Added proper implementation of save verify

This commit is contained in:
Gericom
2025-12-20 15:46:41 +01:00
parent c139eacaee
commit 61463ca39a
6 changed files with 146 additions and 2 deletions

View File

@@ -4,6 +4,7 @@
#include "fileInfo.h"
#include "patches/arm7/ReadSaveAsm.h"
#include "patches/arm7/WriteSaveAsm.h"
#include "patches/arm7/VerifySaveAsm.h"
#include "patches/arm7/SaveOffsetToSdSectorAsm.h"
#include "patches/platform/LoaderPlatform.h"
#include "patches/OffsetToSectorRemapAsm.h"
@@ -82,9 +83,16 @@ void CardiDoTaskFromArm9Patch::ApplyPatch(PatchContext& patchContext)
writePatchCode,
tmpBuffer
);
auto verifySavePatchCode = patchContext.GetPatchCodeCollection().AddUniquePatchCode<VerifySavePatchCode>(
patchContext.GetPatchHeap(),
sectorRemapPatchCode,
readPatchCode,
tmpBuffer
);
__patch_carditaskthread_readsave_asm_address = (u32)readSavePatchCode->GetReadSaveFunction();
__patch_carditaskthread_writesave_asm_address = (u32)writeSavePatchCode->GetWriteSaveFunction();
__patch_carditaskthread_verifysave_asm_address = (u32)verifySavePatchCode->GetVerifySaveFunction();
u32 patchOffset;