mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-11-23 23:18:12 +00:00
Synchronise HALT implementation for Intel style processors with the C++ version.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
16
Z80/Z80.cs
16
Z80/Z80.cs
@@ -214,7 +214,7 @@ namespace EightBit
|
||||
{
|
||||
this.HandleINT();
|
||||
}
|
||||
else if (this.Halted)
|
||||
else if (this.HALT.Lowered())
|
||||
{
|
||||
this.Execute(0); // NOP
|
||||
}
|
||||
@@ -258,11 +258,7 @@ namespace EightBit
|
||||
protected override void HandleINT()
|
||||
{
|
||||
base.HandleINT();
|
||||
if (this.Halted)
|
||||
{
|
||||
this.Proceed();
|
||||
}
|
||||
|
||||
this.RaiseHALT();
|
||||
if (this.IFF1)
|
||||
{
|
||||
this.DisableInterrupts();
|
||||
@@ -1149,7 +1145,7 @@ namespace EightBit
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Halt(); // Exception (replaces LD (HL), (HL))
|
||||
this.LowerHALT(); // Exception (replaces LD (HL), (HL))
|
||||
}
|
||||
|
||||
this.Tick(4);
|
||||
@@ -1396,11 +1392,7 @@ namespace EightBit
|
||||
private void HandleNMI()
|
||||
{
|
||||
this.RaiseNMI();
|
||||
if (this.Halted)
|
||||
{
|
||||
this.Proceed();
|
||||
}
|
||||
|
||||
this.RaiseHALT();
|
||||
this.IFF1 = false;
|
||||
this.Restart(0x66);
|
||||
this.Tick(13);
|
||||
|
||||
Reference in New Issue
Block a user