Move the kext outside Rosalina

- Stability (tm)
- Boots 1s faster on N3DS
- (∩ ͡° ͜ʖ ͡°)⊃━☆゚
This commit is contained in:
TuxSH
2017-06-13 02:00:41 +02:00
parent ae8ea7da16
commit e1d0602f25
78 changed files with 357 additions and 605 deletions

View File

@@ -204,12 +204,15 @@ static Result loader_GetProgramInfo(exheader_header *exheader, u64 prog_handle)
if (R_SUCCEEDED(res))
{
s64 nbSection0Modules;
svcGetSystemInfo(&nbSection0Modules, 26, 0);
// Force always having sdmc:/ and nand:/rw permission
exheader->arm11systemlocalcaps.storageinfo.accessinfo[0] |= 0x480;
exheader->accessdesc.arm11systemlocalcaps.storageinfo.accessinfo[0] |= 0x480;
// Tweak 3dsx placeholder title exheader
if (exheader->arm11systemlocalcaps.programid == HBLDR_3DSX_TID)
if (nbSection0Modules == 6 && exheader->arm11systemlocalcaps.programid == HBLDR_3DSX_TID)
{
Handle hbldr = 0;
res = HBLDR_Init(&hbldr);

View File

@@ -736,10 +736,16 @@ void patchCode(u64 progId, u16 progVer, u8 *code, u32 size, u32 textSize, u32 ro
}
}
// Makes ErrDisp to not start up
static const u64 errDispTid = 0x0004003000008A02ULL;
u32 *errDispTidLoc = (u32 *)memsearch(code, &errDispTid, size, sizeof(errDispTid));
*(errDispTidLoc - 6) = 0xE3A00000; // mov r0, #0
s64 nbSection0Modules;
svcGetSystemInfo(&nbSection0Modules, 26, 0);
if(nbSection0Modules == 6)
{
// Makes ErrDisp to not start up
static const u64 errDispTid = 0x0004003000008A02ULL;
u32 *errDispTidLoc = (u32 *)memsearch(code, &errDispTid, size, sizeof(errDispTid));
*(errDispTidLoc - 6) = 0xE3A00000; // mov r0, #0
}
}
else if(progId == 0x0004013000001702LL) //CFG