else
lines = 262;
- z80_resetCycles();
+ z80_resetCycles(Pico.t.z80c_aim);
PsndStartFrame();
if (/*Pico.m.z80Run &&*/ !Pico.m.z80_reset && (PicoIn.opt&POPT_EN_Z80)) {
memset(&Pico.m,0,sizeof(Pico.m));\r
memset(&Pico.t,0,sizeof(Pico.t));\r
\r
- z80_reset();\r
-\r
// my MD1 VA6 console has this in IO\r
PicoMem.ioports[1] = PicoMem.ioports[2] = PicoMem.ioports[3] = 0xff;\r
\r
\r
memset(&PicoIn.padInt, 0, sizeof(PicoIn.padInt));\r
\r
+ z80_reset();\r
if (PicoIn.AHW & PAHW_SMS) {\r
PicoResetMS();\r
return 0;\r
skip = PicoIn.skipFrame;
+ z80_resetCycles(cycles_68k_to_z80(Pico.t.m68c_aim - Pico.t.m68c_frame_start));
Pico.t.m68c_frame_start = Pico.t.m68c_aim;
- z80_resetCycles();
PsndStartFrame();
hint = pv->hint_cnt;
\r
#define Z80_STATE_SIZE 0x60\r
\r
-#define z80_resetCycles() \\r
- Pico.t.z80c_cnt -= Pico.t.z80c_aim, Pico.t.z80c_aim = Pico.t.z80_scanline = 0\r
+#define z80_resetCycles(aim) \\r
+ Pico.t.z80c_cnt -= (aim < Pico.t.z80c_cnt ? aim : Pico.t.z80c_cnt), Pico.t.z80c_aim = Pico.t.z80_scanline = 0\r
\r
#define z80_cyclesDone() \\r
(Pico.t.z80c_aim - z80_cyclesLeft)\r
int nmi;
int y;
- z80_resetCycles();
+ z80_resetCycles(Pico.t.z80c_aim);
PsndStartFrame();
// for SMS the pause button generates an NMI, for GG ths is not the case