summaryrefslogtreecommitdiff
path: root/src/Noddybox.Emulation.EightBit.Z80/Z80Cpu.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Noddybox.Emulation.EightBit.Z80/Z80Cpu.cs')
-rw-r--r--src/Noddybox.Emulation.EightBit.Z80/Z80Cpu.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Noddybox.Emulation.EightBit.Z80/Z80Cpu.cs b/src/Noddybox.Emulation.EightBit.Z80/Z80Cpu.cs
index a2e6fed..2da155e 100644
--- a/src/Noddybox.Emulation.EightBit.Z80/Z80Cpu.cs
+++ b/src/Noddybox.Emulation.EightBit.Z80/Z80Cpu.cs
@@ -242,7 +242,7 @@ namespace Noddybox.Emulation.EightBit.Z80
}
}
- if ((parity & 1) == 1)
+ if ((parity & 1) == 0)
{
p = Z80Flags.PV;
}
@@ -523,5 +523,15 @@ namespace Noddybox.Emulation.EightBit.Z80
}
#endregion
+
+ #region Object overrides
+
+ public override string ToString()
+ {
+ return String.Format("A={0:x2} BC={1:x4} DE={2:x4} HL={3:x4} F={4}\nPC={5:x4} SP={6:x4} IX={7:x4} IY={8:x4} AF'={9:x4} BC'={10:x4} DE'={11:x4} HL'={12:x4}\nI={13:x2} R={14:x2} IFF1={15} IFF2={16} IM={17} HALT={18}",
+ A, BC.reg, DE.reg, HL.reg, F, PC, SP, IX.reg, IY.reg, AF_.reg, BC_.reg, DE_.reg, HL_.reg, I, R, IFF1, IFF2, IM, HALT);
+ }
+
+ #endregion
}
}