mirror of
https://wiilab.wiimart.org/wiimart/WiiMart-Patcher
synced 2025-09-04 04:21:19 +02:00
Load from main instead of ES_InitLib
This commit is contained in:
parent
0403609bf7
commit
70af333c7d
@ -195,6 +195,7 @@ var OverwriteIOSPatch = PatchSet{
|
||||
LWZ(R10, 0xc, R8),
|
||||
// Apply!
|
||||
STW(R10, 0x0, R9),
|
||||
EIEIO(),
|
||||
|
||||
// The remainder of our patches are for a Wii U. We must detect such.
|
||||
// Even in vWii mode, 0x0d8005a0 (LT_CHIPREVID) will have its upper
|
||||
@ -225,47 +226,47 @@ var OverwriteIOSPatch = PatchSet{
|
||||
// Apply ES_AddTicket
|
||||
LWZ(R9, 0x18, R8),
|
||||
LWZ(R10, 0x1c, R8),
|
||||
STW(R10, 0x0, R9),
|
||||
EIEIO(),
|
||||
|
||||
// Apply ES_AddTitleStart
|
||||
LWZ(R9, 0x20, R8),
|
||||
LWZ(R10, 0x24, R8),
|
||||
STW(R10, 0x0, R9),
|
||||
EIEIO(),
|
||||
|
||||
// Apply ES_AddContentStart
|
||||
//LWZ(R9, 0x28, R8),
|
||||
//LWZ(R10, 0x2c, R8),
|
||||
SYNC(),
|
||||
//STW(R10, 0x0, R9),
|
||||
//EIEIO(),
|
||||
|
||||
// TODO: FILL
|
||||
//// Apply ES_AddTitleStart
|
||||
//LWZ(R9, 0x20, R8),
|
||||
//LWZ(R10, 0x24, R8),
|
||||
//STW(R10, 0x0, R9),
|
||||
//
|
||||
//// Apply ES_AddContentStart
|
||||
//LWZ(R9, 0x28, R8),
|
||||
//LWZ(R10, 0x2c, R8),
|
||||
//STW(R10, 0x0, R9),
|
||||
|
||||
BLR(), BLR(), BLR(),
|
||||
BLR(), BLR(), BLR(),
|
||||
BLR(),
|
||||
|
||||
// We're finished patching!
|
||||
BLR(),
|
||||
}.toBytes(),
|
||||
},
|
||||
Patch{
|
||||
Name: "Modify ES_InitLib",
|
||||
AtOffset: 2399844,
|
||||
Name: "Modify main",
|
||||
AtOffset: 688,
|
||||
|
||||
// We inject in the epilog of the function.
|
||||
// We inject the tail end of the function.
|
||||
Before: Instructions{
|
||||
LWZ(R0, 0x14, R1),
|
||||
MTSPR(),
|
||||
ADDI(R1, R1, 0x10),
|
||||
BLR(),
|
||||
// bl main
|
||||
BL(0x800041b0, 0x80023df0),
|
||||
// b exit
|
||||
B(0x800041b4, 0x801d0960),
|
||||
padding,
|
||||
}.toBytes(),
|
||||
After: Instructions{
|
||||
LWZ(R0, 0x14, R1),
|
||||
// bl overwriteIOSMemory @ 0x80014428
|
||||
Instruction{0x4b, 0xdb, 0xb0, 0xcd},
|
||||
MTSPR(),
|
||||
ADDI(R1, R1, 0x10),
|
||||
BLR(),
|
||||
// bl overwriteIOSMemory
|
||||
BL(0x800041b0, 0x800143f4),
|
||||
// bl main
|
||||
BL(0x800041b4, 0x80023df0),
|
||||
// b exit
|
||||
B(0x800041b8, 0x801d0960),
|
||||
}.toBytes(),
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user