1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-29 13:31:59 +00:00
cc65/cfg/atari7800.cfg

69 lines
3.3 KiB
INI
Raw Normal View History

2022-03-01 04:44:26 +00:00
# Atari VCS 7800 linker configuration file for cc65
# In order to add the a78 header to the build you can add
# "--force-import __EXEHDR__" to the command line
2022-03-01 04:44:26 +00:00
SYMBOLS {
__STACKSIZE__: type = weak, value = $0600; # C stack
2022-03-13 11:31:11 +00:00
__CARTSIZE__: type = weak, value = $8000;
2022-03-01 07:28:15 +00:00
__VEC_BOTTOM__: value = $fffa, type = export;
__VEC_SIZE__: value = $6, type = export;
__ENCRYPT_BOTTOM__: value = $ff7a, type = export;
__ENCRYPT_SIZE__: value = $80, type = export;
__MEMORY_TOP__: value = __ENCRYPT_BOTTOM__, type = export;
2022-04-18 08:59:54 +00:00
__INIT_SIZE__: value = 156, type = export;
2022-03-01 07:28:15 +00:00
__MEMORY_INIT__: value = __MEMORY_TOP__ - __INIT_SIZE__, type = export;
2022-03-13 11:31:11 +00:00
__MEMORY_BOTTOM__: value = $10000 - __CARTSIZE__, type = weak;
2022-03-01 07:28:15 +00:00
__FREE_ROM_SIZE__: value = __MEMORY_INIT__ - __MEMORY_BOTTOM__, type = export;
2022-03-01 04:44:26 +00:00
}
MEMORY {
ZP: file = "", define = yes, start = $0040, size = $00C0, type = rw;
SP: file = "", define = yes, start = $0140, size = $00C0, type = rw;
RAM1: file = "", define = yes, start = $1800, size = $0840, type = rw;
RAM2: file = "", define = yes, start = $2100, size = $0040, type = rw;
RAM3: file = "", define = yes, start = $2200, size = $0600, type = rw;
2022-03-01 07:28:15 +00:00
# For emulators you also need a header file
HEADER: file = %O, start = $0000, size = 128;
2022-03-01 04:44:26 +00:00
# "Normal" cartridge rom. Multiple banks arent supported
# by this script. You may change the rom size, but keep
# two things in mind:
# - start must be a multiple of $1000
# - ROM must end at $ff79
2022-03-01 07:28:15 +00:00
ROM: file = %O, define = yes, start = __MEMORY_BOTTOM__, size = __FREE_ROM_SIZE__, type = ro, fill = yes, fillval = $ff;
ROMS: file = %O, define = yes, start = __MEMORY_INIT__, size = __INIT_SIZE__, type = ro, fill = yes, fillval = $ff;
2022-03-01 04:44:26 +00:00
# Encryption stuff
2022-03-01 07:28:15 +00:00
ROME: file = %O, start = __ENCRYPT_BOTTOM__, size = __ENCRYPT_SIZE__, type = ro, fill = yes, fillval = $ff;
2022-03-01 04:44:26 +00:00
# Interrupt vectors
2022-03-01 07:28:15 +00:00
ROMV: file = %O, start = __VEC_BOTTOM__, size = __VEC_SIZE__, type = ro, fill = yes, fillval = $ff;
2022-03-01 04:44:26 +00:00
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro, optional = yes;
STARTUP: load = ROMS, type = ro, define = yes;
ONCE: load = ROMS, type = ro, define = yes;
2022-03-01 04:44:26 +00:00
CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, define = yes, align = 256;
DATA: load = ROM, run = RAM1, type = rw, define = yes;
BSS: load = RAM1, type = bss, define = yes;
2022-03-01 07:28:15 +00:00
VECTORS: load = ROMV, type = ro, define = yes;
2022-03-01 04:44:26 +00:00
ENCRYPTION: load = ROME, type = ro define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}