Correct Z80 halt interrupt bug.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2019-08-28 23:28:01 +01:00
parent 0dd6f1025f
commit 364d79fde9

View File

@ -258,7 +258,11 @@ namespace EightBit
protected override void HandleINT() protected override void HandleINT()
{ {
base.HandleINT(); base.HandleINT();
this.RaiseHALT(); if (this.Halted)
{
this.Proceed();
}
if (this.IFF1) if (this.IFF1)
{ {
this.DisableInterrupts(); this.DisableInterrupts();
@ -1392,7 +1396,11 @@ namespace EightBit
private void HandleNMI() private void HandleNMI()
{ {
this.RaiseNMI(); this.RaiseNMI();
this.RaiseHALT(); if (this.Halted)
{
this.Proceed();
}
this.IFF1 = false; this.IFF1 = false;
this.Restart(0x66); this.Restart(0x66);
this.Tick(13); this.Tick(13);