Savegames: Difference between revisions
Moosehunter (talk | contribs) No edit summary |
Moosehunter (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
This page describes the format of | This page describes the format of save files contained in NAND. These files are stored as completely unencrypted, plaintext data. Save files are not cleared upon creation, resulting in possible garbage data in unused portions of the container. | ||
== Main header == | == Main header == | ||
Line 415: | Line 415: | ||
| 8 | | 8 | ||
| Block size | | Block size | ||
|- | |||
| | |||
| | |||
| The below fields are treated as a separate subheader | |||
|- | |- | ||
| 0x20 | | 0x20 | ||
| 4 | | 4 | ||
| | | Version? (Must be 0 or 1) | ||
|- | |- | ||
| 0x24 | | 0x24 | ||
Line 462: | Line 466: | ||
| | | | ||
| | | | ||
| The below fields are | | The below fields are treated as a separate subheader | ||
|- | |- | ||
| 0x18 | | 0x18 | ||
Line 578: | Line 582: | ||
== Files == | == Files == | ||
=== | === Directory Table Entry === | ||
* | * Index 0 is the start of a linked list that contains all invalid/inactive directories. | ||
* Index 1 is the start of a linked list that contains all valid/active directories. | |||
* Index 2 is the root directory. | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 591: | Line 595: | ||
|- | |- | ||
| 0x00 | | 0x00 | ||
| | | 4 | ||
| | | Parent directory node index | ||
|- | |||
| 0x04 | |||
| 64 | |||
| Filename | |||
|- | |- | ||
| | | 0x44 | ||
| | | 4 | ||
| | | Next sibling directory node index | ||
|- | |||
| 0x48 | |||
| 4 | |||
| First child directory node index | |||
|- | |||
| 0x4c | |||
| 8 | |||
| First child file node index | |||
|- | |||
| 0x54 | |||
| 8 | |||
| Unused? | |||
|- | |- | ||
| | | 0x5c | ||
| 4 | | 4 | ||
| | | Next directory node index in the chain of invalid or valid directories. If this is the first block in a list of length 0, this value will contain the number total number of directory nodes. | ||
|- | |||
|} | |} | ||
=== File | === File Table Entry === | ||
* | * Index 0 is the start of a linked list that contains all invalid/inactive files. | ||
* Index 1 is the start of a linked list that contains all valid/active files. | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 615: | Line 637: | ||
| 0x00 | | 0x00 | ||
| 4 | | 4 | ||
| Parent | | Parent directory node index | ||
|- | |- | ||
| 0x04 | | 0x04 | ||
Line 623: | Line 645: | ||
| 0x44 | | 0x44 | ||
| 4 | | 4 | ||
| | | Next sibling file node index | ||
|- | |- | ||
| 0x48 | | 0x48 | ||
| 4 | | 4 | ||
| | | Index of the block that the file starts at | ||
|- | |- | ||
| 0x4c | | 0x4c | ||
| 8 | | 8 | ||
| File size | | File size in bytes | ||
|- | |- | ||
| 0x54 | | 0x54 | ||
| 8 | | 8 | ||
| | | Unused? | ||
|- | |- | ||
| 0x5c | | 0x5c | ||
| 4 | | 4 | ||
| Next | | Next file node index in the chain of invalid or valid file. If this is the first block in a list of length 0, this value will contain the number total number of file nodes. | ||
|- | |- | ||
|} | |} |