cd: fix yet more desyncs
[picodrive.git] / pico / pico.c
index 4557269..6888080 100644 (file)
@@ -61,6 +61,7 @@ void PicoExit(void)
 void PicoPower(void)\r
 {\r
   Pico.m.frame_count = 0;\r
+  SekCycleCnt = SekCycleAim = 0;\r
 \r
   // clear all memory of the emulated machine\r
   memset(&Pico.ram,0,(unsigned char *)&Pico.rom - Pico.ram);\r
@@ -167,15 +168,15 @@ int PicoReset(void)
   }\r
 \r
   SekReset();\r
+  // ..but do not reset SekCycle* to not desync with addons\r
+\r
   // s68k doesn't have the TAS quirk, so we just globally set normal TAS handler in MCD mode (used by Batman games).\r
   SekSetRealTAS(PicoAHW & PAHW_MCD);\r
-  SekCycleCnt = SekCycleAim = 0;\r
 \r
   Pico.m.dirtyPal = 1;\r
 \r
   Pico.m.z80_bank68k = 0;\r
   Pico.m.z80_reset = 1;\r
-  memset(Pico.zram, 0, sizeof(Pico.zram)); // ??\r
 \r
   PicoDetectRegion();\r
   Pico.video.status = 0x3428 | Pico.m.pal; // 'always set' bits | vblank | collision | pal\r