Clear all arm9 cpu registers before jumping to the arm9 entry point. Fixes Cake Ninja DSiWare titles.

This commit is contained in:
Gericom
2025-11-30 13:00:35 +01:00
parent 4701b9d1b7
commit b2fabe5d97
3 changed files with 36 additions and 1 deletions

View File

@@ -26,6 +26,7 @@
#include "arm9Clock.h"
#include "errorDisplay/ErrorDisplay.h"
#include "LoaderInfo.h"
#include "jumpToArm9EntryPoint.h"
typedef void (*entrypoint_t)(void);
@@ -109,7 +110,7 @@ static void bootArm9()
while (gfx_getVCount() == 191);
REG_IF = ~0u; // final clear of REG_IF bits
auto romHeader = (const nds_header_ntr_t*)TWL_SHARED_MEMORY->ntrSharedMem.romHeader;
((entrypoint_t)romHeader->arm9EntryAddress)();
jumpToArm9EntryPoint((void*)romHeader->arm9EntryAddress);
}
static void handleInitializeSdCardCommand()