# ca65 linker configuration for iNES ROM with code at $E000 # fill=yes forces area to be padded to specified size in output MEMORY { # My devcart only has memory from $E000-$FFFF HEADER: start = 0, size = $10, type = ro, fill=yes; BANKS: start = $8000, size =$20000, type = ro; ROM: start = $8000, size = $7FF4, type = ro, fill=yes; # Extra 6 bytes in vectors because built-in NES configuration # does the same. Stupid, but better to keep compatible with it # so small examples can use the built-in configuration. VECTORS:start = $FFF4, size = $C, type = ro, fill=yes; CHARS: start = 0, size = $2000, type = ro; ZP: start = $10, size = $F0, type = rw; SRAM: start = $0200, size = $0200, type = rw; } # align=$100 allows use of .align directive with a value up to $100 # optional=yes avoids warning if segment is never used # define=yes defines __NAME_LOAD__ and __NAME_SIZE__ SEGMENTS { HEADER: load = HEADER, type = ro; DMC: load = ROM, type = ro, optional=yes; CODE: load = ROM, type = ro, align=$100; # Library code goes into this segment, keeping user code same # length regardless of runtime: devcart, ROM, NSF, etc. CODE2: load = ROM, type = ro, align=$100, optional=yes; RODATA: load = ROM, type = ro; # Separate segment for strings so RODATA can have pointers to # strings STRINGS: load = ROM, type = ro, optional=yes; # So trailing zeroes won't get stripped off when sending to devcart ROEND: load = ROM, type = ro, optional=yes; VECTORS: load = VECTORS,type = ro; BANKS: load = BANKS, type = ro, align=$2000, optional=yes; CHARS: load = CHARS, type = ro, align=$2000, optional=yes; ZEROPAGE: load = ZP, type = zp; NVRAM: load = SRAM, type = bss, define=yes, optional=yes; BSS: load = SRAM, type = bss; }