Try to fix Guru error

This commit is contained in:
RocketRobz 2018-10-10 14:39:27 -06:00
parent 5cd6e45d8f
commit 4941ef047e

View File

@ -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);