From 88d4ab5126e4981cf129f3bba0a14fef43baddae Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Sun, 3 May 2026 11:27:14 +0100 Subject: [PATCH] Fix final 4 opcodes for 100% harte singlestep test compatibility. hurrah! --- Z80/Z80.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Z80/Z80.cs b/Z80/Z80.cs index a315a29..f9e410b 100644 --- a/Z80/Z80.cs +++ b/Z80/Z80.cs @@ -2152,7 +2152,8 @@ namespace Z80 } else { - this.AdjustParity((byte)(this.B & (byte)Mask.Three)); + var parity = (this.Parity() >> 2) ^ (EvenParity((byte)(this.B & (byte)Mask.Three)) ? 1 : 0) ^ 1; + this.SetBit(StatusBits.PF, parity != 0); } }