int *hc = ts->hc;\r
int tilex, dx, ty, cells;\r
int oldcode = -1, blank = -1; // The tile we know is blank\r
- unsigned int pal = 0, pack = 0;\r
+ unsigned int pal = 0, pack = 0, sh;\r
\r
// Draw tiles across screen:\r
+ sh = (lflags & LF_SH) << 6; // shadow\r
tilex=((-ts->hscroll)>>3)+cellskip;\r
ty=(ts->line&7)<<1; // Y-Offset into tile\r
dx=((ts->hscroll-1)&7)+1;\r
u32 code = PicoMem.vram[ts->nametab + (tilex & ts->xmask)];\r
// code &= ~force; // forced always draw everything\r
\r
- if (code == blank && !((code & 0x8000) && (lflags & LF_SH)))\r
+ if (code == blank && !((code & 0x8000) && sh))\r
continue;\r
\r
if (code!=oldcode) {\r
u32 addr = ((code&0x7ff)<<4) + ty;\r
if (code & 0x1000) addr ^= 0xe; // Y-flip\r
\r
- pal = ((code>>9)&0x30) | ((lflags&LF_SH)<<6); // shadow\r
+ pal = ((code>>9)&0x30) | sh; // shadow\r
\r
pack = *(unsigned int *)(PicoMem.vram + addr);\r
if (!pack)\r
int *hc = ts->hc;\r
int tilex, dx, ty = 0, addr = 0, cell = 0, nametabadd = 0;\r
int oldcode = -1, blank = -1; // The tile we know is blank\r
- unsigned int pal = 0, scan = Pico.est.DrawScanline;\r
+ unsigned int pal = 0, scan = Pico.est.DrawScanline, sh, plane;\r
\r
// Draw tiles across screen:\r
+ sh = (plane_sh & LF_SH) << 6; // shadow\r
+ plane = (plane_sh & LF_PLANE); // plane to draw\r
tilex=(-ts->hscroll)>>3;\r
dx=((ts->hscroll-1)&7)+1;\r
if (ts->hscroll & 0x0f) {\r
if ((cell&1)==0 || cell<0)\r
{\r
int line,vscroll;\r
- vscroll = PicoMem.vsram[(plane_sh&1) + (cell&0x3e)];\r
+ vscroll = PicoMem.vsram[plane + (cell&0x3e)];\r
\r
// Find the line in the name table\r
line=(vscroll+scan)&ts->line&0xffff; // ts->line is really ymask ..\r
// code &= ~force; // forced always draw everything\r
code |= ty<<16; // add ty since that can change pixel row for every 2nd tile\r
\r
- if (code == blank && !((code & 0x8000) && (plane_sh & LF_SH)))\r
+ if (code == blank && !((code & 0x8000) && sh))\r
continue;\r
\r
if (code!=oldcode) {\r
// Get tile address/2:\r
addr = (code&0x7ff)<<4;\r
\r
- pal = ((code>>9)&0x30) | ((plane_sh&LF_SH)<<6); // shadow\r
+ pal = ((code>>9)&0x30) | sh; // shadow\r
}\r
\r
pack = (code & 0x1000 ? ty^0xe : ty); // Y-flip\r
int *hc = ts->hc;\r
int tilex = 0, dx = 0, ty = 0, cells;\r
int oldcode = -1, blank = -1; // The tile we know is blank\r
- unsigned int pal = 0, pack = 0;\r
+ unsigned int pal = 0, pack = 0, sh;\r
\r
// Draw tiles across screen:\r
+ sh = (plane_sh & LF_SH) << 6; // shadow\r
tilex=(-ts->hscroll)>>3;\r
ty=(ts->line&15)<<1; // Y-Offset into tile\r
dx=((ts->hscroll-1)&7)+1;\r
u32 addr = ((code&0x3ff)<<5) + ty;\r
if (code & 0x1000) addr ^= 0x1e; // Y-flip\r
\r
- pal = ((code>>9)&0x30) | ((plane_sh&LF_SH)<<6); // shadow\r
+ pal = ((code>>9)&0x30) | sh; // shadow\r
\r
pack = *(unsigned int *)(PicoMem.vram + addr);\r
if (!pack)\r
unsigned char *pd = Pico.est.HighCol;\r
int tilex, dx, ty=0, code=0, addr=0, cell=0, nametabadd=0;\r
int oldcode=-1;\r
- int pal=0,scan=Pico.est.DrawScanline;\r
+ int pal=0, scan=Pico.est.DrawScanline, plane;\r
\r
// Draw tiles across screen:\r
+ plane = plane_sh & LF_PLANE;\r
tilex=(-ts->hscroll)>>3;\r
dx=((ts->hscroll-1)&7)+1;\r
if (ts->hscroll & 0x0f) {\r
if ((cell&1)==0 || cell<0)\r
{\r
int line,vscroll;\r
- vscroll = PicoMem.vsram[(plane_sh&1)+(cell&0x3e)];\r
+ vscroll = PicoMem.vsram[plane + (cell&0x3e)];\r
\r
// Find the line in the name table\r
line=(vscroll+scan)&ts->line&0xffff; // ts->line is really ymask ..\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[0x0e];\r
hpal[0x80 + 0x1e] = hpal[0x1e];\r