# # Linker script for MDFourier alone (a 4 KiB ROM) # Copyright 2010-2021 Damian Yerrick # # Copying and distribution of this file, with or without # modification, are permitted in any medium without royalty # provided the copyright notice and this notice are preserved. # This file is offered as-is, without any warranty. # MEMORY { ZP: start = $10, size = $f0, type = rw; # use first $10 zeropage locations as locals HEADER: start = 0, size = $0010, type = ro, file = %O, fill=yes, fillval=$00; RAM: start = $0300, size = $0500, type = rw; ROMC0: start = $C000, size = $3000, type = ro, file = %O, fill=yes, fillval=$FF; ROMF0: start = $F000, size = $1000, type = ro, file = %O, fill=yes, fillval=$FF; CHRROM: start = $0000, size = $2000, type = ro, file = %O, fill=yes, fillval=$FF; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; BSS: load = RAM, type = bss, define = yes, align = $100; INESHDR: load = HEADER, type = ro, align = $10; DMC: load = ROMF0, type = ro, align = 64, optional = yes; LIBCODE: load = ROMF0, type = ro, optional = yes; CODE: load = ROMF0, type = ro, align = $20; RODATA: load = ROMF0, type = ro; # Fixed space to put a mapper initialization patch if you need one # Famicom Box header can also go at $FFE0 STUB15: load = ROMF0, type = ro, start = $FFA0; CHR: load = CHRROM, type = ro, align = $20; } FILES { %O: format = bin; }