static int HighCache2A[41*(TILE_ROWS+1)+1+1]; // caches for high layers\r
static int HighCache2B[41*(TILE_ROWS+1)+1+1];\r
\r
-unsigned short *PicoCramHigh=Pico.cram; // pointer to CRAM buff (0x40 shorts), converted to native device color (works only with 16bit for now)\r
+unsigned short *PicoCramHigh=PicoMem.cram; // pointer to CRAM buff (0x40 shorts), converted to native device color (works only with 16bit for now)\r
void (*PicoPrepareCram)()=0; // prepares PicoCramHigh for renderer to use\r
\r
\r
int i;\r
\r
for(i=8; i; i--, addr+=2, pd += LINE_WIDTH) {\r
- pack=*(unsigned int *)(Pico.vram+addr); // Get 8 pixels\r
+ pack=*(unsigned int *)(PicoMem.vram+addr); // Get 8 pixels\r
if(!pack) continue;\r
\r
t=pack&0x0000f000; if (t) pd[0]=(unsigned char)((t>>12)|pal);\r
int i;\r
\r
for(i=8; i; i--, addr+=2, pd += LINE_WIDTH) {\r
- pack=*(unsigned int *)(Pico.vram+addr); // Get 8 pixels\r
+ pack=*(unsigned int *)(PicoMem.vram+addr); // Get 8 pixels\r
if(!pack) continue;\r
\r
t=pack&0x000f0000; if (t) pd[0]=(unsigned char)((t>>16)|pal);\r
\r
addr+=14;\r
for(i=8; i; i--, addr-=2, pd += LINE_WIDTH) {\r
- pack=*(unsigned int *)(Pico.vram+addr); // Get 8 pixels\r
+ pack=*(unsigned int *)(PicoMem.vram+addr); // Get 8 pixels\r
if(!pack) continue;\r
\r
t=pack&0x0000f000; if (t) pd[0]=(unsigned char)((t>>12)|pal);\r
\r
addr+=14;\r
for(i=8; i; i--, addr-=2, pd += LINE_WIDTH) {\r
- pack=*(unsigned int *)(Pico.vram+addr); // Get 8 pixels\r
+ pack=*(unsigned int *)(PicoMem.vram+addr); // Get 8 pixels\r
if(!pack) continue;\r
\r
t=pack&0x000f0000; if (t) pd[0]=(unsigned char)((t>>16)|pal);\r
nametab += nametab_step*start;\r
\r
// check priority\r
- code=Pico.vram[nametab+tile_start];\r
+ code=PicoMem.vram[nametab+tile_start];\r
if ((code>>15) != prio) return; // hack: just assume that whole window uses same priority\r
\r
scrpos+=8*LINE_WIDTH+8;\r
// unsigned short *pal=NULL;\r
unsigned char pal;\r
\r
- code=Pico.vram[nametab+tilex];\r
+ code=PicoMem.vram[nametab+tilex];\r
if (code==blank) continue;\r
\r
// Get tile address/2:\r
\r
if(!(pvid->reg[11]&3)) { // full screen scroll\r
// Get horizontal scroll value\r
- hscroll=Pico.vram[htab&0x7fff];\r
+ hscroll=PicoMem.vram[htab&0x7fff];\r
htab = 0; // this marks that we don't have to update scroll value\r
}\r
\r
scrpos+=8*LINE_WIDTH*(planestart-START_ROW);\r
\r
// Get vertical scroll value:\r
- vscroll=Pico.vsram[plane]&0x1ff;\r
+ vscroll=PicoMem.vsram[plane]&0x1ff;\r
scrpos+=(8-(vscroll&7))*LINE_WIDTH;\r
if(vscroll&7) planeend++; // we have vertically clipped tiles due to vscroll, so we need 1 more row\r
\r
if(htab) {\r
int htaddr=htab+(trow<<4);\r
if(trow) htaddr-=(vscroll&7)<<1;\r
- hscroll=Pico.vram[htaddr&0x7fff];\r
+ hscroll=PicoMem.vram[htaddr&0x7fff];\r
}\r
\r
// Draw tiles across screen:\r
// unsigned short *pal=NULL;\r
unsigned char pal;\r
\r
- code=Pico.vram[nametab_row+(tilex&xmask)];\r
+ code=PicoMem.vram[nametab_row+(tilex&xmask)];\r
if (code==blank) continue;\r
\r
if (code>>15) { // high priority tile\r
unsigned int *sprite=NULL;\r
int code, code2, sx, sy, height;\r
\r
- sprite=(unsigned int *)(Pico.vram+((table+(link<<2))&0x7ffc)); // Find sprite\r
+ sprite=(unsigned int *)(PicoMem.vram+((table+(link<<2))&0x7ffc)); // Find sprite\r
\r
// get sprite info\r
code = sprite[0];\r