mirror of
https://github.com/d0k3/GodMode9.git
synced 2026-09-02 04:59:04 +00:00
Add dev DSi blowfish key support to dump dev software (#969)
* Add dev DSi blowfish key support to dump dev roms * Mention dev DSi blowfish support file in readme * Adjust dsi dev app check * Load support file immediately
This commit is contained in:
parent
406febfb57
commit
0036f39fc6
@ -64,6 +64,7 @@ For certain functionality, GodMode9 may need 'support files'. Support files shou
|
|||||||
* __`aeskeydb.bin`__: This should contain 0x25keyX, 0x18keyX and 0x1BkeyX to enable decryption of 7x / Secure3 / Secure4 encrypted NCCH files, 0x11key95 / 0x11key96 for FIRM decrypt support and 0x11keyOTP / 0x11keyIVOTP for 'secret' sector 0x96 crypto support. Entrypoints other than [boot9strap](https://github.com/SciresM/boot9strap) or [fastboot3ds](https://github.com/derrekr/fastboot3DS) may require a aeskeydb.bin file. This is now included in standard releases of GM9. No need to hunt down the file!
|
* __`aeskeydb.bin`__: This should contain 0x25keyX, 0x18keyX and 0x1BkeyX to enable decryption of 7x / Secure3 / Secure4 encrypted NCCH files, 0x11key95 / 0x11key96 for FIRM decrypt support and 0x11keyOTP / 0x11keyIVOTP for 'secret' sector 0x96 crypto support. Entrypoints other than [boot9strap](https://github.com/SciresM/boot9strap) or [fastboot3ds](https://github.com/derrekr/fastboot3DS) may require a aeskeydb.bin file. This is now included in standard releases of GM9. No need to hunt down the file!
|
||||||
* __`seeddb.bin`__: This file is optional and required to decrypt and mount seed-encrypted NCCHs and CIAs (if the seed in question is not installed to your NAND). Note that your seeddb.bin must also contain the seed for the specific game you need to decrypt.
|
* __`seeddb.bin`__: This file is optional and required to decrypt and mount seed-encrypted NCCHs and CIAs (if the seed in question is not installed to your NAND). Note that your seeddb.bin must also contain the seed for the specific game you need to decrypt.
|
||||||
* __`encTitleKeys.bin`__ / __`decTitleKeys.bin`__: These files are optional and provide titlekeys, which are required to decrypt and install contents downloaded from CDN (for DSi and 3DS content).
|
* __`encTitleKeys.bin`__ / __`decTitleKeys.bin`__: These files are optional and provide titlekeys, which are required to decrypt and install contents downloaded from CDN (for DSi and 3DS content).
|
||||||
|
* __`TwlBlowfishKeyDev.bin`__: This should contain the dev DSi blowfish key. It is optional and required to dump DSi developer or factory cartridges with dev software flashed on them.
|
||||||
|
|
||||||
### Fonts and translations
|
### Fonts and translations
|
||||||
GodMode9 also supports custom fonts and translations as support files. These both use custom formats, fonts use FRF (Font RIFF) files which can be created using the `fontriff.py` Python script in the 'utils' folder. Translations use TRF (Translation RIFF) files from the `transriff.py` script. Examples of the inputs to these scripts can be found in the 'fonts' and 'languages' folders of the 'resources' folder respectively.
|
GodMode9 also supports custom fonts and translations as support files. These both use custom formats, fonts use FRF (Font RIFF) files which can be created using the `fontriff.py` Python script in the 'utils' folder. Translations use TRF (Translation RIFF) files from the `transriff.py` script. Examples of the inputs to these scripts can be found in the 'fonts' and 'languages' folders of the 'resources' folder respectively.
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
#include "card_ntr.h"
|
#include "card_ntr.h"
|
||||||
// #include "draw.h"
|
// #include "draw.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
#include "support.h"
|
||||||
|
|
||||||
|
|
||||||
#define BSWAP32(val) ((((val >> 24) & 0xFF)) | (((val >> 16) & 0xFF) << 8) | (((val >> 8) & 0xFF) << 16) | ((val & 0xFF) << 24))
|
#define BSWAP32(val) ((((val >> 24) & 0xFF)) | (((val >> 16) & 0xFF) << 8) | (((val >> 8) & 0xFF) << 16) | ((val & 0xFF) << 24))
|
||||||
@ -252,7 +253,18 @@ bool NTR_Secure_Init (u8* header, u8* sa_copy, u32 CartID, int iCardDevice)
|
|||||||
|
|
||||||
iGameCode = *((vu32*)(void*)&header[0x0C]);
|
iGameCode = *((vu32*)(void*)&header[0x0C]);
|
||||||
ReadDataFlags = cardControl13 & ~ NTRCARD_BLK_SIZE(7);
|
ReadDataFlags = cardControl13 & ~ NTRCARD_BLK_SIZE(7);
|
||||||
|
|
||||||
|
if (iCardDevice && ((header[0x1BF] & 0x80) || (header[0x1C] & 0x04))) // dsi dev app
|
||||||
|
{
|
||||||
|
size_t fsize;
|
||||||
|
if (!CheckSupportFile(BLOWFISHKEYDEV_NAME, &fsize) || (fsize != 0x1048)) return false;
|
||||||
|
if (LoadSupportFile(BLOWFISHKEYDEV_NAME, iCardHash, 0x1048) != 0x1048) return false;
|
||||||
|
memset(iKeyCode, 0, sizeof(iKeyCode));
|
||||||
|
}
|
||||||
|
else // retail
|
||||||
|
{
|
||||||
NTR_InitKey (iGameCode, iCardHash, nCardHash, iKeyCode, iCardDevice?1:2, iCardDevice);
|
NTR_InitKey (iGameCode, iCardHash, nCardHash, iKeyCode, iCardDevice?1:2, iCardDevice);
|
||||||
|
}
|
||||||
|
|
||||||
if(!iCheapCard) flagsKey1 |= NTRCARD_SEC_LARGE;
|
if(!iCheapCard) flagsKey1 |= NTRCARD_SEC_LARGE;
|
||||||
//Debug("iCheapCard=%d, readTimeout=%d", iCheapCard, readTimeout);
|
//Debug("iCheapCard=%d, readTimeout=%d", iCheapCard, readTimeout);
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
#define BLOWFISHKEYDEV_NAME "TwlBlowfishKeyDev.bin"
|
||||||
|
|
||||||
typedef struct _IKEY1{
|
typedef struct _IKEY1{
|
||||||
u32 iii;
|
u32 iii;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user