# # Linker script for UNROM (512 kbit) # Copyright 2010-2015 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; ROM00: start = $8000, size = $4000, type = ro, file = %O, fill=yes, fillval=$FF, bank=0; ROM01: start = $8000, size = $4000, type = ro, file = %O, fill=yes, fillval=$FF, bank=1; ROM02: start = $8000, size = $4000, type = ro, file = %O, fill=yes, fillval=$FF, bank=2; ROM15: start = $C000, size = $4000, type = ro, file = %O, fill=yes, fillval=$FF, bank=2; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; BSS: load = RAM, type = bss, define = yes, align = $100; INESHDR: load = HEADER, type = ro, align = $10; BANK00: load = ROM00, type = ro, align = $100, optional = yes; BANK01: load = ROM01, type = ro, align = $100, optional = yes; GATEDATA: load = ROM01, type = ro, optional = yes; CODE02: load = ROM02, type = ro, align = $40; HELPDATA: load = ROM02, type = ro, optional = yes; DMC: load = ROM15, type = ro, align = 64, optional = yes; LIBDATA: load = ROM15, type = ro, align = $100, optional = yes; LIBCODE: load = ROM15, type = ro, align = $80, optional = yes; CODE: load = ROM15, type = ro, align = $40, optional = yes; RODATA: load = ROM15, type = ro, align = $10; PB53CODE: load = ROM15, type = ro, optional = yes; PB53TABLES: load = ROM15, type = ro, optional = yes; # Because UNROM/UOROM (mapper 2) has a fixed bank at $C000-$FFFF, # we need not include the reset stub in all banks. STUB15: load = ROM15, type = ro, start = $FF90; } FILES { %O: format = bin; }