Line 19:
Line 19:
=GBA VC=
=GBA VC=
−
GBA VC is run by [[FIRM|AGB_FIRM]]. RomFS isn't used for GBA VC titles, but can be found empty within GBA VC titles. The NCCH [[ExeFS]] contains the same files as a normal application. The [[ExeFS]]:/.code contains the GBA VC ROM followed by a 0x360 footer.
+
GBA VC is run by [[FIRM|AGB_FIRM]]. RomFS isn't used for GBA VC titles, but can be found empty within GBA VC titles. The NCCH [[ExeFS]] contains the same files as a normal application. The [[ExeFS]]:/.code contains the GBA VC ROM followed by a 0x360 byte long footer.
===Footer===
===Footer===
−
All values in the GBA VC Footer are Little Endian.
+
All values in the GBA VC footer are little-endian.
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 34:
Line 34:
|-
|-
| 0x008
| 0x008
−
| 0x2
+
| 0x4
−
| Unknown
+
| Save type (see below)
+
|-
+
| 0x020
+
| 0x1
+
| Manufacturer info select (see below)
|-
|-
−
| 0x02A
+
| 0x024
−
| 0x2FA
+
| 0x300
−
| Unknown
+
| Unknown, three different types of this data have been observed.
|-
|-
| 0x338
| 0x338
Line 55:
Line 59:
| 0x35A
| 0x35A
| 0x2
| 0x2
−
| GBA ROM Filesize per MB
+
| High two bytes of GBA ROM file size
|}
|}
+
+
Save types:
+
* EEPROM (various sizes, IDs specified in footer): 0x2
+
* SRAM/FRAM (128k): 0xE
+
* Flash (512k): 0x9
+
+
Support for RTC and 1m-flash chips is not implemented in AGB_FIRM.
+
+
Manufacturer info:
+
GBA games' SDK-provided save code only supports a range of manufacturers from which Nintendo was buying memory from around the time of that game's development. As such, most games don't support a generic emulated storage chip. This byte appears to select a manufacturer info set to emulate. This has been observed to be 0x90, 0xC0, and (in one EEPROM-based game), 0x80.
+
* SRAM games up to and including V111 use 0xC0. Above use 0x90.
+
* FRAM V103 uses 0xC0. V104+ don't exist, and lower versions also likely use 0xC0.
+
* Flash V124 was observed 0x90, V131 was observed 0xC0.
+
* EEPROM-based games vary wildly, since they can likely specify chip info in the 0x10-region of the footer.