memcard progress

This commit is contained in:
Niko 2024-07-04 14:33:19 -04:00
parent e322899cbe
commit d3910dd4a4
3 changed files with 54 additions and 15 deletions

View File

@ -476,7 +476,7 @@ undefined4 FUN_8003db54(void)
// MEMCARD_NewTask
// param1 slotIndex
// param2 name
// param3 pointer to memcard
// param3 pointer to profile
// param4 memcard size
undefined4 FUN_8003db98(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)
@ -487,7 +487,8 @@ undefined4 FUN_8003db98(undefined4 param_1,undefined4 param_2,undefined4 param_3
// MEMCARD_StringSet
FUN_8003d730(&DAT_800990a4,param_1,param_2);
// pointer to memcard 800992e4
// pointer to profile
// either Save Source, or Load Destination
DAT_8008d408 = param_3;
// reset to 8 attempts before quitting
@ -1011,6 +1012,8 @@ undefined4 FUN_8003e344(undefined4 param_1,undefined4 param_2,
DAT_8008d8cc = DAT_8008d8cc & 0xfffffffb;
DAT_800857a3 = (byte)(DAT_8008d8d8 + param_5 * 2 + 0x1fff >> 0xd);
}
// clear icon
iVar2 = 0;
do {
iVar4 = iVar2 + 2;
@ -1018,6 +1021,8 @@ undefined4 FUN_8003e344(undefined4 param_1,undefined4 param_2,
(&DAT_800857a5)[iVar2] = 0x40;
iVar2 = iVar4;
} while (iVar4 < 0x40);
// file icon
cVar1 = *param_3;
iVar2 = 0;
while ((cVar1 != '\0' && (iVar2 < 0x40))) {

View File

@ -77,15 +77,16 @@ void FUN_80046b1c(undefined2 param_1,undefined2 param_2,undefined4 param_3,undef
// param1 always zero?
DAT_8009aa44 = param_1;
// Name of the save
// Save filename (BASCUS...)
DAT_8009aa48 = param_3;
// Save icon (crash/ghost/psyqhand)
DAT_8009aa4c = param_4;
// if reading, copy data to this address
// pointer to tape (not memcard)
DAT_8009aa50 = param_5;
// if reading, copy data of this size
// size (3E00)
DAT_8009aa54 = param_6;
return;
}

View File

@ -2008,7 +2008,7 @@ struct Data
char data28_afterSlots[0x28];
#elif BUILD == UsaRetail || BUILD == EurRetail || BUILD == JpnRetail
// 0x800859F8
unsigned char data38[0x38];
unsigned char memcardIcon_HeaderSLOTS[0x38];
#endif
// Something changed in JPN
@ -4726,10 +4726,12 @@ struct sData
struct Mempack mempack[3]; // each is 0x60 bytes
// 80099204
char fillerAfterMempack[0xE0];
char fillerAfterMempack[0xA0];
// 80099264 (time string at end of time trial race)
// 800992a4 (ghost profile related)
// 800992a4
char memcardIcon_HeaderGHOST[0x40];
// 800992E4
// literally every byte of memory card,
@ -4762,16 +4764,47 @@ struct sData
} LoadSaveData[12];
// 0x8009AA30
char unk_Between_LoadSave_And_Ghosts[0x2c];
int memcardUnk1;
// 0x8009AA34
int memcardUnk2;
// related to memcard
// FUN_80046b1c handles 8009aa30 to 8009aa58
// 8009aa38
int memcardSlot_copy1;
// 8009aa3c
int memcardSlot_copy2;
// 8009aa40
int memcardSlot_copy3;
// 8009aa44
int memcardSlot_copy4;
// [no hole]
// 8009aa48
char* ghostProfile_fileName;
// 8009aa4c
char* ghostProfile_fileIconHeader;
// 8009aa56 -- Ghost Profile Index (load or save)?
// 8009aa58 -- Ghost Profile Index (load or save)?
// 8009aa5a -- Ghost Profile Index (load or save)?
// 8009aa50
// Points to Destination (ghost load)
// Points to Source (ghost save)
struct GhostHeader* ghostProfile_ptrGhostHeader;
// 8009aa54 -- Size (saving = 3E00)
short ghostProfile_size3E00;
// 8009aa56
// only set for one frame,
// then resets to -1
short ghostProfile_rowSelect;
// 8009aa58
short ghostProfile_indexSave;
// 8009aa5a
short ghostProfile_indexLoad;
// 8009aa5c
int numGhostProfilesSaved;