From 12919182ecea554a5075d6b37a9d71bc6e8a7752 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sat, 28 Dec 2024 08:10:59 +0100 Subject: [PATCH] map: Added map ram section 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 | 1 + src/mapram.s | 8 ++++++++ src/wram.s | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/mapram.s diff --git a/src/main.s b/src/main.s index 9c450bd..08ad47f 100644 --- a/src/main.s +++ b/src/main.s @@ -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 index 0000000..7d83b89 --- /dev/null +++ b/src/mapram.s @@ -0,0 +1,8 @@ +#define MAPRAM 0xD000 + + ; this RAM bank stores the current map +.org MAPRAM + +map0: .adv roomb_size * ROOMS_TOTAL + + diff --git a/src/wram.s b/src/wram.s index 6949744..610cd65 100644 --- a/src/wram.s +++ b/src/wram.s @@ -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 -- 2.30.2