Library fixes

This commit is contained in:
Adrian Conlon
2025-03-18 21:32:44 +00:00
parent a9db2f58bd
commit 8a68fc5856
2 changed files with 56 additions and 1 deletions

View File

@@ -83,6 +83,11 @@ namespace EightBit
}
}
protected void ResetWorkingRegisters()
{
this.AF.Word = this.BC.Word = this.DE.Word = this.HL.Word = (ushort)Mask.Sixteen;
}
protected static int BuildHalfCarryIndex(byte before, byte value, int calculation) => ((before & 0x88) >> 1) | ((value & 0x88) >> 2) | ((calculation & 0x88) >> 3);
protected static int CalculateHalfCarryAdd(byte before, byte value, int calculation)