(data/bank 1)(data/bank 2) ... (code/bank n)
Now, I'm not sure how to relay that information to ca65/ld65. The memory (mis-)configuration I currently have is:
Code: Select all
MEMORY {
ROM1: start = $8000, size = $8000;
ROM2: start = $c000, size = $8000;
}
SEGMENTS {
DATA: load = ROM1, type = ro;
CODE: load = ROM2, type = ro;
VECTORS: load = ROM2, type = ro, start = $FFFA;
}
Code: Select all
MEMORY {
ZP: start = $10, size = $f0, type = rw;
# use first $10 zeropage locations as locals
HEADER: start = $7f00, size = $0010, type = ro, file = %O;
RAM: start = $0300, size = $0500, type = rw;
ROM: start = $C000, size = $8000, type = ro, file = %O;
}
SEGMENTS {
INESHDR: load = HEADER, type = ro, align = $10;
ZEROPAGE: load = ZP, type = zp;
DATA: load = ROM, run = RAM, type = rw, define = yes, align = $100;
BSS: load = RAM, type = bss, define = yes, align = $100;
CODE: load = ROM, type = ro, align = $100;
RODATA: load = ROM, type = ro, align = $100;
DMC: load = ROM, type = ro, align = $40;
VECTORS: load = ROM, type = ro, start = $FFFA;
}
FILES {
%O: format = bin;
}
Code: Select all
.segment "DATABNK1"
.incbin "foo1.bin"
.segment "DATABNK2"
.incbin "foo2.bin"