-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathzelda.cfg
executable file
·43 lines (38 loc) · 1.71 KB
/
zelda.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# cc65ld linker script for the MMC1 mapper used by Legend of Zelda
SYMBOLS {
__STACKSIZE__: type = weak, value = $0300; # 3 pages stack
}
MEMORY {
# iNES Cartridge Header
HEADER: file = %O, start = $0000, size = $0010, fill = yes, fillval = $00;
# Zero page
ZP: file = "", start = $0000, size = $0100, type = rw, define = yes;
# SRAM
SRAM: file = "", start = $6000, size = $2000;
# WRAM
WRAM: file = "", start = $100, size = $700;
# ROM Banks
ROM0: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF;
ROM1: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF;
ROM2: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF;
ROM3: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF;
ROM4: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF;
ROM5: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF;
ROM6: file = %O, start = $8000, size = $4000, fill = yes, fillval = $FF;
# Bank 7 is always mapped to $C000
ROM7: file = %O, start = $C000, size = $4000, fill = yes, fillval = $FF;
}
SEGMENTS {
INESHDR: load = HEADER, type = ro;
ZEROPAGE: load = ZP, type = zp;
WRAM: load = WRAM, type = bss;
PRG_0: load = ROM0, type = ro, align = $100, optional = yes;
PRG_1: load = ROM1, type = ro, align = $100, optional = yes;
PRG_2: load = ROM2, type = ro, align = $100, optional = yes;
PRG_3: load = ROM3, type = ro, align = $100, optional = yes;
PRG_4: load = ROM4, type = ro, align = $100, optional = yes;
PRG_5: load = ROM5, type = ro, align = $100, optional = yes;
PRG_6: load = ROM6, type = ro, align = $100, optional = yes;
PRG_7: load = ROM7, type = ro, align = $100, optional = yes;
VECTORS: load = ROM7, type = ro, start = $FFFA;
}