2015-11-29 00:14:59 +00:00
|
|
|
# linker config to produce simple Gamate cartridge (.bin)
|
2015-11-14 12:15:29 +00:00
|
|
|
|
2015-11-22 18:02:47 +00:00
|
|
|
SYMBOLS {
|
2016-03-06 20:26:22 +00:00
|
|
|
__STARTUP__: type = import;
|
|
|
|
__STACKSIZE__: type = weak, value = $0080; # 1 page stack
|
2015-11-22 18:02:47 +00:00
|
|
|
}
|
|
|
|
|
2015-11-14 12:15:29 +00:00
|
|
|
MEMORY {
|
2016-03-06 20:26:22 +00:00
|
|
|
# 0000-03ff is RAM
|
|
|
|
# FIXME: what zp range can we actually use?
|
|
|
|
# $0a-$11 is used by IRQ/NMI, $e8 is used by NMI
|
2016-03-07 00:28:55 +00:00
|
|
|
ZP: start = $0012, size = $00E8 - $0012;
|
|
|
|
CPUSTACK: start = $0100, size = $0100;
|
|
|
|
RAM: start = $0200, size = $0200 - __STACKSIZE__, define = yes;
|
2015-11-29 00:14:59 +00:00
|
|
|
|
2016-03-07 00:28:55 +00:00
|
|
|
CARTHEADER: file = %O, define = yes, start = %S, size = $0029;
|
2016-03-06 20:26:22 +00:00
|
|
|
# 6000-e000 can be (Cartridge) ROM
|
|
|
|
# WARNING: fill value must be $00 else it will no more work
|
2016-03-07 00:28:55 +00:00
|
|
|
#ROM: start = $6000, size = $1000, fill = yes, fillval = $00, file = %O, define = yes;
|
|
|
|
#ROMFILL: start = $7000, size = $7000, fill = yes, fillval = $00, file = %O, define = yes;
|
2016-03-06 20:26:22 +00:00
|
|
|
# for images that have code >$6fff we must calculate the checksum!
|
2016-03-07 00:28:55 +00:00
|
|
|
ROM: start = $6000 + $0029, size = $8000 - $0029, fill = yes, fillval = $00, file = %O, define = yes;
|
2015-11-14 12:15:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SEGMENTS {
|
2016-03-06 20:26:22 +00:00
|
|
|
ZEROPAGE: load = ZP, type = zp, define = yes;
|
|
|
|
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
|
|
|
|
APPZP: load = ZP, type = zp, define = yes, optional = yes;
|
|
|
|
STARTUP: load = CARTHEADER, type = ro, define = yes;
|
2016-03-15 20:25:22 +00:00
|
|
|
ONCE: load = ROM, type = ro, optional = yes;
|
2016-03-06 20:26:22 +00:00
|
|
|
CODE: load = ROM, type = ro, define = yes;
|
|
|
|
RODATA: load = ROM, type = ro, define = yes;
|
|
|
|
DATA: load = ROM, run = RAM, type = rw, define = yes;
|
|
|
|
BSS: load = RAM, type = bss, define = yes;
|
2015-11-14 12:15:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
FEATURES {
|
2016-03-06 20:26:22 +00:00
|
|
|
CONDES: type = constructor,
|
|
|
|
label = __CONSTRUCTOR_TABLE__,
|
|
|
|
count = __CONSTRUCTOR_COUNT__,
|
|
|
|
segment = ONCE;
|
|
|
|
CONDES: type = destructor,
|
|
|
|
label = __DESTRUCTOR_TABLE__,
|
|
|
|
count = __DESTRUCTOR_COUNT__,
|
|
|
|
segment = RODATA;
|
|
|
|
CONDES: type = interruptor,
|
|
|
|
label = __INTERRUPTOR_TABLE__,
|
|
|
|
count = __INTERRUPTOR_COUNT__,
|
|
|
|
segment = RODATA,
|
|
|
|
import = __CALLIRQ__;
|
2015-11-14 12:15:29 +00:00
|
|
|
}
|