summaryrefslogtreecommitdiff
path: root/Emulator/Program.cs
diff options
context:
space:
mode:
authorMelodi <62381002+Melodi17@users.noreply.github.com>2025-08-08 23:57:26 +1000
committerMelodi <62381002+Melodi17@users.noreply.github.com>2025-08-08 23:57:26 +1000
commite62b66dd08ca445d1f7e5b802a503ad3ec83b2df (patch)
tree8cdb4ee09d1eefe096f51d6c9150dc361d08ccb9 /Emulator/Program.cs
parent33e1c5fc6e37549b4eba833ae7e534f9da250b10 (diff)
added branching to compiler and comment generation
Diffstat (limited to 'Emulator/Program.cs')
-rw-r--r--Emulator/Program.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/Emulator/Program.cs b/Emulator/Program.cs
index 3104fa9..c5ae852 100644
--- a/Emulator/Program.cs
+++ b/Emulator/Program.cs
@@ -18,10 +18,10 @@ internal class Program
{
Q1Cpu cpu = new();
Bus bus = new(u16.MinValue, u16.MaxValue);
- RamDevice ram = new(0x1FFF, 1024 * 8);
- File.ReadAllBytes(options.InputFile).CopyTo(ram.Memory, 0);
+ RamDevice rom = new(Q1Layout.Rom.start, Q1Layout.Rom.size);
+ File.ReadAllBytes(options.InputFile).CopyTo(rom.Memory, 0);
- DisplayDevice display = new(16, 64, 32, 0x3FFF);
+ DisplayDevice display = new(16, 64, 32, Q1Layout.Display);
display.SetPalette([
Color.Red,
Color.Green,
@@ -41,12 +41,12 @@ internal class Program
Color.LightGreen
]);
- DebugDevice debug = new(0xEFFF);
-
+ RamDevice memory = new(Q1Layout.Memory.start, Q1Layout.Memory.size);
+
cpu.Bus = bus;
- ram.AttachToBus(bus);
+ rom.AttachToBus(bus);
display.AttachToBus(bus);
- debug.AttachToBus(bus);
+ memory.AttachToBus(bus);
Thread t = new(() =>
{