core z80, fix cycle counting if z80 in hold on frame change

This commit is contained in:
kub 2024-07-02 22:43:26 +02:00
parent 25559e5417
commit 2f0c5639c1
2 changed files with 6 additions and 3 deletions

View file

@ -201,8 +201,10 @@ extern struct DrZ80 drZ80;
#define Z80_STATE_SIZE 0x60
#define z80_resetCycles() \
Pico.t.z80c_cnt -= Pico.t.z80c_aim, Pico.t.z80c_aim = Pico.t.z80_scanline = 0
#define z80_resetCycles() { \
Pico.t.z80c_cnt -= Pico.t.z80c_aim, Pico.t.z80c_aim = Pico.t.z80_scanline = 0; \
if (!Pico.m.z80Run | Pico.m.z80_reset) Pico.t.z80c_cnt = 0; \
}
#define z80_cyclesDone() \
(Pico.t.z80c_aim - z80_cyclesLeft)