WiiMart-Patcher/patch_ec_title_check.go
Spotlight e17dbf9ce1
Migrate instruction encoding to external library
The PowerPC instruction encoder and patching logic is now available at https://github.com/wii-tools/powerpc.
2022-04-10 23:20:37 -05:00

66 lines
1.1 KiB
Go

package main
import (
. "github.com/wii-tools/powerpc"
)
var NegateECTitle = PatchSet{
Name: "Negate EC Title Check",
Patches: []Patch{
Patch{
Name: "Permit downloading all titles",
AtOffset: 619648,
// Generic function prolog
Before: Instructions{
STWU(R1, R1, 0xffe0),
MFSPR(),
}.Bytes(),
// Immediately return true
After: Instructions{
LI(R3, 1),
BLR(),
}.Bytes(),
},
Patch{
Name: "Mark all titles as managed",
AtOffset: 620656,
Before: Instructions{
STWU(R1, R1, 0xfff0),
MFSPR(),
}.Bytes(),
After: Instructions{
LI(R3, 1),
BLR(),
}.Bytes(),
},
Patch{
Name: "Mark all tickets as managed",
AtOffset: 619904,
Before: Instructions{
STWU(R1, R1, 0xfff0),
MFSPR(),
}.Bytes(),
After: Instructions{
LI(R3, 1),
BLR(),
}.Bytes(),
},
Patch{
Name: "Nullify ec::removeAllTitles",
AtOffset: 588368,
Before: Instructions{
STWU(R1, R1, 0xffc0),
MFSPR(),
}.Bytes(),
After: Instructions{
LI(R3, 0),
BLR(),
}.Bytes(),
},
},
}