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
1 changed files with 10 additions and 2 deletions

View File

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