1. DaFox
  2. Save Game Documentation

Source

Save Game Documentation / Nintendo 64 / Mario Kart 64 / Mario Kart 64.bt

//--------------------------------------
//--- 010 Editor v3.2.2 Binary Template
//
// File: Mario Kart 64.bt
// Author: DaFox
// Revision: 3
// Purpose: Mario Kart 64 Save Game File Format
//--------------------------------------
LittleEndian();
BitfieldDisablePadding();
typedef enum {
    MARIO, LUIGI, YOSHI, TOAD, DK, WARIO, PEACH, BOWSER
} E_CHARACTER;

typedef enum {
    NONE, BRONZE, SILVER, GOLD
} E_TROPHY;

typedef struct {    
    uint32 time : 20;
    E_CHARACTER character : 4;
} TIMECHAR;

typedef struct {
    TIMECHAR BestRec1;
    TIMECHAR BestRec2;
    TIMECHAR BestRec3;
    TIMECHAR BestRec4;
    TIMECHAR BestRec5;
    TIMECHAR BestLap;
    ubyte EnableCourseErasing;
    ubyte unknown[4];
    ubyte checksum;
} COURSE;

typedef struct {
    E_TROPHY MushroomCup50cc : 2;
    E_TROPHY FlowerCup50cc : 2;
    E_TROPHY StarCup50cc : 2;
    E_TROPHY SpecialCup50cc : 2;

    E_TROPHY MushroomCup100cc : 2;
    E_TROPHY FlowerCup100cc : 2;
    E_TROPHY StarCup100cc : 2;
    E_TROPHY SpeciaCup100cc : 2;

    E_TROPHY MushroomCup150cc : 2;
    E_TROPHY FlowerCup150cc : 2;
    E_TROPHY StarCup150cc : 2;
    E_TROPHY SpeciaCup150cc : 2;

    E_TROPHY MushroomCupExtra : 2;
    E_TROPHY FlowerCupExtra : 2;
    E_TROPHY StarCupExtra : 2;
    E_TROPHY SpeciaCupExtra : 2;

    ubyte SoundSettings;
    ubyte unknown;
    ubyte checksum;
    ubyte checksum2;
} E_TROPHYSETTINGS;

typedef struct {
    TIMECHAR LuigisRacewayBestTriLap;
    TIMECHAR MooMooFarmBestTriLap;
    TIMECHAR KoopaTroopaBeachBestTriLap;	
    TIMECHAR KalimariDesertBestTriLap;
    TIMECHAR ToadsTurnpikeBestTriLap;
    TIMECHAR FrappeSnowlandBestTriLap;
    TIMECHAR ChocoMountainBestTriLap;
    TIMECHAR MarioRacewayBestTriLap;
    TIMECHAR LuigisRacewayBestSingle;
    TIMECHAR MooMooFarmBestSingle;
    TIMECHAR KoopaTroopaBeachBestSingle;
    TIMECHAR KalimariDesertBestSingle;
    TIMECHAR ToadsTurnpikeBestSingle;
    TIMECHAR FrappeSnowlandBestSingle;
    TIMECHAR ChocoMountainBestSingle;
    TIMECHAR MarioRacewayBestSingle;
    ubyte unknown[6];
    ubyte checksum;
    ubyte checksum2;
    TIMECHAR WarioStadiumBestTriLap;
    TIMECHAR SherbetLandBestTriLap;
    TIMECHAR RoyalRacewayBestTriLap;
    TIMECHAR BowsersCastleBestTriLap;
    TIMECHAR DKsJungleParkwayBestTriLap;
    TIMECHAR YoshiValleyBestTriLap;
    TIMECHAR BansheeBoardwalkBestTriLap;
    TIMECHAR RainbowRoadBestTriLap;
    TIMECHAR WarioStadiumBestSingle;
    TIMECHAR SherbetLandBestSingle;
    TIMECHAR RoyalRacewayBestSingle;
    TIMECHAR BowsersCastleBestSingle;
    TIMECHAR DKsJungleParkwayBestSingle;
    TIMECHAR YoshiValleyBestSingle;
    TIMECHAR BansheeBoardwalkBestSingle;
    TIMECHAR RainbowRoadBestSingle;
    ubyte unknown2[6];
    ubyte checksum;
    ubyte checksum2;
} TOPTIMES;

struct FILE {
    COURSE LuigisRaceway;
    COURSE MooMooFarm;
	COURSE KoopaTroopaBeach;
	COURSE KalimariDesert;
	COURSE ToadsTurnpike;
	COURSE FrappeSnowland;
	COURSE ChocoMountain;
	COURSE MarioRaceway;
	COURSE WarioStadium;
	COURSE SherbetLand;
	COURSE RoyalRaceway;
	COURSE BowsersCastle;
	COURSE DKsJungleParkway;
	COURSE YoshiValley;
	COURSE BansheeBoardwalk;
	COURSE RainbowRoad;
    E_TROPHYSETTINGS TrophySettings;
    TOPTIMES TopTimes;
    E_TROPHYSETTINGS TrophySettings2;
    ubyte padding[1536];
} file;