//if((cell&1)==0)\r
{\r
int line,vscroll;\r
- vscroll=PicoMem.vsram[(plane_sh&1)+(cell&~1)];\r
+ vscroll=PicoMem.vsram[(plane_sh&1)+(cell&0x3e)];\r
\r
// Find the line in the name table\r
line=(vscroll+scan)&ts->line&0xffff; // ts->line is really ymask ..\r
// shit, we have 2-cell column based vscroll\r
// luckily this doesn't happen too often\r
ts.line=ymask|(shift[width]<<24); // save some stuff instead of line\r
+ PicoMem.vsram[(plane_sh & 1)+0x3e] = PicoMem.vsram[0x27]; // XXX really?\r
DrawStripVSRam(&ts, plane_sh, cellskip);\r
} else {\r
vscroll = PicoMem.vsram[plane_sh & 1]; // Get vertical scroll value\r
\r
if (entry+1 == cnt) width = p[entry+1]; // last sprite width limited?\r
mp = mb+(sx>>3);\r
- for (m = *mp << 8; width; width--, sx+=8, *mp++ = m, tile+=delta)\r
+ for (m = *mp; width; width--, sx+=8, *mp++ = m, m >>= 8, tile+=delta)\r
{\r
unsigned int pack;\r
\r
\r
pack = *(unsigned int *)(PicoMem.vram + (tile & 0x7fff));\r
\r
- m = (m >> 8) | mp[1] << 8; // next mask byte\r
+ m |= mp[1] << 8; // next mask byte\r
// shift mask bits to bits 8-15 for easier load/store handling\r
m = fTileFunc(pd + sx, m << (8-(sx&0x7)), pack, pal) >> (8-(sx&0x7));\r
} \r
- *mp = m >> 8; // write last mask byte\r
+ *mp = m; // write last mask byte\r
}\r
}\r
\r
int win=0, edge=0, hvwind=0, lflags;\r
int maxw, maxcells;\r
\r
- if (!(est->DrawScanline & 15) ||\r
- (est->rendstatus & (PDRAW_SPRITES_MOVED|PDRAW_DIRTY_SPRITES)))\r
- PrepareSprites((est->DrawScanline+16) & ~15);\r
-\r
est->rendstatus &= ~(PDRAW_SPRITES_MOVED|PDRAW_DIRTY_SPRITES);\r
est->rendstatus &= ~(PDRAW_SHHI_DONE|PDRAW_PLANE_HI_PRIO);\r
\r
if (to > 223)\r
to = 223;\r
}\r
+ if (Pico.est.DrawScanline <= to - blank_last_line)\r
+ PrepareSprites(to - blank_last_line + 1);\r
\r
for (line = Pico.est.DrawScanline; line < to; line++)\r
PicoLine(line, offs, sh, bgc);\r