@ int cells; // 0x14\r
@ };\r
\r
-@ void DrawLayer(int plane_sh, int *hcache, int cellskip, int maxcells,\r
+@ void DrawLayer(int lflags, int *hcache, int cellskip, int maxcells,\r
@ struct PicoEState *est)\r
\r
.global DrawLayer\r
ldrb r7, [r11, #16] @ ??vv??hh\r
\r
mov r6, r1 @ hcache\r
- orr r9, r3, r0, lsl #30\r
- orr r9, r9, r2, lsl #8 @ r9=sh[31]|cellskip[15:8]|maxcells[7:0] (tmp)\r
+ orr r9, r3, r0, lsl #29 @ r9=force[31]|sh[30]|plane[29]\r
+ orr r9, r9, r2, lsl #8 @ |cellskip[15:8]|maxcells[7:0] (tmp)\r
\r
mov r1, r7, lsl #4\r
orr r1, r1, #0x00ff\r
and r1, r1, #7\r
add r7, r1, #1 @ r7=dx=((ts->hscroll-1)&7)+1\r
\r
- tst r9, #1<<31\r
+ movs r3, r9, lsl #1 @ (force[31]|sh[30]) << 1\r
mov r3, #0\r
- orrne r10,r10, #1<<23 @ r10=(cells<<24|sh<<23|hi_not_empty<<22|had_output<<21|ty)\r
- movne r3, #0x40 @ default to shadowed pal on sh mode\r
+ orrmi r10,r10, #1<<23 @ r10=cells[31:24]|sh[23]|hi_not_empty[22]\r
+ orrcs r10,r10, #1<<20 @ |had_output[21]|force[20]|ty[15:0]\r
+ movmi r3, #0x40 @ default to shadowed pal on sh mode\r
\r
cmp r7, #8\r
addne r10,r10, #0x01000000 @ we will loop cells+1 times if there is scroll\r
add r8, r8, #1\r
\r
tst r7, #0x8000\r
+ tsteq r10, #1<<20 @ force?\r
bne .DrawStrip_hiprio\r
\r
cmp r7, r9\r
orr r10, r10, #1<<22\r
\r
.DrawStrip_hiprio:\r
- tst r10, #0x00c00000\r
+ tst r10, #0x00d00000 @ sh[23]|hi_not_empty[22]|force[20]\r
beq .DrawStrip_hiprio_maybempt\r
sub r0, r1, r11\r
orr r7, r7, r0, lsl #16\r
bic r4, r1, #0xfe00\r
add r1, r11, r4 @ r1=pdest\r
\r
- mov r7, r6, lsl #16\r
+ movs r7, r6, lsl #16\r
+ bpl .dtfc_loop @ !(code & 0x8000)\r
cmp r5, r7, lsr #16\r
beq .dtfc_samecode @ if (code==prevcode)\r
\r