Attempt to fix NSMB2 by changing archive name
This commit is contained in:
parent
6d82649c3c
commit
48c23f2a43
@ -31,14 +31,14 @@ _start:
|
||||
bne _mountSd+4
|
||||
stmfd sp!, {r0-r4, lr}
|
||||
sub sp, sp, #4
|
||||
load r1, archive
|
||||
load r1, archiveId
|
||||
mov r0, sp
|
||||
load r4, fsMountArchive
|
||||
blx r4
|
||||
mov r3, #0
|
||||
mov r2, #0
|
||||
ldr r1, [sp]
|
||||
addr r0, sdmcArchiveName
|
||||
addr r0, archiveName
|
||||
load r4, fsRegisterArchive
|
||||
blx r4
|
||||
add sp, sp, #4
|
||||
@ -60,7 +60,7 @@ _start:
|
||||
pathRedir:
|
||||
stmfd sp!, {r0-r3}
|
||||
add r0, sp, #0x10
|
||||
addr r3, sdmcCustomPath
|
||||
addr r3, customPath
|
||||
pathRedir_1:
|
||||
ldrb r2, [r3], #1
|
||||
strh r2, [r0], #2
|
||||
@ -90,12 +90,10 @@ _start:
|
||||
|
||||
.pool
|
||||
.align 4
|
||||
sdmcArchiveName : .word 0xdead0007
|
||||
.dcb ":", 0
|
||||
.align 4
|
||||
fsMountArchive : .word 0xdead0005
|
||||
fsRegisterArchive : .word 0xdead0006
|
||||
archive : .word 0xdead0008
|
||||
sdmcCustomPath : .word 0xdead0004
|
||||
archiveName : .word 0xdead0007
|
||||
fsMountArchive : .word 0xdead0005
|
||||
fsRegisterArchive : .word 0xdead0006
|
||||
archiveId : .word 0xdead0008
|
||||
customPath : .word 0xdead0004
|
||||
|
||||
.close
|
||||
|
@ -520,7 +520,7 @@ static inline bool patchLayeredFs(u64 progId, u8* code, u32 size)
|
||||
|
||||
if(!archive) return true;
|
||||
|
||||
const char *mount = archive == ARCHIVE_SDMC ? "sdmc:" : "nand:";
|
||||
const char *mount = archive == ARCHIVE_SDMC ? "sdc:" : "nnd:";
|
||||
|
||||
u32 fsMountArchive = 0xFFFFFFFF,
|
||||
fsRegisterArchive = 0xFFFFFFFF,
|
||||
@ -554,8 +554,8 @@ static inline bool patchLayeredFs(u64 progId, u8* code, u32 size)
|
||||
payload32[i] = MAKE_BRANCH(payloadOffset + i * 4, fsTryOpenFile + 4);
|
||||
break;
|
||||
case 0xdead0004:
|
||||
memcpy(payload32 + i, mount, 5);
|
||||
memcpy((u8 *)(payload32 + i) + 5, path, sizeof(path));
|
||||
memcpy(payload32 + i, mount, 4);
|
||||
memcpy((u8 *)(payload32 + i) + 4, path, sizeof(path));
|
||||
break;
|
||||
case 0xdead0005:
|
||||
payload32[i] = 0x100000 + fsMountArchive;
|
||||
|
Reference in New Issue
Block a user