void *DrawLineDestBase = DefOutBuff;\r
int DrawLineDestIncrement;\r
\r
-static int HighCacheA[41+1]; // caches for high layers\r
-static int HighCacheB[41+1];\r
+static int HighCacheA[41*2+1]; // caches for high layers\r
+static int HighCacheB[41*2+1];\r
static int HighPreSpr[80*2+1]; // slightly preprocessed sprites\r
\r
unsigned int VdpSATCache[128]; // VDP sprite cache (1st 32 sprite attr bits)\r
int tilex,dx,ty,code=0,addr=0,cells;\r
int oldcode=-1,blank=-1; // The tile we know is blank\r
int pal=0;\r
+ unsigned int pack = 0;\r
\r
// Draw tiles across screen:\r
tilex=((-ts->hscroll)>>3)+cellskip;\r
\r
for (; cells > 0; dx+=8, tilex++, cells--)\r
{\r
- unsigned int pack;\r
-\r
code = PicoMem.vram[ts->nametab + (tilex & ts->xmask)];\r
- if ((code >> 15) | (lflags & LF_FORCE)) { // high priority tile\r
- int cval = code | (dx<<16) | (ty<<25);\r
- if(code&0x1000) cval^=7<<26;\r
- *ts->hc++ = cval; // cache it\r
- continue;\r
- }\r
- if (code == blank)\r
- continue;\r
\r
if (code!=oldcode) {\r
oldcode = code;\r
- // Get tile address/2:\r
- addr=(code&0x7ff)<<4;\r
- addr+=ty;\r
- if (code&0x1000) addr^=0xe; // Y-flip\r
\r
- pal=((code>>9)&0x30)|((lflags&LF_SH)<<6); // shadow\r
+ pack = 0;\r
+ if (code != blank) {\r
+ // Get tile address/2:\r
+ addr=(code&0x7ff)<<4;\r
+ addr+=ty;\r
+ if (code&0x1000) addr^=0xe; // Y-flip\r
+\r
+ pal=((code>>9)&0x30)|((lflags&LF_SH)<<6); // shadow\r
+\r
+ pack = *(unsigned int *)(PicoMem.vram + addr);\r
+ if (!pack)\r
+ blank = code;\r
+ }\r
}\r
\r
- pack = *(unsigned int *)(PicoMem.vram + addr);\r
- if (!pack) {\r
- blank = code;\r
+ if ((code >> 15) | (lflags & LF_FORCE)) { // high priority tile\r
+ if ((lflags&LF_SH) | (code!=blank)) {\r
+ int cval = code | (dx<<16) | (ty<<25);\r
+ if (code&0x1000) cval^=0xe<<25;\r
+ *ts->hc++ = cval, *ts->hc++ = pack; // cache it\r
+ }\r
continue;\r
}\r
+ if (code == blank)\r
+ continue;\r
\r
if (code & 0x0800) TileFlip(pd + dx, pack, pal);\r
else TileNorm(pd + dx, pack, pal);\r
}\r
\r
code=PicoMem.vram[ts->nametab+nametabadd+(tilex&ts->xmask)];\r
- if (code>>15) { // high priority tile\r
- int cval = code | (dx<<16) | (ty<<25);\r
- if(code&0x1000) cval^=7<<26;\r
- *ts->hc++ = cval; // cache it\r
- continue;\r
- }\r
- if ((code<<16|ty)==blank) continue;\r
-\r
if (code!=oldcode) {\r
oldcode = code;\r
// Get tile address/2:\r
- addr=(code&0x7ff)<<4;\r
+ addr = (code&0x7ff)<<4;\r
\r
- pal=((code>>9)&0x30)|((plane_sh&LF_SH)<<6); // shadow\r
+ pal = ((code>>9)&0x30)|((plane_sh&LF_SH)<<6); // shadow\r
}\r
+ code |= ty<<16;\r
\r
if (code & 0x1000) ty ^= 0xe; // Y-flip\r
pack = *(unsigned int *)(PicoMem.vram + addr+ty);\r
+ if (!pack)\r
+ blank = code;\r
\r
- if (!pack) {\r
- blank = code<<16|ty;\r
+ if ((code >> 15) | (plane_sh & LF_FORCE)) { // high priority tile\r
+ if ((plane_sh&LF_SH) | (code!=blank)) {\r
+ int cval = code | (dx<<16) | (ty<<25);\r
+ *ts->hc++ = cval, *ts->hc++ = pack; // cache it\r
+ }\r
continue;\r
}\r
+ if (code == blank) continue;\r
\r
if (code & 0x0800) TileFlip(pd + dx, pack, pal);\r
else TileNorm(pd + dx, pack, pal);\r
int tilex=0,dx=0,ty=0,code=0,addr=0,cells;\r
int oldcode=-1,blank=-1; // The tile we know is blank\r
int pal=0;\r
+ unsigned int pack = 0;\r
\r
// Draw tiles across screen:\r
tilex=(-ts->hscroll)>>3;\r
\r
for (; cells; dx+=8,tilex++,cells--)\r
{\r
- unsigned int pack;\r
-\r
code = PicoMem.vram[ts->nametab + (tilex & ts->xmask)];\r
- if (code>>15) { // high priority tile\r
- int cval = (code&0xfc00) | (dx<<16) | (ty<<25);\r
- cval|=(code&0x3ff)<<1;\r
- if(code&0x1000) cval^=0xf<<26;\r
- *ts->hc++ = cval; // cache it\r
- continue;\r
- }\r
- if (code==blank) continue;\r
\r
if (code!=oldcode) {\r
oldcode = code;\r
- // Get tile address/2:\r
- addr=(code&0x3ff)<<5;\r
- if (code&0x1000) addr+=30-ty; else addr+=ty; // Y-flip\r
\r
- pal=((code>>9)&0x30)|((plane_sh&LF_SH)<<6); // shadow\r
+ pack = 0;\r
+ if (code != blank) {\r
+ // Get tile address/2:\r
+ addr = (code&0x3ff)<<5;\r
+ if (code&0x1000) addr+=30-ty; else addr+=ty; // Y-flip\r
+\r
+ pal = ((code>>9)&0x30)|((plane_sh&LF_SH)<<6); // shadow\r
+\r
+ pack = *(unsigned int *)(PicoMem.vram + addr);\r
+ if (!pack)\r
+ blank = code;\r
+ }\r
}\r
\r
- pack = *(unsigned int *)(PicoMem.vram + addr);\r
- if (!pack) {\r
- blank = code;\r
+ if ((code >> 15) | (plane_sh & LF_FORCE)) { // high priority tile\r
+ if ((plane_sh&LF_SH) | (code!=blank)) {\r
+ int cval = (code&0xfc00) | (dx<<16) | (ty<<25);\r
+ cval|=(code&0x3ff)<<1;\r
+ if (code&0x1000) cval^=0x1e<<25;\r
+ *ts->hc++ = cval, *ts->hc++ = pack; // cache it\r
+ }\r
continue;\r
}\r
+ if (code == blank)\r
+ continue;\r
\r
if (code & 0x0800) TileFlip(pd + dx, pack, pal);\r
else TileNorm(pd + dx, pack, pal);\r
\r
tilex=tstart<<1;\r
\r
- if (prio && !(est->rendstatus & PDRAW_WND_HIGH_PRIO)) {\r
+ if (prio && !(est->rendstatus & PDRAW_WND_DIFF_PRIO)) {\r
// all tiles processed in low prio pass\r
return;\r
}\r
\r
code = PicoMem.vram[nametab + tilex];\r
if ((code>>15) != prio) {\r
- est->rendstatus |= PDRAW_WND_HIGH_PRIO;\r
+ est->rendstatus |= PDRAW_WND_DIFF_PRIO;\r
continue;\r
}\r
if (code==blank) continue;\r
\r
code = PicoMem.vram[nametab + tilex];\r
if((code>>15) != prio) {\r
- est->rendstatus |= PDRAW_WND_HIGH_PRIO;\r
+ est->rendstatus |= PDRAW_WND_DIFF_PRIO;\r
continue;\r
}\r
\r
static void DrawTilesFromCache(int *hc, int sh, int rlim, struct PicoEState *est)\r
{\r
unsigned char *pd = Pico.est.HighCol;\r
- int code, addr, dx;\r
+ int code, dx;\r
unsigned int pack;\r
int pal;\r
\r
if (!sh)\r
{\r
while ((code=*hc++)) {\r
- // Get tile address/2:\r
- addr = (code & 0x7ff) << 4;\r
- addr += (unsigned int)code >> 25; // y offset into tile\r
-\r
- pack = *(unsigned int *)(PicoMem.vram + addr);\r
+ pack = *hc++;\r
if (!pack)\r
continue;\r
\r
while ((code=*hc++)) {\r
unsigned char *zb;\r
\r
- // Get tile address/2:\r
- addr=(code&0x7ff)<<4;\r
- addr+=(unsigned int)code>>25; // y offset into tile\r
- dx=(code>>16)&0x1ff;\r
+ dx = (code >> 16) & 0x1ff;\r
zb = est->HighCol+dx;\r
*zb++ &= 0x7f; *zb++ &= 0x7f; *zb++ &= 0x7f; *zb++ &= 0x7f;\r
*zb++ &= 0x7f; *zb++ &= 0x7f; *zb++ &= 0x7f; *zb++ &= 0x7f;\r
\r
- pack = *(unsigned int *)(PicoMem.vram + addr);\r
+ pack = *hc++;\r
if (!pack)\r
continue;\r
\r
// check if it is on this line\r
sy = (code&0x3ff)-0x100;\r
height = (((code>>24)&3)+1)<<4;\r
- if(sline < sy || sline >= sy+height) goto nextsprite; // no\r
+ if((sline < sy) | (sline >= sy+height)) goto nextsprite; // no\r
\r
// check if sprite is not hidden offscreen\r
sx = (sx>>16)&0x1ff;\r
sx -= 0x78; // Get X coordinate + 8\r
- if(sx <= -8*3 || sx >= 328) goto nextsprite;\r
+ if((sx <= -8*3) | (sx >= 328)) goto nextsprite;\r
\r
// sprite is good, save it's pointer\r
sprites[i++]=sprite;\r
t |= (t >> 4) & 0x08610861;\r
dpal[0x40/2 + i] = t;\r
}\r
- // pixels in color 14 always appear normal (hw bug?)\r
+ // shadowed pixels in color 14 always appear normal (hw bug?)\r
unsigned short *hpal = est->HighPal;\r
- hpal[0x80 + 0x0e] = hpal[0x40 + 0x0e] = hpal[0x0e];\r
- hpal[0x80 + 0x1e] = hpal[0x40 + 0x1e] = hpal[0x1e];\r
- hpal[0x80 + 0x2e] = hpal[0x40 + 0x2e] = hpal[0x2e];\r
+ hpal[0x80 + 0x0e] = hpal[0x0e];\r
+ hpal[0x80 + 0x1e] = hpal[0x1e];\r
+ hpal[0x80 + 0x2e] = hpal[0x2e];\r
}\r
}\r
\r
for (i = 0; i < 0x40 / 2; i++) {\r
t = spal[i];\r
#ifdef USE_BGR555\r
- t = ((t & 0x0e000e00)<< 3) | ((t & 0x00e000e0)<<2) | ((t & 0x000e000e)<<1);\r
+ t = ((t & 0x000e000e)<< 1) | ((t & 0x00e000e0)<<3) | ((t & 0x0e000e00)<<4);\r
#else\r
t = ((t & 0x000e000e)<<12) | ((t & 0x00e000e0)<<3) | ((t & 0x0e000e00)>>7);\r
#endif\r
}\r
// pixels in color 14 always appear normal (hw bug?)\r
unsigned short *hpal = est->HighPal;\r
- hpal[0x80 + 0x0e] = hpal[0x40 + 0x0e] = hpal[0x0e];\r
- hpal[0x80 + 0x1e] = hpal[0x40 + 0x1e] = hpal[0x1e];\r
- hpal[0x80 + 0x2e] = hpal[0x40 + 0x2e] = hpal[0x2e];\r
+ hpal[0x80 + 0x0e] = hpal[0x0e];\r
+ hpal[0x80 + 0x1e] = hpal[0x1e];\r
+ hpal[0x80 + 0x2e] = hpal[0x2e];\r
}\r
}\r
\r
if (Pico.m.dirtyPal == 1)\r
{\r
// a hack for mid-frame palette changes\r
- if (!(est->rendstatus & PDRAW_SONIC_MODE) || line - dirty_line > 4) {\r
+ if (!(est->rendstatus & PDRAW_SONIC_MODE) | (line - dirty_line > 4)) {\r
// store a maximum of 2 additional palettes in SonicPal\r
if (est->SonicPalCount < 2)\r
est->SonicPalCount ++;\r
int win=0, edge=0, hvwind=0, lflags;\r
int maxw, maxcells;\r
\r
- est->rendstatus &= ~(PDRAW_SHHI_DONE|PDRAW_PLANE_HI_PRIO|PDRAW_WND_HIGH_PRIO);\r
+ est->rendstatus &= ~(PDRAW_SHHI_DONE|PDRAW_PLANE_HI_PRIO|PDRAW_WND_DIFF_PRIO);\r
\r
if (pvid->reg[12]&1) {\r
maxw = 328; maxcells = 40;\r
#if 0\r
{\r
int *c, a, b;\r
- for (a = 0, c = HighCacheA; *c; c++, a++);\r
- for (b = 0, c = HighCacheB; *c; c++, b++);\r
+ for (a = 0, c = HighCacheA; *c; c+=2, a++);\r
+ for (b = 0, c = HighCacheB; *c; c+=2, b++);\r
printf("%i:%03i: a=%i, b=%i\n", Pico.m.frame_count,\r
Pico.est.DrawScanline, a, b);\r
}\r
.extern DrawStripInterlace\r
\r
.equ PDRAW_SPRITES_MOVED, (1<<0)\r
-.equ PDRAW_WND_HIGH_PRIO, (1<<1)\r
+.equ PDRAW_WND_DIFF_PRIO, (1<<1)\r
.equ PDRAW_PARSE_SPRITES, (1<<2)\r
.equ PDRAW_DIRTY_SPRITES, (1<<4)\r
.equ PDRAW_PLANE_HI_PRIO, (1<<6)\r
add r1, r1, #8\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
beq .DrawStrip_samecode @ we know stuff about this tile already\r
\r
mov r9, r7 @ remember code\r
- orr r10, r10, #1<<21 @ seen non hi-prio tile\r
\r
movs r2, r9, lsl #20 @ if (code&0x1000)\r
mov r2, r2, lsl #1\r
\r
ldr r2, [lr, r2, lsl #1] @ pack=*(unsigned int *)(Pico.vram+addr); // Get 8 pixels\r
\r
- bic r7, r3, #0x7f\r
- and r3, r9, #0x6000\r
- add r3, r7, r3, lsr #9 @ r3=pal=((code&0x6000)>>9);\r
-\r
.DrawStrip_samecode:\r
+ tst r9, #0x8000\r
+ tsteq r10, #1<<20 @ force?\r
+ bne .DrawStrip_hiprio\r
+\r
+ orr r10, r10, #1<<21 @ seen non hi-prio tile\r
tst r2, r2\r
beq .dsloop @ tileline blank\r
\r
+ bic r7, r3, #0x7f\r
+ and r3, r9, #0x6000\r
+ add r3, r7, r3, lsr #9 @ r3=pal=((code&0x6000)>>9);\r
+\r
cmp r2, r2, ror #4\r
beq .DrawStrip_SingleColor @ tileline singlecolor \r
\r
b .dsloop_subr1\r
\r
.DrawStrip_hiprio:\r
- sub r0, r1, r11\r
- orr r7, r7, r0, lsl #16\r
+ tst r10, #(1<<23) @ sh[23]\r
+ tsteq r2, r2 @ if (!sh[23] && code==blank) continue\r
+ beq .dsloop\r
+\r
+@ orr r10, r10, #1<<22 @ hi_not_empty[22]\r
+ sub r7, r1, r11\r
+ orr r7, r9, r7, lsl #16\r
orr r7, r7, r10, lsl #25 @ (ty<<25)\r
- tst r7, #0x1000\r
- eorne r7, r7, #7<<26 @ if(code&0x1000) cval^=7<<26;\r
- str r7, [r6], #4 @ cache hi priority tile\r
- mov r0, #0xf\r
+ tst r9, #0x1000\r
+ eorne r7, r7, #0xe<<25 @ if(code&0x1000) cval^=0xe<<25;\r
+ str r7, [r6], #4 @ cache hi priority tile code\r
+ str r2, [r6], #4 @ cache hi priority tile data\r
b .dsloop\r
\r
.dsloop_exit:\r
orreq r2, r2, #PDRAW_PLANE_HI_PRIO @ had a layer with all hi-prio tiles\r
streq r2, [r1, #OFS_EST_rendstatus]\r
\r
- ldmfd sp!, {r4-r11,lr}\r
- bx lr\r
+ ldmfd sp!, {r4-r11,pc}\r
\r
@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
\r
add r1, r1, #8\r
add r8, r8, #1\r
\r
- tst r7, #0x8000\r
- bne .DrawStrip_vs_hiprio\r
-\r
orr r7, r7, r10, lsl #24 @ code | (ty << 24)\r
cmp r7, r9\r
beq .DrawStrip_vs_samecode @ we know stuff about this tile already\r
\r
mov r9, r7 @ remember code\r
- orr r8, r8, #(1<<24)@ seen non hi-prio tile\r
\r
movs r2, r9, lsl #20 @ if (code&0x1000)\r
mov r2, r2, lsl #1\r
\r
ldr r2, [lr, r2, lsl #1] @ pack=*(unsigned int *)(PicoMem.vram+addr); // Get 8 pixels\r
\r
- bic r7, r3, #0x7f\r
- and r3, r9, #0x6000\r
- add r3, r7, r3, lsr #9 @ r3=pal=((code&0x6000)>>9);\r
-\r
.DrawStrip_vs_samecode:\r
+ tst r9, #0x8000\r
+ tsteq r10, #(1<<20) @ force[20]\r
+ bne .DrawStrip_vs_hiprio\r
+\r
+ orr r8, r8, #(1<<24)@ seen non hi-prio tile\r
tst r2, r2\r
beq .dsloop_vs @ tileline blank\r
\r
+ bic r7, r3, #0x7f\r
+ and r3, r9, #0x6000\r
+ add r3, r7, r3, lsr #9 @ r3=pal=((code&0x6000)>>9);\r
+\r
cmp r2, r2, ror #4\r
beq .DrawStrip_vs_SingleColor @ tileline singlecolor \r
\r
b .dsloop_vs_subr1\r
\r
.DrawStrip_vs_hiprio:\r
- sub r0, r1, r11\r
- orr r7, r7, r0, lsl #16\r
+ tst r10, #(1<<23) @ sh[23]\r
+ tsteq r2, r2 @ if (!sh[23] && code==blank) continue\r
+ beq .dsloop_vs\r
+\r
+@ orr r10, r10, #1<<22 @ hi_not_empty[22]\r
+ sub r7, r1, r11\r
+ orr r7, r9, r7, lsl #16\r
orr r7, r7, r10, lsl #25 @ (ty<<25)\r
- tst r7, #0x1000\r
+ tst r9, #0x1000\r
eorne r7, r7, #7<<26 @ if(code&0x1000) cval^=7<<26;\r
- str r7, [r6], #4 @ cache hi priority tile\r
- mov r0, #0xf\r
+ str r7, [r6], #4 @ cache hi priority tile code\r
+ str r2, [r6], #4 @ cache hi priority tile data\r
b .dsloop_vs\r
\r
.dsloop_vs_exit:\r
orreq r2, r2, #PDRAW_PLANE_HI_PRIO @ had a layer with all hi-prio tiles\r
streq r2, [r1, #OFS_EST_rendstatus]\r
\r
- ldmfd sp!, {r4-r11,lr}\r
- bx lr\r
+ ldmfd sp!, {r4-r11,pc}\r
\r
\r
@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
bl DrawStripInterlace @ struct TileStrip *ts, int plane_sh\r
\r
add sp, sp, #6*4\r
- ldmfd sp!, {r4-r11,lr}\r
- bx lr\r
+ ldmfd sp!, {r4-r11,pc}\r
\r
.pool\r
\r
stmia lr!, {r0-r7}\r
stmia lr!, {r0-r7}\r
\r
- ldmfd sp!, {r4-r9,lr}\r
- bx lr\r
+ ldmfd sp!, {r4-r9,pc}\r
\r
\r
@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
ldr lr, [r3, #OFS_EST_PicoMem_vram]\r
mov r9, r3 @ est\r
\r
- mvn r5, #0 @ r5=prevcode=-1\r
ands r8, r1, #1\r
orr r8, r8, r2, lsl #1\r
bne .dtfc_check_rendflags\r
bic r4, r1, #0xfe00\r
add r1, r11, r4 @ r1=pdest\r
\r
- movs r7, r6, lsl #16\r
- cmp r5, r7, lsr #16\r
- beq .dtfc_samecode @ if (code==prevcode)\r
-\r
- mov r5, r7, lsr #16\r
-\r
- mov r2, r5, lsl #21\r
- mov r2, r2, lsr #17 @ r2=addr=(code&0x7ff)<<4;\r
- add r2, r2, r6, lsr #25 @ addr+=ty\r
+ ldr r2, [r0], #4 @ read pixel data\r
\r
- and r3, r5, #0x6000\r
+ and r3, r6, #0x6000\r
mov r3, r3, lsr #9 @ r3=pal=((code&0x6000)>>9);\r
\r
- ldr r2, [lr, r2, lsl #1] @ pack=*(unsigned int *)(Pico.vram+addr); // Get 8 pixels\r
-\r
-.dtfc_samecode:\r
rsbs r4, r4, r8, lsr #1\r
bmi .dtfc_cut_tile\r
\r
cmp r2, r2, ror #4\r
beq .dtfc_SingleColor @ tileline singlecolor \r
\r
- tst r5, #0x0800\r
+ tst r6, #0x0800\r
bne .dtfc_TileFlip\r
\r
@ (r1=pdest, r2=pixels8, r3=pal) r4: scratch, r12: helper pattern\r
cmp r2, r2, ror #4\r
beq .dtfc_SingleColor @ tileline singlecolor \r
\r
- tst r5, #0x0800\r
+ tst r6, #0x0800\r
bne .dtfc_TileFlipShHP\r
\r
@ (r1=pdest, r2=pixels8, r3=pal) r4: scratch, r12: helper pattern\r
mov r12,#0xf<<28\r
mov r12,r12,asr r4\r
mov r2, r2, ror #16\r
- tst r5, #0x0800 @ flipped?\r
+ tst r6, #0x0800 @ flipped?\r
mvnne r12,r12\r
and r2, r2, r12\r
mov r2, r2, ror #16\r
bne .dtfc_shadow\r
tst r2, r2\r
beq .dtfc_loop\r
- tst r5, #0x0800\r
+ tst r6, #0x0800\r
beq .dtfc_TileNorm\r
b .dtfc_TileFlip\r
\r
@ fetch the first code now\r
ldrh r7, [lr, r12]\r
\r
- ands r6, r6, #PDRAW_WND_HIGH_PRIO\r
- cmpeq r2, #1 @ prio && !(rendstatus & WND_HIGH_PRIO)?\r
+ ands r6, r6, #PDRAW_WND_DIFF_PRIO\r
+ cmpeq r2, #1 @ prio && !(rendstatus & WND_DIFF_PRIO)?\r
ldmeqfd sp!, {r4-r11,pc} @ yes, assume that whole window uses same priority\r
\r
orr r6, r6, r2\r
\r
eor r5, r6, r7, lsr #15\r
tst r5, #1\r
- orrne r6, r6, #PDRAW_WND_HIGH_PRIO @ wrong pri\r
+ orrne r6, r6, #PDRAW_WND_DIFF_PRIO @ wrong pri\r
bne .dwloop\r
\r
cmp r7, r9\r
b .dw_shadow_done\r
\r
.dwloop_end:\r
- and r2, r6, #PDRAW_WND_HIGH_PRIO\r
+ and r2, r6, #PDRAW_WND_DIFF_PRIO\r
ldmfd sp!, {r4-r11,lr}\r
ldr r0, [sp]\r
ldr r1, [r0, #OFS_EST_rendstatus]\r
orr r8, r8, #0x0800\r
orr r8, r8, r8, lsl #16\r
vidConvCpyRGB565_local\r
- ldmfd sp!, {r4-r9,lr}\r
- bx lr\r
+ ldmfd sp!, {r4-r9,pc}\r
\r
\r
@ void PicoDoHighPal555(int sh, int line, struct PicoEState *est)\r
stmia r4!, {r1,r6}\r
bne .fl_loopcpRGB555_sh\r
\r
- @ fixup color 14 in palette 0,1,2 (always normal)\r
+ @ fixup shadowed color 14 in palette 0,1,2 (always normal)\r
sub r4, r3, #0x40*2\r
ldrh r1, [r4, #0x0e*2] @ 0x0e, 0x1e, 0x2e\r
ldrh r5, [r4, #0x1e*2]\r
ldrh r6, [r4, #0x2e*2]\r
- strh r1, [r3, #0x0e*2] @ 0x4e, 0x5e, 0x6e\r
- strh r5, [r3, #0x1e*2]\r
- strh r6, [r3, #0x2e*2]\r
strh r1, [r3, #0x4e*2] @ 0x8e, 0x9e, 0xae\r
strh r5, [r3, #0x5e*2]\r
strh r6, [r3, #0x6e*2]\r
stmia r0!, {r4,r5,r8,r12}\r
bne .fl_loopRGB555\r
\r
- ldmfd sp!, {r4-r10,lr}\r
- bx lr\r
+ ldmfd sp!, {r4-r10,pc}\r
\r
\r
.fl_32scale_RGB555:\r
stmia r0!, {r4,r5,r6,r8,r10}\r
bne .fl_loop32scale_RGB555\r
\r
- ldmfd sp!, {r4-r10,lr}\r
- bx lr\r
+ ldmfd sp!, {r4-r10,pc}\r
\r
#ifdef UNALIGNED_DRAWLINEDEST\r
@ unaligned versions of loops\r
\r
strh r8, [r0], #2\r
\r
- ldmfd sp!, {r4-r10,lr}\r
- bx lr\r
+ ldmfd sp!, {r4-r10,pc}\r
\r
\r
.fl_32scale_RGB555u:\r
\r
strh r4, [r0], #2\r
\r
- ldmfd sp!, {r4-r10,lr}\r
- bx lr\r
+ ldmfd sp!, {r4-r10,pc}\r
\r
#endif /* UNALIGNED_DRAWLINEDEST */\r
\r