Mario Kart Wii Gecko Codes, Cheats, & Hacks
Damage Objects on Command [Ro] - Printable Version

+- Mario Kart Wii Gecko Codes, Cheats, & Hacks (https://mariokartwii.com)
+-- Forum: Cheat Codes (https://mariokartwii.com/forumdisplay.php?fid=51)
+--- Forum: Offline Non-Item (https://mariokartwii.com/forumdisplay.php?fid=53)
+--- Thread: Damage Objects on Command [Ro] (/showthread.php?tid=2105)



Damage Objects on Command [Ro] - _Ro - 03-01-2024

Damage Objects on Command [Ro]

This code will damage most objects (only ones that are affected by Lightning) with a press of a button.

NTSC-U
C2816E1C 00000008
3C80808A 3D808034
A18CXXXX 718CYYYY
41820028 9421FF80
BC610008 38800006
3D808081 618C7780
7D8903A6 4E800421
B8610008 38210080
60000000 00000000

PAL
C282A930 00000008
3C80808B 3D808034
A18CXXXX 718CYYYY
41820028 9421FF80
BC610008 38800006
3D808081 618C7780
7D8903A6 4E800421
B8610008 38210080
60000000 00000000

NTSC-J
C2829F9C 00000008
3C80808B 3D808034
A18C14C2 718C1000
41820028 9421FF80
BC610008 38800006
3D808081 618C7780
7D8903A6 4E800421
B8610008 38210080
60000000 00000000

NTSC-K
C2818CF0 00000008
3C80808A 3D808035
A18CXXXX 718CYYYY
41820028 9421FF80
BC610008 38800006
3D808081 618C7780
7D8903A6 4E800421
B8610008 38210080
60000000 00000000

Code:
Code:
lis r4, 0x808X     # A for NTSC-U and NTSC-K, B for PAL and NTSC-J
lis r12, 0x803X    # Controller address first halfword, 5 for NTSC-K (and PAL GCN iirc?), 4 for the other regions)
lhz r12, 0xYYYY (r12)      # Load controller address
andi. r12, r12, 0xXXXX     # Check button to damage objects
beq end             # If button not pressed, skip all the code
stwu r1,-128(r1)
stmw r3,8(r1)
li r4, 6
lis r12, 0x8081
ori r12, r12, 0x7780
mtctr r12
bctrl         # Call object shock damage
lmw r3,8(r1)
addi r1,r1,128
end:


XXXX: Controller Address (1462 for NTSC-U Wiimote for example)
YYYY: Button value (1000 for Wiimote Minus [-] for example)

Code creator: Ro
Code credits: 1superchip (Remote Object Freeze function which has the pointer for the call)