# SPDX-License-Identifier: MIT # ld65 memory map for a 16K F6 cartridge: four 4K banks, each seen at $1000-$1FFF. # Each bank is linked at its own address ($D000, $F000, $B000, $9000; all mirror the # cartridge window), so a label's address says which bank it lives in. The last 64 # bytes of each bank hold the bank-switch stubs, the F6 hotspots ($1FF6-$1FF9) and # the vectors. MEMORY { ZP: start = $0080, size = $0080, type = rw; ROM0: start = $D000, size = $0FC0, file = %O, fill = yes, fillval = $EA; STUB0: start = $DFC0, size = $0040, file = %O, fill = yes, fillval = $00; ROM1: start = $F000, size = $0FC0, file = %O, fill = yes, fillval = $EA; STUB1: start = $FFC0, size = $0040, file = %O, fill = yes, fillval = $00; ROM2: start = $B000, size = $0FC0, file = %O, fill = yes, fillval = $EA; STUB2: start = $BFC0, size = $0040, file = %O, fill = yes, fillval = $00; ROM3: start = $9000, size = $0FC0, file = %O, fill = yes, fillval = $EA; STUB3: start = $9FC0, size = $0040, file = %O, fill = yes, fillval = $00; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; BANK0: load = ROM0, type = ro, align = $100; STUB0: load = STUB0, type = ro; BANK1: load = ROM1, type = ro, align = $100; STUB1: load = STUB1, type = ro; BANK2: load = ROM2, type = ro, align = $100; STUB2: load = STUB2, type = ro; BANK3: load = ROM3, type = ro, align = $100; STUB3: load = STUB3, type = ro; }