-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlorom.cfg
57 lines (48 loc) · 2.61 KB
/
lorom.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
# ca65 linker config for 256K SNES ROM with GSU and 32K SRAM
# Physical areas of memory
# Names need not match, but it makes it easier to remember if they do.
MEMORY {
ZEROPAGE: start = $0, size = $100;
#IRQ zeropage starts at $200
#STACK: start = $1E00, size = $200;
BSS: start = $300, size = $1B00;
LORAM: start = $7E2000, size = $6000;
PRGRAM: start = $7E8000, size = $8000;
HIRAM: start = $7F0000, size = $10000;
#SRAM stuff
SRAM_ZP: start = $700000, size = $200;
#GSU_STACK: start = $700200, size = $200;
SRAM: start = $700400, size = $1C00; # also adjust size in header
#FRAMEBUFFER:start = $701F00, size = $6100; #take rest of sram
ROM: start = $8000, size = $8000, fill = yes;
BANK1: start = $18000, size = $8000, fill = yes;
BANK2: start = $28000, size = $8000, fill = yes;
BANK3: start = $38000, size = $8000, fill = yes;
BANK4: start = $48000, size = $8000, fill = yes;
BANK5: start = $58000, size = $8000, fill = yes;
BANK6: start = $68000, size = $8000, fill = yes;
BANK7: start = $78000, size = $8000, fill = yes;
}
# Logical areas code/data can be put into.
SEGMENTS {
ZEROPAGE: load = ZEROPAGE, type = zp;
BSS: load = BSS, type = bss; # align = $100;
LORAM: load = LORAM, type = bss, optional = yes;
HIRAM: load = HIRAM, type = bss, optional = yes;
PRGRAM: load = PRGRAM, type = bss, optional = yes;
SRAM_ZP: load = SRAM_ZP, type = bss, optional = yes;
SRAM: load = SRAM, type = bss, optional = yes;
CODE: load = ROM, type = ro; # align = $8000;
RODATA: load = BANK4, type = ro;
HEADER: load = ROM, start = $FFB0;
ROMINFO: load = ROM, start = $FFD5;
VECTORS: load = ROM, start = $FFE4;
# Philip Banks wants to empty the banks, fill our streets with banks, and run a bank-making operation out of his banks.
BANK1: load = BANK1, align = $8000, optional = yes;
BANK2: load = BANK2, align = $8000, optional = yes;
BANK3: load = BANK3, align = $8000, optional = yes;
BANK4: load = BANK4, align = $8000, optional = yes;
BANK5: load = BANK5, align = $8000, optional = yes;
BANK6: load = BANK6, align = $8000, optional = yes;
BANK7: load = BANK7, align = $8000, optional = yes;
}