8 Commits

Author SHA1 Message Date
parsons
2300e2931e First OS Agnostic Commit 2026-05-31 00:24:14 +01:00
parsons
2f332ff224 Added some GG games 2026-05-26 23:22:04 +01:00
parsons
4a0424a664 Added more games 2026-05-26 22:53:50 +01:00
Marc Parsons
ce46e7ed52 Updated Z80 CPU to fix interrupts etc... 2026-05-26 22:02:47 +01:00
Marc Parsons
b5695b5c2f Some fixes and code refactoring 2026-05-22 16:40:33 +01:00
Marc Parsons
cca1abf0be Added double buffering ish. 2026-05-21 17:25:57 +01:00
Marc Parsons
9316a16ab9 A commit to resync the repository 2026-05-21 16:34:24 +01:00
parsons
cd5e18a2ac Tidy Up 2026-05-19 01:00:28 +01:00
22 changed files with 816 additions and 422 deletions

View File

@@ -33,7 +33,9 @@ namespace Core.Audio
0.1584f, 0.1258f, 0.1000f, 0.0794f, 0.0630f, 0.0501f, 0.0398f, 0.0f
};
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
public SmsApu()
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
{
Registers[1] = 0x0F;
Registers[3] = 0x0F;

View File

@@ -25,10 +25,13 @@ namespace Core.Cpu
public int InterruptMode { get; private set; } = 0;
// Interrupt Flip-Flops
public bool IFF1 { get; private set; } = false;
public bool IFF2 { get; private set; } = false;
public bool InterruptRequested { get; private set; } = false;
private int _eiDelay = 0;
public bool IsHalted { get; private set; } = false;
// Main Register Set
public RegisterPair AF;
@@ -48,7 +51,7 @@ namespace Core.Cpu
// Special Purpose Registers
public ushort PC; // Program Counter
public ushort SP; // Stack Pointer
public ushort SP;
public byte I; // Interrupt Vector
public byte R; // Memory Refresh
@@ -96,6 +99,10 @@ namespace Core.Cpu
IFF2 = false;
InterruptMode = 0;
TotalTStates = 0;
_eiDelay = 0;
IsHalted = false;
InterruptRequested = false;
}
public void SaveState(BinaryWriter bw)
@@ -135,6 +142,7 @@ namespace Core.Cpu
public int RequestInterrupt()
{
IsHalted = false;
InterruptRequested = true;
// 1. If the ROM has disabled interrupts (DI), ignore the request
if (!IFF1) return 0;
@@ -143,6 +151,8 @@ namespace Core.Cpu
IFF1 = false;
IFF2 = false;
_eiDelay = 0;
// 3. Push the current Program Counter to the stack so we can return later
Push(PC);
@@ -214,14 +224,36 @@ namespace Core.Cpu
public int Step()
{
int tStates;
// Fetch the next opcode and increment the Program Counter
byte opcode = ReadMemory(PC++);
R = (byte)((R + 1) & 0x7F);
int tStates = ExecuteOpcode(opcode);
R = (byte)((R & 0x80) | ((R + 1) & 0x7F));
if (IsHalted)
{
// The CPU is asleep! Do not fetch instructions, just pass the time.
tStates = 4;
TotalTStates += tStates;
}
else
{
// Normal execution
byte opcode = ReadMemory(PC++);
tStates = ExecuteOpcode(opcode);
TotalTStates += tStates;
}
// The interrupt enablement perfectly mimics the physical hardware delay.
// This MUST tick down even if the CPU is halted!
if (_eiDelay > 0)
{
_eiDelay--;
if (_eiDelay == 0)
{
IFF1 = true;
IFF2 = true;
}
}
// Decode and execute
return tStates;
}
@@ -240,9 +272,6 @@ namespace Core.Cpu
$"C:{f & 1}";
}
// =========================================================================
// MATH AND LOGIC HELPERS
// =========================================================================
private void SubA(byte value, bool isCompare)
{
@@ -924,17 +953,21 @@ namespace Core.Cpu
case 0x73: WriteMemory(HL.Word, DE.Low); return 7;
case 0x74: WriteMemory(HL.Word, HL.High); return 7;
case 0x75: WriteMemory(HL.Word, HL.Low); return 7;
case 0x76: //HALT
if (!InterruptRequested)
{
PC--;
case 0x76: // HALT
IsHalted = true;
return 4;
}
else
{
InterruptRequested = false;
return 4;
}
//case 0x76: //HALT
// if (!InterruptRequested)
// {
// PC--;
// return 4;
// }
// else
// {
// InterruptRequested = false;
// return 4;
// }
case 0x77: WriteMemory(HL.Word, AF.High); return 7;
// --- LD A, r ---
@@ -1272,6 +1305,11 @@ namespace Core.Cpu
case 0xF3: // DI
IFF1 = false;
IFF2 = false;
_eiDelay = 0; // Hard cancel any pending EI delays
return 4;
case 0xFB: // EI
_eiDelay = 2; // Ticks down across the current and subsequent instruction
return 4;
case 0xf5: //push af
Push(AF.Word);
@@ -1282,10 +1320,7 @@ namespace Core.Cpu
case 0xF9: // LD SP, HL
SP = HL.Word;
return 6;
case 0xFB: // EI
IFF1 = true;
IFF2 = true;
return 4;
case 0xFD:
return ExecuteFDPrefix();
case 0xFE: // CP n
@@ -1827,7 +1862,8 @@ namespace Core.Cpu
return 16;
}
default:
throw new NotImplementedException($"Extended ED Opcode 0x{extendedOpcode:X2} at PC 0x{(PC - 1):X4} is not implemented.");
return 8;
//throw new NotImplementedException($"Extended ED Opcode 0x{extendedOpcode:X2} at PC 0x{(PC - 1):X4} is not implemented.");
}
}

View File

@@ -6,8 +6,12 @@ namespace Core.Io
{
public class SmsIoBus : IIoBus
{
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
public SmsVdp VideoProcessor { get; set; }
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
public SmsApu AudioProcessor { get; set; }
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
// Joypad State (0xFF means no buttons pressed - the SMS uses Active-Low logic!)
public byte Joypad1Keyboard = 0xFF;

View File

@@ -6,6 +6,7 @@ namespace Core.Memory
{
public class SmsMemoryBus : IMemory
{
private bool _isCodemastersMapper = false; //Codemasters used their own memory mapper
// SMS has 8KB of internal Work RAM
private readonly byte[] _workRam = new byte[0x2000];
@@ -42,41 +43,101 @@ namespace Core.Memory
public byte Read(ushort address)
{
if (address < 0x4000) // ROM Slot 0 (0x0000 - 0x3FFF)
if (address < 0xC000 && !_isCartridgeLoaded)
{
// SMS Hardware Quirk: The first 1KB (0x0000 - 0x03FF) is NEVER paged.
if (address < 0x0400) return ReadFromCartridge(0, address);
return 0xFF;
}
return ReadFromCartridge(_romBank0, address);
}
if (address < 0x8000) // ROM Slot 1 (0x4000 - 0x7FFF)
if (address < 0x4000)
{
return ReadFromCartridge(_romBank1, address & 0x3FFF);
}
if (address < 0xC000) // ROM Slot 2 (0x8000 - 0xBFFF)
if (!_isCodemastersMapper && address < 0x0400)
{
// --- THE MISSING LINK: Read from Save RAM if enabled! ---
return _cartridgeRom[address];
}
if (address < 0x0400)
{
return _cartridgeRom[address];
}
// Slot 0
return _cartridgeRom[(_romBank0 * 0x4000) + address];
}
if (address < 0x8000)
{
// Slot 1
return _cartridgeRom[(_romBank1 * 0x4000) + (address - 0x4000)];
}
if (address < 0xC000)
{
// Slot 2 (Or SRAM)
if ((_mapperControl & 0x08) != 0)
{
int ramBank = (_mapperControl & 0x04) != 0 ? 1 : 0;
int ramOffset = (ramBank * 0x4000) + (address & 0x1FFF);
return _cartridgeRam[ramOffset];
return _cartridgeRam[address - 0x8000];
else
return _cartridgeRom[(_romBank2 * 0x4000) + (address - 0x8000)];
}
// Otherwise, read from the ROM as usual
return ReadFromCartridge(_romBank2, address & 0x3FFF);
}
// System RAM (0xC000 - 0xFFFF)
// Bitwise AND perfectly forces 0xE000-0xFFFF to mirror down to 0xC000!
return _workRam[address & 0x1FFF];
}
public void Write(ushort address, byte value)
{
// Codemasters games bank-switch by writing directly to ROM!
if (address == 0x0000 || address == 0x4000 || address == 0x8000)
{
_isCodemastersMapper = true;
int cTotalBanks = _cartridgeRom.Length / 0x4000;
if (cTotalBanks == 0) cTotalBanks = 1;
if (address == 0x0000) _romBank0 = value % cTotalBanks;
else if (address == 0x4000) _romBank1 = value % cTotalBanks;
else if (address == 0x8000) _romBank2 = value % cTotalBanks;
return;
}
if (address < 0x8000) return; // Cannot write to physical ROM
if (address < 0xC000)
{
if ((_mapperControl & 0x08) != 0)
_cartridgeRam[address - 0x8000] = value;
return;
}
// THE FIX 1: Save to RAM using the mirror mask
_workRam[address & 0x1FFF] = value;
// THE FIX 2: Mapper Control Registers live at the very end of the mirrored RAM!
if (address >= 0xFFFC)
{
// Calculate the absolute maximum number of banks inside the currently loaded ROM
int totalBanks = _cartridgeRom.Length / 0x4000;
// Safety catch for empty slots
if (totalBanks == 0) totalBanks = 1;
if (address == 0xFFFC)
{
_mapperControl = value;
}
else if (address == 0xFFFD)
{
_romBank0 = value % totalBanks; // Force the bank to stay inside the array bounds!
}
else if (address == 0xFFFE)
{
_romBank1 = value % totalBanks;
}
else if (address == 0xFFFF)
{
_romBank2 = value % totalBanks;
}
}
}
//public byte Read(ushort address)
//{
// if (address < 0x4000) // ROM Slot 0 (0x0000 - 0x3FFF)
// {
// // SMS Hardware Quirk: The first 1KB (0x0000 - 0x03FF) is NEVER paged.
// // It is hardwired to Bank 0 so the interrupt handlers don't crash.
// if (address < 0x0400) return ReadFromCartridge(0, address);
// return ReadFromCartridge(_romBank0, address);
@@ -87,103 +148,73 @@ namespace Core.Memory
// }
// if (address < 0xC000) // ROM Slot 2 (0x8000 - 0xBFFF)
// {
// // Check if Cartridge RAM is enabled (Bit 3 of Mapper Control)
// // --- THE MISSING LINK: Read from Save RAM if enabled! ---
// if ((_mapperControl & 0x08) != 0)
// {
// // Bit 2 decides if we read the first 16KB half or the second 16KB half of the RAM chip
// int ramBank = (_mapperControl & 0x04) != 0 ? 1 : 0;
// int ramOffset = (ramBank * 0x4000) + (address & 0x3FFF);
// int ramOffset = (ramBank * 0x4000) + (address & 0x1FFF);
// return _cartridgeRam[ramOffset];
// }
// // Otherwise, read from the ROM as usual
// return ReadFromCartridge(_romBank2, address & 0x3FFF);
// }
// // If we are here, we are in System RAM (0xC000 - 0xFFFF)
// // The & 0x1FFF handles the 8KB mirroring automatically!
// // System RAM (0xC000 - 0xFFFF)
// return _workRam[address & 0x1FFF];
//}
//public void Write(ushort address, byte value)
//{
// // --- 1. CARTRIDGE RAM (Save Data) ---
// if (address < 0xC000)
// {
// // Bypass the lock if they are trying to save their game!
// if (address >= 0x8000 && (_mapperControl & 0x08) != 0)
// {
// SramUsed = true;
// int ramBank = (_mapperControl & 0x04) != 0 ? 1 : 0;
// int ramOffset = (ramBank * 0x4000) + (address & 0x3FFF);
// int ramOffset = (ramBank * 0x4000) + (address & 0x1FFF);
// _cartridgeRam[ramOffset] = value;
// return;
// }
// // You cannot write to a ROM cartridge!
// return;
// }
// // --- 2. SYSTEM RAM ---
// // Write to System RAM
// _workRam[address & 0x1FFF] = value;
// // --- 3. SEGA MAPPER (With Hardware Mirroring!) ---
// // By checking the masked address (address & 0x1FFF), we perfectly
// // catch writes to 0xFFFC-0xFFFF *and* their 0xDFFC-0xDFFF mirrors!
// int mapperAddress = address & 0x1FFF;
// // --- THE SEGA MAPPER ---
// if (address == 0xFFFC) // <-- ADD THIS
// {
// _mapperControl = value;
// }
// else if (address == 0xFFFD)
// {
// _romBank0 = value;
// }
// if (mapperAddress == 0x1FFC) _mapperControl = value;
// else if (mapperAddress == 0x1FFD) _romBank0 = value;
// else if (mapperAddress == 0x1FFE) _romBank1 = value;
// else if (mapperAddress == 0x1FFF) _romBank2 = value;
// // Write to System RAM
// _workRam[address & 0x1FFF] = value;
// // --- THE SEGA MAPPER ---
// // If the CPU wrote to the very top of memory, it is commanding a bank swap!
// if (address == 0xFFFD)
// {
// _romBank0 = value;
// }
// else if (address == 0xFFFE)
// {
// _romBank1 = value;
// }
// else if (address == 0xFFFF)
// {
// _romBank2 = value;
// }
//}
public void Write(ushort address, byte value)
{
if (address < 0xC000)
{
// Bypass the lock if they are trying to save their game!
if (address >= 0x8000 && (_mapperControl & 0x08) != 0)
{
SramUsed = true;
int ramBank = (_mapperControl & 0x04) != 0 ? 1 : 0;
int ramOffset = (ramBank * 0x4000) + (address & 0x1FFF);
_cartridgeRam[ramOffset] = value;
return;
}
// You cannot write to a ROM cartridge!
return;
}
// Write to System RAM
_workRam[address & 0x1FFF] = value;
// --- THE SEGA MAPPER ---
if (address == 0xFFFC) // <-- ADD THIS
{
_mapperControl = value;
}
else if (address == 0xFFFD)
{
_romBank0 = value;
}
// Write to System RAM
_workRam[address & 0x1FFF] = value;
// --- THE SEGA MAPPER ---
// If the CPU wrote to the very top of memory, it is commanding a bank swap!
if (address == 0xFFFD)
{
_romBank0 = value;
}
else if (address == 0xFFFE)
{
_romBank1 = value;
}
else if (address == 0xFFFF)
{
_romBank2 = value;
}
}
private byte ReadFromCartridge(int bankIndex, int offset)
{
if (!_isCartridgeLoaded) return 0xFF; // Floating bus if no game
@@ -252,6 +283,7 @@ namespace Core.Memory
{
Array.Clear(_workRam, 0, _workRam.Length);
_mapperControl = 0;
_isCodemastersMapper = false;
}
}
}

View File

@@ -17,6 +17,7 @@ namespace Core
public SmsVdp VideoProcessor { get; private set; }
public SmsApu AudioProcessor { get; private set; }
public ushort? Breakpoint { get; set; } = null;
private int _tStateCarryover = 0;
// NTSC SMS T-States per frame
public const int TStatesPerFrame = 59736; //NTSC
@@ -40,13 +41,15 @@ namespace Core
public void Reset()
{
MemoryBus.CleanRAMData();
VideoProcessor.Reset();
Cpu.Reset();
_tStateCarryover = 0;
}
public void RunFrame()
{
int tStatesThisFrame = 0;
int tStatesThisFrame = _tStateCarryover;
while (tStatesThisFrame < TStatesPerFrame) // Standard NTSC frame time
{
// 1. Run one CPU instruction
@@ -58,13 +61,17 @@ namespace Core
AudioProcessor.Update(cycles);
// 3. Check if the VDP is begging for attention!
if (VideoProcessor.InterruptPending && Cpu.IFF1)
//if (VideoProcessor.InterruptPending && Cpu.IFF1)
if (VideoProcessor.InterruptPending)
{
int intCycles = Cpu.RequestInterrupt();
if (intCycles > 0)
{
tStatesThisFrame += intCycles;
VideoProcessor.Update(intCycles);
AudioProcessor.Update(intCycles);
}
}
// 4. THE RESTORED BREAKPOINT TRAP
if (Breakpoint.HasValue && Cpu.PC == Breakpoint.Value)

View File

@@ -40,7 +40,7 @@ namespace Core.Video
_isSecondControlByte = false; // Reading data resets the control latch
byte value = _readBuffer;
_readBuffer = VRAM[_controlWord & 0x3FFF];
_controlWord++;
IncrementVdpAddress();
return value;
}
@@ -82,7 +82,7 @@ namespace Core.Video
}
// THE FIX: The pointer MUST auto-increment so the CPU can blast data fast!
_controlWord++;
IncrementVdpAddress();
}
public void WriteControlPort(byte value) // Port 0xBF
@@ -104,7 +104,7 @@ namespace Core.Video
if (command == 0) // Code 0: Prep for VRAM Read
{
_readBuffer = VRAM[_controlWord & 0x3FFF];
_controlWord++;
IncrementVdpAddress();
}
else if (command == 2) // Code 2: Write to Internal VDP Register
{
@@ -116,6 +116,18 @@ namespace Core.Video
}
}
private void IncrementVdpAddress()
{
// The VDP address register is only 14 bits
// When it increments past 0x3FFF, it rolls over to 0x0000.
// It can't overflow and corrupt the 2-bit command register (bits 14 and 15).
ushort address = (ushort)(_controlWord & 0x3FFF);
ushort command = (ushort)(_controlWord & 0xC000);
address = (ushort)((address + 1) & 0x3FFF);
_controlWord = (ushort)(command | address);
}
public byte ReadVCounter()
{
// NTSC Math: 262 lines. Counts 0 to 218, jumps to 213 (0xD5), counts to 255.
@@ -364,6 +376,17 @@ namespace Core.Video
return (255 << 24) | (r << 16) | (g << 8) | b;
}
public void Reset()
{
_tStateCounter = 0;
_currentScanline = 0;
_lineCounter = 0;
_statusRegister = 0x00;
_controlWord = 0;
_isSecondControlByte = false;
_readBuffer = 0;
}
public void SaveState(BinaryWriter bw)
{
bw.Write(VRAM);

View File

@@ -56,102 +56,104 @@
lblFPS = new Label();
lblFrameTime = new Label();
richTextBox1 = new RichTextBox();
button1 = new Button();
btnCpuStep = new Button();
CpuRun = new Button();
groupBox1 = new GroupBox();
lblTone0 = new Label();
lblNoise = new Label();
lblTone2 = new Label();
lblTone1 = new Label();
lblTone2 = new Label();
lblNoise = new Label();
lblTone0 = new Label();
lblHalt = new Label();
lblR = new Label();
groupBox1.SuspendLayout();
SuspendLayout();
//
// lblAF
//
lblAF.AutoSize = true;
lblAF.Location = new Point(12, 9);
lblAF.Location = new Point(10, 7);
lblAF.Margin = new Padding(2, 0, 2, 0);
lblAF.Name = "lblAF";
lblAF.Size = new Size(33, 25);
lblAF.Size = new Size(26, 20);
lblAF.TabIndex = 0;
lblAF.Text = "AF";
//
// lblBC
//
lblBC.AutoSize = true;
lblBC.Location = new Point(11, 60);
lblBC.Location = new Point(9, 48);
lblBC.Margin = new Padding(2, 0, 2, 0);
lblBC.Name = "lblBC";
lblBC.Size = new Size(33, 25);
lblBC.Size = new Size(27, 20);
lblBC.TabIndex = 1;
lblBC.Text = "BC";
//
// lblDE
//
lblDE.AutoSize = true;
lblDE.Location = new Point(12, 125);
lblDE.Location = new Point(10, 100);
lblDE.Margin = new Padding(2, 0, 2, 0);
lblDE.Name = "lblDE";
lblDE.Size = new Size(34, 25);
lblDE.Size = new Size(28, 20);
lblDE.TabIndex = 2;
lblDE.Text = "DE";
//
// lblHL
//
lblHL.AutoSize = true;
lblHL.Location = new Point(12, 188);
lblHL.Location = new Point(10, 150);
lblHL.Margin = new Padding(2, 0, 2, 0);
lblHL.Name = "lblHL";
lblHL.Size = new Size(33, 25);
lblHL.Size = new Size(27, 20);
lblHL.TabIndex = 3;
lblHL.Text = "HL";
//
// lblPC
//
lblPC.AutoSize = true;
lblPC.Location = new Point(11, 250);
lblPC.Location = new Point(9, 200);
lblPC.Margin = new Padding(2, 0, 2, 0);
lblPC.Name = "lblPC";
lblPC.Size = new Size(33, 25);
lblPC.Size = new Size(26, 20);
lblPC.TabIndex = 4;
lblPC.Text = "PC";
//
// lblSP
//
lblSP.AutoSize = true;
lblSP.Location = new Point(11, 315);
lblSP.Location = new Point(9, 252);
lblSP.Margin = new Padding(2, 0, 2, 0);
lblSP.Name = "lblSP";
lblSP.Size = new Size(32, 25);
lblSP.Size = new Size(25, 20);
lblSP.TabIndex = 6;
lblSP.Text = "SP";
//
// lblFlags
//
lblFlags.AutoSize = true;
lblFlags.Location = new Point(110, 65);
lblFlags.Location = new Point(88, 52);
lblFlags.Margin = new Padding(2, 0, 2, 0);
lblFlags.Name = "lblFlags";
lblFlags.Size = new Size(53, 25);
lblFlags.Size = new Size(43, 20);
lblFlags.TabIndex = 7;
lblFlags.Text = "Flags";
//
// lblTStates
//
lblTStates.AutoSize = true;
lblTStates.Location = new Point(110, 9);
lblTStates.Location = new Point(88, 7);
lblTStates.Margin = new Padding(2, 0, 2, 0);
lblTStates.Name = "lblTStates";
lblTStates.Size = new Size(75, 25);
lblTStates.Size = new Size(63, 20);
lblTStates.TabIndex = 8;
lblTStates.Text = "T-States";
//
// txtMemoryStart
//
txtMemoryStart.Location = new Point(375, 26);
txtMemoryStart.Location = new Point(300, 21);
txtMemoryStart.Margin = new Padding(2);
txtMemoryStart.Name = "txtMemoryStart";
txtMemoryStart.Size = new Size(150, 31);
txtMemoryStart.Size = new Size(121, 27);
txtMemoryStart.TabIndex = 9;
txtMemoryStart.Text = "Memory Start";
txtMemoryStart.TextAlign = HorizontalAlignment.Center;
@@ -159,10 +161,10 @@
//
// btnRefreshMemory
//
btnRefreshMemory.Location = new Point(531, 26);
btnRefreshMemory.Location = new Point(425, 21);
btnRefreshMemory.Margin = new Padding(2);
btnRefreshMemory.Name = "btnRefreshMemory";
btnRefreshMemory.Size = new Size(112, 34);
btnRefreshMemory.Size = new Size(90, 27);
btnRefreshMemory.TabIndex = 14;
btnRefreshMemory.Text = "Refresh Memory";
btnRefreshMemory.UseVisualStyleBackColor = true;
@@ -170,117 +172,109 @@
//
// txtMemoryView
//
txtMemoryView.Location = new Point(110, 101);
txtMemoryView.Location = new Point(88, 81);
txtMemoryView.Margin = new Padding(2);
txtMemoryView.Name = "txtMemoryView";
txtMemoryView.Size = new Size(553, 543);
txtMemoryView.Size = new Size(443, 435);
txtMemoryView.TabIndex = 15;
txtMemoryView.Text = "Memory View Window";
//
// lstDisassembly
//
lstDisassembly.FormattingEnabled = true;
lstDisassembly.ItemHeight = 25;
lstDisassembly.Location = new Point(709, 10);
lstDisassembly.Location = new Point(567, 8);
lstDisassembly.Margin = new Padding(2);
lstDisassembly.Name = "lstDisassembly";
lstDisassembly.Size = new Size(314, 329);
lstDisassembly.Size = new Size(252, 264);
lstDisassembly.TabIndex = 16;
//
// lstStack
//
lstStack.FormattingEnabled = true;
lstStack.ItemHeight = 25;
lstStack.Location = new Point(1029, 10);
lstStack.Location = new Point(823, 8);
lstStack.Margin = new Padding(2);
lstStack.Name = "lstStack";
lstStack.Size = new Size(162, 329);
lstStack.Size = new Size(130, 264);
lstStack.TabIndex = 17;
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(710, 372);
label1.Margin = new Padding(4, 0, 4, 0);
label1.Location = new Point(568, 298);
label1.Name = "label1";
label1.Size = new Size(97, 25);
label1.Size = new Size(81, 20);
label1.TabIndex = 19;
label1.Text = "Breakpoint";
//
// txtBreakpoint
//
txtBreakpoint.Location = new Point(819, 369);
txtBreakpoint.Margin = new Padding(4);
txtBreakpoint.Location = new Point(655, 295);
txtBreakpoint.Name = "txtBreakpoint";
txtBreakpoint.Size = new Size(155, 31);
txtBreakpoint.Size = new Size(125, 27);
txtBreakpoint.TabIndex = 20;
//
// label2
//
label2.AutoSize = true;
label2.Location = new Point(291, 26);
label2.Margin = new Padding(4, 0, 4, 0);
label2.Location = new Point(233, 21);
label2.Name = "label2";
label2.Size = new Size(77, 25);
label2.Size = new Size(62, 20);
label2.TabIndex = 21;
label2.Text = "Address";
//
// lblIX
//
lblIX.AutoSize = true;
lblIX.Location = new Point(11, 372);
lblIX.Location = new Point(9, 298);
lblIX.Margin = new Padding(2, 0, 2, 0);
lblIX.Name = "lblIX";
lblIX.Size = new Size(28, 25);
lblIX.Size = new Size(22, 20);
lblIX.TabIndex = 22;
lblIX.Text = "IX";
//
// lblIY
//
lblIY.AutoSize = true;
lblIY.Location = new Point(12, 430);
lblIY.Location = new Point(10, 344);
lblIY.Margin = new Padding(2, 0, 2, 0);
lblIY.Name = "lblIY";
lblIY.Size = new Size(27, 25);
lblIY.Size = new Size(21, 20);
lblIY.TabIndex = 23;
lblIY.Text = "IY";
//
// lblIff1
//
lblIff1.AutoSize = true;
lblIff1.Location = new Point(11, 533);
lblIff1.Margin = new Padding(4, 0, 4, 0);
lblIff1.Location = new Point(10, 472);
lblIff1.Name = "lblIff1";
lblIff1.Size = new Size(45, 25);
lblIff1.Size = new Size(35, 20);
lblIff1.TabIndex = 24;
lblIff1.Text = "IFF1";
//
// lblIff2
//
lblIff2.AutoSize = true;
lblIff2.Location = new Point(11, 586);
lblIff2.Margin = new Padding(4, 0, 4, 0);
lblIff2.Location = new Point(10, 515);
lblIff2.Name = "lblIff2";
lblIff2.Size = new Size(45, 25);
lblIff2.Size = new Size(35, 20);
lblIff2.TabIndex = 25;
lblIff2.Text = "IFF2";
//
// lblIE
//
lblIE.AutoSize = true;
lblIE.Location = new Point(11, 486);
lblIE.Margin = new Padding(4, 0, 4, 0);
lblIE.Location = new Point(10, 435);
lblIE.Name = "lblIE";
lblIE.Size = new Size(33, 25);
lblIE.Size = new Size(26, 20);
lblIE.TabIndex = 26;
lblIE.Text = "IM";
//
// btnReset
//
btnReset.Location = new Point(814, 409);
btnReset.Location = new Point(651, 327);
btnReset.Margin = new Padding(2);
btnReset.Name = "btnReset";
btnReset.Size = new Size(165, 34);
btnReset.Size = new Size(132, 27);
btnReset.TabIndex = 27;
btnReset.Text = "Set Breakpoint";
btnReset.UseVisualStyleBackColor = true;
@@ -295,61 +289,58 @@
// lblFrames
//
lblFrames.AutoSize = true;
lblFrames.Location = new Point(14, 660);
lblFrames.Location = new Point(10, 605);
lblFrames.Margin = new Padding(2, 0, 2, 0);
lblFrames.Name = "lblFrames";
lblFrames.Size = new Size(149, 25);
lblFrames.Size = new Size(124, 20);
lblFrames.TabIndex = 28;
lblFrames.Text = "Frames Rendered";
//
// lblFPS
//
lblFPS.AutoSize = true;
lblFPS.Location = new Point(129, 757);
lblFPS.Location = new Point(102, 683);
lblFPS.Margin = new Padding(2, 0, 2, 0);
lblFPS.Name = "lblFPS";
lblFPS.Size = new Size(41, 25);
lblFPS.Size = new Size(32, 20);
lblFPS.TabIndex = 29;
lblFPS.Text = "FPS";
//
// lblFrameTime
//
lblFrameTime.AutoSize = true;
lblFrameTime.Location = new Point(60, 706);
lblFrameTime.Location = new Point(47, 642);
lblFrameTime.Margin = new Padding(2, 0, 2, 0);
lblFrameTime.Name = "lblFrameTime";
lblFrameTime.Size = new Size(104, 25);
lblFrameTime.Size = new Size(87, 20);
lblFrameTime.TabIndex = 30;
lblFrameTime.Text = "Frame Time";
//
// richTextBox1
//
richTextBox1.Enabled = false;
richTextBox1.Location = new Point(682, 474);
richTextBox1.Margin = new Padding(4);
richTextBox1.Location = new Point(546, 379);
richTextBox1.Name = "richTextBox1";
richTextBox1.ReadOnly = true;
richTextBox1.Size = new Size(379, 159);
richTextBox1.Size = new Size(304, 128);
richTextBox1.TabIndex = 32;
richTextBox1.Text = "Sega Master System Memory Map:\n0x0000 - 0x3FFF: ROM Slot 0 (16KB)\n0x4000 - 0x7FFF: ROM Slot 1 (16KB)\n0x8000 - 0xBFFF: ROM Slot 2 (16KB)\n0xC000 - 0xDFFF: System RAM (8KB)\n0xE000 - 0xFFFF: RAM Mirror";
//
// button1
// btnCpuStep
//
button1.Location = new Point(1075, 756);
button1.Margin = new Padding(4);
button1.Name = "button1";
button1.Size = new Size(118, 36);
button1.TabIndex = 33;
button1.Text = "CPU Step";
button1.UseVisualStyleBackColor = true;
button1.Click += btnStep_Click;
btnCpuStep.Location = new Point(860, 605);
btnCpuStep.Name = "btnCpuStep";
btnCpuStep.Size = new Size(94, 29);
btnCpuStep.TabIndex = 33;
btnCpuStep.Text = "CPU Step";
btnCpuStep.UseVisualStyleBackColor = true;
btnCpuStep.Click += btnStep_Click;
//
// CpuRun
//
CpuRun.Location = new Point(943, 757);
CpuRun.Margin = new Padding(4);
CpuRun.Location = new Point(754, 606);
CpuRun.Name = "CpuRun";
CpuRun.Size = new Size(118, 36);
CpuRun.Size = new Size(94, 29);
CpuRun.TabIndex = 34;
CpuRun.Text = "CPU Run";
CpuRun.UseVisualStyleBackColor = true;
@@ -361,57 +352,83 @@
groupBox1.Controls.Add(lblTone2);
groupBox1.Controls.Add(lblNoise);
groupBox1.Controls.Add(lblTone0);
groupBox1.Location = new Point(266, 658);
groupBox1.Location = new Point(213, 526);
groupBox1.Margin = new Padding(2);
groupBox1.Name = "groupBox1";
groupBox1.Size = new Size(397, 222);
groupBox1.Padding = new Padding(2);
groupBox1.Size = new Size(318, 178);
groupBox1.TabIndex = 35;
groupBox1.TabStop = false;
groupBox1.Text = "Audio (SN76489)";
//
// lblTone0
// lblTone1
//
lblTone0.AutoSize = true;
lblTone0.Location = new Point(25, 48);
lblTone0.Name = "lblTone0";
lblTone0.Size = new Size(59, 25);
lblTone0.TabIndex = 0;
lblTone0.Text = "Tone0";
//
// lblNoise
//
lblNoise.AutoSize = true;
lblNoise.Location = new Point(25, 160);
lblNoise.Name = "lblNoise";
lblNoise.Size = new Size(57, 25);
lblNoise.TabIndex = 1;
lblNoise.Text = "Noise";
lblTone1.AutoSize = true;
lblTone1.Location = new Point(20, 66);
lblTone1.Margin = new Padding(2, 0, 2, 0);
lblTone1.Name = "lblTone1";
lblTone1.Size = new Size(49, 20);
lblTone1.TabIndex = 3;
lblTone1.Text = "Tone1";
//
// lblTone2
//
lblTone2.AutoSize = true;
lblTone2.Location = new Point(25, 122);
lblTone2.Location = new Point(20, 98);
lblTone2.Margin = new Padding(2, 0, 2, 0);
lblTone2.Name = "lblTone2";
lblTone2.Size = new Size(59, 25);
lblTone2.Size = new Size(49, 20);
lblTone2.TabIndex = 2;
lblTone2.Text = "Tone2";
//
// lblTone1
// lblNoise
//
lblTone1.AutoSize = true;
lblTone1.Location = new Point(25, 83);
lblTone1.Name = "lblTone1";
lblTone1.Size = new Size(59, 25);
lblTone1.TabIndex = 3;
lblTone1.Text = "Tone1";
lblNoise.AutoSize = true;
lblNoise.Location = new Point(20, 128);
lblNoise.Margin = new Padding(2, 0, 2, 0);
lblNoise.Name = "lblNoise";
lblNoise.Size = new Size(47, 20);
lblNoise.TabIndex = 1;
lblNoise.Text = "Noise";
//
// lblTone0
//
lblTone0.AutoSize = true;
lblTone0.Location = new Point(20, 38);
lblTone0.Margin = new Padding(2, 0, 2, 0);
lblTone0.Name = "lblTone0";
lblTone0.Size = new Size(49, 20);
lblTone0.TabIndex = 0;
lblTone0.Text = "Tone0";
//
// lblHalt
//
lblHalt.AutoSize = true;
lblHalt.Location = new Point(9, 564);
lblHalt.Name = "lblHalt";
lblHalt.Size = new Size(37, 20);
lblHalt.TabIndex = 36;
lblHalt.Text = "Halt";
//
// lblR
//
lblR.AutoSize = true;
lblR.Location = new Point(9, 392);
lblR.Name = "lblR";
lblR.Size = new Size(18, 20);
lblR.TabIndex = 37;
lblR.Text = "R";
//
// DebuggerForm
//
AutoScaleDimensions = new SizeF(10F, 25F);
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(1206, 892);
ClientSize = new Size(965, 714);
Controls.Add(lblR);
Controls.Add(lblHalt);
Controls.Add(groupBox1);
Controls.Add(CpuRun);
Controls.Add(button1);
Controls.Add(btnCpuStep);
Controls.Add(richTextBox1);
Controls.Add(lblFrameTime);
Controls.Add(lblFPS);
@@ -475,7 +492,7 @@
private Label lblFPS;
private Label lblFrameTime;
private RichTextBox richTextBox1;
private Button button1;
private Button btnCpuStep;
private Button CpuRun;
public System.Windows.Forms.Timer uiUpdateTimer;
private GroupBox groupBox1;
@@ -483,6 +500,8 @@
private Label lblTone2;
private Label lblNoise;
private Label lblTone0;
private Label lblHalt;
private Label lblR;
//private TextBox textBox4;
}
}

View File

@@ -27,6 +27,7 @@ namespace Desktop
UpdateStackView();
UpdateDisassemblyView();
_mainForm = mainForm;
CpuRun.Text = _mainForm.IsRunning ? "CPU Stop" : "CPU Run";
}
private void CpuRun_Click(object sender, EventArgs e)
@@ -35,7 +36,6 @@ namespace Desktop
{
// Stop the machine
_mainForm.StopEmulator();
CpuRun.Text = "CPU Run";
// Stop the live UI updates and do one final manual refresh
uiUpdateTimer.Stop();
@@ -45,12 +45,12 @@ namespace Desktop
{
// Start the machine
_mainForm.StartEmulator();
CpuRun.Text = "CPU Stop";
// Start the timer so the debugger screen updates automatically
// (Make sure your uiUpdateTimer Interval in the designer is set to something like 100ms)
uiUpdateTimer.Start();
}
CpuRun.Text = _mainForm.IsRunning ? "CPU Stop" : "CPU Run";
}
private void btnStep_Click(object sender, EventArgs e)
@@ -92,6 +92,8 @@ namespace Desktop
// Current Emulator State
private void UpdateDisplay()
{
CpuRun.Text = _mainForm.IsRunning ? "CPU Stop" : "CPU Run";
btnCpuStep.Enabled = _mainForm.IsRunning ? false : true;
lblAF.Text = $"AF: {_cpu.AF.Word:X4}";
lblBC.Text = $"BC: {_cpu.BC.Word:X4}";
lblDE.Text = $"DE: {_cpu.DE.Word:X4}";
@@ -108,11 +110,12 @@ namespace Desktop
lblFrames.Text = $"Frames Rendered: {_mainForm.TotalFrameCount}";
lblFrameTime.Text = $"Frame Time: {((float)_mainForm.FrameTime):F1}ms";
lblFPS.Text = $"FPS: {_mainForm.FramesPerSecond:F2}";
lblHalt.Text = $"CPU Halted: {_cpu.IsHalted}";
lblR.Text = $"R: {_cpu.R:X2}";
UpdateMemoryView();
UpdateStackView();
UpdateDisassemblyView();
// --- AUDIO REGISTERS ---
// Use _mainForm to access the Machine, and then grab the AudioProcessor!
// --- AUDIO REGISTERS ---//
if (_mainForm._machine != null && _mainForm._machine.AudioProcessor != null)
{
ushort[] apuRegs = _mainForm._machine.AudioProcessor.Registers;
@@ -666,6 +669,9 @@ namespace Desktop
case 0xC9:
mnemonic = "RET";
break;
case 0x76:
mnemonic = "HALT!";
break;
case 0xCB:
cbOp = _memoryBus.Read((ushort)(currentPc + 1));

View File

@@ -14,10 +14,10 @@
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<StartupObject>Desktop.Program</StartupObject>
<AssemblyName>Parsons Master System</AssemblyName>
<AssemblyName>Parsons Master System 2026</AssemblyName>
<ApplicationIcon>favicon.ico</ApplicationIcon>
<Title>Sega Master System EMulator 2026</Title>
<Version>0.9</Version>
<Version>1.0</Version>
<Authors>Marc Parsons</Authors>
<Company>Parsons Limited</Company>
<Description>Parsons Master System 2026</Description>
@@ -27,6 +27,7 @@
<ItemGroup>
<None Remove="ROMS\After Burner %28UE%29 [!].sms" />
<None Remove="ROMS\Aladdin %28USA, Europe, Brazil%29.gg" />
<None Remove="ROMS\Alex Kidd in High Tech World %28UE%29 [!].sms" />
<None Remove="ROMS\Alex Kidd in Miracle World %28UE%29 [!].sms" />
<None Remove="ROMS\Back to the Future 2 %28UE%29 [!].sms" />
@@ -34,6 +35,7 @@
<None Remove="ROMS\Bart vs. the Space Mutants %28UE%29 [!].sms" />
<None Remove="ROMS\Bart vs. the World %28UE%29 [!].sms" />
<None Remove="ROMS\Black Belt %28UE%29 [!].sms" />
<None Remove="ROMS\Bonanza Bros. %28Europe%29.sms" />
<None Remove="ROMS\California Games %28UE%29 [!].sms" />
<None Remove="ROMS\California Games 2 %28UE%29 [!].sms" />
<None Remove="ROMS\Casino Games %28UE%29 [!].sms" />
@@ -68,9 +70,11 @@
<None Remove="ROMS\Impossible Mission %28UE%29 [!].sms" />
<None Remove="ROMS\Japanese SMS BIOS v2.1 %28J%29 [!].sms" />
<None Remove="ROMS\Jurassic Park %28UE%29 [!].sms" />
<None Remove="ROMS\Lucky Dime Caper Starring Donald Duck, The %28Europe, Brazil%29 %28En%29.sms" />
<None Remove="ROMS\Mickey Mouse - Castle of Illusion %28UE%29 [!].sms" />
<None Remove="ROMS\Mickey Mouse - Land of Illusion %28UE%29 [!].sms" />
<None Remove="ROMS\Mickey Mouse - Legend of Illusion %28UE%29 [!].sms" />
<None Remove="ROMS\Micro Machines %28Europe%29.sms" />
<None Remove="ROMS\Mortal Kombat %28UE%29 [!].sms" />
<None Remove="ROMS\Mortal Kombat 2 %28UE%29 [!].sms" />
<None Remove="ROMS\Mortal Kombat 3 %28UE%29 [!].sms" />
@@ -80,6 +84,7 @@
<None Remove="ROMS\Parlour Games %28UE%29 [!].sms" />
<None Remove="ROMS\Phantasy Star %28UE%29 [!].sms" />
<None Remove="ROMS\Populous %28UE%29 [!].sms" />
<None Remove="ROMS\Prince of Persia %28Europe%29.sms" />
<None Remove="ROMS\Psychic World %28UE%29 [!].sms" />
<None Remove="ROMS\Psycho Fox %28UE%29 [!].sms" />
<None Remove="ROMS\R-Type.sms" />
@@ -90,6 +95,8 @@
<None Remove="ROMS\Sonic 1 GG.gg" />
<None Remove="ROMS\Sonic 2.sms" />
<None Remove="ROMS\Sonic Chaos %28UE%29 [!].sms" />
<None Remove="ROMS\Sonic The Hedgehog - Triple Trouble %28USA, Europe, Brazil%29.gg" />
<None Remove="ROMS\Sonic The Hedgehog 2 %28World%29.gg" />
<None Remove="ROMS\Sonic.sms" />
<None Remove="ROMS\Space Harrier %28USA%29.sms" />
<None Remove="ROMS\Speedball %28UE%29 %28Virgin%29 [!].sms" />
@@ -122,6 +129,7 @@
<EmbeddedResource Include="ROMS\After Burner (UE) [!].sms">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="ROMS\Aladdin (USA, Europe, Brazil).gg" />
<EmbeddedResource Include="ROMS\Alex Kidd in High Tech World (UE) [!].sms">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
@@ -143,6 +151,7 @@
<EmbeddedResource Include="ROMS\Black Belt (UE) [!].sms">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="ROMS\Bonanza Bros. (Europe).sms" />
<EmbeddedResource Include="ROMS\California Games (UE) [!].sms">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
@@ -241,6 +250,7 @@
<EmbeddedResource Include="ROMS\Jurassic Park (UE) [!].sms">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="ROMS\Lucky Dime Caper Starring Donald Duck, The (Europe, Brazil) (En).sms" />
<EmbeddedResource Include="ROMS\Mickey Mouse - Castle of Illusion (UE) [!].sms">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
@@ -250,6 +260,7 @@
<EmbeddedResource Include="ROMS\Mickey Mouse - Legend of Illusion (UE) [!].sms">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="ROMS\Micro Machines (Europe).sms" />
<EmbeddedResource Include="ROMS\Mortal Kombat (UE) [!].sms">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
@@ -273,6 +284,7 @@
<EmbeddedResource Include="ROMS\Populous (UE) [!].sms">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="ROMS\Prince of Persia (Europe).sms" />
<EmbeddedResource Include="ROMS\Psychic World (UE) [!].sms">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
@@ -301,6 +313,8 @@
<EmbeddedResource Include="ROMS\Sonic Chaos (UE) [!].sms">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="ROMS\Sonic The Hedgehog - Triple Trouble (USA, Europe, Brazil).gg" />
<EmbeddedResource Include="ROMS\Sonic The Hedgehog 2 (World).gg" />
<EmbeddedResource Include="ROMS\Sonic.sms">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>

View File

@@ -32,6 +32,8 @@
fileToolStripMenuItem = new ToolStripMenuItem();
openToolStripMenuItem = new ToolStripMenuItem();
includedToolStripMenuItem = new ToolStripMenuItem();
masterSystemToolStripMenuItem = new ToolStripMenuItem();
gameGearToolStripMenuItem = new ToolStripMenuItem();
selectROMToolStripMenuItem1 = new ToolStripMenuItem();
exitToolStripMenuItem = new ToolStripMenuItem();
viewToolStripMenuItem = new ToolStripMenuItem();
@@ -44,8 +46,6 @@
turboModeToolStripMenuItem = new ToolStripMenuItem();
helpToolStripMenuItem = new ToolStripMenuItem();
aboutToolStripMenuItem = new ToolStripMenuItem();
masterSystemToolStripMenuItem = new ToolStripMenuItem();
gameGearToolStripMenuItem = new ToolStripMenuItem();
menuStrip1.SuspendLayout();
SuspendLayout();
//
@@ -71,27 +71,39 @@
//
openToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { includedToolStripMenuItem, selectROMToolStripMenuItem1 });
openToolStripMenuItem.Name = "openToolStripMenuItem";
openToolStripMenuItem.Size = new Size(224, 26);
openToolStripMenuItem.Size = new Size(128, 26);
openToolStripMenuItem.Text = "Open";
//
// includedToolStripMenuItem
//
includedToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { masterSystemToolStripMenuItem, gameGearToolStripMenuItem });
includedToolStripMenuItem.Name = "includedToolStripMenuItem";
includedToolStripMenuItem.Size = new Size(224, 26);
includedToolStripMenuItem.Size = new Size(178, 26);
includedToolStripMenuItem.Text = "Included";
//
// masterSystemToolStripMenuItem
//
masterSystemToolStripMenuItem.Name = "masterSystemToolStripMenuItem";
masterSystemToolStripMenuItem.Size = new Size(188, 26);
masterSystemToolStripMenuItem.Text = "Master System";
//
// gameGearToolStripMenuItem
//
gameGearToolStripMenuItem.Name = "gameGearToolStripMenuItem";
gameGearToolStripMenuItem.Size = new Size(188, 26);
gameGearToolStripMenuItem.Text = "Game Gear";
//
// selectROMToolStripMenuItem1
//
selectROMToolStripMenuItem1.Name = "selectROMToolStripMenuItem1";
selectROMToolStripMenuItem1.Size = new Size(224, 26);
selectROMToolStripMenuItem1.Size = new Size(178, 26);
selectROMToolStripMenuItem1.Text = "Select ROM...";
selectROMToolStripMenuItem1.Click += selectROMToolStripMenuItem_Click;
//
// exitToolStripMenuItem
//
exitToolStripMenuItem.Name = "exitToolStripMenuItem";
exitToolStripMenuItem.Size = new Size(224, 26);
exitToolStripMenuItem.Size = new Size(128, 26);
exitToolStripMenuItem.Text = "Exit";
exitToolStripMenuItem.Click += exitToolStripMenuItem_Click;
//
@@ -126,28 +138,28 @@
// resetToolStripMenuItem
//
resetToolStripMenuItem.Name = "resetToolStripMenuItem";
resetToolStripMenuItem.Size = new Size(224, 26);
resetToolStripMenuItem.Size = new Size(174, 26);
resetToolStripMenuItem.Text = "Reset";
resetToolStripMenuItem.Click += resetToolStripMenuItem_Click;
//
// saveStateToolStripMenuItem
//
saveStateToolStripMenuItem.Name = "saveStateToolStripMenuItem";
saveStateToolStripMenuItem.Size = new Size(224, 26);
saveStateToolStripMenuItem.Size = new Size(174, 26);
saveStateToolStripMenuItem.Text = "Save State";
saveStateToolStripMenuItem.Click += saveStateToolStripMenuItem_Click;
//
// loadStateToolStripMenuItem
//
loadStateToolStripMenuItem.Name = "loadStateToolStripMenuItem";
loadStateToolStripMenuItem.Size = new Size(224, 26);
loadStateToolStripMenuItem.Size = new Size(174, 26);
loadStateToolStripMenuItem.Text = "Load State";
loadStateToolStripMenuItem.Click += loadStateToolStripMenuItem_Click;
//
// turboModeToolStripMenuItem
//
turboModeToolStripMenuItem.Name = "turboModeToolStripMenuItem";
turboModeToolStripMenuItem.Size = new Size(224, 26);
turboModeToolStripMenuItem.Size = new Size(174, 26);
turboModeToolStripMenuItem.Text = "Turbo Mode";
turboModeToolStripMenuItem.Click += turboModeToolStripMenuItem_Click;
//
@@ -161,20 +173,9 @@
// aboutToolStripMenuItem
//
aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
aboutToolStripMenuItem.Size = new Size(133, 26);
aboutToolStripMenuItem.Size = new Size(224, 26);
aboutToolStripMenuItem.Text = "About";
//
// masterSystemToolStripMenuItem
//
masterSystemToolStripMenuItem.Name = "masterSystemToolStripMenuItem";
masterSystemToolStripMenuItem.Size = new Size(224, 26);
masterSystemToolStripMenuItem.Text = "Master System";
//
// gameGearToolStripMenuItem
//
gameGearToolStripMenuItem.Name = "gameGearToolStripMenuItem";
gameGearToolStripMenuItem.Size = new Size(224, 26);
gameGearToolStripMenuItem.Text = "Game Gear";
aboutToolStripMenuItem.Click += aboutToolStripMenuItem_Click;
//
// ParsonsForm1
//

View File

@@ -24,7 +24,7 @@ namespace Desktop
private string _currentRomName = "No ROM";
private string _currentRomPath = "";
private Stopwatch _stopwatch = new Stopwatch();
private string _romType = "";
private string _romType = "TBC";
private bool isTurboMode = false;
public bool IsRunning { get; private set; } = false;
@@ -34,12 +34,18 @@ namespace Desktop
set { if (_machine != null) _machine.Breakpoint = value; }
}
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
public ParsonsForm1()
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
{
InitializeComponent();
this.KeyPreview = true;
#pragma warning disable CS8622 // Nullability of reference types in type of parameter doesn't match the target delegate (possibly because of nullability attributes).
this.KeyDown += Form1_KeyDown;
#pragma warning restore CS8622 // Nullability of reference types in type of parameter doesn't match the target delegate (possibly because of nullability attributes).
#pragma warning disable CS8622 // Nullability of reference types in type of parameter doesn't match the target delegate (possibly because of nullability attributes).
this.KeyUp += Form1_KeyUp;
#pragma warning restore CS8622 // Nullability of reference types in type of parameter doesn't match the target delegate (possibly because of nullability attributes).
this.DoubleBuffered = true;
this.ResizeRedraw = true;
}
@@ -47,21 +53,28 @@ namespace Desktop
{
base.OnLoad(e);
this.Text = $"Parsons Master System 2026 - {_currentRomName}";
this.Text = $"{_romType} Parsons Master System 2026 - {_currentRomName}";
this.BackColor = Color.Black;
_machine = new SmsMachine();
_audioPlayer = new NAudioPlayer();
_machine.AudioProcessor.AudioDevice = _audioPlayer;
IsRunning = false;
PopulateIncludedRomsMenu();
}
private void DrawScreen()
private void DrawScreen(int[] safeFrame)
{
// Rapidly copy our VDP FrameBuffer into the Windows Bitmap
// Rapidly the Frame into the Windows Bitmap
var data = _screenBitmap.LockBits(new Rectangle(0, 0, 256, 192), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
Marshal.Copy(_machine.VideoProcessor.FrameBuffer, 0, data.Scan0, _machine.VideoProcessor.FrameBuffer.Length);
//Frame buffer draw
Marshal.Copy(safeFrame, 0, data.Scan0, safeFrame.Length);
//Direct VDP draw
//Marshal.Copy(_machine.VideoProcessor.FrameBuffer, 0, data.Scan0, _machine.VideoProcessor.FrameBuffer.Length);
_screenBitmap.UnlockBits(data);
this.Invalidate();
TotalFrameCount++;
@@ -115,42 +128,7 @@ namespace Desktop
e.Graphics.DrawImage(_screenBitmap, destRect, sourceRect, GraphicsUnit.Pixel);
}
}
//protected override void OnPaint(PaintEventArgs e)
//{
// base.OnPaint(e);
// if (_screenBitmap != null && menuStrip1 != null)
// {
// // 1. Maintain perfect, chunky retro pixels
// e.Graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
// e.Graphics.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.Half;
// // 2. Calculate the actual usable window space
// int topOffset = menuStrip1.Height;
// int availableWidth = this.ClientSize.Width;
// int availableHeight = this.ClientSize.Height - topOffset;
// // 3. Calculate the maximum scale factor that fits perfectly
// float scaleX = (float)availableWidth / 256f;
// float scaleY = (float)availableHeight / 192f;
// // Pick the smaller scale so the image never bleeds off the edge
// float scale = Math.Min(scaleX, scaleY);
// // 4. Calculate the new physical pixel dimensions
// int newWidth = (int)(256 * scale);
// int newHeight = (int)(192 * scale);
// // 5. Center the image (Letterboxing / Pillarboxing)
// int offsetX = (availableWidth - newWidth) / 2;
// int offsetY = topOffset + ((availableHeight - newHeight) / 2);
// Rectangle renderArea = new Rectangle(offsetX, offsetY, newWidth, newHeight);
// // 6. Draw the scaled image
// e.Graphics.DrawImage(_screenBitmap, renderArea);
// }
//}
public void StartEmulator()
{
@@ -166,7 +144,8 @@ namespace Desktop
double nextFrameTargetTime = _stopwatch.Elapsed.TotalMilliseconds + TargetFrameTime;
double lastFpsUpdate = _stopwatch.Elapsed.TotalMilliseconds;
int framesThisSecond = 0;
try
{
while (IsRunning)
{
//targetFps = isTurboMode ? 1000 : 59.94;
@@ -197,14 +176,18 @@ namespace Desktop
// --------------------------------
_machine.RunFrame();
int[] frozenFrame = (int[])_machine.VideoProcessor.FrameBuffer.Clone();
// 2. FIRE AND FORGET! Tell Windows to draw, but DO NOT WAIT for it to finish!
BeginInvoke((System.Windows.Forms.MethodInvoker)delegate { DrawScreen(); });
BeginInvoke((System.Windows.Forms.MethodInvoker)delegate { DrawScreen(frozenFrame); });
// 3. Safety catch
if (_machine.Breakpoint.HasValue && _machine.Cpu.PC == _machine.Breakpoint.Value)
{
IsRunning = false;
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
BeginInvoke((System.Windows.Forms.MethodInvoker)delegate { _debugger?.uiUpdateTimer_Tick(null, EventArgs.Empty); });
#pragma warning restore CS8625 // Cannot convert null literal to non-nullable reference type.
break;
}
@@ -247,6 +230,23 @@ namespace Desktop
nextFrameTargetTime = currentTime + TargetFrameTime;
}
}
}
catch (Exception ex)
{
IsRunning = false;
this.Invoke((System.Windows.Forms.MethodInvoker)delegate
{
MessageBox.Show(
$"The Z80 CPU Panicked!\n\n" +
$"PC Address: 0x{_machine.Cpu.PC:X4}\n" +
$"Error: {ex.Message}\n\n" +
$"Stack Trace:\n{ex.StackTrace}",
"Fatal Emulator Crash",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
});
}
});
}
@@ -254,55 +254,58 @@ namespace Desktop
{
IsRunning = false;
}
private async void LoadRomAndStart(string filePath)
private async void LoadRomDataAndStart(byte[] romData, string fileName, string uniqueId)
{
StopEmulator();
if (_emulatorTask != null)
{
await _emulatorTask;
}
_romType = Path.GetExtension(filePath);
if (_romType == ".sms")
{
_machine.VideoProcessor.IsGameGear = false;
}
else if (_romType == ".gg")
{
_machine.VideoProcessor.IsGameGear = true;
}
else
throw new Exception("Incorrect ROM Type!");
_romType = _machine.VideoProcessor.IsGameGear ? "GG" : "SMS";
// 1. SAVE THE PREVIOUS GAME!
SaveCurrentSram();
// 2. Load the file
byte[] rom = File.ReadAllBytes(filePath);
// Blast the bytes straight into the virtual cartridge slot!
_machine.LoadCartridge(romData);
// 3. Jam it into the Sega Mapper
_machine.LoadCartridge(rom);
// Check the hardware mode based on the file name
bool isGG = fileName.EndsWith(".gg", StringComparison.OrdinalIgnoreCase);
_machine.VideoProcessor.IsGameGear = isGG;
// 4. Update the path tracking
_currentRomPath = filePath;
_currentRomName = Path.GetFileNameWithoutExtension(filePath);
//this.Text = $"{_romType} Parsons Master System 2026 - {_currentRomName}";
// We use uniqueId to track the SRAM file path (works for both real paths and resource names)
_currentRomPath = uniqueId;
_currentRomName = Path.GetFileNameWithoutExtension(fileName);
// Update the window title dynamically
_romType = isGG ? "GG" : "MS";
this.Text = $"{_romType} Parsons Master System 2026 - {_currentRomName}";
// 5. LOAD THE NEW SAVE DATA FROM THE EXE FOLDER!
string savPath = GetSaveFilePath();
if (savPath != null)
{
_machine.MemoryBus.LoadSaveData(savPath);
}
// 6. Turn the power on!
StartEmulator();
}
private void LoadRomAndStart(string filePath)
{
if (!File.Exists(filePath)) return;
// Read from the hard drive, then pass to the universal loader
byte[] romData = File.ReadAllBytes(filePath);
LoadRomDataAndStart(romData, Path.GetFileName(filePath), filePath);
}
private string GetSaveFilePath()
{
// Don't try to save if a game hasn't been loaded yet!
if (string.IsNullOrEmpty(_currentRomName) || _currentRomName == "No ROM")
#pragma warning disable CS8603 // Possible null reference return.
return null;
#pragma warning restore CS8603 // Possible null reference return.
// Application.StartupPath is the exact folder containing your .exe
string exeFolder = Application.StartupPath;
@@ -324,37 +327,80 @@ namespace Desktop
private void PopulateIncludedRomsMenu()
{
string romsDirectory = @"C:\Parsons\Local Code Projects\ParsonsMasterSystem2026\Desktop\ROMS\";
string romsDirectory = "Desktop.ROMS";
string[] files = GetFilesInResourceDirectory(romsDirectory);
if (Directory.Exists(romsDirectory))
foreach (string resourceName in files)
{
string[] romFiles = Directory.GetFiles(romsDirectory, "*.sms");
foreach (string file in romFiles)
// 1. Strip the "Desktop.ROMS." prefix
string cleanFileName = resourceName.Replace("Desktop.ROMS.", "");
// 2. Strip the extension for a beautiful menu item (e.g. "Sonic")
string menuName = Path.GetFileNameWithoutExtension(cleanFileName);
ToolStripMenuItem romMenuItem = new ToolStripMenuItem(menuName);
// 3. Point the click event to our new extraction helper!
romMenuItem.Click += (sender, e) => LoadEmbeddedRom(resourceName);
// 4. Sort into the correct menu based on extension!
if (resourceName.EndsWith(".gg", StringComparison.OrdinalIgnoreCase))
{
// Create a new dropdown item for each .sms file it finds
string romName = Path.GetFileNameWithoutExtension(file);
ToolStripMenuItem romMenuItem = new ToolStripMenuItem(romName);
// When clicked, pass the file path to our helper method
romMenuItem.Click += (sender, e) => LoadRomAndStart(file);
// Add it to the "Included" submenu (make sure the name matches your designer element!)
masterSystemToolStripMenuItem.DropDownItems.Add(romMenuItem);
}
romFiles = Directory.GetFiles(romsDirectory, "*.gg");
foreach (string file in romFiles)
{
// Create a new dropdown item for each .gg file it finds
string romName = Path.GetFileNameWithoutExtension(file);
ToolStripMenuItem romMenuItem = new ToolStripMenuItem(romName);
// When clicked, pass the file path to the helper method
romMenuItem.Click += (sender, e) => LoadRomAndStart(file);
gameGearToolStripMenuItem.DropDownItems.Add(romMenuItem);
}
else if (resourceName.EndsWith(".sms", StringComparison.OrdinalIgnoreCase))
{
masterSystemToolStripMenuItem.DropDownItems.Add(romMenuItem);
}
}
}
private void LoadEmbeddedRom(string resourceName)
{
// 1. Strip off the ugly prefix to get the real file name for the UI and the .gg check
string cleanFileName = resourceName.Replace("Desktop.ROMS.", "");
Assembly assembly = Assembly.GetExecutingAssembly();
// 2. Open a direct pipe to the internal resource
using (Stream stream = assembly.GetManifestResourceStream(resourceName))
{
if (stream == null) return;
// 3. Copy the stream entirely in RAM—never touching the hard drive!
using (MemoryStream ms = new MemoryStream())
{
stream.CopyTo(ms);
byte[] romData = ms.ToArray();
// 4. Pass the raw bytes to our universal loader
LoadRomDataAndStart(romData, cleanFileName, resourceName);
}
}
}
public static string[] GetFilesInResourceDirectory(string directoryPrefix)
{
// Get the assembly containing the embedded resources.
// Change this if your resources are in a different project/assembly.
Assembly assembly = Assembly.GetExecutingAssembly();
// Ensure the prefix ends with a dot so we don't accidentally match
// similarly named folders (e.g., matching "Folder" but not "FolderTwo")
if (!directoryPrefix.EndsWith("."))
{
directoryPrefix += ".";
}
// Get all resource names and filter by our "directory" prefix
string[] allResources = assembly.GetManifestResourceNames();
string[] filesInDirectory = allResources
.Where(resource => resource.StartsWith(directoryPrefix, StringComparison.OrdinalIgnoreCase))
.ToArray();
return filesInDirectory;
}
private void selectROMToolStripMenuItem_Click(object sender, EventArgs e)
{
@@ -484,5 +530,28 @@ namespace Desktop
turboModeToolStripMenuItem.Checked = !turboModeToolStripMenuItem.Checked;
isTurboMode = turboModeToolStripMenuItem.Checked ? true : false;
}
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show(
$"First full release of Parsons Master System Emulator 2026!\r\n\r\nFeatures (v1.0):\r\n\r\n" +
$" *Full compatibility with all Master System and Game Gear ROMs\r\n" +
$" *Full window scaling with fixed aspect ratio (SMS & GG)\r\n" +
$" *Full 4 channel SN76489 implememtation using NAudio\r\n" +
$" *SRAM auto save and load (Battery Backed RAM)\r\n" +
$" *Keyboard and XInput control pad support\r\n" +
$" *Comprehensive Debugger\r\n" +
$" *VRAM Viewer\r\n" +
$" *Single point Save State\r\n" +
$" *Turbo mode\r\n" +
$" *Includes a selection of commercial ROMs\r\n\r\n" +
$"Planned updates (v1.1):\r\n\r\n" +
$" *Architectural double buffering (prevent screen tear)\r\n" +
$" *Graphics shaders (scanlines etc...)\r\n" +
$" *Add multiple Save States per game\r\n\r\n\r\n" +
$"(c) Marc Parsons 2026","Parsons Master System 2026 v1.0",
MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PublishAot>true</PublishAot>
<OptimizationPreference>Size</OptimizationPreference>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Raylib-cs" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,125 @@
using System;
using System.IO;
using System.Numerics;
using Core;
using Raylib_cs;
namespace Parsons.SteamDeck
{
class Program
{
static void Main(string[] args)
{
// 1. Initialize Cross-Platform OpenGL Window
// THE FIX: Use PascalCase C# enums
Raylib.SetConfigFlags(ConfigFlags.ResizableWindow);
Raylib.InitWindow(1280, 800, "Parsons Master System"); // Native Steam Deck Resolution
Raylib.InitAudioDevice();
// 2. Initialize Hardware-Agnostic Audio Stream (44.1kHz, 32-bit float, Mono)
AudioStream audioStream = Raylib.LoadAudioStream(44100, 32, 1);
Raylib.PlayAudioStream(audioStream);
// 3. Boot the Core Emulator
SmsMachine machine = new SmsMachine();
RaylibAudioPlayer audioPlayer = new RaylibAudioPlayer();
machine.AudioProcessor.AudioDevice = audioPlayer;
// Load a ROM (Passed via command line argument, e.g. ./Parsons.SteamDeck sonic.sms)
if (args.Length > 0 && File.Exists(args[0]))
{
machine.LoadCartridge(File.ReadAllBytes(args[0]));
bool isGG = args[0].EndsWith(".gg", StringComparison.OrdinalIgnoreCase);
machine.VideoProcessor.IsGameGear = isGG;
}
// Lock the engine loop to 60 FPS natively
Raylib.SetTargetFPS(60);
// 4. Prepare the Video Texture Pipeline
// THE FIX: Use Color.Black
Image img = Raylib.GenImageColor(256, 192, Color.Black);
Texture2D vdpTexture = Raylib.LoadTextureFromImage(img);
byte[] pixelBuffer = new byte[256 * 192 * 4]; // Fast RGBA translation array
// --- THE MAIN GAME LOOP ---
while (!Raylib.WindowShouldClose())
{
// A. OS-Agnostic Input Polling (Works on Keyboard AND Steam Deck Controller)
// THE FIX: PascalCase KeyboardKey and GamepadButton enums
byte pad = 0xFF;
if (Raylib.IsKeyDown(KeyboardKey.Up) || Raylib.IsGamepadButtonDown(0, GamepadButton.LeftFaceUp)) pad &= 0xFE;
if (Raylib.IsKeyDown(KeyboardKey.Down) || Raylib.IsGamepadButtonDown(0, GamepadButton.LeftFaceDown)) pad &= 0xFD;
if (Raylib.IsKeyDown(KeyboardKey.Left) || Raylib.IsGamepadButtonDown(0, GamepadButton.LeftFaceLeft)) pad &= 0xFB;
if (Raylib.IsKeyDown(KeyboardKey.Right) || Raylib.IsGamepadButtonDown(0, GamepadButton.LeftFaceRight)) pad &= 0xF7;
// Steam Deck "A" Button is RightFaceDown. "B" Button is RightFaceRight.
if (Raylib.IsKeyDown(KeyboardKey.Z) || Raylib.IsGamepadButtonDown(0, GamepadButton.RightFaceDown)) pad &= 0xEF; // B1 / A Button
if (Raylib.IsKeyDown(KeyboardKey.X) || Raylib.IsGamepadButtonDown(0, GamepadButton.RightFaceRight)) pad &= 0xDF; // B2 / B Button
machine.IoBus.Joypad1Keyboard = pad;
// B. Execute exactly one frame of T-States
machine.RunFrame();
// C. Flush Audio Buffer to the Sound Card
if (Raylib.IsAudioStreamProcessed(audioStream))
{
float[] samples = audioPlayer.GetQueuedSamples();
if (samples.Length > 0)
{
unsafe
{
fixed (float* p = samples)
{
Raylib.UpdateAudioStream(audioStream, p, samples.Length);
}
}
}
}
// D. Fast Pixel Translation (ARGB int -> RGBA bytes)
int[] frameBuffer = machine.VideoProcessor.FrameBuffer;
for (int i = 0; i < frameBuffer.Length; i++)
{
int argb = frameBuffer[i];
pixelBuffer[i * 4 + 0] = (byte)((argb >> 16) & 0xFF); // R
pixelBuffer[i * 4 + 1] = (byte)((argb >> 8) & 0xFF); // G
pixelBuffer[i * 4 + 2] = (byte)(argb & 0xFF); // B
pixelBuffer[i * 4 + 3] = 255; // A
}
// Push bytes directly to the GPU Texture
unsafe
{
fixed (byte* p = pixelBuffer)
{
Raylib.UpdateTexture(vdpTexture, p);
}
}
// E. Render to Screen (Perfect Aspect Ratio Scaling)
Raylib.BeginDrawing();
Raylib.ClearBackground(Color.Black);
float scale = Math.Min((float)Raylib.GetScreenWidth() / 256, (float)Raylib.GetScreenHeight() / 192);
Rectangle sourceRec = new Rectangle(0, 0, 256, 192);
Rectangle destRec = new Rectangle(
(Raylib.GetScreenWidth() - (256 * scale)) * 0.5f,
(Raylib.GetScreenHeight() - (192 * scale)) * 0.5f,
256 * scale, 192 * scale);
// Draw the VDP Frame
Raylib.DrawTexturePro(vdpTexture, sourceRec, destRec, new Vector2(0, 0), 0.0f, Color.White);
Raylib.EndDrawing();
}
// Clean up hardware resources on exit
Raylib.UnloadTexture(vdpTexture);
Raylib.UnloadAudioStream(audioStream);
Raylib.CloseAudioDevice();
Raylib.CloseWindow();
}
}
}

View File

@@ -0,0 +1,28 @@
using Core.Interfaces;
using System.Collections.Concurrent;
namespace Parsons.SteamDeck
{
public class RaylibAudioPlayer : IAudioDevice
{
private ConcurrentQueue<float> _sampleQueue = new ConcurrentQueue<float>();
public void AddSample(float sample)
{
// Queue the sample from the emulator core
_sampleQueue.Enqueue(sample);
}
public float[] GetQueuedSamples()
{
// Pull all pending samples out of the queue to send to the sound card
int count = _sampleQueue.Count;
float[] buffer = new float[count];
for (int i = 0; i < count; i++)
{
_sampleQueue.TryDequeue(out buffer[i]);
}
return buffer;
}
}
}

View File

@@ -1,12 +1,14 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.37216.2 d17.14
VisualStudioVersion = 17.14.37216.2
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Desktop", "Desktop\Desktop.csproj", "{E245F3A5-E541-43BB-B64E-B4B2BB3D8C51}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "Core\Core.csproj", "{B0A741E4-CE3E-4DF0-96B2-E314973F9201}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Parsons.Steamdeck", "Parsons.Steamdeck\Parsons.Steamdeck.csproj", "{B619DF68-7EBF-4C6A-AC24-AD5250404943}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -21,6 +23,10 @@ Global
{B0A741E4-CE3E-4DF0-96B2-E314973F9201}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0A741E4-CE3E-4DF0-96B2-E314973F9201}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0A741E4-CE3E-4DF0-96B2-E314973F9201}.Release|Any CPU.Build.0 = Release|Any CPU
{B619DF68-7EBF-4C6A-AC24-AD5250404943}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B619DF68-7EBF-4C6A-AC24-AD5250404943}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B619DF68-7EBF-4C6A-AC24-AD5250404943}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B619DF68-7EBF-4C6A-AC24-AD5250404943}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE