defs: Added new def file for structs
authorLukas Krickl <lukas@krickl.dev>
Sun, 19 Jan 2025 06:26:54 +0000 (07:26 +0100)
committerLukas Krickl <lukas@krickl.dev>
Sun, 19 Jan 2025 06:26:54 +0000 (07:26 +0100)
TODO: move all structs to this file.

Added new .section keyword to places where it makes sense

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

diff --git a/src/defs.s b/src/defs.s
new file mode 100644 (file)
index 0000000..6013798
--- /dev/null
@@ -0,0 +1,3 @@
+; This file contains struct defintions
+
+.section structs
index e2c7814ed49f18e7fbe0e2c6d4220ccde0c01112..c09a04ed9885ccc6c3cb7d0f540912d71274602b 100644 (file)
@@ -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 - $
index e0ff943b8e0cbb7bd060bc95be49106c7c0eea79..2a74de9e8dca8801f778306e540b282770620e90 100644 (file)
@@ -1,3 +1,5 @@
+.section GbWorkRam 
+
 #define MAPRAM 0xD000
 
   ; this RAM bank stores the current map 
index b71df91b352bc8dcf729a343e1f502c61a2d03cf..287bf2589935ba6763a32c1302f55bf8122f78f5 100644 (file)
--- a/src/oam.s
+++ b/src/oam.s
@@ -1,3 +1,5 @@
+.section oamdef
+
 ; oam memory layout 
 .se 0
 .de oamy, 1
index cc6c7afafe45b1808bfa0932c64be34ebea486d0..c71a165391cb92431db4a6e49ed8c0a0a37b86d9 100644 (file)
@@ -1,3 +1,5 @@
+.section GbWorkRam 
+
 #define WRAM 0xC000
 #define WRAMLEN 0xFFF