--- /dev/null
+# 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;
+}
--- /dev/null
+# 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__;
+}
--- /dev/null
+# 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__;
+}
--- /dev/null
+# 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__;
+}
--- /dev/null
+# 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;
+}
--- /dev/null
+# 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__;
+}
--- /dev/null
+# 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__;
+}
--- /dev/null
+# 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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+# 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
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+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__;
+}
--- /dev/null
+# supervision 1284kbyte cartridge with bankswitching
+# for assembler
+
+# ld65 config file
+# ld65 --config supervision.cfg -o <prog>.bin <prog>.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;
+}
--- /dev/null
+# supervision 16kbyte cartridge
+
+# ld65 config file
+# ld65 --config supervision16.cfg -o <prog>.bin <prog>.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__;
+}
--- /dev/null
+# supervision 64kbyte cartridge with bankswitching
+# for assembler
+
+# ld65 config file
+# ld65 --config supervision.cfg -o <prog>.bin <prog>.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;
+}
--- /dev/null
+# 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__;
+}
--- /dev/null
+# 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__;
+}
--- /dev/null
+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__;
+}
/* 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 */
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 */
+/* common */
+#include "target.h"
+
+/* ld65 */
#include "error.h"
#include "binfmt.h"
-/* 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;
+++ /dev/null
-# 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;
-}
+++ /dev/null
-# 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__;
-}
+++ /dev/null
-# 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__;
-}
+++ /dev/null
-# 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__;
-}
+++ /dev/null
-# 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;
-}
+++ /dev/null
-# 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__;
-}
+++ /dev/null
-# 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__;
-}
+++ /dev/null
-# 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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-#!/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 = <IN>) {
-
- # 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;
-
-
-
-
+++ /dev/null
-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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-# 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
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-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__;
-}
+++ /dev/null
-# supervision 1284kbyte cartridge with bankswitching
-# for assembler
-
-# ld65 config file
-# ld65 --config supervision.cfg -o <prog>.bin <prog>.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;
-}
+++ /dev/null
-# supervision 16kbyte cartridge
-
-# ld65 config file
-# ld65 --config supervision16.cfg -o <prog>.bin <prog>.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__;
-}
+++ /dev/null
-# supervision 64kbyte cartridge with bankswitching
-# for assembler
-
-# ld65 config file
-# ld65 --config supervision.cfg -o <prog>.bin <prog>.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;
-}
+++ /dev/null
-# 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__;
-}
+++ /dev/null
-# 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__;
-}
+++ /dev/null
-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__;
-}
#include "check.h"
#include "print.h"
#include "segdefs.h"
+#include "target.h"
#include "xmalloc.h"
#include "xsprintf.h"
#include "scanner.h"
#include "segments.h"
#include "spool.h"
-#include "tgtcfg.h"
#include "tpool.h"
-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 */
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);
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 ();
}
{ "--config", 1, OptConfig },
{ "--dbgfile", 1, OptDbgFile },
{ "--define", 1, OptDefine },
- { "--dump-config", 1, OptDumpConfig },
{ "--end-group", 0, OptEndGroup },
{ "--force-import", 1, OptForceImport },
{ "--help", 0, OptHelp },
EBIND = emxbind
LDFLAGS =
-# Perl script for config file conversion
-CVT=cfg/cvt-cfg.pl
-
# -----------------------------------------------------------------------------
# List of all object files
# -----------------------------------------------------------------------------
# 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
@$(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
# 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
-
-
+++ /dev/null
-/*****************************************************************************/
-/* */
-/* 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);
-}
-
-
-
-
+++ /dev/null
-/*****************************************************************************/
-/* */
-/* 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 <stdio.h>
-
-/* 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
-
-
-