mirror of
https://github.com/wiiu-env/MochaLite.git
synced 2024-06-13 04:28:43 +02:00
Add stub ioctl 0x64, doesn't do much yet
This commit is contained in:
parent
8aed06c564
commit
4a5e8f3d19
|
@ -56,6 +56,7 @@ void mcp_run_patches(u32 ios_elf_start)
|
|||
patch_table_entries(ios_elf_start, mcp_patches_table, patch_count);
|
||||
|
||||
section_write_word(ios_elf_start, 0x050254D6, THUMB_BL(0x050254D6, MCP_LoadFile_patch));
|
||||
section_write_word(ios_elf_start, 0x05025242, THUMB_BL(0x05025242, MCP_ioctl64_patch));
|
||||
|
||||
// patch MCP syslogs
|
||||
//section_write_word(ios_elf_start, 0x05055438, ARM_B(0x05055438, 0x0503DCF8));
|
||||
|
|
|
@ -114,3 +114,10 @@ int _MCP_LoadFile_patch(ipcmessage* msg) {
|
|||
|
||||
return real_MCP_LoadFile(msg);
|
||||
}
|
||||
|
||||
int _MCP_ioctl64_patch(ipcmessage* msg) {
|
||||
log_printf("Hi from ioctl 0x64! ipc: %08X\n", msg);
|
||||
|
||||
/* DO NOT RETURN 0, this affects the codepaths back in the native ARM code */
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -8,3 +8,15 @@ MCP_LoadFile_patch:
|
|||
.arm
|
||||
ldr r12, =_MCP_LoadFile_patch
|
||||
bx r12
|
||||
|
||||
.extern _MCP_ioctl64_patch
|
||||
|
||||
.global MCP_ioctl64_patch
|
||||
MCP_ioctl64_patch:
|
||||
.thumb
|
||||
ldr r0, [r7,#0xC]
|
||||
bx pc
|
||||
nop
|
||||
.arm
|
||||
ldr r12, =_MCP_ioctl64_patch
|
||||
bx r12
|
||||
|
|
Loading…
Reference in New Issue
Block a user