forked from Mirror/GodMode9
Fix NTR AGING cart dump
... for reals, this time
This commit is contained in:
parent
8b6ca667ed
commit
96054a8406
@ -237,6 +237,7 @@ bool NTR_Secure_Init (u8* header, u32 CartID, int iCardDevice)
|
|||||||
u32 cardControl13 = *((vu32*)(void*)&header[0x60]);
|
u32 cardControl13 = *((vu32*)(void*)&header[0x60]);
|
||||||
u32 cardControlBF = *((vu32*)(void*)&header[0x64]);
|
u32 cardControlBF = *((vu32*)(void*)&header[0x64]);
|
||||||
u16 readTimeout = *((vu16*)(void*)&header[0x6E]);
|
u16 readTimeout = *((vu16*)(void*)&header[0x6E]);
|
||||||
|
u32 nds9Offset = *((vu32*)(void*)&header[0x20]);
|
||||||
u8 deviceType = header[0x13];
|
u8 deviceType = header[0x13];
|
||||||
int nCardHash = sizeof (iCardHash) / sizeof (iCardHash[0]);
|
int nCardHash = sizeof (iCardHash) / sizeof (iCardHash[0]);
|
||||||
u32 flagsKey1=NTRCARD_ACTIVATE|NTRCARD_nRESET|(cardControl13&(NTRCARD_WR|NTRCARD_CLK_SLOW))|((cardControlBF&(NTRCARD_CLK_SLOW|NTRCARD_DELAY1(0x1FFF)))+((cardControlBF&NTRCARD_DELAY2(0x3F))>>16));
|
u32 flagsKey1=NTRCARD_ACTIVATE|NTRCARD_nRESET|(cardControl13&(NTRCARD_WR|NTRCARD_CLK_SLOW))|((cardControlBF&(NTRCARD_CLK_SLOW|NTRCARD_DELAY1(0x1FFF)))+((cardControlBF&NTRCARD_DELAY2(0x3F))>>16));
|
||||||
@ -320,7 +321,8 @@ bool NTR_Secure_Init (u8* header, u32 CartID, int iCardDevice)
|
|||||||
}
|
}
|
||||||
NTR_CmdSecure (flagsKey1, NULL, 0, cmdData);
|
NTR_CmdSecure (flagsKey1, NULL, 0, cmdData);
|
||||||
|
|
||||||
if(!iCardDevice) //CycloDS doesn't like the dsi secure area being decrypted
|
//CycloDS doesn't like the dsi secure area being decrypted
|
||||||
|
if(!iCardDevice && ((nds9Offset != 0x4000) || secureArea[0] || secureArea[1]))
|
||||||
{
|
{
|
||||||
NTR_DecryptSecureArea (iGameCode, iCardHash, nCardHash, iKeyCode, secureArea, iCardDevice);
|
NTR_DecryptSecureArea (iGameCode, iCardHash, nCardHash, iKeyCode, secureArea, iCardDevice);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user