Reset/power refactoring for z80

This commit is contained in:
Adrian Conlon
2025-05-06 15:37:24 +01:00
parent d58095a9d0
commit 95783d37aa
2 changed files with 25 additions and 15 deletions

View File

@@ -116,10 +116,15 @@ namespace EightBit
return HalfCarryTableSub[index & (int)Mask.Three];
}
protected void ResetRegisterSet()
{
this.AF.Word = this.BC.Word = this.DE.Word = this.HL.Word = (ushort)Mask.Sixteen;
}
private void IntelProcessor_RaisedPOWER(object? sender, EventArgs e)
{
this.PC.Word = this.SP.Word = (ushort)Mask.Sixteen;
this.AF.Word = this.BC.Word = this.DE.Word = this.HL.Word = (ushort)Mask.Sixteen;
this.ResetRegisterSet();
this.RaiseHALT();
}