mirror of
https://github.com/rvtr/GodMode9i.git
synced 2025-11-02 00:11:07 -04:00
Fix freezing on boot on flashcard & getting GBA cart info (#110)
* Only check if 3DS in DSi mode * Fix reading GBA cart info * Don't do & on the arrays for the GBA info I don't think it was breaking anything to do that? but it's not needed and I think it might be wrong somehow or other
This commit is contained in:
parent
9e1c56fa2d
commit
8de40f23ac
@ -124,10 +124,12 @@ int main() {
|
|||||||
setPowerButtonCB(powerButtonCB);
|
setPowerButtonCB(powerButtonCB);
|
||||||
|
|
||||||
// Check for 3DS
|
// Check for 3DS
|
||||||
|
if(isDSiMode()) {
|
||||||
u8 byteBak = i2cReadRegister(0x4A, 0x71);
|
u8 byteBak = i2cReadRegister(0x4A, 0x71);
|
||||||
i2cWriteRegister(0x4A, 0x71, 0xD2);
|
i2cWriteRegister(0x4A, 0x71, 0xD2);
|
||||||
fifoSendValue32(FIFO_USER_05, i2cReadRegister(0x4A, 0x71));
|
fifoSendValue32(FIFO_USER_05, i2cReadRegister(0x4A, 0x71));
|
||||||
i2cWriteRegister(0x4A, 0x71, byteBak);
|
i2cWriteRegister(0x4A, 0x71, byteBak);
|
||||||
|
}
|
||||||
|
|
||||||
if (isDSiMode() /*|| ((REG_SCFG_EXT & BIT(17)) && (REG_SCFG_EXT & BIT(18)))*/) {
|
if (isDSiMode() /*|| ((REG_SCFG_EXT & BIT(17)) && (REG_SCFG_EXT & BIT(18)))*/) {
|
||||||
/*for (int i = 0; i < 8; i++) {
|
/*for (int i = 0; i < 8; i++) {
|
||||||
|
|||||||
@ -804,11 +804,11 @@ void gbaCartDump(void) {
|
|||||||
mkdir("fat:/gm9i/out", 0777);
|
mkdir("fat:/gm9i/out", 0777);
|
||||||
}
|
}
|
||||||
char gbaHeaderGameTitle[13] = "\0";
|
char gbaHeaderGameTitle[13] = "\0";
|
||||||
tonccpy((u8*)(0x080000A0), &gbaHeaderGameTitle, 12);
|
tonccpy(gbaHeaderGameTitle, (u8*)(0x080000A0), 12);
|
||||||
char gbaHeaderGameCode[5] = "\0";
|
char gbaHeaderGameCode[5] = "\0";
|
||||||
tonccpy((u8*)(0x080000AC), &gbaHeaderGameCode, 4);
|
tonccpy(gbaHeaderGameCode, (u8*)(0x080000AC), 4);
|
||||||
char gbaHeaderMakerCode[3] = "\0";
|
char gbaHeaderMakerCode[3] = "\0";
|
||||||
tonccpy((u8*)(0x080000B0), &gbaHeaderMakerCode, 2);
|
tonccpy(gbaHeaderMakerCode, (u8*)(0x080000B0), 2);
|
||||||
if (gbaHeaderGameTitle[0] == 0 || gbaHeaderGameTitle[0] == 0xFF) {
|
if (gbaHeaderGameTitle[0] == 0 || gbaHeaderGameTitle[0] == 0xFF) {
|
||||||
sprintf(gbaHeaderGameTitle, "NO-TITLE");
|
sprintf(gbaHeaderGameTitle, "NO-TITLE");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user