diff options
-rw-r--r-- | koopatlas.yaml | 15 | ||||
-rw-r--r-- | src/randomcrap.S | 44 |
2 files changed, 59 insertions, 0 deletions
diff --git a/koopatlas.yaml b/koopatlas.yaml index 4c79acf..268ee12 100644 --- a/koopatlas.yaml +++ b/koopatlas.yaml @@ -70,3 +70,18 @@ hooks: addr_pal: 0x80926800 data: '60000000' +# try to fix effects? +# - name: WMEffectFixTry +# type: patch +# addr_pal: 0x80124DCC +# data: '2800000D' +# - name: WMEffectDebug +# type: branch_insn +# src_addr_pal: 0x802863AC #Effect::Calc +# src_addr_pal: 0x8016CB10 #mEf::effect_c::spawnWithName or something +# src_addr_pal: 0x802858B0 #Effect::Draw +# src_addr_pal: 0x8016C9CC #DealWithPuttingEffectsOnTheScreen-succeeds with extra RenderEffects +# src_addr_pal: 0x80286A70 +# branch_type: b +# target_func: 'UniversalFunctionLog' + diff --git a/src/randomcrap.S b/src/randomcrap.S index 808009b..36bbde7 100644 --- a/src/randomcrap.S +++ b/src/randomcrap.S @@ -6,3 +6,47 @@ HeapChangeAttempt: lwz 4, 0(4) blr + +.extern OSReport +.global UniversalFunctionLog +UniversalFunctionLog: + stwu r1, -0x10(r1) + stw r0, 0x14(r1) + stw r31, 0xC(r1) + stw r30, 0x8(r1) + mr r31, r3 + mr r30, r4 + + crclr 4*cr1+eq + mr r4, r31 + #Loop through callstack, kind of + lwz r3, 0(r1) + lwz r5, 4(r3) + lwz r3, 0(r3) + lwz r6, 4(r3) + lwz r3, 0(r3) + lwz r7, 4(r3) + lwz r3, 0(r3) + lwz r8, 4(r3) + lwz r3, 0(r3) + lwz r9, 4(r3) + lwz r3, 0(r3) + lwz r10, 4(r3) + #lwz r10, 0x14(r29) + + lis r3, UniLogStr@h + ori r3, r3, UniLogStr@l + bl OSReport + + mr r3, r31 + mr r4, r30 + lwz r30, 0x8(r1) + lwz r31, 0xC(r1) + lwz r0, 0x14(r1) + mtlr r0 + addi r1, r1, 0x10 + blr + +.data +UniLogStr: .string "[ULog] returning %8x to: %x > %x > %x > %x > %x > %x\n" + |