Minor stuff
This commit is contained in:
parent
1f68c2da42
commit
4cbf4e93e7
@ -143,7 +143,7 @@ static int loadTitleLocaleConfig(u64 progId, u8 *regionId, u8 *languageId)
|
|||||||
|
|
||||||
u32 i = 29;
|
u32 i = 29;
|
||||||
|
|
||||||
while(progId > 0)
|
while(progId)
|
||||||
{
|
{
|
||||||
static const char hexDigits[] = "0123456789ABCDEF";
|
static const char hexDigits[] = "0123456789ABCDEF";
|
||||||
path[i--] = hexDigits[(u32)(progId & 0xF)];
|
path[i--] = hexDigits[(u32)(progId & 0xF)];
|
||||||
|
@ -348,9 +348,9 @@ void decryptExeFs(u8 *inbuf)
|
|||||||
void arm9Loader(u8 *arm9Section, u32 mode)
|
void arm9Loader(u8 *arm9Section, u32 mode)
|
||||||
{
|
{
|
||||||
//Firm keys
|
//Firm keys
|
||||||
u8 keyY[0x10];
|
u8 keyY[0x10],
|
||||||
u8 arm9BinCTR[0x10];
|
arm9BinCTR[0x10],
|
||||||
u8 arm9BinSlot = mode ? 0x16 : 0x15;
|
arm9BinSlot = mode ? 0x16 : 0x15;
|
||||||
|
|
||||||
//Setup keys needed for arm9bin decryption
|
//Setup keys needed for arm9bin decryption
|
||||||
memcpy(keyY, arm9Section + 0x10, 0x10);
|
memcpy(keyY, arm9Section + 0x10, 0x10);
|
||||||
@ -384,8 +384,8 @@ void arm9Loader(u8 *arm9Section, u32 mode)
|
|||||||
//Set >=9.6 KeyXs
|
//Set >=9.6 KeyXs
|
||||||
if(mode)
|
if(mode)
|
||||||
{
|
{
|
||||||
u8 keyData[0x10] = {0xDD, 0xDA, 0xA4, 0xC6, 0x2C, 0xC4, 0x50, 0xE9, 0xDA, 0xB6, 0x9B, 0x0D, 0x9D, 0x2A, 0x21, 0x98};
|
u8 keyData[0x10] = {0xDD, 0xDA, 0xA4, 0xC6, 0x2C, 0xC4, 0x50, 0xE9, 0xDA, 0xB6, 0x9B, 0x0D, 0x9D, 0x2A, 0x21, 0x98},
|
||||||
u8 decKey[0x10];
|
decKey[0x10];
|
||||||
|
|
||||||
//Set keys 0x19..0x1F keyXs
|
//Set keys 0x19..0x1F keyXs
|
||||||
aes_use_keyslot(0x11);
|
aes_use_keyslot(0x11);
|
||||||
|
@ -100,7 +100,7 @@ void firmRead(void *dest, const char *firmFolder)
|
|||||||
u32 i = 42;
|
u32 i = 42;
|
||||||
|
|
||||||
//Convert back the .app name from integer to array
|
//Convert back the .app name from integer to array
|
||||||
while(id > 0)
|
while(id)
|
||||||
{
|
{
|
||||||
static const char hexDigits[] = "0123456789ABCDEF";
|
static const char hexDigits[] = "0123456789ABCDEF";
|
||||||
path[i--] = hexDigits[id & 0xF];
|
path[i--] = hexDigits[id & 0xF];
|
||||||
|
Reference in New Issue
Block a user