void PicoVideoInit(void);\r
void PicoVideoSave(void);\r
void PicoVideoLoad(void);\r
-void PicoVideoCacheSAT(void);\r
+void PicoVideoCacheSAT(int load);\r
\r
// misc.c\r
PICO_INTERNAL_ASM void memcpy16bswap(unsigned short *dest, void *src, int count);\r
char buff[8];\r
\r
if (PicoIn.AHW & PAHW_32X)\r
- to_find += 2;\r
+ to_find += 3;\r
\r
g_read_offs = 0;\r
CHECKED_READ(8, buff);\r
case CHUNK_DRAM:\r
if (Pico32xMem != NULL)\r
CHECKED_READ_BUFF(Pico32xMem->dram);\r
+ found++;\r
break;\r
\r
case CHUNK_32XPAL:\r
if (Pico32xMem != NULL)\r
CHECKED_READ_BUFF(Pico32xMem->pal);\r
+ found++;\r
Pico32x.dirty_pal = 1;\r
break;\r
\r
case CHUNK_32XSYS:\r
CHECKED_READ_BUFF(Pico32x);\r
+ found++;\r
break;\r
#endif\r
default:\r
}\r
areaClose(afile);\r
\r
- PicoVideoCacheSAT();\r
+ PicoVideoCacheSAT(1);\r
+ Pico.est.rendstatus = -1;\r
return 0;\r
}\r
\r
memcpy(VdpSATCache, t->satcache, sizeof(VdpSATCache));\r
memcpy(&Pico.video, &t->video, sizeof(Pico.video));\r
Pico.m.dirtyPal = 1;\r
+ PicoVideoCacheSAT(0);\r
\r
#ifndef NO_32X\r
if (PicoIn.AHW & PAHW_32X) {\r
return d;\r
}\r
\r
-void PicoVideoCacheSAT(void)\r
+void PicoVideoCacheSAT(int load)\r
{\r
struct PicoVideo *pv = &Pico.video;\r
int l;\r
SATaddr &= ~0x200, SATmask &= ~0x200; // H40, zero lowest SAT bit\r
\r
// rebuild SAT cache XXX wrong since cache and memory can differ\r
- for (l = 0; l < 80; l++) {\r
+ for (l = 0; load && l < 80; l++) {\r
((u16 *)VdpSATCache)[l*2 ] = PicoMem.vram[(SATaddr>>1) + l*4 ];\r
((u16 *)VdpSATCache)[l*2 + 1] = PicoMem.vram[(SATaddr>>1) + l*4 + 1];\r
}\r
}\r
if (vf->fifo_ql)\r
pv->status |= SR_DMA;\r
- PicoVideoCacheSAT();\r
+ PicoVideoCacheSAT(1);\r
}\r
// vim:shiftwidth=2:ts=2:expandtab\r