Actually use IZ80ALink's IRQ/NMI/IRQACK callbacks

This commit is contained in:
CasualPokePlayer 2024-09-07 16:49:39 -07:00
parent f6ce041ccf
commit 16d51b429d
2 changed files with 3 additions and 10 deletions

View File

@ -36,13 +36,6 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
}
}
public Action IRQCallback = () => {};
public Action NMICallback = () => {};
// this will be a few cycles off for now
// it should suffice for now until Alyosha returns from hiatus
public Action IRQACKCallback = () => {};
private void NMI_()
{
PopulateCURINSTR

View File

@ -716,7 +716,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
break;
case IORQ:
IRQACKCallback();
_link.IRQACKCallback();
break;
}
@ -742,7 +742,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
iff2 = iff1;
iff1 = false;
NMI_();
NMICallback();
_link.NMICallback();
instr_pntr = mem_pntr = bus_pntr = irq_pntr = 0;
temp_R = (byte)(Regs[R] & 0x7F);
@ -774,7 +774,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
INTERRUPT_2();
break;
}
IRQCallback();
_link.IRQCallback();
instr_pntr = mem_pntr = bus_pntr = irq_pntr = 0;
temp_R = (byte)(Regs[R] & 0x7F);