Filesystem services: Difference between revisions
TimmSkiller (talk | contribs) Move anti savegame restore here |
TimmSkiller (talk | contribs) No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1,523: | Line 1,523: | ||
==Anti Savegame Restore Save Data== | ==Anti Savegame Restore Save Data== | ||
The save data used for this feature is stored in [[System_SaveData|System Save Data]] ID 0x00010011 and contains only one file, named <code>DB</code>: | The save data used for this feature is stored in [[System_SaveData|System Save Data]] ID 0x00010011 and contains only one file, named <code>DB</code>: | ||
===Main Structure=== | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset !! Size !! Description | |||
|- | |||
| 0x0 || 0x1000 || Header | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset !! Size !! Description | |||
|- | |||
| 0x0 || 0x1 || u8, version (usually 0) | |||
|- | |||
| 0x1 || 0x3 || padding | |||
|- | |||
| 0x4 || 0x4 || u32, number of secure value entries | |||
|- | |||
| 0x8 || 0xFF8 || completely unused, padding | |||
|} | |||
|- | |||
| 0x1000 || 0x1C000 (8 * 14336) || [[Filesystem_services#SecureValueKey|Secure value keys]] | |||
|- | |||
| 0x1D000 || 0x1C000 (8 * 14336) || u64s, Secure values | |||
|} | |||
===SecureValueKey=== | ===SecureValueKey=== | ||
Line 1,542: | Line 1,566: | ||
|} | |} | ||
=== | ==Applications using this feature== | ||
* Animal Crossing: New Leaf | |||
* Pokemon X & Y | |||
* Pokemon Omega Ruby & Alpha Sapphire | |||
* Pokemon Omega Ruby & Alpha Sapphire Demo | |||
* Pokemon Shuffle | |||
* Super Smash Bros | |||
* Pokemon Red,Blue and Yellow (GB(C) VC) | |||
* Rusty's Real Deal Baseball | |||
* Megami Meguri | |||
=SEEDDB and TITLETAG= | |||
With [[9.6.0-24|9.6.0-X]] new [[System_SaveData]] with save ID 0x0001000F was added. This save data contains both the NCCH seed database (SEEDDB) and the title tag database (TITLETAG). | |||
These databases are managed by the commands [[FS:AddSeed]], [[FS:GetSeed]], [[FS:DeleteSeed]], [[FS:GetNumSeeds]] and [[FS:ListSeeds]] for SEEDDB, and [[FS:AddTitleTag]], [[FS:GetTitleTag]], [[FS:DeleteTitleTag]], [[FS:GetNumTitleTags]], and [[FS:ListTitleTags]] for TITLETAG respectively. | |||
Both the [[Home_Menu|HOME Menu]] and the [[NIM_Services|NIM]] module have access to these commands. | |||
==SEEDDB== | |||
Stored in the system savedata archive 0x0001000F as a file named <code>SEEDDB</code>, it contains the title-unique seed-data used for the new [[NCCH]] keyY generation added with FIRM [[9.6.0-24|9.6.0-X]]. | |||
The file follows a simple key-value format allowing the storage of seed data for up to 2000 unique title IDs. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,556: | Line 1,603: | ||
| 0x1 || 0x3 || padding | | 0x1 || 0x3 || padding | ||
|- | |- | ||
| 0x4 || 0x4 || u32, number of | | 0x4 || 0x4 || u32, number of seed entries | ||
|- | |- | ||
| 0x8 || 0xFF8 || completely unused, padding | | 0x8 || 0xFF8 || completely unused, padding | ||
|} | |} | ||
|- | |- | ||
| 0x1000 || | | 0x1000 || 0x3E80 (8 * 2000) || u64s, Title IDs | ||
|- | |- | ||
| | | 0x4E80 || 0x7D00 (16 * 2000) || Seed data, 16 bytes per seed | ||
|} | |} | ||
== | ==TITLETAG Database== | ||
Stored in the system savedata archive 0x0001000F as a file named <code>TITLETAG</code>, it contains information used by the [[Home_Menu|HOME Menu]] to handle cases when a to-be-released title has been purchased already, that is, to properly install the seed required for [[NCCH]] keyY generation added with FIRM [[9.6.0-24|9.6.0-X]]. | |||
When a to-be-released title is purchased, the [[NIM_Services|NIM]] module installs a [[Filesystem_services#TitleTag|title tag]] with enough information about the title for the [[Home_Menu|HOME Menu]] to be able to initiate a seed import once the title has been released (and thus, the title's NCCH content lock seed). Until the title's seed is released, and while the title tag remains in the database, the HOME Menu will prevent the user from launching the software as it would not run without the seed. Once released, information from the title tag is used to download the seed, and, if successful, the title tag is removed from the database, making the software playable. | |||
The file follows a simple key-value format allowing the storage of title tag data for up to 2000 unique title IDs. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset !! Size !! Description | |||
|- | |||
| 0x0 || 0x1000 || Header | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset !! Size !! Description | |||
|- | |||
| 0x0 || 0x1 || u8, version (usually 0) | |||
|- | |||
| 0x1 || 0x3 || padding | |||
|- | |||
| 0x4 || 0x4 || u32, number of entries | |||
|- | |||
| 0x8 || 0xFF8 || completely unused, padding | |||
|} | |||
|- | |||
| 0x1000 || 0x3E80 (8 * 2000) || u64s, Title IDs | |||
|- | |||
| 0x4E80 || 0x3E800 (0x80 * 2000) || [[Filesystem_services#TitleTag|Title Tag]] data, 0x80 bytes per entry | |||
|} | |||
= Common Types = | = Common Types = |