CF (CurrentFiles)
This is a singleton class (object) containing files FA and FB, pointers to structs containing F1,F2,F3 and associated data, and many methods for managing the files.
The classes’ data is mapped out below; see also the CF methods.
CF |
CurrentFiles |
Location |
8095545c |
Pointer |
8057825c (static) | aka r13 (=8057c6a0 ) - 0x4444 |
Size |
0xa850 | confirmed in 8000a010: _Heap::allocCF() |
SF |
SaveFiles |
Location |
809be1e0 |
Pointer |
8095545c | aka cf+0x0 |
Size |
0xfbe0 |
ST |
SaveTails |
Location |
809cdde0 |
Pointer |
80955460 | aka cf+0x4 |
Size |
0x80 |
The “Tail” class (size [24], of which last 4 are checksum) is some unknown data that will be referenced a lot.
Data
CF |
|
|
|
|
|
8095545c |
0 |
[4] |
ptr |
saveFiles |
ptr to SF (= 809be1e0) |
80955460 |
4 |
[4] |
ptr |
saveTails |
ptr to ST (= 809cdde0) |
80955464 |
8 |
[53c0] |
File |
FA |
|
8095a824 |
53c8 |
[53c0] |
File |
FB |
|
8095fbe4 |
a788 |
[24] |
Tail |
fileTail |
current tail; last 4B are checksum |
8095fc08 |
a7ac |
[48] |
char16[9][4] |
heronames[4] |
9 utf16 chars; F1, F2, F3, extra(???) |
8095fc50 |
a7f4 |
[20] |
char[32] |
area |
|
8095fc70 |
a814 |
[4] |
___[4] |
– |
|
8095fc74 |
a818 |
[18] |
long[3] |
savetimes |
per-file |
8095fc8c |
a830 |
[6] |
short[3] |
curhearts |
per-file |
8095fc92 |
a836 |
[6] |
short[3] |
widths |
per-file (of first row of FS text+hearts?) |
8095fc98 |
a83c |
[1] |
byte |
selectedFileNo |
|
8095fc99 |
a83d |
[3] |
bool[3] |
chkA |
per-file: did SF file have 53ad set? |
8095fc9c |
a840 |
[6] |
bool[6] |
_u |
unknown flags |
8095fca2 |
a846 |
[3] |
bool[3] |
chkB |
per-file: is SF file checksum stale? |
8095fca5 |
a849 |
[3] |
bool[3] |
chkC |
per-file: is SF tail checksum stale? |
8095fca8 |
a84c |
[1] |
bool |
errorFlag |
(nothing works when this is set) |
8095fca9 |
a84d |
[1] |
bool |
opFlag |
signals that a file is being saved/copied/deleted |
8095fcaa |
a84e |
[1] |
bool |
anticommitFlag |
signals to load static data from FA during title screen (guards loadToCurrent()) |
8095fcab |
a84f |
[1] |
___[1] |
– |
|
8095fcac |
a850 |
// |
|
|
|
SF |
|
|
|
0 |
[4] |
char[4] |
game ID (SOUJ etc.) |
4 |
[1c] |
??? |
header |
20 |
[53c0] |
File |
F1 |
53e0 |
[53c0] |
File |
F2 |
a7e0 |
[53c0] |
File |
F3 |
fb60 |
[24] |
Tail |
tailsInt1 (or tailsInt[0], etc.) |
fb84 |
[24] |
Tail |
tailsInt2 |
fba8 |
[24] |
Tail |
tailsInt3 |
fbcc |
[14] |
??? |
footer |
fbe0 |
// |
|
there’s [10] of space b/w SF and ST |
ST |
|
|
|
0 |
[24] |
Tail |
tailsExt1 (or tailsExt[0], etc.) |
24 |
[24] |
Tail |
tailsExt2 |
48 |
[24] |
Tail |
tailsExt3 |
6c |
[14] |
??? |
footer |
80 |
// |
|
|