-
Notifications
You must be signed in to change notification settings - Fork 14
/
Map.cfg
72 lines (62 loc) · 3.31 KB
/
Map.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
# libSFX Default Memory Map (Mode 20 "LoROM" mapping with 4*32kB banks)
# David Lindecrantz <[email protected]>
# Copy this file (or any of the supplied examples) to your source path as "Map.cfg" and edit as necessary
# If no custom "Map.cfg" is found, this default file is included (from $(libsfx_dir)/Configurations/Map.cfg)
SYMBOLS {
__STACKSIZE__: type = weak, value = $100;
__ZPADSIZE__: type = weak, value = $10;
__ZNMISIZE__: type = weak, value = $10;
__RPADSIZE__: type = weak, value = $100;
}
MEMORY {
ZPAD: start = $000000, size = __ZPADSIZE__, define = yes;
ZNMI: start = __ZPADSIZE__, size = __ZNMISIZE__, define = yes;
ZPAGE: start = __ZPADSIZE__ + __ZNMISIZE__, size = $100 - (__ZPADSIZE__ + __ZNMISIZE__), define = yes;
LORAM: start = $000100, size = $1f00 - __STACKSIZE__, define = yes;
STACK: start = $002000 - __STACKSIZE__, size = __STACKSIZE__, define = yes;
HIRAM: start = $7e2000, size = $e000, define = yes;
EXRAM: start = $7f0000, size = $10000, define = yes;
ROM0: start = $808000, size = $8000, fill = yes, fillval = $ff;
ROM1: start = $818000, size = $8000, fill = yes, fillval = $ff;
ROM2: start = $828000, size = $8000, fill = yes, fillval = $ff;
ROM3: start = $838000, size = $8000, fill = yes, fillval = $ff;
SMPZPAGE: start = $0002, size = $00ee;
SMPMMIO: start = $00f0, size = $0010;
SMPSTACK: start = $0100, size = $0100;
SMPRAM: start = $0200, size = $fdc0;
}
SEGMENTS {
ZPAD: load = ZPAD, type = zp, optional = yes;
ZNMI: load = ZNMI, type = zp, optional = yes;
ZEROPAGE: load = ZPAGE, type = zp, optional = yes;
BSS: load = LORAM, type = bss, optional = yes;
LORAM: load = LORAM, type = bss, optional = yes;
HIRAM: load = HIRAM, type = bss, optional = yes;
EXRAM: load = EXRAM, type = bss, optional = yes;
CODE: load = ROM0, type = ro;
RODATA: load = ROM0, type = ro;
LIBSFX: load = ROM0, type = ro, optional = yes;
LIBSFX_PKG: load = ROM0, type = ro, optional = yes;
LIBSFX_SMP: load = ROM0, type = rw, run = SMPZPAGE, optional = yes, define = yes;
SMPCODE: load = ROM0, type = rw, run = SMPRAM, optional = yes, define = yes;
HEADER: load = ROM0, type = ro, start = $80ffb0;
VECTORS: load = ROM0, type = ro, start = $80ffe0;
ROM1: load = ROM1, type = ro, optional = yes;
ROM2: load = ROM2, type = ro, optional = yes;
ROM3: load = ROM3, type = ro, optional = yes;
SMPZPAGE: load = SMPZPAGE, type = zp, optional = yes;
SMPRAM: load = SMPRAM, type = bss, optional = yes;
}
# Group: Map.cfg
#
# Map.cfg is the configuration file passed to the ld65 linker.
#
# It consists of two main parts∶
# * MEMORY describes the memory layout of the SNES and the cartridge
# * SEGMENTS assigns segments to the memory areas specified
#
# In include/Configurations there are several template configuration
# files for different ROM sizes and memory layouts.
#
# For full documentation of ld65 and its configuration refer to
# the <official documentation at https://cc65.github.io/doc/ld65.html>.