From a1b95e9ccf9bd7b316adf21952e43e03f2bf3746 Mon Sep 17 00:00:00 2001
From: Ben Bridle <ben@derelict.engineering>
Date: Tue, 19 Nov 2024 17:52:36 +1300
Subject: Implement memory device

The memory device is fully implemented, with 3MB of heap memory.

This commit is a bit messy, additional changes are:
- The program memory and program counter in each Bedrock struct have
  been moved to a dedicated struct to prevent a name collision with the
  memory device
- The run_bg and debug functions have been moved to core.c and debug.c
- The blank screen colour has been changed back to black
- No second program runs on the sub screen by default
- The number of Bedrock instances to run has been parameterized
---
 arm9/source/main_debug.c | 24 ------------------------
 1 file changed, 24 deletions(-)
 delete mode 100644 arm9/source/main_debug.c

(limited to 'arm9/source/main_debug.c')

diff --git a/arm9/source/main_debug.c b/arm9/source/main_debug.c
deleted file mode 100644
index eae5192..0000000
--- a/arm9/source/main_debug.c
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <nds.h>
-#include "core.h"
-
-void debug_stacks(Bedrock *br) {
-    u8 i;
-    printf("\nP:0x%04x   I:0x%02x", PC, MEM[PC]);
-    printf("\nW:");
-    for (i=0; i<WST.p; i++) {
-        printf("%02x ", WST.mem[i]);
-    }
-    printf("\nR:");
-    for (i=0; i<RST.p; i++) {
-        printf("%02x ", RST.mem[i]);
-    }
-    printf("\n");
-}
-
-void debug_assert(Bedrock *br) {
-    if (WST.mem[0] == 0xff && WST.p == 1 && RST.p == 0) {
-        printf(".");
-    } else {
-        printf("X");
-    }
-}
-- 
cgit v1.2.3-70-g09d2