X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=cfg%2Fgamate.cfg;h=74ae9f3e332ea06329b32e96e0e51a9875663c8c;hb=e2d14291b74e3cbbbc584c9d24f95860bf65313d;hp=d7c87b455c8c399e39e2dec9f985d30d1d734500;hpb=c636675521a4804d3f93b6ffb0261753ff01ee45;p=cc65 diff --git a/cfg/gamate.cfg b/cfg/gamate.cfg index d7c87b455..74ae9f3e3 100644 --- a/cfg/gamate.cfg +++ b/cfg/gamate.cfg @@ -1,40 +1,51 @@ # linker config to produce simple Gamate cartridge (.bin) SYMBOLS { - __STARTUP__: type = import; - __STACKSIZE__: type = weak, value = $0080; # 1 page stack + __STARTUP__: type = import; + __STACKSIZE__: type = weak, value = $0080; # 1 page stack } MEMORY { - # 0000-03ff is RAM - # FIXME: what zp range can we actually use? - ZP: start = $0020, size = $e0; - CPUSTACK: start = $0100, size =$100; - RAM: start = $0200, size = $200 - __STACKSIZE__, define = yes; + # 0000-03ff is RAM + # FIXME: what zp range can we actually use? + # $0a-$11 is used by IRQ/NMI, $e8 is used by NMI + ZP: start = $0012, size = $00E8 - $0012; + CPUSTACK: start = $0100, size = $0100; + RAM: start = $0200, size = $0200 - __STACKSIZE__, define = yes; - CARTHEADER: file = %O, define = yes, start = %S, size = $0029; - # 6000-e000 can be (Cartridge) ROM - # WARNING: fill value must be $00 else it will no more work - #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; - # for images that have code >$6fff we must calculate the checksum! - ROM: start = $6000 + $29, size = $8000 - $29, fill = yes, fillval = $00, file = %O, define = yes; + CARTHEADER: file = %O, define = yes, start = %S, size = $0029; + # 6000-e000 can be (Cartridge) ROM + # WARNING: fill value must be $00 else it will no more work + #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; + # for images that have code >$6fff we must calculate the checksum! + ROM: start = $6000 + $0029, size = $8000 - $0029, fill = yes, fillval = $00, file = %O, define = yes; } SEGMENTS { - 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; - INIT: load = ROM, type = ro, define = yes, optional = yes; - 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; + 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; + ONCE: load = ROM, type = ro, optional = yes; + 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; } FEATURES { - CONDES: segment = RODATA, type = constructor, label = __CONSTRUCTOR_TABLE__, count = __CONSTRUCTOR_COUNT__; - CONDES: segment = RODATA, type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; - CONDES: segment = RODATA, type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__, import = __CALLIRQ__; + 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__; }