mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-06 15:48:05 -04:00
z80, fix sms interrupt handling in cz80
This commit is contained in:
parent
4b3e9d92e3
commit
80bf9bcce9
5 changed files with 104 additions and 94 deletions
|
@ -686,8 +686,8 @@ OP_CCF:
|
|||
|
||||
OP(0x76): // HALT
|
||||
OP_HALT:
|
||||
CPU->HaltState = 1;
|
||||
goto Cz80_Check_Interrupt;
|
||||
CPU->Status |= CZ80_HALTED;
|
||||
RET(4)
|
||||
|
||||
OP(0xf3): // DI
|
||||
OP_DI:
|
||||
|
@ -709,9 +709,12 @@ OP_EI:
|
|||
zR++;
|
||||
#endif
|
||||
}
|
||||
afterEI = 1;
|
||||
CPU->ExtraCycles += 1 - CPU->ICount;
|
||||
CPU->ICount = 1;
|
||||
if (CPU->IRQState)
|
||||
{
|
||||
CPU->Status |= CZ80_HAS_INT;
|
||||
CPU->ExtraCycles -= CPU->ICount;
|
||||
CPU->ICount = 0;
|
||||
}
|
||||
}
|
||||
else zIFF2 = (1 << 2);
|
||||
goto Cz80_Exec_nocheck;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue