1 # linker config to produce simple Gamate cartridge (.bin)
4 __STARTUP__: type = import;
5 __STACKSIZE__: type = weak, value = $0080; # 1 page stack
10 # FIXME: what zp range can we actually use?
11 # $0a-$11 is used by IRQ/NMI, $e8 is used by NMI
12 ZP: start = $0012, size = $e8 - $12;
13 CPUSTACK: start = $0100, size =$100;
14 RAM: start = $0200, size = $200 - __STACKSIZE__, define = yes;
16 CARTHEADER: file = %O, define = yes, start = %S, size = $0029;
17 # 6000-e000 can be (Cartridge) ROM
18 # WARNING: fill value must be $00 else it will no more work
19 #ROM: start = $6000, size = $1000, fill = yes, fillval = $00, file = %O, define = yes;
20 #ROMFILL: start = $7000, size = $7000, fill = yes, fillval = $00, file = %O, define = yes;
21 # for images that have code >$6fff we must calculate the checksum!
22 ROM: start = $6000 + $29, size = $8000 - $29, fill = yes, fillval = $00, file = %O, define = yes;
26 ZEROPAGE: load = ZP, type = zp, define = yes;
27 EXTZP: load = ZP, type = zp, define = yes, optional = yes;
28 APPZP: load = ZP, type = zp, define = yes, optional = yes;
29 STARTUP: load = CARTHEADER, type = ro, define=yes;
30 INIT: load = ROM, type = ro, define = yes, optional = yes;
31 CODE: load = ROM, type = ro, define=yes;
32 RODATA: load = ROM, type = ro, define=yes;
33 DATA: load = ROM, run=RAM, type = rw, define = yes;
34 BSS: load = RAM, type = bss, define = yes;
38 CONDES: segment = RODATA, type = constructor, label = __CONSTRUCTOR_TABLE__, count = __CONSTRUCTOR_COUNT__;
39 CONDES: segment = RODATA, type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__;
40 CONDES: segment = RODATA, type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__, import = __CALLIRQ__;