Further work on implementing support for cheats

This commit is contained in:
Gericom
2026-02-21 19:30:03 +01:00
parent 3300c5277c
commit 83046e2cc2
11 changed files with 286 additions and 15 deletions

View File

@@ -522,7 +522,13 @@ void NdsLoader::HandleHomebrewPatching()
void NdsLoader::ApplyArm7Patches()
{
sendToArm9(IPC_COMMAND_ARM9_APPLY_ARM7_PATCHES);
sendToArm9(_cheats ? _cheats->length : 0);
void* patchSpaceStart = (void*)receiveFromArm9();
void* cheatsPtr = (void*)receiveFromArm9();
if (cheatsPtr != nullptr && _cheats != nullptr)
{
memcpy(cheatsPtr, _cheats, _cheats->length);
}
if (patchSpaceStart)
{
u32 mbk6 = 0;