From 647083a1f53bbec58e5058616b84f706b0402911 Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 2 Jan 2012 23:37:51 +0000 Subject: Added some opcodes and removed unnecessary using statements. --- src/Noddybox.Emulation.EightBit.Z80/Z80Cpu.cs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (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 5c40854..0717ef5 100644 --- a/src/Noddybox.Emulation.EightBit.Z80/Z80Cpu.cs +++ b/src/Noddybox.Emulation.EightBit.Z80/Z80Cpu.cs @@ -2,15 +2,6 @@ // Copyright (c) 2012 Ian Cowburn // using System; -using System.Net; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Shapes; namespace Noddybox.Emulation.EightBit.Z80 { @@ -32,7 +23,8 @@ namespace Noddybox.Emulation.EightBit.Z80 HalfCarry = 0x10, Hidden5 = 0x20, Zero = 0x40, - Sign = 0x80 + Sign = 0x80, + Hidden = Hidden3 | Hidden5 }; #endregion @@ -46,7 +38,7 @@ namespace Noddybox.Emulation.EightBit.Z80 private Z80Flags[] Ptable = new Z80Flags[512]; private Z80Flags[] Stable = new Z80Flags[512]; private Z80Flags[] Ztable = new Z80Flags[512]; - private Z80Flags[] H35table = new Z80Flags[256]; + private Z80Flags[] H35table = new Z80Flags[512]; // Machine accessors // @@ -81,6 +73,7 @@ namespace Noddybox.Emulation.EightBit.Z80 private bool IFF2; private int IM; private bool HALT; + private int shift; #endregion @@ -120,6 +113,7 @@ namespace Noddybox.Emulation.EightBit.Z80 I = 0; R = 0; HALT = false; + shift = 0; } public void Step() @@ -216,6 +210,7 @@ namespace Noddybox.Emulation.EightBit.Z80 Ztable[f+256] = Ztable[f] | Z80Flags.Carry; SZtable[f+256] = SZtable[f] | Z80Flags.Carry; PSZtable[f+256] = PSZtable[f] | Z80Flags.Carry; + H35table[f+256] = h3 | h5; } Reset(); -- cgit v1.2.3