From: Oliver Schmidt Date: Tue, 9 Apr 2013 21:09:46 +0000 (+0200) Subject: Replaced builtin linker configs with ordinary .cfg files. X-Git-Tag: V2.14~68 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=37c492b544dec2460fc2c16a3d66275cc0d4edc0;p=cc65 Replaced builtin linker configs with ordinary .cfg files. The benefits are: - Independency of ld65 build from perl - More transparent behaviour --- diff --git a/cfg/apple2-asm.cfg b/cfg/apple2-asm.cfg new file mode 100644 index 000000000..e70ed4484 --- /dev/null +++ b/cfg/apple2-asm.cfg @@ -0,0 +1,20 @@ +# Configuration for assembler programs which don't need a special setup + +FEATURES { + STARTADDRESS: default = $0803; +} +SYMBOLS { + __LOADADDR__: type = weak, value = __CODE_RUN__; + __LOADSIZE__: type = weak, value = __BSS_RUN__ - __CODE_RUN__; +} +MEMORY { + HEADER: file = %O, start = $0000, size = $0004; + RAM: file = %O, start = %S, size = $C000 - %S; +} +SEGMENTS { + EXEHDR: load = HEADER, type = ro, optional = yes; + CODE: load = RAM, type = rw, optional = yes, define = yes; + RODATA: load = RAM, type = ro, optional = yes; + DATA: load = RAM, type = rw, optional = yes; + BSS: load = RAM, type = bss, optional = yes, define = yes; +} diff --git a/cfg/apple2-overlay.cfg b/cfg/apple2-overlay.cfg new file mode 100644 index 000000000..9216aa7c7 --- /dev/null +++ b/cfg/apple2-overlay.cfg @@ -0,0 +1,76 @@ +# Configuration for overlay programs (overlays located below main program) + +# The overlay files don't include the 4 byte DOS 3.3 header so use AppleCommander like this: +# java -jar ac.jar -cc65 mydisk.dsk myprog bin < myprog +# java -jar ac.jar -p mydisk.dsk myprog.1 bin < myprog.1 +# java -jar ac.jar -p mydisk.dsk myprog.2 bin < myprog.2 +# java -jar ac.jar -p mydisk.dsk myprog.3 bin < myprog.3 +# ... + +FEATURES { + STARTADDRESS: default = $0803; +} +SYMBOLS { + __EXEHDR__: type = import; + __HIMEM__: type = weak, value = $9600; # Presumed RAM end + __LCADDR__: type = weak, value = $D400; # Behind quit code + __LCSIZE__: type = weak, value = $0C00; # Rest of bank two + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay + __LOADADDR__: type = weak, value = __STARTUP_RUN__; + __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ + + __MOVE_LAST__ - __MOVE_START__; +} +MEMORY { + ZP: define = yes, start = $0080, size = $001A; + HEADER: file = %O, start = $0000, size = $0004; + RAM: file = %O, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __STACKSIZE__ - __OVERLAYSIZE__ - %S; + MOVE: file = %O, define = yes, start = $0000, size = $FFFF; + LC: define = yes, start = __LCADDR__, size = __LCSIZE__; + OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__; + OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__; + OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__; + OVL4: file = "%O.4", start = %S, size = __OVERLAYSIZE__; + OVL5: file = "%O.5", start = %S, size = __OVERLAYSIZE__; + OVL6: file = "%O.6", start = %S, size = __OVERLAYSIZE__; + OVL7: file = "%O.7", start = %S, size = __OVERLAYSIZE__; + OVL8: file = "%O.8", start = %S, size = __OVERLAYSIZE__; + OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__; +} +SEGMENTS { + ZEROPAGE: load = ZP, type = zp; + EXEHDR: load = HEADER, type = ro; + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss, define = yes; + BSS: load = RAM, type = bss, define = yes; + INIT: load = MOVE, run = RAM, type = ro, define = yes; + LC: load = MOVE, run = LC, type = ro, optional = yes; + OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; + OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes; + OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes; + OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes; + OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes; + OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes; + OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes; + OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes; + OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/apple2-system.cfg b/cfg/apple2-system.cfg new file mode 100644 index 000000000..d3df44d05 --- /dev/null +++ b/cfg/apple2-system.cfg @@ -0,0 +1,43 @@ +# Configuration for ProDOS 8 system programs (without the header) + +SYMBOLS { + __LCADDR__: type = weak, value = $D400; # Behind quit code + __LCSIZE__: type = weak, value = $0C00; # Rest of bank two + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __LOADADDR__: type = weak, value = __STARTUP_RUN__; + __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ + + __MOVE_LAST__ - __MOVE_START__; +} +MEMORY { + ZP: define = yes, start = $0080, size = $001A; + RAM: file = %O, start = $2000, size = $9F00 - __STACKSIZE__; + MOVE: file = %O, define = yes, start = $0000, size = $FFFF; + LC: define = yes, start = __LCADDR__, size = __LCSIZE__; +} +SEGMENTS { + ZEROPAGE: load = ZP, type = zp; + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss, define = yes; + BSS: load = RAM, type = bss, define = yes; + INIT: load = MOVE, run = RAM, type = ro, define = yes; + LC: load = MOVE, run = LC, type = ro, optional = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/apple2.cfg b/cfg/apple2.cfg new file mode 100644 index 000000000..1f0ae121a --- /dev/null +++ b/cfg/apple2.cfg @@ -0,0 +1,50 @@ +# Default configuration built into ld65 (allowing for 3KB in LC) + +FEATURES { + STARTADDRESS: default = $0803; +} +SYMBOLS { + __EXEHDR__: type = import; + __HIMEM__: type = weak, value = $9600; # Presumed RAM end + __LCADDR__: type = weak, value = $D400; # Behind quit code + __LCSIZE__: type = weak, value = $0C00; # Rest of bank two + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __LOADADDR__: type = weak, value = __STARTUP_RUN__; + __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ + + __MOVE_LAST__ - __MOVE_START__; +} +MEMORY { + ZP: define = yes, start = $0080, size = $001A; + HEADER: file = %O, start = $0000, size = $0004; + RAM: file = %O, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S; + MOVE: file = %O, define = yes, start = $0000, size = $FFFF; + LC: define = yes, start = __LCADDR__, size = __LCSIZE__; +} +SEGMENTS { + ZEROPAGE: load = ZP, type = zp; + EXEHDR: load = HEADER, type = ro; + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss, define = yes; + BSS: load = RAM, type = bss, define = yes; + INIT: load = MOVE, run = RAM, type = ro, define = yes; + LC: load = MOVE, run = LC, type = ro, optional = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/apple2enh-asm.cfg b/cfg/apple2enh-asm.cfg new file mode 100644 index 000000000..e70ed4484 --- /dev/null +++ b/cfg/apple2enh-asm.cfg @@ -0,0 +1,20 @@ +# Configuration for assembler programs which don't need a special setup + +FEATURES { + STARTADDRESS: default = $0803; +} +SYMBOLS { + __LOADADDR__: type = weak, value = __CODE_RUN__; + __LOADSIZE__: type = weak, value = __BSS_RUN__ - __CODE_RUN__; +} +MEMORY { + HEADER: file = %O, start = $0000, size = $0004; + RAM: file = %O, start = %S, size = $C000 - %S; +} +SEGMENTS { + EXEHDR: load = HEADER, type = ro, optional = yes; + CODE: load = RAM, type = rw, optional = yes, define = yes; + RODATA: load = RAM, type = ro, optional = yes; + DATA: load = RAM, type = rw, optional = yes; + BSS: load = RAM, type = bss, optional = yes, define = yes; +} diff --git a/cfg/apple2enh-overlay.cfg b/cfg/apple2enh-overlay.cfg new file mode 100644 index 000000000..9216aa7c7 --- /dev/null +++ b/cfg/apple2enh-overlay.cfg @@ -0,0 +1,76 @@ +# Configuration for overlay programs (overlays located below main program) + +# The overlay files don't include the 4 byte DOS 3.3 header so use AppleCommander like this: +# java -jar ac.jar -cc65 mydisk.dsk myprog bin < myprog +# java -jar ac.jar -p mydisk.dsk myprog.1 bin < myprog.1 +# java -jar ac.jar -p mydisk.dsk myprog.2 bin < myprog.2 +# java -jar ac.jar -p mydisk.dsk myprog.3 bin < myprog.3 +# ... + +FEATURES { + STARTADDRESS: default = $0803; +} +SYMBOLS { + __EXEHDR__: type = import; + __HIMEM__: type = weak, value = $9600; # Presumed RAM end + __LCADDR__: type = weak, value = $D400; # Behind quit code + __LCSIZE__: type = weak, value = $0C00; # Rest of bank two + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay + __LOADADDR__: type = weak, value = __STARTUP_RUN__; + __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ + + __MOVE_LAST__ - __MOVE_START__; +} +MEMORY { + ZP: define = yes, start = $0080, size = $001A; + HEADER: file = %O, start = $0000, size = $0004; + RAM: file = %O, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __STACKSIZE__ - __OVERLAYSIZE__ - %S; + MOVE: file = %O, define = yes, start = $0000, size = $FFFF; + LC: define = yes, start = __LCADDR__, size = __LCSIZE__; + OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__; + OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__; + OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__; + OVL4: file = "%O.4", start = %S, size = __OVERLAYSIZE__; + OVL5: file = "%O.5", start = %S, size = __OVERLAYSIZE__; + OVL6: file = "%O.6", start = %S, size = __OVERLAYSIZE__; + OVL7: file = "%O.7", start = %S, size = __OVERLAYSIZE__; + OVL8: file = "%O.8", start = %S, size = __OVERLAYSIZE__; + OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__; +} +SEGMENTS { + ZEROPAGE: load = ZP, type = zp; + EXEHDR: load = HEADER, type = ro; + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss, define = yes; + BSS: load = RAM, type = bss, define = yes; + INIT: load = MOVE, run = RAM, type = ro, define = yes; + LC: load = MOVE, run = LC, type = ro, optional = yes; + OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; + OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes; + OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes; + OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes; + OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes; + OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes; + OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes; + OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes; + OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/apple2enh-system.cfg b/cfg/apple2enh-system.cfg new file mode 100644 index 000000000..d3df44d05 --- /dev/null +++ b/cfg/apple2enh-system.cfg @@ -0,0 +1,43 @@ +# Configuration for ProDOS 8 system programs (without the header) + +SYMBOLS { + __LCADDR__: type = weak, value = $D400; # Behind quit code + __LCSIZE__: type = weak, value = $0C00; # Rest of bank two + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __LOADADDR__: type = weak, value = __STARTUP_RUN__; + __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ + + __MOVE_LAST__ - __MOVE_START__; +} +MEMORY { + ZP: define = yes, start = $0080, size = $001A; + RAM: file = %O, start = $2000, size = $9F00 - __STACKSIZE__; + MOVE: file = %O, define = yes, start = $0000, size = $FFFF; + LC: define = yes, start = __LCADDR__, size = __LCSIZE__; +} +SEGMENTS { + ZEROPAGE: load = ZP, type = zp; + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss, define = yes; + BSS: load = RAM, type = bss, define = yes; + INIT: load = MOVE, run = RAM, type = ro, define = yes; + LC: load = MOVE, run = LC, type = ro, optional = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/apple2enh.cfg b/cfg/apple2enh.cfg new file mode 100644 index 000000000..1f0ae121a --- /dev/null +++ b/cfg/apple2enh.cfg @@ -0,0 +1,50 @@ +# Default configuration built into ld65 (allowing for 3KB in LC) + +FEATURES { + STARTADDRESS: default = $0803; +} +SYMBOLS { + __EXEHDR__: type = import; + __HIMEM__: type = weak, value = $9600; # Presumed RAM end + __LCADDR__: type = weak, value = $D400; # Behind quit code + __LCSIZE__: type = weak, value = $0C00; # Rest of bank two + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __LOADADDR__: type = weak, value = __STARTUP_RUN__; + __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ + + __MOVE_LAST__ - __MOVE_START__; +} +MEMORY { + ZP: define = yes, start = $0080, size = $001A; + HEADER: file = %O, start = $0000, size = $0004; + RAM: file = %O, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S; + MOVE: file = %O, define = yes, start = $0000, size = $FFFF; + LC: define = yes, start = __LCADDR__, size = __LCSIZE__; +} +SEGMENTS { + ZEROPAGE: load = ZP, type = zp; + EXEHDR: load = HEADER, type = ro; + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss, define = yes; + BSS: load = RAM, type = bss, define = yes; + INIT: load = MOVE, run = RAM, type = ro, define = yes; + LC: load = MOVE, run = LC, type = ro, optional = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/atari-overlay.cfg b/cfg/atari-overlay.cfg new file mode 100644 index 000000000..02becd29b --- /dev/null +++ b/cfg/atari-overlay.cfg @@ -0,0 +1,61 @@ +FEATURES { + STARTADDRESS: default = $2E00; +} +SYMBOLS { + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay + __RESERVED_MEMORY__: type = weak, value = $0000; +} +MEMORY { + ZP: file = "", define = yes, start = $0082, size = $007E; + HEADER: file = %O, start = $0000, size = $0006; + RAM: file = %O, start = %S + __OVERLAYSIZE__, size = $BC20 - __STACKSIZE__ - __OVERLAYSIZE__ - %S; + TRAILER: file = %O, start = $0000, size = $0006; + OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__; + OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__; + OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__; + OVL4: file = "%O.4", start = %S, size = __OVERLAYSIZE__; + OVL5: file = "%O.5", start = %S, size = __OVERLAYSIZE__; + OVL6: file = "%O.6", start = %S, size = __OVERLAYSIZE__; + OVL7: file = "%O.7", start = %S, size = __OVERLAYSIZE__; + OVL8: file = "%O.8", start = %S, size = __OVERLAYSIZE__; + OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__; +} +SEGMENTS { + EXEHDR: load = HEADER, type = ro; + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro, define = yes, optional = yes; + INIT: load = RAM, type = ro, optional = yes; + CODE: load = RAM, type = ro, define = yes; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss, define = yes; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; + EXTZP: load = ZP, type = zp, optional = yes; + AUTOSTRT: load = TRAILER, type = ro; + OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; + OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes; + OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes; + OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes; + OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes; + OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes; + OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes; + OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes; + OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/atari.cfg b/cfg/atari.cfg new file mode 100644 index 000000000..975d16213 --- /dev/null +++ b/cfg/atari.cfg @@ -0,0 +1,42 @@ +FEATURES { + STARTADDRESS: default = $2E00; +} +SYMBOLS { + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __RESERVED_MEMORY__: type = weak, value = $0000; +} +MEMORY { + ZP: file = "", define = yes, start = $0082, size = $007E; + HEADER: file = %O, start = $0000, size = $0006; + RAM: file = %O, start = %S, size = $BC20 - __STACKSIZE__ - %S; + TRAILER: file = %O, start = $0000, size = $0006; +} +SEGMENTS { + EXEHDR: load = HEADER, type = ro; + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro, define = yes, optional = yes; + INIT: load = RAM, type = ro, optional = yes; + CODE: load = RAM, type = ro, define = yes; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss, define = yes; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; + EXTZP: load = ZP, type = zp, optional = yes; + AUTOSTRT: load = TRAILER, type = ro; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/atmos.cfg b/cfg/atmos.cfg new file mode 100644 index 000000000..137c0e9a9 --- /dev/null +++ b/cfg/atmos.cfg @@ -0,0 +1,35 @@ +SYMBOLS { + __STACKSIZE__: type = weak, value = $0800; # 2k stack +} +MEMORY { + ZP: file = "", define = yes, start = $00E2, size = $001A; + TAPEHDR: file = %O, type = ro, start = $0000, size = $0011; + RAM: file = %O, define = yes, start = $0500, size = $9300 - __STACKSIZE__; +} +SEGMENTS { + TAPEHDR: load = TAPEHDR, type = ro; + STARTUP: load = RAM, type = ro; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss, define = yes; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/bbc.cfg b/cfg/bbc.cfg new file mode 100644 index 000000000..6304c309b --- /dev/null +++ b/cfg/bbc.cfg @@ -0,0 +1,32 @@ +SYMBOLS { + __STACKSIZE__: type = weak, value = $0800; # 2k stack +} +MEMORY { + ZP: file = "", define = yes, start = $0070, size = $0020; + RAM: file = %O, start = $0E00, size = $7200 - __STACKSIZE__; +} +SEGMENTS { + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/c128-overlay.cfg b/cfg/c128-overlay.cfg new file mode 100644 index 000000000..811e099ef --- /dev/null +++ b/cfg/c128-overlay.cfg @@ -0,0 +1,58 @@ +SYMBOLS { + __LOADADDR__: type = import; + __EXEHDR__: type = import; + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay +} +MEMORY { + ZP: file = "", define = yes, start = $0002, size = $001A; + LOADADDR: file = %O, start = $1BFF, size = $0002; + HEADER: file = %O, start = $1C01, size = $000C; + RAM: file = %O, define = yes, start = $1C0D, size = $A3F3 - __OVERLAYSIZE__ - __STACKSIZE__; + OVL1: file = "%O.1", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + OVL2: file = "%O.2", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + OVL3: file = "%O.3", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + OVL4: file = "%O.4", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + OVL5: file = "%O.5", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + OVL6: file = "%O.6", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + OVL7: file = "%O.7", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + OVL8: file = "%O.8", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + OVL9: file = "%O.9", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; +} +SEGMENTS { + LOADADDR: load = LOADADDR, type = ro; + EXEHDR: load = HEADER, type = ro; + STARTUP: load = RAM, type = ro; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; + OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; + OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes; + OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes; + OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes; + OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes; + OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes; + OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes; + OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes; + OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/c128.cfg b/cfg/c128.cfg new file mode 100644 index 000000000..0e1259111 --- /dev/null +++ b/cfg/c128.cfg @@ -0,0 +1,39 @@ +SYMBOLS { + __LOADADDR__: type = import; + __EXEHDR__: type = import; + __STACKSIZE__: type = weak, value = $0800; # 2k stack +} +MEMORY { + ZP: file = "", define = yes, start = $0002, size = $001A; + LOADADDR: file = %O, start = $1BFF, size = $0002; + HEADER: file = %O, start = $1C01, size = $000C; + RAM: file = %O, define = yes, start = $1C0D, size = $A3F3 - __STACKSIZE__; +} +SEGMENTS { + LOADADDR: load = LOADADDR, type = ro; + EXEHDR: load = HEADER, type = ro; + STARTUP: load = RAM, type = ro; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/c16.cfg b/cfg/c16.cfg new file mode 100644 index 000000000..78c1739d3 --- /dev/null +++ b/cfg/c16.cfg @@ -0,0 +1,39 @@ +SYMBOLS { + __LOADADDR__: type = import; + __EXEHDR__: type = import; + __STACKSIZE__: type = weak, value = $0800; # 2k stack +} +MEMORY { + ZP: file = "", define = yes, start = $0002, size = $001A; + LOADADDR: file = %O, start = $0FFF, size = $0002; + HEADER: file = %O, start = $1001, size = $000C; + RAM: file = %O, start = $100D, size = $6FF3 - __STACKSIZE__; +} +SEGMENTS { + LOADADDR: load = LOADADDR, type = ro; + EXEHDR: load = HEADER, type = ro; + STARTUP: load = RAM, type = ro; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/c64-asm.cfg b/cfg/c64-asm.cfg new file mode 100644 index 000000000..0924cdb56 --- /dev/null +++ b/cfg/c64-asm.cfg @@ -0,0 +1,18 @@ +FEATURES { + STARTADDRESS: default = $0801; +} +SYMBOLS { + __LOADADDR__: type = import; +} +MEMORY { + LOADADDR: file = %O, start = %S - 2, size = $0002; + RAM: file = %O, start = %S, size = $D000 - %S; +} +SEGMENTS { + LOADADDR: load = LOADADDR, type = ro; + EXEHDR: load = RAM, type = ro, optional = yes; + CODE: load = RAM, type = rw, optional = yes; + RODATA: load = RAM, type = ro, optional = yes; + DATA: load = RAM, type = rw, optional = yes; + BSS: load = RAM, type = bss, optional = yes; +} diff --git a/cfg/c64-overlay.cfg b/cfg/c64-overlay.cfg new file mode 100644 index 000000000..c5e9e070c --- /dev/null +++ b/cfg/c64-overlay.cfg @@ -0,0 +1,58 @@ +SYMBOLS { + __LOADADDR__: type = import; + __EXEHDR__: type = import; + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay +} +MEMORY { + ZP: file = "", define = yes, start = $0002, size = $001A; + LOADADDR: file = %O, start = $07FF, size = $0002; + HEADER: file = %O, start = $0801, size = $000C; + RAM: file = %O, define = yes, start = $080D, size = $C7F3 - __OVERLAYSIZE__ - __STACKSIZE__; + OVL1: file = "%O.1", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + OVL2: file = "%O.2", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + OVL3: file = "%O.3", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + OVL4: file = "%O.4", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + OVL5: file = "%O.5", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + OVL6: file = "%O.6", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + OVL7: file = "%O.7", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + OVL8: file = "%O.8", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + OVL9: file = "%O.9", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; +} +SEGMENTS { + LOADADDR: load = LOADADDR, type = ro; + EXEHDR: load = HEADER, type = ro; + STARTUP: load = RAM, type = ro; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; + OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; + OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes; + OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes; + OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes; + OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes; + OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes; + OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes; + OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes; + OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/c64.cfg b/cfg/c64.cfg new file mode 100644 index 000000000..5d8befd02 --- /dev/null +++ b/cfg/c64.cfg @@ -0,0 +1,39 @@ +SYMBOLS { + __LOADADDR__: type = import; + __EXEHDR__: type = import; + __STACKSIZE__: type = weak, value = $0800; # 2k stack +} +MEMORY { + ZP: file = "", define = yes, start = $0002, size = $001A; + LOADADDR: file = %O, start = $07FF, size = $0002; + HEADER: file = %O, start = $0801, size = $000C; + RAM: file = %O, define = yes, start = $080D, size = $C7F3 - __STACKSIZE__; +} +SEGMENTS { + LOADADDR: load = LOADADDR, type = ro; + EXEHDR: load = HEADER, type = ro; + STARTUP: load = RAM, type = ro; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/cbm510.cfg b/cfg/cbm510.cfg new file mode 100644 index 000000000..7635c6eeb --- /dev/null +++ b/cfg/cbm510.cfg @@ -0,0 +1,43 @@ +SYMBOLS { + # The stack starts from $FEC3 and grows towards the video ram + __STACKSIZE__: type = weak, value = $06C3; # ~1.5k stack +} +MEMORY { + HEADER: file = %O, start = $0001, size = $0050, fill = yes; + ZP: file = %O, define = yes, start = $0051, size = $00AD, fill = yes; + STARTUP: file = %O, start = $00FE, size = $0102, fill = yes; + PAGE2: file = %O, start = $0200, size = $0100, fill = yes; + PAGE3: file = %O, start = $0300, size = $0100, fill = yes; + RAM: file = %O, start = $0400, size = $DC00; + CHARRAM: file = "", define = yes, start = $E000, size = $1000; + VIDRAM: file = "", define = yes, start = $F000, size = $0400; +} +SEGMENTS { + EXEHDR: load = HEADER, type = rw; + STARTUP: load = STARTUP, type = rw; + PAGE2: load = PAGE2, type = rw; + PAGE3: load = PAGE3, type = rw; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; + EXTZP: load = ZP, type = rw, define = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/cbm610.cfg b/cfg/cbm610.cfg new file mode 100644 index 000000000..48b5eba0c --- /dev/null +++ b/cfg/cbm610.cfg @@ -0,0 +1,40 @@ +SYMBOLS { + __STACKSIZE__: type = weak, value = $0800; # 2k stack +} +MEMORY { + HEADER: file = %O, start = $0001, size = $0050, fill = yes; + ZP: file = %O, define = yes, start = $0051, size = $00AD, fill = yes; + STARTUP: file = %O, start = $00FE, size = $0102, fill = yes; + PAGE2: file = %O, start = $0200, size = $0100, fill = yes; + PAGE3: file = %O, start = $0300, size = $0100, fill = yes; + RAM: file = %O, start = $0400, size = $FECB - __STACKSIZE__; +} +SEGMENTS { + EXEHDR: load = HEADER, type = rw; + STARTUP: load = STARTUP, type = rw; + PAGE2: load = PAGE2, type = rw; + PAGE3: load = PAGE3, type = rw; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; + EXTZP: load = ZP, type = rw, define = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/geos-apple.cfg b/cfg/geos-apple.cfg new file mode 100644 index 000000000..1900c4866 --- /dev/null +++ b/cfg/geos-apple.cfg @@ -0,0 +1,101 @@ +SYMBOLS { + __BACKBUFSIZE__: type = weak, value = $2000; + __OVERLAYSIZE__: type = weak, value = $0000; + __OVERLAYADDR__: type = weak, value = $C000 - __BACKBUFSIZE__ - __OVERLAYSIZE__; + __STACKSIZE__: type = weak, value = $0400; + __STACKADDR__: type = weak, value = $2000 - __STACKSIZE__; +} +MEMORY { + CVT: file = %O, start = $0, size = $20000; + ZP: define = yes, start = $80, size = $1A + $06; + EXT: define = yes, start = $0C00, size = __STACKADDR__ - $0C00; + VLIR0: define = yes, start = $4000, size = __OVERLAYADDR__ - $4000; + VLIR1: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR2: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR3: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR4: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR5: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR6: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR7: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR8: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR9: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR10: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR11: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR12: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR13: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR14: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR15: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR16: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR17: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR18: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR19: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; +} +SEGMENTS { + ZEROPAGE: type = zp, load = ZP; + EXTZP: type = zp, load = ZP; + EXTBSS: type = bss, load = EXT, define = yes, optional = yes; + FILEINFO: type = ro, load = CVT, offset = $002; + RECORDS: type = ro, load = CVT, offset = $100, optional = yes; + DIRENTRY: type = ro, load = CVT, offset = $180; + VLIRIDX0: type = ro, load = CVT, align = $200, optional = yes; + STARTUP: type = ro, run = VLIR0, load = CVT, align_load = $200, define = yes; + LOWCODE: type = ro, run = VLIR0, load = CVT, optional = yes; + INIT: type = ro, run = VLIR0, load = CVT, define = yes, optional = yes; + CODE: type = ro, run = VLIR0, load = CVT; + RODATA: type = ro, run = VLIR0, load = CVT; + DATA: type = rw, run = VLIR0, load = CVT; + BSS: type = bss, load = VLIR0, define = yes; + VLIRIDX1: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY1: type = ro, run = VLIR1, load = CVT, align_load = $200, optional = yes; + VLIRIDX2: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY2: type = ro, run = VLIR2, load = CVT, align_load = $200, optional = yes; + VLIRIDX3: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY3: type = ro, run = VLIR3, load = CVT, align_load = $200, optional = yes; + VLIRIDX4: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY4: type = ro, run = VLIR4, load = CVT, align_load = $200, optional = yes; + VLIRIDX5: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY5: type = ro, run = VLIR5, load = CVT, align_load = $200, optional = yes; + VLIRIDX6: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY6: type = ro, run = VLIR6, load = CVT, align_load = $200, optional = yes; + VLIRIDX7: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY7: type = ro, run = VLIR7, load = CVT, align_load = $200, optional = yes; + VLIRIDX8: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY8: type = ro, run = VLIR8, load = CVT, align_load = $200, optional = yes; + VLIRIDX9: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY9: type = ro, run = VLIR9, load = CVT, align_load = $200, optional = yes; + VLIRIDX10: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY10: type = ro, run = VLIR10, load = CVT, align_load = $200, optional = yes; + VLIRIDX11: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY11: type = ro, run = VLIR11, load = CVT, align_load = $200, optional = yes; + VLIRIDX12: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY12: type = ro, run = VLIR12, load = CVT, align_load = $200, optional = yes; + VLIRIDX13: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY13: type = ro, run = VLIR13, load = CVT, align_load = $200, optional = yes; + VLIRIDX14: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY14: type = ro, run = VLIR14, load = CVT, align_load = $200, optional = yes; + VLIRIDX15: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY15: type = ro, run = VLIR15, load = CVT, align_load = $200, optional = yes; + VLIRIDX16: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY16: type = ro, run = VLIR16, load = CVT, align_load = $200, optional = yes; + VLIRIDX17: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY17: type = ro, run = VLIR17, load = CVT, align_load = $200, optional = yes; + VLIRIDX18: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY18: type = ro, run = VLIR18, load = CVT, align_load = $200, optional = yes; + VLIRIDX19: type = ro, load = CVT, align = $200, optional = yes; + OVERLAY19: type = ro, run = VLIR19, load = CVT, align_load = $200, optional = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/geos-cbm.cfg b/cfg/geos-cbm.cfg new file mode 100644 index 000000000..f2aea55a2 --- /dev/null +++ b/cfg/geos-cbm.cfg @@ -0,0 +1,79 @@ +SYMBOLS { + __BACKBUFSIZE__: type = weak, value = $2000; + __OVERLAYSIZE__: type = weak, value = $0000; + __OVERLAYADDR__: type = weak, value = $8000 - __BACKBUFSIZE__ - __OVERLAYSIZE__; + __STACKSIZE__: type = weak, value = $0400; + __STACKADDR__: type = weak, value = __OVERLAYADDR__ - __STACKSIZE__; +} +MEMORY { + CVT: file = %O, start = $0, size = $40000; + ZP: define = yes, start = $58, size = $1A + $06; + VLIR0: define = yes, start = $0400, size = __STACKADDR__ - $0400; + VLIR1: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR2: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR3: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR4: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR5: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR6: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR7: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR8: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR9: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR10: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR11: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR12: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR13: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR14: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR15: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR16: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR17: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR18: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; + VLIR19: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; +} +SEGMENTS { + ZEROPAGE: type = zp, load = ZP; + EXTZP: type = zp, load = ZP; + DIRENTRY: type = ro, load = CVT, align = $FE; + FILEINFO: type = ro, load = CVT, align = $FE; + RECORDS: type = ro, load = CVT, align = $FE, optional = yes; + STARTUP: type = ro, run = VLIR0, load = CVT, align_load = $FE, define = yes; + LOWCODE: type = ro, run = VLIR0, load = CVT, optional = yes; + INIT: type = ro, run = VLIR0, load = CVT, define = yes, optional = yes; + CODE: type = ro, run = VLIR0, load = CVT; + RODATA: type = ro, run = VLIR0, load = CVT; + DATA: type = rw, run = VLIR0, load = CVT; + BSS: type = bss, load = VLIR0, define = yes; + OVERLAY1: type = ro, run = VLIR1, load = CVT, align_load = $FE, optional = yes; + OVERLAY2: type = ro, run = VLIR2, load = CVT, align_load = $FE, optional = yes; + OVERLAY3: type = ro, run = VLIR3, load = CVT, align_load = $FE, optional = yes; + OVERLAY4: type = ro, run = VLIR4, load = CVT, align_load = $FE, optional = yes; + OVERLAY5: type = ro, run = VLIR5, load = CVT, align_load = $FE, optional = yes; + OVERLAY6: type = ro, run = VLIR6, load = CVT, align_load = $FE, optional = yes; + OVERLAY7: type = ro, run = VLIR7, load = CVT, align_load = $FE, optional = yes; + OVERLAY8: type = ro, run = VLIR8, load = CVT, align_load = $FE, optional = yes; + OVERLAY9: type = ro, run = VLIR9, load = CVT, align_load = $FE, optional = yes; + OVERLAY10: type = ro, run = VLIR10, load = CVT, align_load = $FE, optional = yes; + OVERLAY11: type = ro, run = VLIR11, load = CVT, align_load = $FE, optional = yes; + OVERLAY12: type = ro, run = VLIR12, load = CVT, align_load = $FE, optional = yes; + OVERLAY13: type = ro, run = VLIR13, load = CVT, align_load = $FE, optional = yes; + OVERLAY14: type = ro, run = VLIR14, load = CVT, align_load = $FE, optional = yes; + OVERLAY15: type = ro, run = VLIR15, load = CVT, align_load = $FE, optional = yes; + OVERLAY16: type = ro, run = VLIR16, load = CVT, align_load = $FE, optional = yes; + OVERLAY17: type = ro, run = VLIR17, load = CVT, align_load = $FE, optional = yes; + OVERLAY18: type = ro, run = VLIR18, load = CVT, align_load = $FE, optional = yes; + OVERLAY19: type = ro, run = VLIR19, load = CVT, align_load = $FE, optional = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/lunix.cfg b/cfg/lunix.cfg new file mode 100644 index 000000000..1342c390b --- /dev/null +++ b/cfg/lunix.cfg @@ -0,0 +1,44 @@ +# ld65 Linker-configuration for LUnix, Next Generation. + +SYMBOLS { + __HEAPSIZE__: type = weak, value = $2000; # 8k heap [temporary, until LUnix malloc() exists] + __STACKSIZE__: type = weak, value = $0400; # 1k stack (do typical LUnix apps. need 2k?) +} +MEMORY { + ZP: start = $0080, size = $0040; + RAM: start = %S, size = $7600 - __STACKSIZE__; +} +SEGMENTS { + ZEROPAGE: load = ZP, type = zp, define = yes; # Pseudo-registers + STARTUP: load = RAM, type = ro; # First initialization code + LOWCODE: load = RAM, type = ro, optional = yes; # Legacy from other platforms + INIT: load = RAM, type = ro, define = yes, optional = yes; # Library initialization code + CODE: load = RAM, type = ro; # Program + RODATA: load = RAM, type = ro; # Literals, constants + DATA: load = RAM, type = rw; # Initialized variables + BSS: load = RAM, type = bss, define = yes; # Uninitialized variables +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} +FILES { + %O: format = o65; +} +FORMATS { + o65: os = lunix, + type = small, + export = main, # Program entry-point + import = LUNIXKERNEL; # Kernel entry-points +} diff --git a/cfg/lynx-bll.cfg b/cfg/lynx-bll.cfg new file mode 100644 index 000000000..3d6cf19aa --- /dev/null +++ b/cfg/lynx-bll.cfg @@ -0,0 +1,39 @@ +SYMBOLS { + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader + __BLOCKSIZE__: type = weak, value = $0400; # cart block size + __BLLHDR__: type = import; +} +MEMORY { + ZP: file = "", define = yes, start = $0000, size = $0100; + HEADER: file = %O, start = $0000, size = $000a; + RAM: file = %O, define = yes, start = $0400, size = $BC38 - __STACKSIZE__; +} +SEGMENTS { + BLLHDR: load = HEADER, type = ro; + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro, define = yes; + RODATA: load = RAM, type = ro, define = yes; + DATA: load = RAM, type = rw, define = yes; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; + EXTZP: load = ZP, type = zp, optional = yes; + APPZP: load = ZP, type = zp, optional = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/lynx-coll.cfg b/cfg/lynx-coll.cfg new file mode 100644 index 000000000..e7a220fb3 --- /dev/null +++ b/cfg/lynx-coll.cfg @@ -0,0 +1,45 @@ +SYMBOLS { + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader + __BLOCKSIZE__: type = weak, value = $0400; # cart block size + __EXEHDR__: type = import; + __BOOTLDR__: type = import; + __DEFDIR__: type = import; +} +MEMORY { + ZP: file = "", define = yes, start = $0000, size = $0100; + HEADER: file = %O, start = $0000, size = $0040; + BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__; + DIR: file = %O, start = $0000, size = 8; + RAM: file = %O, define = yes, start = $0200, size = $9E58 - __STACKSIZE__; +} +SEGMENTS { + EXEHDR: load = HEADER, type = ro; + BOOTLDR: load = BOOT, type = ro; + DIRECTORY: load = DIR, type = ro; + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro, define = yes; + RODATA: load = RAM, type = ro, define = yes; + DATA: load = RAM, type = rw, define = yes; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; + EXTZP: load = ZP, type = zp, optional = yes; + APPZP: load = ZP, type = zp, optional = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/lynx-uploader.cfg b/cfg/lynx-uploader.cfg new file mode 100644 index 000000000..4a1e87bee --- /dev/null +++ b/cfg/lynx-uploader.cfg @@ -0,0 +1,49 @@ +SYMBOLS { + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader + __BLOCKSIZE__: type = weak, value = $0400; # cart block size + __EXEHDR__: type = import; + __BOOTLDR__: type = import; + __DEFDIR__: type = import; + __UPLOADER__: type = import; +} +MEMORY { + ZP: file = "", define = yes, start = $0000, size = $0100; + HEADER: file = %O, start = $0000, size = $0040; + BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__; + DIR: file = %O, start = $0000, size = 8; + RAM: file = %O, define = yes, start = $0200, size = $BD38 - __STACKSIZE__; + UPLDR: file = %O, define = yes, start = $BFDC, size = $005C; +} +SEGMENTS { + EXEHDR: load = HEADER, type = ro; + BOOTLDR: load = BOOT, type = ro; + DIRECTORY:load = DIR, type = ro; + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro, define = yes; + RODATA: load = RAM, type = ro, define = yes; + DATA: load = RAM, type = rw, define = yes; + BSS: load = RAM, type = bss, define = yes; + UPCODE: load = UPLDR, type = ro, define = yes; + UPDATA: load = UPLDR, type = rw, define = yes; + ZEROPAGE: load = ZP, type = zp; + EXTZP: load = ZP, type = zp, optional = yes; + APPZP: load = ZP, type = zp, optional = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/lynx.cfg b/cfg/lynx.cfg new file mode 100644 index 000000000..77345bf49 --- /dev/null +++ b/cfg/lynx.cfg @@ -0,0 +1,45 @@ +SYMBOLS { + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader + __BLOCKSIZE__: type = weak, value = 1024; # cart block size + __EXEHDR__: type = import; + __BOOTLDR__: type = import; + __DEFDIR__: type = import; +} +MEMORY { + ZP: file = "", define = yes, start = $0000, size = $0100; + HEADER: file = %O, start = $0000, size = $0040; + BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__; + DIR: file = %O, start = $0000, size = 8; + RAM: file = %O, define = yes, start = $0200, size = $BE38 - __STACKSIZE__; +} +SEGMENTS { + EXEHDR: load = HEADER, type = ro; + BOOTLDR: load = BOOT, type = ro; + DIRECTORY: load = DIR, type = ro; + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro, define = yes; + RODATA: load = RAM, type = ro, define = yes; + DATA: load = RAM, type = rw, define = yes; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; + EXTZP: load = ZP, type = zp, optional = yes; + APPZP: load = ZP, type = zp, optional = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/module.cfg b/cfg/module.cfg new file mode 100644 index 000000000..edc87fb17 --- /dev/null +++ b/cfg/module.cfg @@ -0,0 +1,21 @@ +MEMORY { + ZP: file = %O, start = $0000, size = $0100, type = rw, define = yes; + COMBINED: file = %O, start = $0000, size = $FFFF; +} +SEGMENTS { + JUMPTABLE: load = COMBINED, type = ro; + INIT: load = COMBINED, type = ro, optional = yes; + CODE: load = COMBINED, type = ro; + RODATA: load = COMBINED, type = ro; + DATA: load = COMBINED, type = rw, define = yes; + BSS: load = COMBINED, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; + EXTZP: load = ZP, type = zp; +} +FILES { + %O: format = o65; +} +FORMATS { + o65: os = cc65, + type = small; +} diff --git a/cfg/nes.cfg b/cfg/nes.cfg new file mode 100644 index 000000000..3e2f408cc --- /dev/null +++ b/cfg/nes.cfg @@ -0,0 +1,62 @@ +SYMBOLS { + __STACKSIZE__: type = weak, value = $0300; # 3 pages stack +} +MEMORY { + ZP: file = "", start = $0002, size = $001A, type = rw, define = yes; + + # INES Cartridge Header + HEADER: file = %O, start = $0000, size = $0010, fill = yes; + + # 2 16K ROM Banks + # - startup + # - code + # - rodata + # - data (load) + ROM0: file = %O, start = $8000, size = $7FF4, fill = yes, define = yes; + + # Hardware Vectors at End of 2nd 8K ROM + ROMV: file = %O, start = $FFF6, size = $000C, fill = yes; + + # 1 8k CHR Bank + ROM2: file = %O, start = $0000, size = $2000, fill = yes; + + # standard 2k SRAM (-zeropage) + # $0100-$0200 cpu stack + # $0200-$0500 3 pages for ppu memory write buffer + # $0500-$0800 3 pages for cc65 parameter stack + SRAM: file = "", start = $0500, size = __STACKSIZE__, define = yes; + + # additional 8K SRAM Bank + # - data (run) + # - bss + # - heap + RAM: file = "", start = $6000, size = $2000, define = yes; +} +SEGMENTS { + HEADER: load = HEADER, type = ro; + STARTUP: load = ROM0, type = ro, define = yes; + LOWCODE: load = ROM0, type = ro, optional = yes; + INIT: load = ROM0, type = ro, define = yes, optional = yes; + CODE: load = ROM0, type = ro, define = yes; + RODATA: load = ROM0, type = ro, define = yes; + DATA: load = ROM0, run = RAM, type = rw, define = yes; + VECTORS: load = ROMV, type = rw; + CHARS: load = ROM2, type = rw; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/none.cfg b/cfg/none.cfg new file mode 100644 index 000000000..49409a82c --- /dev/null +++ b/cfg/none.cfg @@ -0,0 +1,31 @@ +SYMBOLS { + __STACKSIZE__: type = weak, value = $0800; # 2k stack +} +MEMORY { + ZP: file = "", define = yes, start = $0000, size = $0001F; + RAM: file = %O, start = %S, size = $10000 - __STACKSIZE__; +} +SEGMENTS { + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = rw; + RODATA: load = RAM, type = rw; + DATA: load = RAM, type = rw; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/pet.cfg b/cfg/pet.cfg new file mode 100644 index 000000000..ef8b82e54 --- /dev/null +++ b/cfg/pet.cfg @@ -0,0 +1,39 @@ +SYMBOLS { + __LOADADDR__: type = import; + __EXEHDR__: type = import; + __STACKSIZE__: type = weak, value = $0800; # 2k stack +} +MEMORY { + ZP: file = "", define = yes, start = $0055, size = $001A; + LOADADDR: file = %O, start = $03FF, size = $0002; + HEADER: file = %O, start = $0401, size = $000C; + RAM: file = %O, start = $040D, size = $7BF3 - __STACKSIZE__; +} +SEGMENTS { + LOADADDR: load = LOADADDR, type = ro; + EXEHDR: load = HEADER, type = ro; + STARTUP: load = RAM, type = ro; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/plus4.cfg b/cfg/plus4.cfg new file mode 100644 index 000000000..c756f45a1 --- /dev/null +++ b/cfg/plus4.cfg @@ -0,0 +1,39 @@ +SYMBOLS { + __LOADADDR__: type = import; + __EXEHDR__: type = import; + __STACKSIZE__: type = weak, value = $0800; # 2k stack +} +MEMORY { + ZP: file = "", define = yes, start = $0002, size = $001A; + LOADADDR: file = %O, start = $0FFF, size = $0002; + HEADER: file = %O, start = $1001, size = $000C; + RAM: file = %O, define = yes, start = $100D, size = $ECF3 - __STACKSIZE__; +} +SEGMENTS { + LOADADDR: load = LOADADDR, type = ro; + EXEHDR: load = HEADER, type = ro; + STARTUP: load = RAM, type = ro; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/supervision-128k.cfg b/cfg/supervision-128k.cfg new file mode 100644 index 000000000..ce835db50 --- /dev/null +++ b/cfg/supervision-128k.cfg @@ -0,0 +1,37 @@ +# supervision 1284kbyte cartridge with bankswitching +# for assembler + +# ld65 config file +# ld65 --config supervision.cfg -o .bin .o + +SYMBOLS { + __STACKSIZE__: type = weak, value = $0100; # 1 page stack +} +MEMORY { + RAM: file = "", start = $0000, size = $2000 - __STACKSIZE__; + VRAM: file = "", start = $4000, size = $2000; + BANKROM1: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; + BANKROM2: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; + BANKROM3: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; + BANKROM4: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; + BANKROM5: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; + BANKROM6: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; + BANKROM7: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; + ROM: file = %O, start = $c000, size = $4000, fill = yes, fillval = $FF; +} +SEGMENTS { + LOWCODE: load = ROM, type = ro, optional = yes; + INIT: load = ROM, type = ro, define = yes, optional = yes; + CODE: load = ROM, type = ro; + BANK1: load = BANKROM1, type = ro; + BANK2: load = BANKROM2, type = ro; + BANK3: load = BANKROM3, type = ro; + BANK4: load = BANKROM4, type = ro; + BANK5: load = BANKROM5, type = ro; + BANK6: load = BANKROM6, type = ro; + BANK7: load = BANKROM7, type = ro; + ZEROPAGE: load = RAM, type = bss, define = yes; + DATA: load = RAM, type = bss, define = yes, offset = $0200; + BSS: load = RAM, type = bss, define = yes; + VECTOR: load = ROM, type = ro, offset = $3FFA; +} diff --git a/cfg/supervision-16k.cfg b/cfg/supervision-16k.cfg new file mode 100644 index 000000000..e38948d5f --- /dev/null +++ b/cfg/supervision-16k.cfg @@ -0,0 +1,41 @@ +# supervision 16kbyte cartridge + +# ld65 config file +# ld65 --config supervision16.cfg -o .bin .o + +SYMBOLS { + __STACKSIZE__: type = weak, value = $0100; # 1 page stack +} +MEMORY { + ZP: file = "", start = $0000, size = $0100; + CPUSTACK: file = "", start = $0100, size = $0100; + RAM: file = "", start = $0200, size = $1E00 - __STACKSIZE__; + VRAM: file = "", start = $4000, size = $2000; + ROM: file = %O, start = $C000, size = $4000, fill = yes, fillval = $ff, define=yes; +} +SEGMENTS { + LOWCODE: load = ROM, type = ro, optional = 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; + FFF0: load = ROM, type = ro, offset = $3FF0; + VECTOR: load = ROM, type = ro, offset = $3FFA; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp, define = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/supervision-64k.cfg b/cfg/supervision-64k.cfg new file mode 100644 index 000000000..fd5370fa5 --- /dev/null +++ b/cfg/supervision-64k.cfg @@ -0,0 +1,30 @@ +# supervision 64kbyte cartridge with bankswitching +# for assembler + +# ld65 config file +# ld65 --config supervision.cfg -o .bin .o + +SYMBOLS { + __STACKSIZE__: type = weak, value = $0100; # 1 page stack +} +MEMORY { + RAM: file = "", start = $0000, size = $2000 - __STACKSIZE__; + VRAM: file = "", start = $4000, size = $2000; + BANKROM1: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; + BANKROM2: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; + BANKROM3: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; + ROM: file = %O, start = $C000, size = $4000, fill = yes, fillval = $FF; +} +SEGMENTS { + LOWCODE: load = ROM, type = ro, optional = yes; + INIT: load = ROM, type = ro, define = yes, optional = yes; + CODE: load = ROM, type = ro; + RODATA: load = ROM, type = ro; + BANK1: load = BANKROM1, type = ro; + BANK2: load = BANKROM2, type = ro; + BANK3: load = BANKROM3, type = ro; + ZEROPAGE: load = RAM, type = bss, define = yes; + DATA: load = RAM, type = bss, define = yes, offset = $0200; + BSS: load = RAM, type = bss, define = yes; + VECTOR: load = ROM, type = ro, offset = $3FFA; +} diff --git a/cfg/supervision.cfg b/cfg/supervision.cfg new file mode 100644 index 000000000..66fb4cfad --- /dev/null +++ b/cfg/supervision.cfg @@ -0,0 +1,37 @@ +# if you want to combine the 2 16 kbyte roms +# make sure the halves are mirrored in the 64kbyte cartridge image +# or reset from code >0xc000 and switch bank to the 3rd bank + +MEMORY { + ZP: file = "", start = $0000, size = $0100; + CPUSTACK: file = "", start = $0100, size = $0100; + RAM: file = "", start = $0200, size = $1E00, define = yes; + VRAM: file = "", start = $4000, size = $2000; + ROM: file = %O, start = $8000, size = $8000, fill = yes, fillval = $FF, define = yes; +} +SEGMENTS { + LOWCODE: load = ROM, type = ro, optional = 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; + FFF0: load = ROM, type = ro, offset = $7FF0; + VECTOR: load = ROM, type = ro, offset = $7FFA; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp, define = yes; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/vic20-32k.cfg b/cfg/vic20-32k.cfg new file mode 100644 index 000000000..c66b35247 --- /dev/null +++ b/cfg/vic20-32k.cfg @@ -0,0 +1,41 @@ +# Memory configuration for the VIC-20 with 32K RAM Cartridge +# Contributed by Stefan Haubenthal +SYMBOLS { + __LOADADDR__: type = import; + __EXEHDR__: type = import; + __STACKSIZE__: type = weak, value = $0400; # 1k stack +} +MEMORY { + ZP: file = "", define = yes, start = $0002, size = $001A; + LOADADDR: file = %O, start = $11FF, size = $0002; + HEADER: file = %O, start = $1201, size = $000C; + RAM: file = %O, define = yes, start = $120D, size = $6DF3 - __STACKSIZE__; +} +SEGMENTS { + LOADADDR: load = LOADADDR, type = ro; + EXEHDR: load = HEADER, type = ro; + STARTUP: load = RAM, type = ro; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/cfg/vic20.cfg b/cfg/vic20.cfg new file mode 100644 index 000000000..f356eb61e --- /dev/null +++ b/cfg/vic20.cfg @@ -0,0 +1,39 @@ +SYMBOLS { + __LOADADDR__: type = import; + __EXEHDR__: type = import; + __STACKSIZE__: type = weak, value = $0400; # 1k stack +} +MEMORY { + ZP: file = "", define = yes, start = $0002, size = $001A; + LOADADDR: file = %O, start = $0FFF, size = $0002; + HEADER: file = %O, start = $1001, size = $000C; + RAM: file = %O, define = yes, start = $100D, size = $0DF3 - __STACKSIZE__; +} +SEGMENTS { + LOADADDR: load = LOADADDR, type = ro; + EXEHDR: load = HEADER, type = ro; + STARTUP: load = RAM, type = ro; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: load = RAM, type = ro, define = yes, optional = yes; + CODE: load = RAM, type = ro; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + ZPSAVE: load = RAM, type = bss; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/src/common/target.c b/src/common/target.c index 2d1eb60b3..79c9f8555 100644 --- a/src/common/target.c +++ b/src/common/target.c @@ -151,27 +151,27 @@ static const TargetEntry TargetMap[] = { /* Table with target properties by target id */ static const TargetProperties PropertyTable[TGT_COUNT] = { - { "none", CPU_6502, CTNone }, - { "module", CPU_6502, CTNone }, - { "atari", CPU_6502, CTAtari }, - { "vic20", CPU_6502, CTPET }, - { "c16", CPU_6502, CTPET }, - { "c64", CPU_6502, CTPET }, - { "c128", CPU_6502, CTPET }, - { "plus4", CPU_6502, CTPET }, - { "cbm510", CPU_6502, CTPET }, - { "cbm610", CPU_6502, CTPET }, - { "pet", CPU_6502, CTPET }, - { "bbc", CPU_6502, CTNone }, - { "apple2", CPU_6502, CTNone }, - { "apple2enh", CPU_65C02, CTNone }, - { "geos-cbm", CPU_6502, CTNone }, - { "geos-apple", CPU_65C02, CTNone }, - { "lunix", CPU_6502, CTNone }, - { "atmos", CPU_6502, CTNone }, - { "nes", CPU_6502, CTNone }, - { "supervision", CPU_65SC02, CTNone }, - { "lynx", CPU_65C02, CTNone }, + { "none", CPU_6502, BINFMT_BINARY, CTNone }, + { "module", CPU_6502, BINFMT_O65, CTNone }, + { "atari", CPU_6502, BINFMT_BINARY, CTAtari }, + { "vic20", CPU_6502, BINFMT_BINARY, CTPET }, + { "c16", CPU_6502, BINFMT_BINARY, CTPET }, + { "c64", CPU_6502, BINFMT_BINARY, CTPET }, + { "c128", CPU_6502, BINFMT_BINARY, CTPET }, + { "plus4", CPU_6502, BINFMT_BINARY, CTPET }, + { "cbm510", CPU_6502, BINFMT_BINARY, CTPET }, + { "cbm610", CPU_6502, BINFMT_BINARY, CTPET }, + { "pet", CPU_6502, BINFMT_BINARY, CTPET }, + { "bbc", CPU_6502, BINFMT_BINARY, CTNone }, + { "apple2", CPU_6502, BINFMT_BINARY, CTNone }, + { "apple2enh", CPU_65C02, BINFMT_BINARY, CTNone }, + { "geos-cbm", CPU_6502, BINFMT_BINARY, CTNone }, + { "geos-apple", CPU_65C02, BINFMT_BINARY, CTNone }, + { "lunix", CPU_6502, BINFMT_O65, CTNone }, + { "atmos", CPU_6502, BINFMT_BINARY, CTNone }, + { "nes", CPU_6502, BINFMT_BINARY, CTNone }, + { "supervision", CPU_65SC02, BINFMT_BINARY, CTNone }, + { "lynx", CPU_65C02, BINFMT_BINARY, CTNone }, }; /* Target system */ diff --git a/src/common/target.h b/src/common/target.h index fa1d42964..0ac5564e5 100644 --- a/src/common/target.h +++ b/src/common/target.h @@ -81,14 +81,17 @@ typedef struct TargetProperties TargetProperties; struct TargetProperties { const char Name[12]; /* Name of the target */ cpu_t DefaultCPU; /* Default CPU for this target */ + unsigned char BinFmt; /* Default binary format for this target */ const unsigned char* CharMap; /* Character translation table */ }; /* Target system */ extern target_t Target; -/* Table with default CPUs per target */ -extern const cpu_t DefaultCPU[TGT_COUNT]; +/* Types of available output formats */ +#define BINFMT_DEFAULT 0 /* Default (binary) */ +#define BINFMT_BINARY 1 /* Straight binary format */ +#define BINFMT_O65 2 /* Andre Fachats o65 format */ diff --git a/src/ld65/binfmt.c b/src/ld65/binfmt.c index b7c978475..3419cd063 100644 --- a/src/ld65/binfmt.c +++ b/src/ld65/binfmt.c @@ -33,6 +33,10 @@ +/* common */ +#include "target.h" + +/* ld65 */ #include "error.h" #include "binfmt.h" diff --git a/src/ld65/binfmt.h b/src/ld65/binfmt.h index f5414172d..493bd7fea 100644 --- a/src/ld65/binfmt.h +++ b/src/ld65/binfmt.h @@ -44,11 +44,6 @@ -/* Types of available output formats */ -#define BINFMT_DEFAULT 0 /* Default (binary) */ -#define BINFMT_BINARY 1 /* Straight binary format */ -#define BINFMT_O65 2 /* Andre Fachats o65 format */ - /* Default format (depends on target system) */ extern unsigned char DefaultBinFmt; diff --git a/src/ld65/cfg/apple2-asm.cfg b/src/ld65/cfg/apple2-asm.cfg deleted file mode 100644 index e70ed4484..000000000 --- a/src/ld65/cfg/apple2-asm.cfg +++ /dev/null @@ -1,20 +0,0 @@ -# Configuration for assembler programs which don't need a special setup - -FEATURES { - STARTADDRESS: default = $0803; -} -SYMBOLS { - __LOADADDR__: type = weak, value = __CODE_RUN__; - __LOADSIZE__: type = weak, value = __BSS_RUN__ - __CODE_RUN__; -} -MEMORY { - HEADER: file = %O, start = $0000, size = $0004; - RAM: file = %O, start = %S, size = $C000 - %S; -} -SEGMENTS { - EXEHDR: load = HEADER, type = ro, optional = yes; - CODE: load = RAM, type = rw, optional = yes, define = yes; - RODATA: load = RAM, type = ro, optional = yes; - DATA: load = RAM, type = rw, optional = yes; - BSS: load = RAM, type = bss, optional = yes, define = yes; -} diff --git a/src/ld65/cfg/apple2-overlay.cfg b/src/ld65/cfg/apple2-overlay.cfg deleted file mode 100644 index 9216aa7c7..000000000 --- a/src/ld65/cfg/apple2-overlay.cfg +++ /dev/null @@ -1,76 +0,0 @@ -# Configuration for overlay programs (overlays located below main program) - -# The overlay files don't include the 4 byte DOS 3.3 header so use AppleCommander like this: -# java -jar ac.jar -cc65 mydisk.dsk myprog bin < myprog -# java -jar ac.jar -p mydisk.dsk myprog.1 bin < myprog.1 -# java -jar ac.jar -p mydisk.dsk myprog.2 bin < myprog.2 -# java -jar ac.jar -p mydisk.dsk myprog.3 bin < myprog.3 -# ... - -FEATURES { - STARTADDRESS: default = $0803; -} -SYMBOLS { - __EXEHDR__: type = import; - __HIMEM__: type = weak, value = $9600; # Presumed RAM end - __LCADDR__: type = weak, value = $D400; # Behind quit code - __LCSIZE__: type = weak, value = $0C00; # Rest of bank two - __STACKSIZE__: type = weak, value = $0800; # 2k stack - __OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay - __LOADADDR__: type = weak, value = __STARTUP_RUN__; - __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ + - __MOVE_LAST__ - __MOVE_START__; -} -MEMORY { - ZP: define = yes, start = $0080, size = $001A; - HEADER: file = %O, start = $0000, size = $0004; - RAM: file = %O, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __STACKSIZE__ - __OVERLAYSIZE__ - %S; - MOVE: file = %O, define = yes, start = $0000, size = $FFFF; - LC: define = yes, start = __LCADDR__, size = __LCSIZE__; - OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__; - OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__; - OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__; - OVL4: file = "%O.4", start = %S, size = __OVERLAYSIZE__; - OVL5: file = "%O.5", start = %S, size = __OVERLAYSIZE__; - OVL6: file = "%O.6", start = %S, size = __OVERLAYSIZE__; - OVL7: file = "%O.7", start = %S, size = __OVERLAYSIZE__; - OVL8: file = "%O.8", start = %S, size = __OVERLAYSIZE__; - OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__; -} -SEGMENTS { - ZEROPAGE: load = ZP, type = zp; - EXEHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss, define = yes; - BSS: load = RAM, type = bss, define = yes; - INIT: load = MOVE, run = RAM, type = ro, define = yes; - LC: load = MOVE, run = LC, type = ro, optional = yes; - OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; - OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes; - OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes; - OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes; - OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes; - OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes; - OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes; - OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes; - OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/apple2-system.cfg b/src/ld65/cfg/apple2-system.cfg deleted file mode 100644 index d3df44d05..000000000 --- a/src/ld65/cfg/apple2-system.cfg +++ /dev/null @@ -1,43 +0,0 @@ -# Configuration for ProDOS 8 system programs (without the header) - -SYMBOLS { - __LCADDR__: type = weak, value = $D400; # Behind quit code - __LCSIZE__: type = weak, value = $0C00; # Rest of bank two - __STACKSIZE__: type = weak, value = $0800; # 2k stack - __LOADADDR__: type = weak, value = __STARTUP_RUN__; - __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ + - __MOVE_LAST__ - __MOVE_START__; -} -MEMORY { - ZP: define = yes, start = $0080, size = $001A; - RAM: file = %O, start = $2000, size = $9F00 - __STACKSIZE__; - MOVE: file = %O, define = yes, start = $0000, size = $FFFF; - LC: define = yes, start = __LCADDR__, size = __LCSIZE__; -} -SEGMENTS { - ZEROPAGE: load = ZP, type = zp; - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss, define = yes; - BSS: load = RAM, type = bss, define = yes; - INIT: load = MOVE, run = RAM, type = ro, define = yes; - LC: load = MOVE, run = LC, type = ro, optional = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/apple2.cfg b/src/ld65/cfg/apple2.cfg deleted file mode 100644 index 1f0ae121a..000000000 --- a/src/ld65/cfg/apple2.cfg +++ /dev/null @@ -1,50 +0,0 @@ -# Default configuration built into ld65 (allowing for 3KB in LC) - -FEATURES { - STARTADDRESS: default = $0803; -} -SYMBOLS { - __EXEHDR__: type = import; - __HIMEM__: type = weak, value = $9600; # Presumed RAM end - __LCADDR__: type = weak, value = $D400; # Behind quit code - __LCSIZE__: type = weak, value = $0C00; # Rest of bank two - __STACKSIZE__: type = weak, value = $0800; # 2k stack - __LOADADDR__: type = weak, value = __STARTUP_RUN__; - __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ + - __MOVE_LAST__ - __MOVE_START__; -} -MEMORY { - ZP: define = yes, start = $0080, size = $001A; - HEADER: file = %O, start = $0000, size = $0004; - RAM: file = %O, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S; - MOVE: file = %O, define = yes, start = $0000, size = $FFFF; - LC: define = yes, start = __LCADDR__, size = __LCSIZE__; -} -SEGMENTS { - ZEROPAGE: load = ZP, type = zp; - EXEHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss, define = yes; - BSS: load = RAM, type = bss, define = yes; - INIT: load = MOVE, run = RAM, type = ro, define = yes; - LC: load = MOVE, run = LC, type = ro, optional = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/apple2enh-asm.cfg b/src/ld65/cfg/apple2enh-asm.cfg deleted file mode 100644 index e70ed4484..000000000 --- a/src/ld65/cfg/apple2enh-asm.cfg +++ /dev/null @@ -1,20 +0,0 @@ -# Configuration for assembler programs which don't need a special setup - -FEATURES { - STARTADDRESS: default = $0803; -} -SYMBOLS { - __LOADADDR__: type = weak, value = __CODE_RUN__; - __LOADSIZE__: type = weak, value = __BSS_RUN__ - __CODE_RUN__; -} -MEMORY { - HEADER: file = %O, start = $0000, size = $0004; - RAM: file = %O, start = %S, size = $C000 - %S; -} -SEGMENTS { - EXEHDR: load = HEADER, type = ro, optional = yes; - CODE: load = RAM, type = rw, optional = yes, define = yes; - RODATA: load = RAM, type = ro, optional = yes; - DATA: load = RAM, type = rw, optional = yes; - BSS: load = RAM, type = bss, optional = yes, define = yes; -} diff --git a/src/ld65/cfg/apple2enh-overlay.cfg b/src/ld65/cfg/apple2enh-overlay.cfg deleted file mode 100644 index 9216aa7c7..000000000 --- a/src/ld65/cfg/apple2enh-overlay.cfg +++ /dev/null @@ -1,76 +0,0 @@ -# Configuration for overlay programs (overlays located below main program) - -# The overlay files don't include the 4 byte DOS 3.3 header so use AppleCommander like this: -# java -jar ac.jar -cc65 mydisk.dsk myprog bin < myprog -# java -jar ac.jar -p mydisk.dsk myprog.1 bin < myprog.1 -# java -jar ac.jar -p mydisk.dsk myprog.2 bin < myprog.2 -# java -jar ac.jar -p mydisk.dsk myprog.3 bin < myprog.3 -# ... - -FEATURES { - STARTADDRESS: default = $0803; -} -SYMBOLS { - __EXEHDR__: type = import; - __HIMEM__: type = weak, value = $9600; # Presumed RAM end - __LCADDR__: type = weak, value = $D400; # Behind quit code - __LCSIZE__: type = weak, value = $0C00; # Rest of bank two - __STACKSIZE__: type = weak, value = $0800; # 2k stack - __OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay - __LOADADDR__: type = weak, value = __STARTUP_RUN__; - __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ + - __MOVE_LAST__ - __MOVE_START__; -} -MEMORY { - ZP: define = yes, start = $0080, size = $001A; - HEADER: file = %O, start = $0000, size = $0004; - RAM: file = %O, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __STACKSIZE__ - __OVERLAYSIZE__ - %S; - MOVE: file = %O, define = yes, start = $0000, size = $FFFF; - LC: define = yes, start = __LCADDR__, size = __LCSIZE__; - OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__; - OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__; - OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__; - OVL4: file = "%O.4", start = %S, size = __OVERLAYSIZE__; - OVL5: file = "%O.5", start = %S, size = __OVERLAYSIZE__; - OVL6: file = "%O.6", start = %S, size = __OVERLAYSIZE__; - OVL7: file = "%O.7", start = %S, size = __OVERLAYSIZE__; - OVL8: file = "%O.8", start = %S, size = __OVERLAYSIZE__; - OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__; -} -SEGMENTS { - ZEROPAGE: load = ZP, type = zp; - EXEHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss, define = yes; - BSS: load = RAM, type = bss, define = yes; - INIT: load = MOVE, run = RAM, type = ro, define = yes; - LC: load = MOVE, run = LC, type = ro, optional = yes; - OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; - OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes; - OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes; - OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes; - OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes; - OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes; - OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes; - OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes; - OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/apple2enh-system.cfg b/src/ld65/cfg/apple2enh-system.cfg deleted file mode 100644 index d3df44d05..000000000 --- a/src/ld65/cfg/apple2enh-system.cfg +++ /dev/null @@ -1,43 +0,0 @@ -# Configuration for ProDOS 8 system programs (without the header) - -SYMBOLS { - __LCADDR__: type = weak, value = $D400; # Behind quit code - __LCSIZE__: type = weak, value = $0C00; # Rest of bank two - __STACKSIZE__: type = weak, value = $0800; # 2k stack - __LOADADDR__: type = weak, value = __STARTUP_RUN__; - __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ + - __MOVE_LAST__ - __MOVE_START__; -} -MEMORY { - ZP: define = yes, start = $0080, size = $001A; - RAM: file = %O, start = $2000, size = $9F00 - __STACKSIZE__; - MOVE: file = %O, define = yes, start = $0000, size = $FFFF; - LC: define = yes, start = __LCADDR__, size = __LCSIZE__; -} -SEGMENTS { - ZEROPAGE: load = ZP, type = zp; - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss, define = yes; - BSS: load = RAM, type = bss, define = yes; - INIT: load = MOVE, run = RAM, type = ro, define = yes; - LC: load = MOVE, run = LC, type = ro, optional = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/apple2enh.cfg b/src/ld65/cfg/apple2enh.cfg deleted file mode 100644 index 1f0ae121a..000000000 --- a/src/ld65/cfg/apple2enh.cfg +++ /dev/null @@ -1,50 +0,0 @@ -# Default configuration built into ld65 (allowing for 3KB in LC) - -FEATURES { - STARTADDRESS: default = $0803; -} -SYMBOLS { - __EXEHDR__: type = import; - __HIMEM__: type = weak, value = $9600; # Presumed RAM end - __LCADDR__: type = weak, value = $D400; # Behind quit code - __LCSIZE__: type = weak, value = $0C00; # Rest of bank two - __STACKSIZE__: type = weak, value = $0800; # 2k stack - __LOADADDR__: type = weak, value = __STARTUP_RUN__; - __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ + - __MOVE_LAST__ - __MOVE_START__; -} -MEMORY { - ZP: define = yes, start = $0080, size = $001A; - HEADER: file = %O, start = $0000, size = $0004; - RAM: file = %O, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S; - MOVE: file = %O, define = yes, start = $0000, size = $FFFF; - LC: define = yes, start = __LCADDR__, size = __LCSIZE__; -} -SEGMENTS { - ZEROPAGE: load = ZP, type = zp; - EXEHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss, define = yes; - BSS: load = RAM, type = bss, define = yes; - INIT: load = MOVE, run = RAM, type = ro, define = yes; - LC: load = MOVE, run = LC, type = ro, optional = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/atari-overlay.cfg b/src/ld65/cfg/atari-overlay.cfg deleted file mode 100644 index 02becd29b..000000000 --- a/src/ld65/cfg/atari-overlay.cfg +++ /dev/null @@ -1,61 +0,0 @@ -FEATURES { - STARTADDRESS: default = $2E00; -} -SYMBOLS { - __STACKSIZE__: type = weak, value = $0800; # 2k stack - __OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay - __RESERVED_MEMORY__: type = weak, value = $0000; -} -MEMORY { - ZP: file = "", define = yes, start = $0082, size = $007E; - HEADER: file = %O, start = $0000, size = $0006; - RAM: file = %O, start = %S + __OVERLAYSIZE__, size = $BC20 - __STACKSIZE__ - __OVERLAYSIZE__ - %S; - TRAILER: file = %O, start = $0000, size = $0006; - OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__; - OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__; - OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__; - OVL4: file = "%O.4", start = %S, size = __OVERLAYSIZE__; - OVL5: file = "%O.5", start = %S, size = __OVERLAYSIZE__; - OVL6: file = "%O.6", start = %S, size = __OVERLAYSIZE__; - OVL7: file = "%O.7", start = %S, size = __OVERLAYSIZE__; - OVL8: file = "%O.8", start = %S, size = __OVERLAYSIZE__; - OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__; -} -SEGMENTS { - EXEHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro, define = yes, optional = yes; - INIT: load = RAM, type = ro, optional = yes; - CODE: load = RAM, type = ro, define = yes; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss, define = yes; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; - EXTZP: load = ZP, type = zp, optional = yes; - AUTOSTRT: load = TRAILER, type = ro; - OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; - OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes; - OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes; - OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes; - OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes; - OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes; - OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes; - OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes; - OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/atari.cfg b/src/ld65/cfg/atari.cfg deleted file mode 100644 index 975d16213..000000000 --- a/src/ld65/cfg/atari.cfg +++ /dev/null @@ -1,42 +0,0 @@ -FEATURES { - STARTADDRESS: default = $2E00; -} -SYMBOLS { - __STACKSIZE__: type = weak, value = $0800; # 2k stack - __RESERVED_MEMORY__: type = weak, value = $0000; -} -MEMORY { - ZP: file = "", define = yes, start = $0082, size = $007E; - HEADER: file = %O, start = $0000, size = $0006; - RAM: file = %O, start = %S, size = $BC20 - __STACKSIZE__ - %S; - TRAILER: file = %O, start = $0000, size = $0006; -} -SEGMENTS { - EXEHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro, define = yes, optional = yes; - INIT: load = RAM, type = ro, optional = yes; - CODE: load = RAM, type = ro, define = yes; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss, define = yes; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; - EXTZP: load = ZP, type = zp, optional = yes; - AUTOSTRT: load = TRAILER, type = ro; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/atmos.cfg b/src/ld65/cfg/atmos.cfg deleted file mode 100644 index 137c0e9a9..000000000 --- a/src/ld65/cfg/atmos.cfg +++ /dev/null @@ -1,35 +0,0 @@ -SYMBOLS { - __STACKSIZE__: type = weak, value = $0800; # 2k stack -} -MEMORY { - ZP: file = "", define = yes, start = $00E2, size = $001A; - TAPEHDR: file = %O, type = ro, start = $0000, size = $0011; - RAM: file = %O, define = yes, start = $0500, size = $9300 - __STACKSIZE__; -} -SEGMENTS { - TAPEHDR: load = TAPEHDR, type = ro; - STARTUP: load = RAM, type = ro; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss, define = yes; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/bbc.cfg b/src/ld65/cfg/bbc.cfg deleted file mode 100644 index 6304c309b..000000000 --- a/src/ld65/cfg/bbc.cfg +++ /dev/null @@ -1,32 +0,0 @@ -SYMBOLS { - __STACKSIZE__: type = weak, value = $0800; # 2k stack -} -MEMORY { - ZP: file = "", define = yes, start = $0070, size = $0020; - RAM: file = %O, start = $0E00, size = $7200 - __STACKSIZE__; -} -SEGMENTS { - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/c128-overlay.cfg b/src/ld65/cfg/c128-overlay.cfg deleted file mode 100644 index 811e099ef..000000000 --- a/src/ld65/cfg/c128-overlay.cfg +++ /dev/null @@ -1,58 +0,0 @@ -SYMBOLS { - __LOADADDR__: type = import; - __EXEHDR__: type = import; - __STACKSIZE__: type = weak, value = $0800; # 2k stack - __OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay -} -MEMORY { - ZP: file = "", define = yes, start = $0002, size = $001A; - LOADADDR: file = %O, start = $1BFF, size = $0002; - HEADER: file = %O, start = $1C01, size = $000C; - RAM: file = %O, define = yes, start = $1C0D, size = $A3F3 - __OVERLAYSIZE__ - __STACKSIZE__; - OVL1: file = "%O.1", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL2: file = "%O.2", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL3: file = "%O.3", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL4: file = "%O.4", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL5: file = "%O.5", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL6: file = "%O.6", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL7: file = "%O.7", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL8: file = "%O.8", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL9: file = "%O.9", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; -} -SEGMENTS { - LOADADDR: load = LOADADDR, type = ro; - EXEHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; - OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; - OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes; - OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes; - OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes; - OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes; - OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes; - OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes; - OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes; - OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/c128.cfg b/src/ld65/cfg/c128.cfg deleted file mode 100644 index 0e1259111..000000000 --- a/src/ld65/cfg/c128.cfg +++ /dev/null @@ -1,39 +0,0 @@ -SYMBOLS { - __LOADADDR__: type = import; - __EXEHDR__: type = import; - __STACKSIZE__: type = weak, value = $0800; # 2k stack -} -MEMORY { - ZP: file = "", define = yes, start = $0002, size = $001A; - LOADADDR: file = %O, start = $1BFF, size = $0002; - HEADER: file = %O, start = $1C01, size = $000C; - RAM: file = %O, define = yes, start = $1C0D, size = $A3F3 - __STACKSIZE__; -} -SEGMENTS { - LOADADDR: load = LOADADDR, type = ro; - EXEHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/c16.cfg b/src/ld65/cfg/c16.cfg deleted file mode 100644 index 78c1739d3..000000000 --- a/src/ld65/cfg/c16.cfg +++ /dev/null @@ -1,39 +0,0 @@ -SYMBOLS { - __LOADADDR__: type = import; - __EXEHDR__: type = import; - __STACKSIZE__: type = weak, value = $0800; # 2k stack -} -MEMORY { - ZP: file = "", define = yes, start = $0002, size = $001A; - LOADADDR: file = %O, start = $0FFF, size = $0002; - HEADER: file = %O, start = $1001, size = $000C; - RAM: file = %O, start = $100D, size = $6FF3 - __STACKSIZE__; -} -SEGMENTS { - LOADADDR: load = LOADADDR, type = ro; - EXEHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/c64-asm.cfg b/src/ld65/cfg/c64-asm.cfg deleted file mode 100644 index 0924cdb56..000000000 --- a/src/ld65/cfg/c64-asm.cfg +++ /dev/null @@ -1,18 +0,0 @@ -FEATURES { - STARTADDRESS: default = $0801; -} -SYMBOLS { - __LOADADDR__: type = import; -} -MEMORY { - LOADADDR: file = %O, start = %S - 2, size = $0002; - RAM: file = %O, start = %S, size = $D000 - %S; -} -SEGMENTS { - LOADADDR: load = LOADADDR, type = ro; - EXEHDR: load = RAM, type = ro, optional = yes; - CODE: load = RAM, type = rw, optional = yes; - RODATA: load = RAM, type = ro, optional = yes; - DATA: load = RAM, type = rw, optional = yes; - BSS: load = RAM, type = bss, optional = yes; -} diff --git a/src/ld65/cfg/c64-overlay.cfg b/src/ld65/cfg/c64-overlay.cfg deleted file mode 100644 index c5e9e070c..000000000 --- a/src/ld65/cfg/c64-overlay.cfg +++ /dev/null @@ -1,58 +0,0 @@ -SYMBOLS { - __LOADADDR__: type = import; - __EXEHDR__: type = import; - __STACKSIZE__: type = weak, value = $0800; # 2k stack - __OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay -} -MEMORY { - ZP: file = "", define = yes, start = $0002, size = $001A; - LOADADDR: file = %O, start = $07FF, size = $0002; - HEADER: file = %O, start = $0801, size = $000C; - RAM: file = %O, define = yes, start = $080D, size = $C7F3 - __OVERLAYSIZE__ - __STACKSIZE__; - OVL1: file = "%O.1", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL2: file = "%O.2", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL3: file = "%O.3", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL4: file = "%O.4", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL5: file = "%O.5", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL6: file = "%O.6", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL7: file = "%O.7", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL8: file = "%O.8", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL9: file = "%O.9", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; -} -SEGMENTS { - LOADADDR: load = LOADADDR, type = ro; - EXEHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; - OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; - OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes; - OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes; - OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes; - OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes; - OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes; - OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes; - OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes; - OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/c64.cfg b/src/ld65/cfg/c64.cfg deleted file mode 100644 index 5d8befd02..000000000 --- a/src/ld65/cfg/c64.cfg +++ /dev/null @@ -1,39 +0,0 @@ -SYMBOLS { - __LOADADDR__: type = import; - __EXEHDR__: type = import; - __STACKSIZE__: type = weak, value = $0800; # 2k stack -} -MEMORY { - ZP: file = "", define = yes, start = $0002, size = $001A; - LOADADDR: file = %O, start = $07FF, size = $0002; - HEADER: file = %O, start = $0801, size = $000C; - RAM: file = %O, define = yes, start = $080D, size = $C7F3 - __STACKSIZE__; -} -SEGMENTS { - LOADADDR: load = LOADADDR, type = ro; - EXEHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/cbm510.cfg b/src/ld65/cfg/cbm510.cfg deleted file mode 100644 index 7635c6eeb..000000000 --- a/src/ld65/cfg/cbm510.cfg +++ /dev/null @@ -1,43 +0,0 @@ -SYMBOLS { - # The stack starts from $FEC3 and grows towards the video ram - __STACKSIZE__: type = weak, value = $06C3; # ~1.5k stack -} -MEMORY { - HEADER: file = %O, start = $0001, size = $0050, fill = yes; - ZP: file = %O, define = yes, start = $0051, size = $00AD, fill = yes; - STARTUP: file = %O, start = $00FE, size = $0102, fill = yes; - PAGE2: file = %O, start = $0200, size = $0100, fill = yes; - PAGE3: file = %O, start = $0300, size = $0100, fill = yes; - RAM: file = %O, start = $0400, size = $DC00; - CHARRAM: file = "", define = yes, start = $E000, size = $1000; - VIDRAM: file = "", define = yes, start = $F000, size = $0400; -} -SEGMENTS { - EXEHDR: load = HEADER, type = rw; - STARTUP: load = STARTUP, type = rw; - PAGE2: load = PAGE2, type = rw; - PAGE3: load = PAGE3, type = rw; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; - EXTZP: load = ZP, type = rw, define = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/cbm610.cfg b/src/ld65/cfg/cbm610.cfg deleted file mode 100644 index 48b5eba0c..000000000 --- a/src/ld65/cfg/cbm610.cfg +++ /dev/null @@ -1,40 +0,0 @@ -SYMBOLS { - __STACKSIZE__: type = weak, value = $0800; # 2k stack -} -MEMORY { - HEADER: file = %O, start = $0001, size = $0050, fill = yes; - ZP: file = %O, define = yes, start = $0051, size = $00AD, fill = yes; - STARTUP: file = %O, start = $00FE, size = $0102, fill = yes; - PAGE2: file = %O, start = $0200, size = $0100, fill = yes; - PAGE3: file = %O, start = $0300, size = $0100, fill = yes; - RAM: file = %O, start = $0400, size = $FECB - __STACKSIZE__; -} -SEGMENTS { - EXEHDR: load = HEADER, type = rw; - STARTUP: load = STARTUP, type = rw; - PAGE2: load = PAGE2, type = rw; - PAGE3: load = PAGE3, type = rw; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; - EXTZP: load = ZP, type = rw, define = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/cvt-cfg.pl b/src/ld65/cfg/cvt-cfg.pl deleted file mode 100755 index c02c2a7d9..000000000 --- a/src/ld65/cfg/cvt-cfg.pl +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/perl - -# Check number of params -die "Usage: cvt-cfg.pl input output varname\n" unless ($#ARGV == 2); - -# Get the parameters -$InputName = shift (@ARGV); -$OutputName = shift (@ARGV); -$VarName = shift (@ARGV); - -# Open both files -open (IN, "<$InputName") or die "Cannot open $InputName\n"; -open (OUT, ">$OutputName") or die "Cannot open $OutputName\n"; - -# Print the header to the output file -print OUT "static const char $VarName [] = \n"; - -# Read from input, print to output -while ($Line = ) { - - # Remove the newline - chomp $Line; - - # Separate an existing comment. No need to be overly clever, just ignore - # hash marks in strings. - if ($Line =~ /(.*?)(\s*)(\#\s*)(.*?)\s*$/) { - $Line = $1; - $CommentSpace = $2; - $Comment = $4; - } else { - $CommentSpace = ""; - $Comment = ""; - } - - # Remove leading and trailing spaces - $Line =~ s/^\s*|\s*$//g; - - # Replace control chars - $Line =~ s/\\/\\\\/g; - $Line =~ s/\"/\\\"/g; - $Line =~ s/\'/\\\'/g; - - # Print to output - print OUT "\"$Line\\n\""; - - # Add a comment if we have one - if ($Comment ne "") { - print OUT "$CommentSpace/* $Comment */"; - } - - # Terminate the line - print OUT "\n"; -} - -# Terminate the variable declaration -print OUT ";\n"; - -# Close the files -close IN; -close OUT; - -# Done -exit 0; - - - - diff --git a/src/ld65/cfg/geos-apple.cfg b/src/ld65/cfg/geos-apple.cfg deleted file mode 100644 index 1900c4866..000000000 --- a/src/ld65/cfg/geos-apple.cfg +++ /dev/null @@ -1,101 +0,0 @@ -SYMBOLS { - __BACKBUFSIZE__: type = weak, value = $2000; - __OVERLAYSIZE__: type = weak, value = $0000; - __OVERLAYADDR__: type = weak, value = $C000 - __BACKBUFSIZE__ - __OVERLAYSIZE__; - __STACKSIZE__: type = weak, value = $0400; - __STACKADDR__: type = weak, value = $2000 - __STACKSIZE__; -} -MEMORY { - CVT: file = %O, start = $0, size = $20000; - ZP: define = yes, start = $80, size = $1A + $06; - EXT: define = yes, start = $0C00, size = __STACKADDR__ - $0C00; - VLIR0: define = yes, start = $4000, size = __OVERLAYADDR__ - $4000; - VLIR1: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR2: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR3: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR4: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR5: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR6: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR7: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR8: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR9: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR10: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR11: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR12: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR13: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR14: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR15: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR16: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR17: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR18: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR19: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; -} -SEGMENTS { - ZEROPAGE: type = zp, load = ZP; - EXTZP: type = zp, load = ZP; - EXTBSS: type = bss, load = EXT, define = yes, optional = yes; - FILEINFO: type = ro, load = CVT, offset = $002; - RECORDS: type = ro, load = CVT, offset = $100, optional = yes; - DIRENTRY: type = ro, load = CVT, offset = $180; - VLIRIDX0: type = ro, load = CVT, align = $200, optional = yes; - STARTUP: type = ro, run = VLIR0, load = CVT, align_load = $200, define = yes; - LOWCODE: type = ro, run = VLIR0, load = CVT, optional = yes; - INIT: type = ro, run = VLIR0, load = CVT, define = yes, optional = yes; - CODE: type = ro, run = VLIR0, load = CVT; - RODATA: type = ro, run = VLIR0, load = CVT; - DATA: type = rw, run = VLIR0, load = CVT; - BSS: type = bss, load = VLIR0, define = yes; - VLIRIDX1: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY1: type = ro, run = VLIR1, load = CVT, align_load = $200, optional = yes; - VLIRIDX2: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY2: type = ro, run = VLIR2, load = CVT, align_load = $200, optional = yes; - VLIRIDX3: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY3: type = ro, run = VLIR3, load = CVT, align_load = $200, optional = yes; - VLIRIDX4: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY4: type = ro, run = VLIR4, load = CVT, align_load = $200, optional = yes; - VLIRIDX5: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY5: type = ro, run = VLIR5, load = CVT, align_load = $200, optional = yes; - VLIRIDX6: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY6: type = ro, run = VLIR6, load = CVT, align_load = $200, optional = yes; - VLIRIDX7: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY7: type = ro, run = VLIR7, load = CVT, align_load = $200, optional = yes; - VLIRIDX8: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY8: type = ro, run = VLIR8, load = CVT, align_load = $200, optional = yes; - VLIRIDX9: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY9: type = ro, run = VLIR9, load = CVT, align_load = $200, optional = yes; - VLIRIDX10: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY10: type = ro, run = VLIR10, load = CVT, align_load = $200, optional = yes; - VLIRIDX11: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY11: type = ro, run = VLIR11, load = CVT, align_load = $200, optional = yes; - VLIRIDX12: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY12: type = ro, run = VLIR12, load = CVT, align_load = $200, optional = yes; - VLIRIDX13: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY13: type = ro, run = VLIR13, load = CVT, align_load = $200, optional = yes; - VLIRIDX14: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY14: type = ro, run = VLIR14, load = CVT, align_load = $200, optional = yes; - VLIRIDX15: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY15: type = ro, run = VLIR15, load = CVT, align_load = $200, optional = yes; - VLIRIDX16: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY16: type = ro, run = VLIR16, load = CVT, align_load = $200, optional = yes; - VLIRIDX17: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY17: type = ro, run = VLIR17, load = CVT, align_load = $200, optional = yes; - VLIRIDX18: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY18: type = ro, run = VLIR18, load = CVT, align_load = $200, optional = yes; - VLIRIDX19: type = ro, load = CVT, align = $200, optional = yes; - OVERLAY19: type = ro, run = VLIR19, load = CVT, align_load = $200, optional = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/geos-cbm.cfg b/src/ld65/cfg/geos-cbm.cfg deleted file mode 100644 index f2aea55a2..000000000 --- a/src/ld65/cfg/geos-cbm.cfg +++ /dev/null @@ -1,79 +0,0 @@ -SYMBOLS { - __BACKBUFSIZE__: type = weak, value = $2000; - __OVERLAYSIZE__: type = weak, value = $0000; - __OVERLAYADDR__: type = weak, value = $8000 - __BACKBUFSIZE__ - __OVERLAYSIZE__; - __STACKSIZE__: type = weak, value = $0400; - __STACKADDR__: type = weak, value = __OVERLAYADDR__ - __STACKSIZE__; -} -MEMORY { - CVT: file = %O, start = $0, size = $40000; - ZP: define = yes, start = $58, size = $1A + $06; - VLIR0: define = yes, start = $0400, size = __STACKADDR__ - $0400; - VLIR1: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR2: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR3: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR4: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR5: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR6: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR7: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR8: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR9: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR10: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR11: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR12: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR13: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR14: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR15: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR16: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR17: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR18: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; - VLIR19: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__; -} -SEGMENTS { - ZEROPAGE: type = zp, load = ZP; - EXTZP: type = zp, load = ZP; - DIRENTRY: type = ro, load = CVT, align = $FE; - FILEINFO: type = ro, load = CVT, align = $FE; - RECORDS: type = ro, load = CVT, align = $FE, optional = yes; - STARTUP: type = ro, run = VLIR0, load = CVT, align_load = $FE, define = yes; - LOWCODE: type = ro, run = VLIR0, load = CVT, optional = yes; - INIT: type = ro, run = VLIR0, load = CVT, define = yes, optional = yes; - CODE: type = ro, run = VLIR0, load = CVT; - RODATA: type = ro, run = VLIR0, load = CVT; - DATA: type = rw, run = VLIR0, load = CVT; - BSS: type = bss, load = VLIR0, define = yes; - OVERLAY1: type = ro, run = VLIR1, load = CVT, align_load = $FE, optional = yes; - OVERLAY2: type = ro, run = VLIR2, load = CVT, align_load = $FE, optional = yes; - OVERLAY3: type = ro, run = VLIR3, load = CVT, align_load = $FE, optional = yes; - OVERLAY4: type = ro, run = VLIR4, load = CVT, align_load = $FE, optional = yes; - OVERLAY5: type = ro, run = VLIR5, load = CVT, align_load = $FE, optional = yes; - OVERLAY6: type = ro, run = VLIR6, load = CVT, align_load = $FE, optional = yes; - OVERLAY7: type = ro, run = VLIR7, load = CVT, align_load = $FE, optional = yes; - OVERLAY8: type = ro, run = VLIR8, load = CVT, align_load = $FE, optional = yes; - OVERLAY9: type = ro, run = VLIR9, load = CVT, align_load = $FE, optional = yes; - OVERLAY10: type = ro, run = VLIR10, load = CVT, align_load = $FE, optional = yes; - OVERLAY11: type = ro, run = VLIR11, load = CVT, align_load = $FE, optional = yes; - OVERLAY12: type = ro, run = VLIR12, load = CVT, align_load = $FE, optional = yes; - OVERLAY13: type = ro, run = VLIR13, load = CVT, align_load = $FE, optional = yes; - OVERLAY14: type = ro, run = VLIR14, load = CVT, align_load = $FE, optional = yes; - OVERLAY15: type = ro, run = VLIR15, load = CVT, align_load = $FE, optional = yes; - OVERLAY16: type = ro, run = VLIR16, load = CVT, align_load = $FE, optional = yes; - OVERLAY17: type = ro, run = VLIR17, load = CVT, align_load = $FE, optional = yes; - OVERLAY18: type = ro, run = VLIR18, load = CVT, align_load = $FE, optional = yes; - OVERLAY19: type = ro, run = VLIR19, load = CVT, align_load = $FE, optional = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/lunix.cfg b/src/ld65/cfg/lunix.cfg deleted file mode 100644 index 1342c390b..000000000 --- a/src/ld65/cfg/lunix.cfg +++ /dev/null @@ -1,44 +0,0 @@ -# ld65 Linker-configuration for LUnix, Next Generation. - -SYMBOLS { - __HEAPSIZE__: type = weak, value = $2000; # 8k heap [temporary, until LUnix malloc() exists] - __STACKSIZE__: type = weak, value = $0400; # 1k stack (do typical LUnix apps. need 2k?) -} -MEMORY { - ZP: start = $0080, size = $0040; - RAM: start = %S, size = $7600 - __STACKSIZE__; -} -SEGMENTS { - ZEROPAGE: load = ZP, type = zp, define = yes; # Pseudo-registers - STARTUP: load = RAM, type = ro; # First initialization code - LOWCODE: load = RAM, type = ro, optional = yes; # Legacy from other platforms - INIT: load = RAM, type = ro, define = yes, optional = yes; # Library initialization code - CODE: load = RAM, type = ro; # Program - RODATA: load = RAM, type = ro; # Literals, constants - DATA: load = RAM, type = rw; # Initialized variables - BSS: load = RAM, type = bss, define = yes; # Uninitialized variables -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} -FILES { - %O: format = o65; -} -FORMATS { - o65: os = lunix, - type = small, - export = main, # Program entry-point - import = LUNIXKERNEL; # Kernel entry-points -} diff --git a/src/ld65/cfg/lynx-bll.cfg b/src/ld65/cfg/lynx-bll.cfg deleted file mode 100644 index 3d6cf19aa..000000000 --- a/src/ld65/cfg/lynx-bll.cfg +++ /dev/null @@ -1,39 +0,0 @@ -SYMBOLS { - __STACKSIZE__: type = weak, value = $0800; # 2k stack - __STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader - __BLOCKSIZE__: type = weak, value = $0400; # cart block size - __BLLHDR__: type = import; -} -MEMORY { - ZP: file = "", define = yes, start = $0000, size = $0100; - HEADER: file = %O, start = $0000, size = $000a; - RAM: file = %O, define = yes, start = $0400, size = $BC38 - __STACKSIZE__; -} -SEGMENTS { - BLLHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro, define = yes; - RODATA: load = RAM, type = ro, define = yes; - DATA: load = RAM, type = rw, define = yes; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; - EXTZP: load = ZP, type = zp, optional = yes; - APPZP: load = ZP, type = zp, optional = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/lynx-coll.cfg b/src/ld65/cfg/lynx-coll.cfg deleted file mode 100644 index e7a220fb3..000000000 --- a/src/ld65/cfg/lynx-coll.cfg +++ /dev/null @@ -1,45 +0,0 @@ -SYMBOLS { - __STACKSIZE__: type = weak, value = $0800; # 2k stack - __STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader - __BLOCKSIZE__: type = weak, value = $0400; # cart block size - __EXEHDR__: type = import; - __BOOTLDR__: type = import; - __DEFDIR__: type = import; -} -MEMORY { - ZP: file = "", define = yes, start = $0000, size = $0100; - HEADER: file = %O, start = $0000, size = $0040; - BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__; - DIR: file = %O, start = $0000, size = 8; - RAM: file = %O, define = yes, start = $0200, size = $9E58 - __STACKSIZE__; -} -SEGMENTS { - EXEHDR: load = HEADER, type = ro; - BOOTLDR: load = BOOT, type = ro; - DIRECTORY: load = DIR, type = ro; - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro, define = yes; - RODATA: load = RAM, type = ro, define = yes; - DATA: load = RAM, type = rw, define = yes; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; - EXTZP: load = ZP, type = zp, optional = yes; - APPZP: load = ZP, type = zp, optional = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/lynx-uploader.cfg b/src/ld65/cfg/lynx-uploader.cfg deleted file mode 100644 index 4a1e87bee..000000000 --- a/src/ld65/cfg/lynx-uploader.cfg +++ /dev/null @@ -1,49 +0,0 @@ -SYMBOLS { - __STACKSIZE__: type = weak, value = $0800; # 2k stack - __STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader - __BLOCKSIZE__: type = weak, value = $0400; # cart block size - __EXEHDR__: type = import; - __BOOTLDR__: type = import; - __DEFDIR__: type = import; - __UPLOADER__: type = import; -} -MEMORY { - ZP: file = "", define = yes, start = $0000, size = $0100; - HEADER: file = %O, start = $0000, size = $0040; - BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__; - DIR: file = %O, start = $0000, size = 8; - RAM: file = %O, define = yes, start = $0200, size = $BD38 - __STACKSIZE__; - UPLDR: file = %O, define = yes, start = $BFDC, size = $005C; -} -SEGMENTS { - EXEHDR: load = HEADER, type = ro; - BOOTLDR: load = BOOT, type = ro; - DIRECTORY:load = DIR, type = ro; - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro, define = yes; - RODATA: load = RAM, type = ro, define = yes; - DATA: load = RAM, type = rw, define = yes; - BSS: load = RAM, type = bss, define = yes; - UPCODE: load = UPLDR, type = ro, define = yes; - UPDATA: load = UPLDR, type = rw, define = yes; - ZEROPAGE: load = ZP, type = zp; - EXTZP: load = ZP, type = zp, optional = yes; - APPZP: load = ZP, type = zp, optional = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/lynx.cfg b/src/ld65/cfg/lynx.cfg deleted file mode 100644 index 77345bf49..000000000 --- a/src/ld65/cfg/lynx.cfg +++ /dev/null @@ -1,45 +0,0 @@ -SYMBOLS { - __STACKSIZE__: type = weak, value = $0800; # 2k stack - __STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader - __BLOCKSIZE__: type = weak, value = 1024; # cart block size - __EXEHDR__: type = import; - __BOOTLDR__: type = import; - __DEFDIR__: type = import; -} -MEMORY { - ZP: file = "", define = yes, start = $0000, size = $0100; - HEADER: file = %O, start = $0000, size = $0040; - BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__; - DIR: file = %O, start = $0000, size = 8; - RAM: file = %O, define = yes, start = $0200, size = $BE38 - __STACKSIZE__; -} -SEGMENTS { - EXEHDR: load = HEADER, type = ro; - BOOTLDR: load = BOOT, type = ro; - DIRECTORY: load = DIR, type = ro; - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro, define = yes; - RODATA: load = RAM, type = ro, define = yes; - DATA: load = RAM, type = rw, define = yes; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; - EXTZP: load = ZP, type = zp, optional = yes; - APPZP: load = ZP, type = zp, optional = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/module.cfg b/src/ld65/cfg/module.cfg deleted file mode 100644 index edc87fb17..000000000 --- a/src/ld65/cfg/module.cfg +++ /dev/null @@ -1,21 +0,0 @@ -MEMORY { - ZP: file = %O, start = $0000, size = $0100, type = rw, define = yes; - COMBINED: file = %O, start = $0000, size = $FFFF; -} -SEGMENTS { - JUMPTABLE: load = COMBINED, type = ro; - INIT: load = COMBINED, type = ro, optional = yes; - CODE: load = COMBINED, type = ro; - RODATA: load = COMBINED, type = ro; - DATA: load = COMBINED, type = rw, define = yes; - BSS: load = COMBINED, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; - EXTZP: load = ZP, type = zp; -} -FILES { - %O: format = o65; -} -FORMATS { - o65: os = cc65, - type = small; -} diff --git a/src/ld65/cfg/nes.cfg b/src/ld65/cfg/nes.cfg deleted file mode 100644 index 3e2f408cc..000000000 --- a/src/ld65/cfg/nes.cfg +++ /dev/null @@ -1,62 +0,0 @@ -SYMBOLS { - __STACKSIZE__: type = weak, value = $0300; # 3 pages stack -} -MEMORY { - ZP: file = "", start = $0002, size = $001A, type = rw, define = yes; - - # INES Cartridge Header - HEADER: file = %O, start = $0000, size = $0010, fill = yes; - - # 2 16K ROM Banks - # - startup - # - code - # - rodata - # - data (load) - ROM0: file = %O, start = $8000, size = $7FF4, fill = yes, define = yes; - - # Hardware Vectors at End of 2nd 8K ROM - ROMV: file = %O, start = $FFF6, size = $000C, fill = yes; - - # 1 8k CHR Bank - ROM2: file = %O, start = $0000, size = $2000, fill = yes; - - # standard 2k SRAM (-zeropage) - # $0100-$0200 cpu stack - # $0200-$0500 3 pages for ppu memory write buffer - # $0500-$0800 3 pages for cc65 parameter stack - SRAM: file = "", start = $0500, size = __STACKSIZE__, define = yes; - - # additional 8K SRAM Bank - # - data (run) - # - bss - # - heap - RAM: file = "", start = $6000, size = $2000, define = yes; -} -SEGMENTS { - HEADER: load = HEADER, type = ro; - STARTUP: load = ROM0, type = ro, define = yes; - LOWCODE: load = ROM0, type = ro, optional = yes; - INIT: load = ROM0, type = ro, define = yes, optional = yes; - CODE: load = ROM0, type = ro, define = yes; - RODATA: load = ROM0, type = ro, define = yes; - DATA: load = ROM0, run = RAM, type = rw, define = yes; - VECTORS: load = ROMV, type = rw; - CHARS: load = ROM2, type = rw; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/none.cfg b/src/ld65/cfg/none.cfg deleted file mode 100644 index 49409a82c..000000000 --- a/src/ld65/cfg/none.cfg +++ /dev/null @@ -1,31 +0,0 @@ -SYMBOLS { - __STACKSIZE__: type = weak, value = $0800; # 2k stack -} -MEMORY { - ZP: file = "", define = yes, start = $0000, size = $0001F; - RAM: file = %O, start = %S, size = $10000 - __STACKSIZE__; -} -SEGMENTS { - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = rw; - RODATA: load = RAM, type = rw; - DATA: load = RAM, type = rw; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/pet.cfg b/src/ld65/cfg/pet.cfg deleted file mode 100644 index ef8b82e54..000000000 --- a/src/ld65/cfg/pet.cfg +++ /dev/null @@ -1,39 +0,0 @@ -SYMBOLS { - __LOADADDR__: type = import; - __EXEHDR__: type = import; - __STACKSIZE__: type = weak, value = $0800; # 2k stack -} -MEMORY { - ZP: file = "", define = yes, start = $0055, size = $001A; - LOADADDR: file = %O, start = $03FF, size = $0002; - HEADER: file = %O, start = $0401, size = $000C; - RAM: file = %O, start = $040D, size = $7BF3 - __STACKSIZE__; -} -SEGMENTS { - LOADADDR: load = LOADADDR, type = ro; - EXEHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/plus4.cfg b/src/ld65/cfg/plus4.cfg deleted file mode 100644 index c756f45a1..000000000 --- a/src/ld65/cfg/plus4.cfg +++ /dev/null @@ -1,39 +0,0 @@ -SYMBOLS { - __LOADADDR__: type = import; - __EXEHDR__: type = import; - __STACKSIZE__: type = weak, value = $0800; # 2k stack -} -MEMORY { - ZP: file = "", define = yes, start = $0002, size = $001A; - LOADADDR: file = %O, start = $0FFF, size = $0002; - HEADER: file = %O, start = $1001, size = $000C; - RAM: file = %O, define = yes, start = $100D, size = $ECF3 - __STACKSIZE__; -} -SEGMENTS { - LOADADDR: load = LOADADDR, type = ro; - EXEHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/supervision-128k.cfg b/src/ld65/cfg/supervision-128k.cfg deleted file mode 100644 index ce835db50..000000000 --- a/src/ld65/cfg/supervision-128k.cfg +++ /dev/null @@ -1,37 +0,0 @@ -# supervision 1284kbyte cartridge with bankswitching -# for assembler - -# ld65 config file -# ld65 --config supervision.cfg -o .bin .o - -SYMBOLS { - __STACKSIZE__: type = weak, value = $0100; # 1 page stack -} -MEMORY { - RAM: file = "", start = $0000, size = $2000 - __STACKSIZE__; - VRAM: file = "", start = $4000, size = $2000; - BANKROM1: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; - BANKROM2: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; - BANKROM3: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; - BANKROM4: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; - BANKROM5: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; - BANKROM6: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; - BANKROM7: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; - ROM: file = %O, start = $c000, size = $4000, fill = yes, fillval = $FF; -} -SEGMENTS { - LOWCODE: load = ROM, type = ro, optional = yes; - INIT: load = ROM, type = ro, define = yes, optional = yes; - CODE: load = ROM, type = ro; - BANK1: load = BANKROM1, type = ro; - BANK2: load = BANKROM2, type = ro; - BANK3: load = BANKROM3, type = ro; - BANK4: load = BANKROM4, type = ro; - BANK5: load = BANKROM5, type = ro; - BANK6: load = BANKROM6, type = ro; - BANK7: load = BANKROM7, type = ro; - ZEROPAGE: load = RAM, type = bss, define = yes; - DATA: load = RAM, type = bss, define = yes, offset = $0200; - BSS: load = RAM, type = bss, define = yes; - VECTOR: load = ROM, type = ro, offset = $3FFA; -} diff --git a/src/ld65/cfg/supervision-16k.cfg b/src/ld65/cfg/supervision-16k.cfg deleted file mode 100644 index e38948d5f..000000000 --- a/src/ld65/cfg/supervision-16k.cfg +++ /dev/null @@ -1,41 +0,0 @@ -# supervision 16kbyte cartridge - -# ld65 config file -# ld65 --config supervision16.cfg -o .bin .o - -SYMBOLS { - __STACKSIZE__: type = weak, value = $0100; # 1 page stack -} -MEMORY { - ZP: file = "", start = $0000, size = $0100; - CPUSTACK: file = "", start = $0100, size = $0100; - RAM: file = "", start = $0200, size = $1E00 - __STACKSIZE__; - VRAM: file = "", start = $4000, size = $2000; - ROM: file = %O, start = $C000, size = $4000, fill = yes, fillval = $ff, define=yes; -} -SEGMENTS { - LOWCODE: load = ROM, type = ro, optional = 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; - FFF0: load = ROM, type = ro, offset = $3FF0; - VECTOR: load = ROM, type = ro, offset = $3FFA; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp, define = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/supervision-64k.cfg b/src/ld65/cfg/supervision-64k.cfg deleted file mode 100644 index fd5370fa5..000000000 --- a/src/ld65/cfg/supervision-64k.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# supervision 64kbyte cartridge with bankswitching -# for assembler - -# ld65 config file -# ld65 --config supervision.cfg -o .bin .o - -SYMBOLS { - __STACKSIZE__: type = weak, value = $0100; # 1 page stack -} -MEMORY { - RAM: file = "", start = $0000, size = $2000 - __STACKSIZE__; - VRAM: file = "", start = $4000, size = $2000; - BANKROM1: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; - BANKROM2: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; - BANKROM3: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF; - ROM: file = %O, start = $C000, size = $4000, fill = yes, fillval = $FF; -} -SEGMENTS { - LOWCODE: load = ROM, type = ro, optional = yes; - INIT: load = ROM, type = ro, define = yes, optional = yes; - CODE: load = ROM, type = ro; - RODATA: load = ROM, type = ro; - BANK1: load = BANKROM1, type = ro; - BANK2: load = BANKROM2, type = ro; - BANK3: load = BANKROM3, type = ro; - ZEROPAGE: load = RAM, type = bss, define = yes; - DATA: load = RAM, type = bss, define = yes, offset = $0200; - BSS: load = RAM, type = bss, define = yes; - VECTOR: load = ROM, type = ro, offset = $3FFA; -} diff --git a/src/ld65/cfg/supervision.cfg b/src/ld65/cfg/supervision.cfg deleted file mode 100644 index 66fb4cfad..000000000 --- a/src/ld65/cfg/supervision.cfg +++ /dev/null @@ -1,37 +0,0 @@ -# if you want to combine the 2 16 kbyte roms -# make sure the halves are mirrored in the 64kbyte cartridge image -# or reset from code >0xc000 and switch bank to the 3rd bank - -MEMORY { - ZP: file = "", start = $0000, size = $0100; - CPUSTACK: file = "", start = $0100, size = $0100; - RAM: file = "", start = $0200, size = $1E00, define = yes; - VRAM: file = "", start = $4000, size = $2000; - ROM: file = %O, start = $8000, size = $8000, fill = yes, fillval = $FF, define = yes; -} -SEGMENTS { - LOWCODE: load = ROM, type = ro, optional = 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; - FFF0: load = ROM, type = ro, offset = $7FF0; - VECTOR: load = ROM, type = ro, offset = $7FFA; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp, define = yes; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/vic20-32k.cfg b/src/ld65/cfg/vic20-32k.cfg deleted file mode 100644 index c66b35247..000000000 --- a/src/ld65/cfg/vic20-32k.cfg +++ /dev/null @@ -1,41 +0,0 @@ -# Memory configuration for the VIC-20 with 32K RAM Cartridge -# Contributed by Stefan Haubenthal -SYMBOLS { - __LOADADDR__: type = import; - __EXEHDR__: type = import; - __STACKSIZE__: type = weak, value = $0400; # 1k stack -} -MEMORY { - ZP: file = "", define = yes, start = $0002, size = $001A; - LOADADDR: file = %O, start = $11FF, size = $0002; - HEADER: file = %O, start = $1201, size = $000C; - RAM: file = %O, define = yes, start = $120D, size = $6DF3 - __STACKSIZE__; -} -SEGMENTS { - LOADADDR: load = LOADADDR, type = ro; - EXEHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/cfg/vic20.cfg b/src/ld65/cfg/vic20.cfg deleted file mode 100644 index f356eb61e..000000000 --- a/src/ld65/cfg/vic20.cfg +++ /dev/null @@ -1,39 +0,0 @@ -SYMBOLS { - __LOADADDR__: type = import; - __EXEHDR__: type = import; - __STACKSIZE__: type = weak, value = $0400; # 1k stack -} -MEMORY { - ZP: file = "", define = yes, start = $0002, size = $001A; - LOADADDR: file = %O, start = $0FFF, size = $0002; - HEADER: file = %O, start = $1001, size = $000C; - RAM: file = %O, define = yes, start = $100D, size = $0DF3 - __STACKSIZE__; -} -SEGMENTS { - LOADADDR: load = LOADADDR, type = ro; - EXEHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - ZPSAVE: load = RAM, type = bss; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; -} -FEATURES { - CONDES: type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__, - segment = INIT; - CONDES: type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__, - segment = RODATA; - CONDES: type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__, - segment = RODATA, - import = __CALLIRQ__; -} diff --git a/src/ld65/config.c b/src/ld65/config.c index 4aaa7d99d..70fa63b54 100644 --- a/src/ld65/config.c +++ b/src/ld65/config.c @@ -48,6 +48,7 @@ #include "check.h" #include "print.h" #include "segdefs.h" +#include "target.h" #include "xmalloc.h" #include "xsprintf.h" diff --git a/src/ld65/main.c b/src/ld65/main.c index 6a0c09c06..45ab3493a 100644 --- a/src/ld65/main.c +++ b/src/ld65/main.c @@ -67,7 +67,6 @@ #include "scanner.h" #include "segments.h" #include "spool.h" -#include "tgtcfg.h" #include "tpool.h" @@ -326,21 +325,6 @@ static void OptDefine (const char* Opt attribute ((unused)), const char* Arg) -static void OptDumpConfig (const char* Opt attribute ((unused)), const char* Arg) -/* Dump a builtin linker configuration */ -{ - /* Map the given target name to its id */ - target_t T = FindTarget (Arg); - if (T == TGT_UNKNOWN) { - Error ("Target system `%s' is unknown", Arg); - } - - /* Dump the builtin configuration */ - DumpBuiltinConfig (stdout, T); -} - - - static void OptEndGroup (const char* Opt attribute ((unused)), const char* Arg attribute ((unused))) /* End a library group */ @@ -486,7 +470,8 @@ static void OptStartGroup (const char* Opt attribute ((unused)), static void OptTarget (const char* Opt attribute ((unused)), const char* Arg) /* Set the target system */ { - const TargetDesc* D; + StrBuf FileName = STATIC_STRBUF_INITIALIZER; + char* PathName; /* Map the target name to a target id */ Target = FindTarget (Arg); @@ -494,14 +479,25 @@ static void OptTarget (const char* Opt attribute ((unused)), const char* Arg) Error ("Invalid target name: `%s'", Arg); } - /* Get the target description record */ - D = &Targets[Target]; + /* Set the target binary format */ + DefaultBinFmt = GetTargetProperties (Target)->BinFmt; + + /* Build config file name from target name */ + SB_CopyStr (&FileName, GetTargetName (Target)); + SB_AppendStr (&FileName, ".cfg"); + SB_Terminate (&FileName); + + /* Search for the file */ + PathName = SearchFile (CfgSearchPath, SB_GetBuf (&FileName)); + if (PathName == 0) { + Error ("Cannot find config file `%s'", SB_GetBuf (&FileName)); + } - /* Set the target data */ - DefaultBinFmt = D->BinFmt; - CfgSetBuf (D->Cfg); + /* Free file name memory */ + SB_Done (&FileName); - /* Read the target config */ + /* Read the file */ + CfgSetName (PathName); CfgRead (); } @@ -527,7 +523,6 @@ int main (int argc, char* argv []) { "--config", 1, OptConfig }, { "--dbgfile", 1, OptDbgFile }, { "--define", 1, OptDefine }, - { "--dump-config", 1, OptDumpConfig }, { "--end-group", 0, OptEndGroup }, { "--force-import", 1, OptForceImport }, { "--help", 0, OptHelp }, diff --git a/src/ld65/make/gcc.mak b/src/ld65/make/gcc.mak index 4baf8708a..fe8428944 100644 --- a/src/ld65/make/gcc.mak +++ b/src/ld65/make/gcc.mak @@ -23,9 +23,6 @@ override CFLAGS += -DLD65_LIB=$(LD65_LIB) -DLD65_OBJ=$(LD65_OBJ) -DLD65_CFG=$(LD EBIND = emxbind LDFLAGS = -# Perl script for config file conversion -CVT=cfg/cvt-cfg.pl - # ----------------------------------------------------------------------------- # List of all object files @@ -65,28 +62,6 @@ OBJS = asserts.o \ # ----------------------------------------------------------------------------- # List of all config includes -INCS = apple2.inc \ - apple2enh.inc \ - atari.inc \ - atmos.inc \ - bbc.inc \ - c128.inc \ - c16.inc \ - c64.inc \ - cbm510.inc \ - cbm610.inc \ - geos-apple.inc \ - geos-cbm.inc \ - lunix.inc \ - lynx.inc \ - module.inc \ - nes.inc \ - none.inc \ - pet.inc \ - plus4.inc \ - supervision.inc \ - vic20.inc - LIBS = $(COMMON)/common.a @@ -103,12 +78,10 @@ all: depend @$(MAKE) -f make/gcc.mak all endif -$(EXE): $(INCS) $(OBJS) $(LIBS) +$(EXE): $(OBJS) $(LIBS) $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ @if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi -inc: $(INCS) - clean: $(RM) *~ core.* *.map @@ -119,74 +92,6 @@ zap: clean # Make the dependencies .PHONY: depend dep -depend dep: $(INCS) $(OBJS:.o=.c) +depend dep: $(OBJS:.o=.c) @echo "Creating dependency information" $(CC) $(CFLAGS) -MM $(OBJS:.o=.c) > .depend - -# ----------------------------------------------------------------------------- -# Rules to make config includes - -apple2.inc: cfg/apple2.cfg - @$(CVT) $< $@ CfgApple2 - -apple2enh.inc: cfg/apple2enh.cfg - @$(CVT) $< $@ CfgApple2Enh - -atari.inc: cfg/atari.cfg - @$(CVT) $< $@ CfgAtari - -atmos.inc: cfg/atmos.cfg - @$(CVT) $< $@ CfgAtmos - -bbc.inc: cfg/bbc.cfg - @$(CVT) $< $@ CfgBBC - -c16.inc: cfg/c16.cfg - @$(CVT) $< $@ CfgC16 - -c64.inc: cfg/c64.cfg - @$(CVT) $< $@ CfgC64 - -c128.inc: cfg/c128.cfg - @$(CVT) $< $@ CfgC128 - -cbm510.inc: cfg/cbm510.cfg - @$(CVT) $< $@ CfgCBM510 - -cbm610.inc: cfg/cbm610.cfg - @$(CVT) $< $@ CfgCBM610 - -geos-apple.inc: cfg/geos-apple.cfg - @$(CVT) $< $@ CfgGeosApple - -geos-cbm.inc: cfg/geos-cbm.cfg - @$(CVT) $< $@ CfgGeosCBM - -lunix.inc: cfg/lunix.cfg - @$(CVT) $< $@ CfgLunix - -lynx.inc: cfg/lynx.cfg - @$(CVT) $< $@ CfgLynx - -module.inc: cfg/module.cfg - @$(CVT) $< $@ CfgModule - -nes.inc: cfg/nes.cfg - @$(CVT) $< $@ CfgNES - -none.inc: cfg/none.cfg - @$(CVT) $< $@ CfgNone - -pet.inc: cfg/pet.cfg - @$(CVT) $< $@ CfgPET - -plus4.inc: cfg/plus4.cfg - @$(CVT) $< $@ CfgPlus4 - -supervision.inc: cfg/supervision.cfg - @$(CVT) $< $@ CfgSupervision - -vic20.inc: cfg/vic20.cfg - @$(CVT) $< $@ CfgVic20 - - diff --git a/src/ld65/tgtcfg.c b/src/ld65/tgtcfg.c deleted file mode 100644 index 2601c20e4..000000000 --- a/src/ld65/tgtcfg.c +++ /dev/null @@ -1,127 +0,0 @@ -/*****************************************************************************/ -/* */ -/* tgtcfg.c */ -/* */ -/* Target machine configurations the ld65 linker */ -/* */ -/* */ -/* */ -/* (C) 1998-2009, Ullrich von Bassewitz */ -/* Roemerstrasse 52 */ -/* D-70794 Filderstadt */ -/* EMail: uz@cc65.org */ -/* */ -/* */ -/* This software is provided 'as-is', without any expressed or implied */ -/* warranty. In no event will the authors be held liable for any damages */ -/* arising from the use of this software. */ -/* */ -/* Permission is granted to anyone to use this software for any purpose, */ -/* including commercial applications, and to alter it and redistribute it */ -/* freely, subject to the following restrictions: */ -/* */ -/* 1. The origin of this software must not be misrepresented; you must not */ -/* claim that you wrote the original software. If you use this software */ -/* in a product, an acknowledgment in the product documentation would be */ -/* appreciated but is not required. */ -/* 2. Altered source versions must be plainly marked as such, and must not */ -/* be misrepresented as being the original software. */ -/* 3. This notice may not be removed or altered from any source */ -/* distribution. */ -/* */ -/*****************************************************************************/ - - - -/* common */ -#include "check.h" - -/* ld65 */ -#include "binfmt.h" -#include "tgtcfg.h" - - - -/*****************************************************************************/ -/* Target configurations */ -/*****************************************************************************/ - - - -/* Actual target configurations, converted into C strings by a perl script */ -#include "apple2.inc" -#include "apple2enh.inc" -#include "atari.inc" -#include "atmos.inc" -#include "bbc.inc" -#include "c128.inc" -#include "c16.inc" -#include "c64.inc" -#include "cbm510.inc" -#include "cbm610.inc" -#include "geos-apple.inc" -#include "geos-cbm.inc" -#include "lunix.inc" -#include "lynx.inc" -#include "module.inc" -#include "nes.inc" -#include "none.inc" -#include "pet.inc" -#include "plus4.inc" -#include "supervision.inc" -#include "vic20.inc" - - - -/*****************************************************************************/ -/* Data */ -/*****************************************************************************/ - - - -/* Target configurations for all systems */ -const TargetDesc Targets[TGT_COUNT] = { - { BINFMT_BINARY, CfgNone }, - { BINFMT_O65, CfgModule }, - { BINFMT_BINARY, CfgAtari }, - { BINFMT_BINARY, CfgVic20 }, - { BINFMT_BINARY, CfgC16 }, - { BINFMT_BINARY, CfgC64 }, - { BINFMT_BINARY, CfgC128 }, - { BINFMT_BINARY, CfgPlus4 }, - { BINFMT_BINARY, CfgCBM510 }, - { BINFMT_BINARY, CfgCBM610 }, - { BINFMT_BINARY, CfgPET }, - { BINFMT_BINARY, CfgBBC }, - { BINFMT_BINARY, CfgApple2 }, - { BINFMT_BINARY, CfgApple2Enh }, - { BINFMT_BINARY, CfgGeosCBM }, - { BINFMT_BINARY, CfgGeosApple }, - { BINFMT_O65, CfgLunix }, - { BINFMT_BINARY, CfgAtmos }, - { BINFMT_BINARY, CfgNES }, - { BINFMT_BINARY, CfgSupervision }, - { BINFMT_BINARY, CfgLynx }, -}; - - - -/*****************************************************************************/ -/* Code */ -/*****************************************************************************/ - - - -void DumpBuiltinConfig (FILE* F, target_t T) -/* Dump a builtin linker configuration */ -{ - /* Check the given parameter */ - PRECONDITION (T > TGT_UNKNOWN && T < TGT_COUNT); - - /* Dump the config */ - fprintf (F, "%s\n", Targets[T].Cfg); -} - - - - diff --git a/src/ld65/tgtcfg.h b/src/ld65/tgtcfg.h deleted file mode 100644 index c37e2f313..000000000 --- a/src/ld65/tgtcfg.h +++ /dev/null @@ -1,81 +0,0 @@ -/*****************************************************************************/ -/* */ -/* tgtcfg.h */ -/* */ -/* Target machine configurations the ld65 linker */ -/* */ -/* */ -/* */ -/* (C) 1998-2003 Ullrich von Bassewitz */ -/* Römerstrasse 52 */ -/* D-70794 Filderstadt */ -/* EMail: uz@cc65.org */ -/* */ -/* */ -/* This software is provided 'as-is', without any expressed or implied */ -/* warranty. In no event will the authors be held liable for any damages */ -/* arising from the use of this software. */ -/* */ -/* Permission is granted to anyone to use this software for any purpose, */ -/* including commercial applications, and to alter it and redistribute it */ -/* freely, subject to the following restrictions: */ -/* */ -/* 1. The origin of this software must not be misrepresented; you must not */ -/* claim that you wrote the original software. If you use this software */ -/* in a product, an acknowledgment in the product documentation would be */ -/* appreciated but is not required. */ -/* 2. Altered source versions must be plainly marked as such, and must not */ -/* be misrepresented as being the original software. */ -/* 3. This notice may not be removed or altered from any source */ -/* distribution. */ -/* */ -/*****************************************************************************/ - - - -#ifndef TGTCFG_H -#define TGTCFG_H - - - -#include - -/* common */ -#include "target.h" - - - -/*****************************************************************************/ -/* Target configurations */ -/*****************************************************************************/ - - - -/* Structure describing a target */ -typedef struct TargetDesc TargetDesc; -struct TargetDesc { - unsigned char BinFmt; /* Default binary format for the target */ - const char* Cfg; /* Pointer to configuration */ -}; - -/* Target configurations for all systems */ -extern const TargetDesc Targets [TGT_COUNT]; - - - -/*****************************************************************************/ -/* Code */ -/*****************************************************************************/ - - - -void DumpBuiltinConfig (FILE* F, target_t T); -/* Dump a builtin linker configuration */ - - - -/* End of tgtcfg.h */ -#endif - - -