From e6d60ea244d178d6c50313d221cb1a476b1c9361 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Wed, 10 Apr 2019 23:57:31 +0300 Subject: [PATCH] forgot romhdr.S --- src/romhdr.S | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/romhdr.S diff --git a/src/romhdr.S b/src/romhdr.S new file mode 100644 index 0000000..9064dd2 --- /dev/null +++ b/src/romhdr.S @@ -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 -- 1.7.10.4