# ca65 configuration for CNROM with code at $E000 # fill=yes forces area to be padded to specified size in output MEMORY { ZP: start = $10, size = $F0, type = rw; RAM: start = $0200, size = $0600, type = rw; # My devcart only has memory from $E000-$FFFF HEADER: start = 0, size = $10, type = ro, fill=yes; UNUSED: start = $8000, size = $6000, type = ro, fill=yes; ROM: start = $E000, size = $1FF4, 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; } # align=$100 allows use of .align directive with a value up to $100 # optional=yes avoids warning if segment is never used SEGMENTS { ZEROPAGE: load = ZP, type = zp; BSS: load = RAM, type = bss; HEADER: load = HEADER, type = ro; 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; VECTORS: load = VECTORS,type = ro; CHARS: load = CHARS, type = ro, align=$2000, optional=yes; }