From 4941ef047ed8e813fe6f1da8d6a5a68b77367958 Mon Sep 17 00:00:00 2001 From: RocketRobz Date: Wed, 10 Oct 2018 14:39:27 -0600 Subject: [PATCH] Try to fix Guru error --- arm9/source/driveOperations.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arm9/source/driveOperations.cpp b/arm9/source/driveOperations.cpp index d6b1f88..18d37c5 100644 --- a/arm9/source/driveOperations.cpp +++ b/arm9/source/driveOperations.cpp @@ -143,8 +143,11 @@ TWL_CODE void ShowGameInfo(const char gameid[], const char gamename[]) { TWL_CODE bool twl_flashcardMount(void) { if (REG_SCFG_MC != 0x11) { - // Reset Slot-1 to allow reading title name and ID + setCpuClock(false); //REG_SCFG_CLK = 0x80; // Set NTR clock speed to avoid potential timing issues + sysSetCardOwner (BUS_OWNER_ARM9); + + // Reset Slot-1 to allow reading title name and ID disableSlot1(); for(int i = 0; i < 25; i++) { swiWaitForVBlank(); } enableSlot1(); @@ -161,7 +164,6 @@ TWL_CODE bool twl_flashcardMount(void) { } memcpy(&nds, (void*)0x02000000, sizeof(nds));*/ UpdateCardInfo(&nds, &gameid[0], &gamename[0]); - swiWaitForVBlank(); /*consoleClear(); iprintf("REG_SCFG_MC: %x\n", REG_SCFG_MC); @@ -172,7 +174,6 @@ TWL_CODE bool twl_flashcardMount(void) { }*/ sysSetCardOwner (BUS_OWNER_ARM7); // 3DS fix - swiWaitForVBlank(); // Read a DLDI driver specific to the cart if (!memcmp(gamename, "QMATETRIAL", 9) || !memcmp(gamename, "R4DSULTRA", 9)) { @@ -189,6 +190,8 @@ TWL_CODE bool twl_flashcardMount(void) { fatMountSimple("fat", &io_dldi_data->ioInterface); } + setCpuClock(true); + if (flashcardFound()) { fatGetVolumeLabel("fat", fatLabel); fixLabel(true);