From 634681ce2bb36cd686943102a0f071cd6a09049f Mon Sep 17 00:00:00 2001 From: Melodi <62381002+Melodi17@users.noreply.github.com> Date: Wed, 27 Aug 2025 21:22:55 +1000 Subject: fixed bugs and revolutionized the universe --- Emulator/Q1Layout.cs | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'Emulator/Q1Layout.cs') diff --git a/Emulator/Q1Layout.cs b/Emulator/Q1Layout.cs index c3ccd08..60a99c0 100644 --- a/Emulator/Q1Layout.cs +++ b/Emulator/Q1Layout.cs @@ -1,15 +1,23 @@ namespace Q1.Emulator; +using Chip; + public static class Q1Layout { + public static readonly u16 DisplayWidth = 128; + public static readonly u16 DisplayHeight = 64; + public static readonly u16 DisplayPaletteSize = 16; + // Bus locations - public static readonly (u16 start, u16 size) Rom = (0x1FFF, 1024 * 8); - public static readonly (u16 start, u16 size) Memory = (0x4FFF, 1024 * 16); - public static readonly u16 Display = 0x3FFF; - - - public static readonly u16 StackStart = Q1Layout.Memory.start; - public static readonly u16 StackLength = 256 * 2; // 256 16-bit values + public static readonly (u16 start, u16 size) Rom = (0x1FFF, 1024 * 8); + public static readonly (u16 start, u16 size) Hid = (0x602F, HIDDevice.CalculateSize()); + public static readonly (u16 start, u16 size) Memory = (0x6FFF, 1024 * 16); + public static readonly (u16 start, u16 size) Display = (0x3FFF, + DisplayDevice.DetermineSize(Q1Layout.DisplayPaletteSize, Q1Layout.DisplayWidth, Q1Layout.DisplayHeight)); + + + public static readonly u16 StackStart = Q1Layout.Memory.start; + public static readonly u16 StackLength = 256 * 2; // 256 16-bit values public static readonly u16 FreeMemoryStart = (u16) (Q1Layout.StackStart + Q1Layout.StackLength); public static readonly u16 ProgramStart = Q1Layout.Rom.start; } \ No newline at end of file -- cgit v1.3.1