{\r
if (d)\r
{\r
- Pico.t.z80c_aim = Pico.t.z80c_cnt = z80_cycles_from_68k() + (Pico.t.z80_busdelay >> 8) + 2;\r
+ Pico.t.z80c_aim = Pico.t.z80c_cnt = z80_cycles_from_68k() + 2;\r
+ Pico.t.z80c_cnt += Pico.t.z80_busdelay >> 8;\r
Pico.t.z80_busdelay &= 0xff;\r
}\r
else\r
\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() { \\r
+ Pico.t.z80c_cnt -= Pico.t.z80c_aim, Pico.t.z80c_aim = Pico.t.z80_scanline = 0; \\r
+ if (!Pico.m.z80Run | Pico.m.z80_reset) Pico.t.z80c_cnt = 0; \\r
+}\r
\r
#define z80_cyclesDone() \\r
(Pico.t.z80c_aim - z80_cyclesLeft)\r