core, fix z80 irq handling, reset defaults (cz80, drz80)

This commit is contained in:
kub 2024-02-22 21:01:37 +01:00
parent bfe516c3a9
commit ad43165afc
6 changed files with 35 additions and 40 deletions

View file

@ -212,6 +212,8 @@ void Cz80_Reset(cz80_struc *CPU)
{
// I, R, CPU and interrupts logic is reset, registers are untouched
memset(&CPU->R, 0, (FPTR)&CPU->BasePC - (FPTR)&CPU->R);
Cz80_Set_Reg(CPU, CZ80_FA, 0xffff);
Cz80_Set_Reg(CPU, CZ80_SP, 0xffff);
Cz80_Set_Reg(CPU, CZ80_PC, 0);
}