core z80, fix cycle counting in reset state

This commit is contained in:
kub 2024-04-12 20:29:50 +02:00
parent c7661b80ef
commit db2b6d9966
5 changed files with 6 additions and 7 deletions

View file

@ -201,8 +201,8 @@ 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(aim) \
Pico.t.z80c_cnt -= (aim < Pico.t.z80c_cnt ? aim : Pico.t.z80c_cnt), Pico.t.z80c_aim = Pico.t.z80_scanline = 0
#define z80_cyclesDone() \
(Pico.t.z80c_aim - z80_cyclesLeft)