2015-07-12 14:27:24 +02:00
|
|
|
# linker config to produce simple NEC PC-Engine cartridge (.pce)
|
|
|
|
|
2014-11-30 11:20:57 +01:00
|
|
|
SYMBOLS {
|
2015-07-12 10:32:55 +02:00
|
|
|
__STACKSIZE__: type = weak, value = $0300; # 3 pages stack
|
2014-11-30 11:20:57 +01:00
|
|
|
}
|
2014-11-29 14:18:48 +01:00
|
|
|
|
2015-07-12 14:27:24 +02:00
|
|
|
MEMORY {
|
|
|
|
# FIXME: is this correct? the first 3? bytes cant be used?
|
|
|
|
ZP: start = $03, size = $1A, type = rw, define = yes;
|
2014-11-29 14:18:48 +01:00
|
|
|
|
2015-07-12 14:27:24 +02:00
|
|
|
# reset-bank and hardware vectors
|
|
|
|
ROM0: start = $e000, size = $1ff6, file = %O ,fill = yes, define = yes;
|
|
|
|
ROMV: start = $fff6, size = $a, file = %O,fill = yes;
|
2014-11-29 14:18:48 +01:00
|
|
|
|
2015-07-12 14:27:24 +02:00
|
|
|
# first RAM page (also contains stack and zeropage)
|
|
|
|
RAM: start = $2200, size = $1e00, define = yes;
|
2014-11-29 14:18:48 +01:00
|
|
|
}
|
|
|
|
|
2015-07-12 14:27:24 +02:00
|
|
|
SEGMENTS {
|
|
|
|
STARTUP: load = ROM0, type = ro, define = 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;
|
|
|
|
BSS: load = RAM, type = bss, define = yes;
|
|
|
|
VECTORS: load = ROMV, type = rw, define = yes;
|
|
|
|
ZEROPAGE: load = ZP, type = zp, define = yes;
|
2014-11-29 14:18:48 +01:00
|
|
|
}
|
2015-07-12 14:27:24 +02:00
|
|
|
|
2014-11-29 14:18:48 +01:00
|
|
|
FEATURES {
|
2015-07-12 10:32:55 +02:00
|
|
|
CONDES: segment = STARTUP,
|
|
|
|
type=constructor,
|
|
|
|
label=__CONSTRUCTOR_TABLE__,
|
|
|
|
count=__CONSTRUCTOR_COUNT__;
|
|
|
|
|
|
|
|
CONDES: segment = STARTUP,
|
|
|
|
type=destructor,
|
|
|
|
label=__DESTRUCTOR_TABLE__,
|
|
|
|
count=__DESTRUCTOR_COUNT__;
|
2014-11-29 14:18:48 +01:00
|
|
|
}
|