summaryrefslogtreecommitdiff
path: root/include/gba/defines.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gba/defines.h')
-rw-r--r--include/gba/defines.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/gba/defines.h b/include/gba/defines.h
index 0f7f06755..e67d64777 100644
--- a/include/gba/defines.h
+++ b/include/gba/defines.h
@@ -15,6 +15,11 @@
#define INTR_CHECK (*(u16 *)0x3007FF8)
#define INTR_VECTOR (*(void **)0x3007FFC)
+#define EWRAM_START 0x02000000
+#define EWRAM_END (EWRAM_START + 0x40000)
+#define IWRAM_START 0x03000000
+#define IWRAM_END (IWRAM_START + 0x8000)
+
#define PLTT 0x5000000
#define PLTT_SIZE 0x400
@@ -29,8 +34,10 @@
#define BG_VRAM VRAM
#define BG_VRAM_SIZE 0x10000
-#define BG_CHAR_ADDR(n) (BG_VRAM + (0x4000 * (n)))
-#define BG_SCREEN_ADDR(n) (BG_VRAM + (0x800 * (n)))
+#define BG_CHAR_SIZE 0x4000
+#define BG_SCREEN_SIZE 0x800
+#define BG_CHAR_ADDR(n) (BG_VRAM + (BG_CHAR_SIZE * (n)))
+#define BG_SCREEN_ADDR(n) (BG_VRAM + (BG_SCREEN_SIZE * (n)))
// text-mode BG
#define OBJ_VRAM0 (VRAM + 0x10000)