diff options
| author | Ian C <ianc@noddybox.co.uk> | 2012-03-01 00:02:07 +0000 |
|---|---|---|
| committer | Ian C <ianc@noddybox.co.uk> | 2012-03-01 00:02:07 +0000 |
| commit | 788b8cc4dd404a826ce881c020ee6ca0388a5975 (patch) | |
| tree | d6a0e0a2a03316ccfd14ea0f1433ce311fdb1d4e /src/Noddybox.Emulation.EightBit.Z80/Z80CpuBaseOpcodes.cs | |
| parent | a937b96b20e61cd0770119da3327c15575779793 (diff) | |
Initial working version of test suite. Fixed INC8 and DEC8 with results.
Diffstat (limited to 'src/Noddybox.Emulation.EightBit.Z80/Z80CpuBaseOpcodes.cs')
| -rw-r--r-- | src/Noddybox.Emulation.EightBit.Z80/Z80CpuBaseOpcodes.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Noddybox.Emulation.EightBit.Z80/Z80CpuBaseOpcodes.cs b/src/Noddybox.Emulation.EightBit.Z80/Z80CpuBaseOpcodes.cs index 389ba41..24f8093 100644 --- a/src/Noddybox.Emulation.EightBit.Z80/Z80CpuBaseOpcodes.cs +++ b/src/Noddybox.Emulation.EightBit.Z80/Z80CpuBaseOpcodes.cs @@ -369,7 +369,7 @@ namespace Noddybox.Emulation.EightBit.Z80 {
reg++;
- F = Z80Flags.Carry;
+ F &= Z80Flags.Carry;
if (reg == 0x80)
{
@@ -380,6 +380,8 @@ namespace Noddybox.Emulation.EightBit.Z80 {
F |= Z80Flags.HalfCarry;
}
+
+ F |= SZtable[reg] | H35table[reg];
}
/// <summary>
@@ -390,7 +392,8 @@ namespace Noddybox.Emulation.EightBit.Z80 {
reg--;
- F = Z80Flags.Carry | Z80Flags.Neg;
+ F &= Z80Flags.Carry;
+ F |= Z80Flags.Neg;
if (reg == 0x7f)
{
@@ -401,6 +404,8 @@ namespace Noddybox.Emulation.EightBit.Z80 {
F |= Z80Flags.HalfCarry;
}
+
+ F |= SZtable[reg] | H35table[reg];
}
/// <summary>
|
