mirror of
https://github.com/rvtr/GodMode9i.git
synced 2025-11-02 00:11:07 -04:00
Fix some carts making the app shut down the console
This commit is contained in:
parent
4bd01664ff
commit
7721df24c4
@ -118,11 +118,12 @@ TWL_CODE DLDI_INTERFACE* dldiLoadFromBin (const u8 dldiAddr[]) {
|
|||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
||||||
TWL_CODE bool UpdateCardInfo(sNDSHeader* nds, char* gameid, char* gamename) {
|
TWL_CODE bool UpdateCardInfo(char* gameid, char* gamename) {
|
||||||
cardReadHeader((uint8*)nds);
|
cardReadHeader((uint8*)0x02000000);
|
||||||
memcpy(gameid, nds->gameCode, 4);
|
memcpy(&nds, (void*)0x02000000, sizeof(sNDSHeader));
|
||||||
|
memcpy(gameid, &nds.gameCode, 4);
|
||||||
gameid[4] = 0x00;
|
gameid[4] = 0x00;
|
||||||
memcpy(gamename, nds->gameTitle, 12);
|
memcpy(gamename, &nds.gameTitle, 12);
|
||||||
gamename[12] = 0x00;
|
gamename[12] = 0x00;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -151,7 +152,7 @@ TWL_CODE bool twl_flashcardMount(void) {
|
|||||||
swiWaitForVBlank();
|
swiWaitForVBlank();
|
||||||
}
|
}
|
||||||
memcpy(&nds, (void*)0x02000000, sizeof(nds));*/
|
memcpy(&nds, (void*)0x02000000, sizeof(nds));*/
|
||||||
UpdateCardInfo(&nds, &gameid[0], &gamename[0]);
|
UpdateCardInfo(&gameid[0], &gamename[0]);
|
||||||
|
|
||||||
/*consoleClear();
|
/*consoleClear();
|
||||||
iprintf("REG_SCFG_MC: %x\n", REG_SCFG_MC);
|
iprintf("REG_SCFG_MC: %x\n", REG_SCFG_MC);
|
||||||
@ -163,6 +164,10 @@ TWL_CODE bool twl_flashcardMount(void) {
|
|||||||
|
|
||||||
sysSetCardOwner (BUS_OWNER_ARM7); // 3DS fix
|
sysSetCardOwner (BUS_OWNER_ARM7); // 3DS fix
|
||||||
|
|
||||||
|
if (gameid[0] >= 0x00 && gameid[0] < 0x20) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Read a DLDI driver specific to the cart
|
// Read a DLDI driver specific to the cart
|
||||||
if (!memcmp(gameid, "ASMA", 4)) {
|
if (!memcmp(gameid, "ASMA", 4)) {
|
||||||
io_dldi_data = dldiLoadFromBin(r4tf_dldi);
|
io_dldi_data = dldiLoadFromBin(r4tf_dldi);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user