-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlinker_template.cfg
56 lines (44 loc) · 2.01 KB
/
linker_template.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
# ca65 linker config for 1024 KiB (8 Mbit) sfc file
# Physical areas of memory
MEMORY {
# Reserve the first 24 bytes of RAM for local variables
ZEROPAGE: start = $000018, size = $00E8;
# Make sure to change BSS based on where you put
# the stack and how big you expect it to get.
# Unlike on the NES, we include shadow OAM in BSS here
# because there's not as much of a benefit to having it
# page-aligned.
BSS: start = $000200, size = $1E00;
BSS7E: start = $7E2000, size = $E000;
BSS7F: start = $7F0000, size =$10000;
# The fast ROM area starts at $808000.
# It's mirrored into the slow ROM area.
#ROM0: start = $c00000, type = ro, size = $8000, fill = yes;
#ROM0_code: start = $808000, type = ro, size = $8000, fill = yes;
# Insert automatic memory here
# The sound processor has its own address space
SPCZEROPAGE: start = $0004, size = $00EC;
SPCRAM: start = $0200, size = $FDC0;
}
# Logical areas code/data can be put into.
SEGMENTS {
# Read-only areas for main CPU
# CODE will be placed in the game automatically, but it can be defined here to guarantee a specific bank
#CODE: load = ROM0_code, type = ro, align = $100;
# Needs to be at the start of a bank:
PlayerGraphics:
load = ROM1, type = ro, align = $100, optional=yes;
# Read-only areas for sound CPU
# SPCIMAGE: load = ROM0, run=SPCRAM, align = $100, define=yes;
# Areas for variables for main CPU
ZEROPAGE: load = ZEROPAGE, type = zp, define=yes;
BSS: load = BSS, type = bss, align = $100, optional=yes;
BSS7E: load = BSS7E, type = bss, align = $100, optional=yes;
BSS7F: load = BSS7F, type = bss, align = $100, optional=yes;
# Areas for variables for sound CPU
SPCZEROPAGE:load = SPCZEROPAGE, type=zp, optional=yes;
SPCBSS: load = SPCRAM, type = bss, align = $100, optional=yes;
# Insert automatic segments here
# Put SNESHEADER last to avoid bank overflow errors
SNESHEADER: load = ROM0_code, type = ro, start = $80FFC0;
}