4 |
nishi |
1 |
SYMBOLS {
|
|
|
2 |
__STACKSIZE__: value = $0800, type = weak; # 2k stack
|
|
|
3 |
}
|
|
|
4 |
MEMORY {
|
|
|
5 |
ZP: start = $0002, size = $001A, type = rw, define = yes;
|
|
|
6 |
#This CRT header stuff is refereced cart64_8k.s but not written to cart binary
|
|
|
7 |
CHEADER: start = $0000, size = $0040, type = ro, file = "", fill=yes;
|
|
|
8 |
ROMCHIP: start = $0000, size = $0010, type = ro, file = "", fill=yes;
|
|
|
9 |
#16k catridge data.
|
|
|
10 |
ROM: start = $8000, size = $4000, file = %O, fill=yes, define = yes;
|
|
|
11 |
#Usable RAM for data.
|
|
|
12 |
RAM: start = $0800, size = $7800, type = rw, define = yes;
|
|
|
13 |
#Data at $C000. Not normally used but made available to your cartridge.
|
|
|
14 |
#Top 2k is for the stack.
|
|
|
15 |
HIRAM: start = $C000, size = $1000-__STACKSIZE__, type = rw;
|
|
|
16 |
}
|
|
|
17 |
SEGMENTS {
|
|
|
18 |
#Cartridge ID and settings - these are not written to cart binary but still req
|
|
|
19 |
#because referenced in cart64_8k.S
|
|
|
20 |
HEADERDATA: load = CHEADER, type = ro;
|
|
|
21 |
CHIP0: load = ROMCHIP, type = ro;
|
|
|
22 |
#-----------------------------------------
|
|
|
23 |
STARTUP: load = ROM, type = ro;
|
|
|
24 |
LOWCODE: load = ROM, type = ro, optional = yes;
|
|
|
25 |
INIT: load = ROM, type = ro, define = yes, optional = yes;
|
|
|
26 |
CODE: load = ROM, type = ro;
|
|
|
27 |
RODATA: load = ROM, type = ro;
|
|
|
28 |
DATA: load = ROM, run = RAM, type = rw, define = yes;
|
|
|
29 |
ONCE: load = ROM, type = ro, define = yes; # MAX ADDED THIS
|
|
|
30 |
BSS: load = RAM, type = bss, define = yes;
|
|
|
31 |
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
|
|
32 |
#Data stored at $C000.
|
|
|
33 |
BSSHI: load = HIRAM, type = bss, define = yes, optional = yes;
|
|
|
34 |
ZEROPAGE: load = ZP, type = zp;
|
|
|
35 |
}
|
|
|
36 |
FEATURES {
|
|
|
37 |
CONDES: segment = INIT,
|
|
|
38 |
type = constructor,
|
|
|
39 |
label = __CONSTRUCTOR_TABLE__,
|
|
|
40 |
count = __CONSTRUCTOR_COUNT__;
|
|
|
41 |
CONDES: segment = RODATA,
|
|
|
42 |
type = destructor,
|
|
|
43 |
label = __DESTRUCTOR_TABLE__,
|
|
|
44 |
count = __DESTRUCTOR_COUNT__;
|
|
|
45 |
CONDES: segment = RODATA,
|
|
|
46 |
type = interruptor,
|
|
|
47 |
label = __INTERRUPTOR_TABLE__,
|
|
|
48 |
count = __INTERRUPTOR_COUNT__;
|
|
|
49 |
}
|