diff options
author | Ian C <ianc@noddybox.co.uk> | 2012-01-02 23:37:51 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2012-01-02 23:37:51 +0000 |
commit | 647083a1f53bbec58e5058616b84f706b0402911 (patch) | |
tree | 7b74c6bce93adeb0165cd94e42affaa9c667cd8e /src/Noddybox.Emulation.EightBit.Z80/Z80Cpu.cs | |
parent | 2b8d49726e448e22b5055da5ba4395d043030984 (diff) |
Added some opcodes and removed unnecessary using statements.
Diffstat (limited to 'src/Noddybox.Emulation.EightBit.Z80/Z80Cpu.cs')
-rw-r--r-- | src/Noddybox.Emulation.EightBit.Z80/Z80Cpu.cs | 17 |
1 files changed, 6 insertions, 11 deletions
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();
|