-
Notifications
You must be signed in to change notification settings - Fork 1
/
header.txt
64 lines (54 loc) · 1.77 KB
/
header.txt
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
Super UFO copier header format
by Revenant
last updated 2018/07/19
0000 1 byte ROM size in megabits (4, 8, 10, 12, 16, 24, 32)
0001 1 byte unused
0002 1 byte ROM mapping (1 = lorom, 0 = hirom)
0003 5 bytes unused
0008 8 bytes "SFCUFOSD"
0010 1 byte unused
0011 1 byte ROM size in megabits (rounded up to power of 2)
0012 1 byte SRAM present
00 = none
01 = 16kbit (2kb)
02 = 64kbit (8kb)
03 = 256kbit (32kb)
07 = 1Mbit (128kb)
(written to bits 0-2 of $2184)
0013 2 bytes ROM mapping
A23:A16 DRAM mapping and address translation
(written to $2186-87)
examples:
LoROM 4M = 05 2a (x0-x7:8000-ffff, x8-xf:8000-ffff)
8M = 15 28 (x0-xf:8000-ffff)
10..16M = 55 20 (00-1f:8000-ffff, 20-3f, 80-9f,...)
24..32M = 55 00 (00-3f:8000-ffff, 80-bf...)
HiROM 4M = 09 00 (40-43:0000-ffff, c0-c3, c4-c7...)
8M = 25 00 (40-47:0000-ffff, c0-c7, c8-cf...)
10M = 37 00
12M = 3d 00
16M = 95 00 (40-4f:0000-ffff, c0-cf...)
24M = f5 00
32M = 55 00 (40-5f:0000-ffff, c0-df...)
0015 1 byte SRAM A15
00 = 0 (HiROM) (xx:6000-7fff)
10 = don't care (xx:0000-ffff)
20 = 0 (LoROM) (xx:0000-7fff) if more than 2MB ROM or 32kb SRAM
30 = 1 (xx:8000-ffff)
possibly ORed with either of...
40 = 24-32Mbit LoROM
80 = 32Mbit HiROM
(written to bits 4-7 of $2184)
0016 1 byte SRAM A23:20 (2 bits each, A23 most significant)
00b = don't care
01b = don't care (not used by firmware)
10b = 0
11b = 1
(written to $2185)
default for LoROM : 3f (7x, fx = x111xxxxb = 00111111b)
default for HiROM : 2c (2x-3x, ax-bx = x01xxxxxb = 00101100b)
0017 1 byte ROM mapping (same as 0002, written to $218f)
0018 1 byte region (00 = NTSC, 02 = PAL)
0019 1 byte expansion chip (00 = no, FF = yes)
001A 6 bytes unused
0020 32 bytes copy of cartridge header (00FFC0-00FFDF)