From 93a9ba254206097e664aa6de20a45d08db427ff4 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sun, 19 Jan 2025 07:26:54 +0100 Subject: [PATCH] defs: Added new def file for structs TODO: move all structs to this file. Added new .section keyword to places where it makes sense --- src/defs.s | 3 +++ src/main.s | 3 +++ src/mapram.s | 2 ++ src/oam.s | 2 ++ src/wram.s | 2 ++ 5 files changed, 12 insertions(+) create mode 100644 src/defs.s diff --git a/src/defs.s b/src/defs.s new file mode 100644 index 0000000..6013798 --- /dev/null +++ b/src/defs.s @@ -0,0 +1,3 @@ +; This file contains struct defintions + +.section structs diff --git a/src/main.s b/src/main.s index e2c7814..c09a04e 100644 --- a/src/main.s +++ b/src/main.s @@ -1,11 +1,14 @@ #include "hw.inc" #include "macros.inc" #include "oam.s" +#include "defs.s" #include "wram.s" #include "mapram.s" #include "hram.s" #include "sram.s" +.section GbPrgRom + .org 0x0 #include "jmp.inc" .fill 0, 0x100 - $ diff --git a/src/mapram.s b/src/mapram.s index e0ff943..2a74de9 100644 --- a/src/mapram.s +++ b/src/mapram.s @@ -1,3 +1,5 @@ +.section GbWorkRam + #define MAPRAM 0xD000 ; this RAM bank stores the current map diff --git a/src/oam.s b/src/oam.s index b71df91..287bf25 100644 --- a/src/oam.s +++ b/src/oam.s @@ -1,3 +1,5 @@ +.section oamdef + ; oam memory layout .se 0 .de oamy, 1 diff --git a/src/wram.s b/src/wram.s index cc6c7af..c71a165 100644 --- a/src/wram.s +++ b/src/wram.s @@ -1,3 +1,5 @@ +.section GbWorkRam + #define WRAM 0xC000 #define WRAMLEN 0xFFF -- 2.30.2