Cleanup, fixed exceptions derp, support RomFS from CTRNAND, patching features for NAND titles

This commit is contained in:
Aurora
2016-11-17 15:38:28 +01:00
parent db16e8d602
commit 1e3362250f
3 changed files with 45 additions and 44 deletions

View File

@@ -15,7 +15,6 @@
cmp r3, #3
beq openRomfs
load r12, fsOpenFileDirectly
add r12, r12, #4
nop ; Will be replaced with the original function opcode
bx r12
@@ -42,7 +41,7 @@
str r12, [sp, #0x10] ; File DataPointer
load r12, romfsFileNameSize
str r12, [sp, #0x14] ; File PathSize
mov r3, #9 ; SDMC Archive ID
load r3, archive
bl openFileDirectlyHook
sub sp, sp, #0x5C
ldmfd sp!, {r0, r1, lr}
@@ -51,7 +50,6 @@
; Once we have the sd romfs file opened, we'll open a subfile
; in order to skip the useless data.
fsOpenSubFile:
stmfd sp!, {r1, r3-r11}
mrc p15, 0, r4, c13, c0, 3
add r4, r4, #0x80
@@ -70,12 +68,13 @@
.pool
.align 4
; Part of these symbols will be set from outside
fsOpenFileDirectly : .word 0x00000000
fsOpenFileDirectly : .word 0
fsOpenSubFileCmd : .word 0x08010100
.word 0x00000000 ; File Offset
.word 0x00000000
.word 0x00000000 ; File Size
.word 0x00000000
romfsFileNameSize : .word 0x00000000
romfsFileName : .word 0x00000000 ; File DataPointer
.word 0 ; File Offset
.word 0
.word 0 ; File Size
.word 0
archive : .word 0
romfsFileNameSize : .word 0
romfsFileName : .word 0 ; File DataPointer
.close