megadrive_test1

diff src/romhdr.S @ 0:909c22dc18d2

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 30 Jan 2017 08:21:53 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/romhdr.S	Mon Jan 30 08:21:53 2017 +0200
     1.3 @@ -0,0 +1,37 @@
     1.4 +| the following will go into the custom .romhdr section which will be placed at
     1.5 +| address 100 of the binary by the linker (see lnkscript).
     1.6 +	.section .romhdr,"a"
     1.7 +
     1.8 +#ifndef GAMENAME
     1.9 +#define GAMENAME "unnamed"
    1.10 +#endif
    1.11 +#ifndef VERSTR
    1.12 +#define VERSTR "00"
    1.13 +#endif
    1.14 +
    1.15 +	.ascii "SEGA MEGA DRIVE (C)MINDLAPSE2017"
    1.16 +hdr_game_dom:
    1.17 +	.ascii GAMENAME
    1.18 +hdr_game_dom_end:
    1.19 +	.fill 48 - (hdr_game_dom_end - hdr_game_dom),1,32 | pad to 48 bytes with spaces
    1.20 +hdr_game_int:
    1.21 +	.ascii GAMENAME
    1.22 +hdr_game_int_end:
    1.23 +	.fill 48 - (hdr_game_int_end - hdr_game_int),1,32 | pad to 48 bytes with spaces
    1.24 +	.ascii "GM"		| it's a game (who cares what it is?)
    1.25 +	.ascii "0000000-"	| product code
    1.26 +	.ascii VERSTR		| version string
    1.27 +	.short 0		| checksum
    1.28 +	.ascii "J               " | I/O support (joypad)
    1.29 +	.long 0			| start address of ROM
    1.30 +	.long _rom_end		| last address of ROM
    1.31 +	.long 0xff0000		| start address of RAM
    1.32 +	.long 0xffffff		| last address of RAM
    1.33 +	.long 0			| SRAM enabled(?)
    1.34 +	.long 0			| ???
    1.35 +	.long 0			| start address of SRAM
    1.36 +	.long 0			| last address of SRAM
    1.37 +	.long 0			| ???
    1.38 +	.long 0			| ???
    1.39 +	.fill 40,1,32		| notes (fill with spaces for now TODO)
    1.40 +	.ascii "JUE             " | country codes