More opcodes, some helpers
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -241,7 +241,7 @@ namespace MCEmuCore.GBMonolith
|
||||
{
|
||||
Console.WriteLine("Flag status:");
|
||||
Console.WriteLine($"Zero:\t\t{Flags.Zero}");
|
||||
Console.WriteLine($"Subtract:\t{Flags.Subtract}");
|
||||
Console.WriteLine($"Subtract:\t{Flags.N_Subtract}");
|
||||
Console.WriteLine($"Half Carry:\t{Flags.HalfCarry}");
|
||||
Console.WriteLine($"Carry:\t\t{Flags.Carry}");
|
||||
Console.WriteLine($"Raw Register:\t{Convert.ToString(Flags.Value, 2)}");
|
||||
@@ -269,7 +269,7 @@ namespace MCEmuCore.GBMonolith
|
||||
register &= 0b0111_0000;
|
||||
}
|
||||
}
|
||||
public bool Subtract
|
||||
public bool N_Subtract
|
||||
{
|
||||
get { return (Value & 0b0100_0000) != 0; }
|
||||
set
|
||||
|
||||
14
MCEmuCore.GBMonolith/IMemory.cs
Normal file
14
MCEmuCore.GBMonolith/IMemory.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace MCEmuCore.GBMonolith
|
||||
{
|
||||
interface IMemory
|
||||
{
|
||||
byte ReadByte(int address);
|
||||
ushort ReadShort(int address);
|
||||
bool WriteByte(int address, byte value);
|
||||
bool WriteShort(int address, ushort value);
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ namespace MCEmuCore.GBMonolith
|
||||
Console.WriteLine("Testing Flags:");
|
||||
cpuRegisters.PrintFlags();
|
||||
cpuRegisters.Flags.Zero = true;
|
||||
cpuRegisters.Flags.Subtract = true;
|
||||
cpuRegisters.Flags.N_Subtract = true;
|
||||
cpuRegisters.Flags.HalfCarry = true;
|
||||
cpuRegisters.Flags.Carry = false;
|
||||
cpuRegisters.PrintFlags();
|
||||
|
||||
Reference in New Issue
Block a user