map: Added map ram section
authorLukas Krickl <lukas@krickl.dev>
Sat, 28 Dec 2024 07:10:59 +0000 (08:10 +0100)
committerLukas Krickl <lukas@krickl.dev>
Sat, 28 Dec 2024 07:10:59 +0000 (08:10 +0100)
The map ram section is used to store the current map.
This is a distinct section from the save ram. It should take up a 4KB
bank in WRAM (D000)

src/main.s
src/mapram.s [new file with mode: 0644]
src/wram.s

index 9c450bdfc78ecdd7d9237526a9db1db849f1b8dd..08ad47f4092d06e24be4794d1bf266ffafcc7022 100644 (file)
@@ -2,6 +2,7 @@
 #include "macros.inc"
 #include "oam.s"
 #include "wram.s"
+#include "mapram.s"
 #include "sram.s"
 
 .org 0x0
diff --git a/src/mapram.s b/src/mapram.s
new file mode 100644 (file)
index 0000000..7d83b89
--- /dev/null
@@ -0,0 +1,8 @@
+#define MAPRAM 0xD000
+
+  ; this RAM bank stores the current map 
+.org MAPRAM
+
+map0: .adv roomb_size * ROOMS_TOTAL
+
+
index 6949744c829ffb4a27ead76e4585b33efb54be6e..610cd6592f68be4e2e003ac42ac11a0799b3c787 100644 (file)
@@ -33,7 +33,7 @@ prev_inputs: .adv 1
 
 #define ACTOR_TABLE_SIZE ACTORS_MAX * actor_size
 
-  ; ptr to current actor table 
+  ; static actor table space
 actor_table: .adv ACTOR_TABLE_SIZE 
 
 actor_soam_ptr: .adv 2