file
save.c
Classes
- struct SaveFileStatus
- struct SaveFileEEPROMAddresses
Functions
- static auto HandleSaveInit(u32) -> SaveResult
- static auto HandleSaveInProgress(u32) -> SaveResult
- static auto HandleSaveDone(u32) -> SaveResult
- auto GetSaveFileEEPROMAddresses(u32) -> const SaveFileEEPROMAddresses*
- auto DataDoubleReadWithStatus(u32, void* data) -> u32
- auto DataDoubleWriteWithStatus(u32, const void* data) -> u32
- auto VerifyChecksum(SaveFileStatus* fileStatus, u16* data, u32 size) -> u32
- auto CalculateChecksum(u16* data, u32) -> u16
- auto WriteSaveFile(u32 index, SaveFile* saveFile) -> u32
- void SetFileStatusInit(u32 index)
- auto ReadSaveFileStatus(u32 address, SaveFileStatus* fileStatus) -> u32
- auto ParseSaveFileStatus(const SaveFileStatus* fileStatus) -> u32
- 2 for valid existing file 1 for valid empty file 0 for bad file
- auto WriteSaveFileStatus(u32 address, const SaveFileStatus* fileStatus) -> u32
- auto DataRead(u32 address, void* data, u32 size) -> u32
- read arbitrary data from EEPROM
- auto DataWrite(u32 address, const void* data, u32 size) -> u32
- write arbitrary data to EEPROM
- auto DataCompare(u32 address, const void* data, u32 size) -> u32
- compare arbitrary data with EEPROM
- void sub_0807CD9C(void)
- auto HandleSave(u32 idx) -> SaveResult
- Attempt to save the game.
- auto InitSaveData(void) -> u32
- Initialize the save system.
- auto WriteSaveHeader(SaveHeader* saveHeader) -> u32
- Write save header.
- auto sub_0807CF1C(u8* arg0) -> u32
- auto ReadSaveFile(u32 index, SaveFile* saveFile) -> s32
- Read save file.
- auto ReadSaveHeader(SaveHeader* saveHeader) -> u32
- Read save header.
- auto sub_0807CF3C(u8* arg0) -> u32
- void SetFileStatusDeleted(u32 index)
- Mark a save file as deleted.
- auto WriteSaveFileStatus(u32 address, const struct SaveFileStatus* fileStatus) -> bool32
Variables
- const char gUnk_0811E470
- const u8 padding
- static SaveResult(*const sSaveHandlers
- static const char sSignatureLong
- static const SaveFileStatus sSaveDescInit
- static const SaveFileStatus sSaveDescDeleted
- const char sDummyData
- const SaveFileEEPROMAddresses gSaveFileEEPROMAddresses
Function documentation
u32 ParseSaveFileStatus(const SaveFileStatus* fileStatus)
2 for valid existing file 1 for valid empty file 0 for bad file
Parameters | |
---|---|
fileStatus |
u32 DataCompare(u32 address, const void* data, u32 size)
compare arbitrary data with EEPROM
Parameters | |
---|---|
address | EEPROM address |
data | buffer to compare to |
size | size in bytes to compare |
Returns | TRUE on success |
SaveResult HandleSave(u32 idx)
Attempt to save the game.
Parameters | |
---|---|
idx | The save slot. |
Returns | SaveResult result. |
void SetFileStatusDeleted(u32 index)
Mark a save file as deleted.
Parameters | |
---|---|
index | The save file index. |