FS:FormatSaveData

FS:FormatSaveData

Request #

Index WordDescription
0Header code [0x084C0242]
1Archive ID. This must be either 0x4 (SaveData) or 0x567890B2, otherwise error 0xE0E046BE is returned.
2Path Type
3Path Size
4Size of a block. Only 0x200 and 0x1000 are accepted it seems. The value of this word is hard-coded to 0x200 in official titles it appears.
5Number of Directories
6Max number of Files
7Directory Bucket Count
8File Bucket Count
9u8, 0 = don’t duplicate data, 1 = duplicate data
10(PathSize << 14) | 2
11Path Data Pointer

Response #

Index WordDescription
0Header code
1Result code

Description #

This clears the SaveData archive for the specified game, if the LowPath.Type is Empty then this will clear the SaveData for the current game. The target SaveData to format is determined by a Binary path, a game needs an exheader permission set in order to format the SaveData of another program.

See here for an example of how bucket counts should be calculated.