Some ways to set this up in the ld65 linker config:
16K padding section:
Code:
MEMORY {
DUMMY: start = $8000, size = $4000, type = ro, fill = yes;
ROM: start = $C000, size = $4000, type = ro, fill = yes;
}
SEGMENTS {
CODE: load = ROM, type = ro;
}
32K section with coded loaded at 16K offset:
Code:
MEMORY {
ROM: start = $8000, size = $8000, type = ro, fill = yes;
}
SEGMENTS {
CODE: load = ROM, type = ro, offset = $4000;
}
Personally, I'd to what Ed suggested and handle the padding as a separate step in a script. If your only concern is the correct file size, you could just double up the file:
Code:
cat 16k.bin 16k.bin > 32k.bin
(or "type" instead of "cat" on Windows)