mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Enable compatibility with O3DS NANDs on N3DS
This commit is contained in:
parent
7b8b11123a
commit
2628082192
@ -52,9 +52,9 @@ FATpartition DriveInfo[11] = {
|
||||
};
|
||||
|
||||
SubtypeDesc SubTypes[5] = {
|
||||
{ 0x05CAE5, 0x179F1B, 0x4 }, // O3DS CTRNAND
|
||||
{ 0x05CAD7, 0x20E969, 0x5 }, // N3DS CTRNAND
|
||||
{ 0x05CAD7, 0x20E969, 0x4 }, // N3DS CTRNAND (downgraded)
|
||||
{ 0x05C980, 0x17AE80, 0x4 }, // O3DS CTRNAND
|
||||
{ 0x05C980, 0x20F680, 0x5 }, // N3DS CTRNAND
|
||||
{ 0x05C980, 0x20F680, 0x4 }, // N3DS CTRNAND (downgraded)
|
||||
{ 0x000097, 0x047DA9, 0x3 }, // TWLN
|
||||
{ 0x04808D, 0x0105B3, 0x3 } // TWLP
|
||||
};
|
||||
|
@ -336,7 +336,11 @@ u32 CheckNandType(u32 nand_src)
|
||||
if (memcmp(NAND_BUFFER + 0x100, nand_magic_n3ds, 0x60) == 0) {
|
||||
return (GetUnitPlatform() == PLATFORM_3DS) ? 0 : NAND_TYPE_N3DS;
|
||||
} else if (memcmp(NAND_BUFFER + 0x100, nand_magic_o3ds, 0x60) == 0) {
|
||||
return (GetUnitPlatform() == PLATFORM_3DS) ? NAND_TYPE_O3DS : NAND_TYPE_NO3DS;
|
||||
u8 magic[8] = {0xE9, 0x00, 0x00, 0x43, 0x54, 0x52, 0x20, 0x20};
|
||||
if (ReadNandSectors(NAND_BUFFER, 0x5CAE5, 1, 0x04, nand_src) != 0)
|
||||
return 0;
|
||||
return ((GetUnitPlatform() == PLATFORM_3DS) || (memcmp(magic, NAND_BUFFER, 8) == 0)) ?
|
||||
NAND_TYPE_O3DS : NAND_TYPE_NO3DS;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user