From 31203bc854656ff92844364903de9abee9daea8b Mon Sep 17 00:00:00 2001 From: Ian C Date: Wed, 7 Mar 2012 22:48:11 +0000 Subject: Safe-keeping commit. Currently debugging emulation using FUSE tests. --- src/Noddybox.Emulation.EightBit.Z80/Z80Cpu.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/Noddybox.Emulation.EightBit.Z80/Z80Cpu.cs') 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 } } -- cgit v1.3