Compare commits

..

2 Commits

Author SHA1 Message Date
Aurora Wright
c5369a5cad Minor stuff 2017-04-26 18:04:02 +02:00
Aurora Wright
b5eba765a5 Fix update RomFSes mounted as "ext:" (such as Taiko no Tatsujin: Don Don! Mystery Adventure) 2017-04-26 17:26:39 +02:00
3 changed files with 8 additions and 6 deletions

View File

@@ -53,8 +53,9 @@ _start:
fsRedir:
stmfd sp!, {r0-r12, lr}
ldrb r12, [r1]
cmp r12, #0x72 ; 'r', should include "rom:" and "rom2:"
cmp r12, #0x72 ; 'r', should include "rom:", "rom2:" and "rex:"
cmpne r12, #0x70 ; 'p', should include "patch:"
cmpne r12, #0x65 ; 'e', should include "ext:"
bne endRedir
sub sp, sp, #0x400
pathRedir:

View File

@@ -278,7 +278,7 @@ static inline void patchCfgGetRegion(u8 *code, u32 size, u8 regionId, u32 CFGUHa
}
}
static u32 findFunctionStart(u8* code, u32 pos)
static u32 findFunctionStart(u8 *code, u32 pos)
{
while(pos >= 4)
{
@@ -289,7 +289,7 @@ static u32 findFunctionStart(u8* code, u32 pos)
return 0xFFFFFFFF;
}
static inline bool findLayeredFsSymbols(u8* code, u32 size, u32 *fsMountArchive, u32 *fsRegisterArchive, u32 *fsTryOpenFile, u32 *fsOpenFileDirectly)
static inline bool findLayeredFsSymbols(u8 *code, u32 size, u32 *fsMountArchive, u32 *fsRegisterArchive, u32 *fsTryOpenFile, u32 *fsOpenFileDirectly)
{
for(u32 addr = 0; addr <= size - 4; addr += 4)
{
@@ -324,7 +324,7 @@ static inline bool findLayeredFsSymbols(u8* code, u32 size, u32 *fsMountArchive,
return false;
}
static inline bool findLayeredFsPayloadOffset(u8* code, u32 size, u32 *payloadOffset)
static inline bool findLayeredFsPayloadOffset(u8 *code, u32 size, u32 *payloadOffset)
{
//First check for sufficient padding at the end of the .text segment
if(((size + 4095) & 0xFFFFF000) - size >= romfsredir_bin_size)
@@ -510,7 +510,7 @@ exit:
return ret;
}
static inline bool patchLayeredFs(u64 progId, u8* code, u32 size)
static inline bool patchLayeredFs(u64 progId, u8 *code, u32 size)
{
/* Here we look for "/luma/titles/[u64 titleID in hex, uppercase]/romfs"
If it exists it should be a folder containing ROMFS files */

View File

@@ -240,7 +240,8 @@ boot:
bool loadFromStorage = CONFIG(LOADEXTFIRMSANDMODULES);
u32 firmVersion = loadFirm(&firmType, firmSource, loadFromStorage, isSafeMode);
bool doUnitinfoPatch = CONFIG(PATCHUNITINFO), enableExceptionHandlers = CONFIG(ENABLEEXCEPTIONHANDLERS);
bool doUnitinfoPatch = CONFIG(PATCHUNITINFO),
enableExceptionHandlers = CONFIG(ENABLEEXCEPTIONHANDLERS);
u32 res;
switch(firmType)
{