From: kub Date: Tue, 18 Jun 2024 20:45:02 +0000 (+0200) Subject: core vdp, arm rendering fix (1st window col prio) X-Git-Tag: v2.00~31 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbb9a09837d9ff8930757ef6d4b102eeafb212ef;p=picodrive.git core vdp, arm rendering fix (1st window col prio) --- diff --git a/pico/draw.c b/pico/draw.c index 1b4ceb3c..7c170baf 100644 --- a/pico/draw.c +++ b/pico/draw.c @@ -566,7 +566,7 @@ static void DrawLayer(int plane_sh, u32 *hcache, int cellskip, int maxcells, ts.nametab+=(ts.line>>4)<reg[11]&4) { + } else if (pvid->reg[11]&4) { // shit, we have 2-cell column based vscroll // luckily this doesn't happen too often ts.line=ymask|(shift[width]<<24); // save some stuff instead of line diff --git a/pico/draw_arm.S b/pico/draw_arm.S index c01439aa..37617b91 100644 --- a/pico/draw_arm.S +++ b/pico/draw_arm.S @@ -461,7 +461,6 @@ DrawLayer: subs r10,r10, #0x01000000 bmi .dsloop_exit -.dsloop_enter: and r7, r5, r8 add r7, lr, r7, lsl #1 @ Pico.vram+((tilex&ts->xmask) as halfwords) ldrh r7, [r7, r12] @ r7=code (int, but from unsigned, no sign extend) @@ -1385,6 +1384,9 @@ DrawWindow: and r10, r10, #7 mov r10, r10, lsl #1 @ r10=ty + ldr r6, [r11, #OFS_EST_rendstatus] + ldr lr, [r11, #OFS_EST_PicoMem_vram] + mov r12, r12, lsl #10 tst r4, #1 @ 40 cell mode? @@ -1394,12 +1396,6 @@ DrawWindow: addeq r12, r12, r5, lsl #6 @ nametab add r12, r12, r0, lsl #2 @ +starttile - ldr lr, [r11, #OFS_EST_PicoMem_vram] - ldr r6, [r11, #OFS_EST_rendstatus] - - @ fetch the first code now - ldrh r7, [lr, r12] - ands r6, r6, #PDRAW_WND_DIFF_PRIO cmpeq r2, #1 @ prio && !(rendstatus & WND_DIFF_PRIO)? ldmeqfd sp!, {r4-r11,pc} @ yes, assume that whole window uses same priority @@ -1412,20 +1408,18 @@ DrawWindow: @ cache some stuff to avoid mem access ldr r11, [r11, #OFS_EST_HighCol] mov r8, r8, lsl #1 @ cells - add r11,r11,#8 mvn r9, #0 @ r9=prevcode=-1 - add r1, r11, r0, lsl #4 @ r1=pdest + add r1, r11, r0, lsl #4 @ r1=pdest=HighCol+starttile (+8 added in loop) mov r0, #0xf - b .dwloop_enter @ r4,r5 are scratch in this loop .dwloop: add r1, r1, #8 .dwloop_nor1: - add r12, r12, #2 @ halfwords ldrh r7, [lr, r12] @ r7=code (int, but from unsigned, no sign extend) + add r12, r12, #2 @ halfwords subs r8, r8, #1 - beq .dwloop_end @ done + bmi .dwloop_end @ done eor r5, r6, r7, lsr #15 tst r5, #1 @@ -1435,7 +1429,6 @@ DrawWindow: cmp r7, r9 beq .dw_samecode @ we know stuff about this tile already -.dwloop_enter: mov r9, r7 @ remember code movs r2, r9, lsl #20 @ if (code&0x1000)