mirror of
https://github.com/wiiu-env/MochaLite.git
synced 2024-06-01 06:58:45 +02:00
Add stub MCP_LoadFile patch - It works!
This commit is contained in:
parent
82a58b7fe0
commit
8f1bba1f9f
|
@ -55,6 +55,8 @@ void mcp_run_patches(u32 ios_elf_start)
|
|||
u32 patch_count = (u32)(((u8*)mcp_patches_table_end) - ((u8*)mcp_patches_table)) / sizeof(patch_table_t);
|
||||
patch_table_entries(ios_elf_start, mcp_patches_table, patch_count);
|
||||
|
||||
section_write_word(ios_elf_start, 0x050254D6, THUMB_BL(0x050254D6, MCP_LoadFile_patch));
|
||||
|
||||
// patch MCP syslogs
|
||||
//section_write_word(ios_elf_start, 0x05055438, ARM_B(0x05055438, 0x0503DCF8));
|
||||
//section_write_word(ios_elf_start, 0x05056C2C, ARM_B(0x05056C2C, 0x0503DCF8));
|
||||
|
|
4
ios_mcp/source/mcp_loadfile.c
Normal file
4
ios_mcp/source/mcp_loadfile.c
Normal file
|
@ -0,0 +1,4 @@
|
|||
int _MCP_LoadFile_patch(int arg1, int arg2, int arg3, int arg4, char arg5) {
|
||||
int (*real_func)(int arg1, int arg2, int arg3, int arg4, char arg5) = (void*)0x0501CAA8 + 1; //thumb
|
||||
return real_func(arg1, arg2, arg3, arg4, arg5);
|
||||
}
|
10
ios_mcp/source/mcp_loadfile_asm.s
Normal file
10
ios_mcp/source/mcp_loadfile_asm.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.extern _MCP_LoadFile_patch
|
||||
|
||||
.global MCP_LoadFile_patch
|
||||
MCP_LoadFile_patch:
|
||||
.thumb
|
||||
bx pc
|
||||
nop
|
||||
.arm
|
||||
ldr r12, =_MCP_LoadFile_patch
|
||||
bx r12
|
Loading…
Reference in New Issue
Block a user