mirror of
https://wiilab.wiimart.org/wiimart/WiiMart-Patcher
synced 2025-09-04 04:21:19 +02:00
Narrow function clearing patch
We wish to preserve the first blr, but it's ridiculous to clear it and replace it with itself. Now, we only clear the contents of the three textinput::EventObserver we overwrite.
This commit is contained in:
parent
957d69f118
commit
0551c6a9a9
13
patches.go
13
patches.go
@ -4,15 +4,10 @@ package main
|
||||
// See docs/patch_overwrite_ios.md for more information.
|
||||
var OverwriteIOSPatch = PatchSet{
|
||||
Patch{
|
||||
Name: "Clear textinput::EventObserver functions",
|
||||
AtOffset: 20320,
|
||||
Name: "Clear extraneous textinput::EventObserver functions",
|
||||
AtOffset: 20336,
|
||||
|
||||
Before: Instructions{
|
||||
// Function: textinput::EventObserver::onSE
|
||||
BLR(),
|
||||
padding,
|
||||
padding,
|
||||
padding,
|
||||
// Function: textinput::EventObserver::onEvent
|
||||
BLR(),
|
||||
padding,
|
||||
@ -32,9 +27,7 @@ var OverwriteIOSPatch = PatchSet{
|
||||
|
||||
// We wish to clear extraneous blrs so that our custom overwriteIOSMemory
|
||||
// function does not somehow conflict. We only preserve onSE.
|
||||
After: append(Instructions{
|
||||
BLR(),
|
||||
}.toBytes(), emptyBytes(60)...),
|
||||
After: emptyBytes(48),
|
||||
},
|
||||
Patch{
|
||||
Name: "Repair textinput::EventObserver vtable",
|
||||
|
@ -2,8 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"log"
|
||||
)
|
||||
|
||||
// Register represents a value for a PowerPC register.
|
||||
@ -115,10 +113,6 @@ func EncodeInstrDForm(opcode byte, rT Register, rA Register, value uint16) Instr
|
||||
secondInstr := instr[1].getByte()
|
||||
valByte := twoByte(value)
|
||||
|
||||
log.Println(hex.EncodeToString([]byte{
|
||||
firstInstr, secondInstr, valByte[0], valByte[1],
|
||||
}))
|
||||
|
||||
return Instruction{firstInstr, secondInstr, valByte[0], valByte[1]}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user