X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=megatris;a=blobdiff_plain;f=src%2Fromhdr.S;fp=src%2Fromhdr.S;h=9064dd21a6e3eec89a3c98c668c68cd2589f6458;hp=0000000000000000000000000000000000000000;hb=e6d60ea244d178d6c50313d221cb1a476b1c9361;hpb=e2e548eafdddeecb65fe8c15dbbd082bf125298d 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