Mario Kart 64
Loading...
Searching...
No Matches
save.h File Reference
#include <PR/os.h>
#include <common_structs.h>
Include dependency graph for save.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CONTROLLER_1   0
 
#define CONTROLLER_2   1
 
#define CONTROLLER_3   2
 
#define CONTROLLER_4   3
 
#define PFS_NO_ERROR   0
 
#define PFS_NO_PAK_INSERTED   1
 
#define PFS_PAK_BAD_READ   2
 
#define PFS_PAK_CORRUPTED   3
 
#define PFS_FILE_OVERFLOW   4
 
#define PFS_INVALID_DATA   -1
 
#define PFS_NUM_FILES_ERROR   -2
 
#define PFS_FREE_BLOCKS_ERROR   -3
 
#define PFS_PAK_STATE_OK   -4
 
#define NO_PAK   0
 
#define PAK   1
 
#define PAK_NOT_INSERTED   -1
 

Functions

void func_800B45E0 (s32)
 
void write_save_data_grand_prix_points_and_sound_mode (void)
 
void func_800B46D0 (void)
 
void func_800B4728 (s32)
 
void reset_save_data_grand_prix_points_and_sound_mode (void)
 
u8 checksum_time_trial_records (s32)
 
s32 func_800B6348 (s32)
 
s32 func_800B639C (s32)
 
s32 func_800B63F0 (s32)
 
u8 compute_save_data_checksum_1 (void)
 
u8 compute_save_data_checksum_2 (void)
 
void load_save_data (void)
 
void func_800B4A9C (s32)
 
void validate_save_data (void)
 
void populate_time_trial_record (u8 *timeTrialRecord, u32 time, s32 characterId)
 
u32 func_800B4DF4 (u8 *)
 
s32 func_800B4E24 (s32)
 
u32 func_800B4EB4 (s32, s32)
 
s32 func_800B4F2C (void)
 
s32 func_800B4FB0 (s32)
 
s32 func_800B5020 (u32, s32)
 
s32 func_800B5218 (void)
 
void func_800B536C (s32)
 
void func_800B5404 (s32, s32)
 
u8 func_800B54C0 (s32, s32)
 
u8 func_800B54EC (s32, s32)
 
u8 func_800B5508 (s32, s32, s32)
 
s32 is_cc_mode_complete (s32)
 
s32 has_unlocked_extra_mode (void)
 
s32 has_completed_extra_mode (void)
 
void func_800B559C (s32)
 
u8 func_800B578C (s32)
 
s32 func_800B5888 (s32)
 
s32 func_800B58C4 (s32)
 
void update_save_data_backup (void)
 
u8 compute_save_data_checksum_backup_1 (void)
 
u8 compute_save_data_checksum_backup_2 (void)
 
s32 validate_save_data_checksum_backup (void)
 
s32 check_for_controller_pak (s32)
 
s32 func_800B5B2C (s32)
 
s32 controller_pak_1_status (void)
 
s32 controller_pak_2_status (void)
 
s32 func_800B5F30 (void)
 
s32 func_800B6014 (void)
 
s32 func_800B6088 (s32)
 
u8 func_800B60E8 (s32)
 
s32 func_800B6178 (s32)
 
s32 func_800B64EC (s32)
 
s32 func_800B65F4 (s32, s32)
 
void func_800B6708 (void)
 
void func_800B6798 (void)
 
u8 func_800B6828 (s32)
 
u8 func_800B68F4 (s32)
 
s32 func_800B69BC (s32)
 
s32 func_800B6A68 (void)
 

Variables

u32D_800DC714
 
struct_8018EE10_entry D_8018EE10 []
 
u16 gCompanyCode
 
u32 gGameCode
 
s8 gControllerPak1State
 
s8 sControllerPak2State
 
const u8 D_800F2E60 []
 
const u8 gGameName []
 
const u8 gExtCode []
 
u16 D_80162DD6
 
s32 D_80162DE0
 
s32 D_80162DFC
 
OSPfs gControllerPak1FileHandle
 
OSPfs gControllerPak2FileHandle
 
OSPfsState pfsState [16]
 
s32 pfsError [16]
 
s32 gControllerPak1NumFilesUsed
 
s32 gControllerPak1MaxWriteableFiles
 
s8 D_8018EDE5
 
s8 D_8018EDE6
 
s8 D_8018EDE7
 

Macro Definition Documentation

◆ CONTROLLER_1

#define CONTROLLER_1   0

◆ CONTROLLER_2

#define CONTROLLER_2   1

◆ CONTROLLER_3

#define CONTROLLER_3   2

◆ CONTROLLER_4

#define CONTROLLER_4   3

◆ NO_PAK

#define NO_PAK   0

◆ PAK

#define PAK   1

◆ PAK_NOT_INSERTED

#define PAK_NOT_INSERTED   -1

◆ PFS_FILE_OVERFLOW

#define PFS_FILE_OVERFLOW   4

◆ PFS_FREE_BLOCKS_ERROR

#define PFS_FREE_BLOCKS_ERROR   -3

◆ PFS_INVALID_DATA

#define PFS_INVALID_DATA   -1

◆ PFS_NO_ERROR

#define PFS_NO_ERROR   0

◆ PFS_NO_PAK_INSERTED

#define PFS_NO_PAK_INSERTED   1

◆ PFS_NUM_FILES_ERROR

#define PFS_NUM_FILES_ERROR   -2

◆ PFS_PAK_BAD_READ

#define PFS_PAK_BAD_READ   2

◆ PFS_PAK_CORRUPTED

#define PFS_PAK_CORRUPTED   3

◆ PFS_PAK_STATE_OK

#define PFS_PAK_STATE_OK   -4

Function Documentation

◆ check_for_controller_pak()

s32 check_for_controller_pak ( s32 controller)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checksum_time_trial_records()

u8 checksum_time_trial_records ( s32 courseIdx)
Here is the caller graph for this function:

◆ compute_save_data_checksum_1()

u8 compute_save_data_checksum_1 ( void )
Here is the caller graph for this function:

◆ compute_save_data_checksum_2()

u8 compute_save_data_checksum_2 ( void )
Here is the caller graph for this function:

◆ compute_save_data_checksum_backup_1()

u8 compute_save_data_checksum_backup_1 ( void )
Here is the caller graph for this function:

◆ compute_save_data_checksum_backup_2()

u8 compute_save_data_checksum_backup_2 ( void )
Here is the caller graph for this function:

◆ controller_pak_1_status()

s32 controller_pak_1_status ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ controller_pak_2_status()

s32 controller_pak_2_status ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B45E0()

void func_800B45E0 ( s32 arg0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B46D0()

void func_800B46D0 ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B4728()

void func_800B4728 ( s32 arg0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B4A9C()

void func_800B4A9C ( s32 course)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B4DF4()

u32 func_800B4DF4 ( u8 * arr)
Here is the caller graph for this function:

◆ func_800B4E24()

s32 func_800B4E24 ( s32 recordIndex)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B4EB4()

u32 func_800B4EB4 ( s32 recordIndex,
s32 courseIndex )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B4F2C()

s32 func_800B4F2C ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B4FB0()

s32 func_800B4FB0 ( s32 courseIndex)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B5020()

s32 func_800B5020 ( u32 time,
s32 charId )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B5218()

s32 func_800B5218 ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B536C()

void func_800B536C ( s32 arg0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B5404()

void func_800B5404 ( s32 arg0,
s32 arg1 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B54C0()

u8 func_800B54C0 ( s32 cup,
s32 cc_mode )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B54EC()

u8 func_800B54EC ( s32 cup,
s32 ccGrandPrixPoints )
Here is the caller graph for this function:

◆ func_800B5508()

u8 func_800B5508 ( s32 cup,
s32 ccGrandPrixPoints,
s32 points_scored )
Here is the caller graph for this function:

◆ func_800B559C()

void func_800B559C ( s32 arg0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B578C()

u8 func_800B578C ( s32 arg0)

This one is weird. Its some type of checksum calculator, seemingly for the best time trial records. But the number of bytes it operates over is odd. It calculates a checksum for 51 bytes in 17 byte chunks, but that doesn't line up with anything in the save data cleanly. At that byte count it would get the 48 bytes for the records plus 3 of the unknown bytes.

But only unknown bytes 7 and 8 ever get set, so why the extra 3, and why in chunks of 17?

Here is the caller graph for this function:

◆ func_800B5888()

s32 func_800B5888 ( s32 arg0)
Here is the caller graph for this function:

◆ func_800B58C4()

s32 func_800B58C4 ( s32 arg0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B5B2C()

s32 func_800B5B2C ( s32 )

◆ func_800B5F30()

s32 func_800B5F30 ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B6014()

s32 func_800B6014 ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B6088()

s32 func_800B6088 ( s32 arg0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B60E8()

u8 func_800B60E8 ( s32 page)
Here is the caller graph for this function:

◆ func_800B6178()

s32 func_800B6178 ( s32 arg0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B6348()

s32 func_800B6348 ( s32 arg0)
Here is the caller graph for this function:

◆ func_800B639C()

s32 func_800B639C ( s32 arg0)
Here is the caller graph for this function:

◆ func_800B63F0()

s32 func_800B63F0 ( s32 arg0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B64EC()

s32 func_800B64EC ( s32 arg0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B65F4()

s32 func_800B65F4 ( s32 arg0,
s32 arg1 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B6708()

void func_800B6708 ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B6798()

void func_800B6798 ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B6828()

u8 func_800B6828 ( s32 arg0)
Here is the caller graph for this function:

◆ func_800B68F4()

u8 func_800B68F4 ( s32 arg0)
Here is the caller graph for this function:

◆ func_800B69BC()

s32 func_800B69BC ( s32 arg0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B6A68()

s32 func_800B6A68 ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_completed_extra_mode()

s32 has_completed_extra_mode ( void )
Here is the call graph for this function:

◆ has_unlocked_extra_mode()

s32 has_unlocked_extra_mode ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_cc_mode_complete()

s32 is_cc_mode_complete ( s32 cc_mode)
Here is the caller graph for this function:

◆ load_save_data()

void load_save_data ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ populate_time_trial_record()

void populate_time_trial_record ( u8 * timeTrialRecord,
u32 time,
s32 characterId )
Here is the caller graph for this function:

◆ reset_save_data_grand_prix_points_and_sound_mode()

void reset_save_data_grand_prix_points_and_sound_mode ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_save_data_backup()

void update_save_data_backup ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validate_save_data()

void validate_save_data ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validate_save_data_checksum_backup()

s32 validate_save_data_checksum_backup ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_save_data_grand_prix_points_and_sound_mode()

void write_save_data_grand_prix_points_and_sound_mode ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ D_800DC714

u32* D_800DC714
extern

◆ D_800F2E60

const u8 D_800F2E60[]
extern

◆ D_80162DD6

u16 D_80162DD6
extern

◆ D_80162DE0

s32 D_80162DE0
extern

◆ D_80162DFC

s32 D_80162DFC
extern

◆ D_8018EDE5

s8 D_8018EDE5
extern

◆ D_8018EDE6

s8 D_8018EDE6
extern

◆ D_8018EDE7

s8 D_8018EDE7
extern

◆ D_8018EE10

struct_8018EE10_entry D_8018EE10[]
extern

BSS

◆ gCompanyCode

u16 gCompanyCode
extern

◆ gControllerPak1FileHandle

OSPfs gControllerPak1FileHandle
extern

◆ gControllerPak1MaxWriteableFiles

s32 gControllerPak1MaxWriteableFiles
extern

◆ gControllerPak1NumFilesUsed

s32 gControllerPak1NumFilesUsed
extern

◆ gControllerPak1State

s8 gControllerPak1State
extern

◆ gControllerPak2FileHandle

OSPfs gControllerPak2FileHandle
extern

◆ gExtCode

const u8 gExtCode[]
extern

◆ gGameCode

u32 gGameCode
extern

◆ gGameName

const u8 gGameName[]
extern

◆ pfsError

s32 pfsError[16]
extern

◆ pfsState

OSPfsState pfsState[16]
extern

◆ sControllerPak2State

s8 sControllerPak2State
extern