From eced0190981a424f9910a7052765023474483b33 Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 27 Sep 2017 02:59:50 +0300 Subject: [PATCH] scroll size improvement --- pico/draw.c | 7 +++++-- pico/draw_arm.S | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pico/draw.c b/pico/draw.c index 7b4dd99..2aa37f8 100644 --- a/pico/draw.c +++ b/pico/draw.c @@ -394,8 +394,11 @@ static void DrawLayer(int plane_sh, int *hcache, int cellskip, int maxcells, ts.xmask=(1<1) ymask =0x0ff; + switch (width) { + case 1: ymask &= 0x1ff; break; + case 2: ymask = 0x007; break; + case 3: ymask = 0x0ff; break; + } // Find name table: if (plane_sh&1) ts.nametab=(pvid->reg[4]&0x07)<<12; // B diff --git a/pico/draw_arm.S b/pico/draw_arm.S index 023b0a2..e19abd8 100644 --- a/pico/draw_arm.S +++ b/pico/draw_arm.S @@ -303,7 +303,9 @@ DrawLayer: cmp r10, #1 biclt r1, r1, #0xfc00 biceq r1, r1, #0xfe00 - bicgt r1, r1, #0xff00 @ r1=ymask=(height<<8)|0xff; ...; // Y Mask in pixels + cmp r10, #2 + moveq r1, #0x0007 + movgt r1, #0x00ff @ r1=ymask=(height<<8)|0xff; ...; // Y Mask in pixels add r10, r10, #5 cmp r10, #7 -- 2.39.2