forgot romhdr.S master
authorJohn Tsiombikas <nuclear@mutantstargoat.com>
Wed, 10 Apr 2019 20:57:31 +0000 (23:57 +0300)
committerJohn Tsiombikas <nuclear@mutantstargoat.com>
Wed, 10 Apr 2019 20:57:31 +0000 (23:57 +0300)
src/romhdr.S [new file with mode: 0644]

diff --git a/src/romhdr.S b/src/romhdr.S
new file mode 100644 (file)
index 0000000..9064dd2
--- /dev/null
@@ -0,0 +1,37 @@
+| the following will go into the custom .romhdr section which will be placed at
+| address 100h of the binary by the linker (see lnkscript).
+       .section .romhdr,"a"
+
+#ifndef GAMENAME
+#define GAMENAME "unnamed"
+#endif
+#ifndef VERSTR
+#define VERSTR "00"
+#endif
+
+       .ascii "SEGA MEGA DRIVE (C)MINDLAPSE2017"
+hdr_game_dom:
+       .ascii GAMENAME
+hdr_game_dom_end:
+       .fill 48 - (hdr_game_dom_end - hdr_game_dom),1,32 | pad to 48 bytes with spaces
+hdr_game_int:
+       .ascii GAMENAME
+hdr_game_int_end:
+       .fill 48 - (hdr_game_int_end - hdr_game_int),1,32 | pad to 48 bytes with spaces
+       .ascii "GM"             | it's a game (who cares what it is?)
+       .ascii "0000000-"       | product code
+       .ascii VERSTR           | version string
+       .short 0                | checksum
+       .ascii "J               " | I/O support (joypad)
+       .long 0                 | start address of ROM
+       .long _rom_end          | last address of ROM
+       .long 0xff0000          | start address of RAM
+       .long 0xffffff          | last address of RAM
+       .long 0                 | SRAM enabled(?)
+       .long 0                 | ???
+       .long 0                 | start address of SRAM
+       .long 0                 | last address of SRAM
+       .long 0                 | ???
+       .long 0                 | ???
+       .fill 40,1,32           | notes (fill with spaces for now TODO)
+       .ascii "JUE             " | country codes