-
Notifications
You must be signed in to change notification settings - Fork 3
/
nes.cfg
74 lines (67 loc) · 2.78 KB
/
nes.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
SYMBOLS {
__STACK_START__: type = weak, value = $0700; # 1 pages stack
__STACK_SIZE__: type = weak, value = $0100; # 1 pages stack
}
MEMORY {
# Zero Page
ZP: file = "", start = $0000, size = $0100, type = rw, define = yes;
# RAM copy of sprite data
OAM1: start = $0200, size = $0100, define = yes;
# regular ram
RAM: start = $0500, size = $0200, define = yes;
# INES Cartridge Header
HEADER: file = %O, start = $0000, size = $0010, fill = yes;
# 2 16K PRG ROM Banks
# - startup
# - code
# - rodata
# - data (load)
PRG: file = %O, start = $C000, size = $3FFA, fill = yes, define = yes;
# Hardware Vectors at End of 2nd 8K ROM
VECTORS: file = %O, start = $FFFA, size = $0006, fill = yes;
# 1 8k CHR Bank
CHR: 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 = $0100, size = __STACK_SIZE__, define = yes;
#RAM: start = $0300, size = $0500, define = yes;
# additional 8K SRAM Bank
# - data (run)
# - bss
# - heap
#RAM2: file = %O, start = $6000, size = $2000, define = yes;
}
SEGMENTS {
HEADER: load = HEADER, type = ro;
STARTUP: load = PRG, type = ro, define = yes;
LOWCODE: load = PRG, type = ro, optional = yes;
CODE: load = PRG, type = ro, define = yes;
INIT: load = PRG, type = ro, define = yes, optional = yes;
MUSIC: load = PRG, type = ro, define = yes;
RODATA: load = PRG, type = ro, define = yes;
DATA: load = PRG, run = RAM, type = rw, define = yes;
VECTORS: load = VECTORS, type = rw;
CHARS: load = CHR, type = rw;
BSS: load = RAM, type = bss, define = yes;
HEAP: load = RAM, type = bss, optional = yes;
ZEROPAGE: load = ZP, type = zp;
OAM: load = OAM1, type = bss, define = yes;
ONCE: load = PRG, type = ro, 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__;
}