Mario Kart Wii Gecko Codes, Cheats, & Hacks

Full Version: GeoHit Patcher [CLF78]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This code lets you patch any of the GeoHit files right after they're loaded in memory. Useful if you only changed a few values and don't want to provide the entire file.

Since this is a customizable code, only the ASM is provided.

Code:
# Hooks (PAL, NTSC-U, NTSC-J, NTSC-K):
# GeoHitTableItem    = 0x8082A410, 0x808168FC, 0x80829A7C, 0x808187D0
# GeoHitTableItemObj = 0x8082A440, 0x8081692C, 0x80829AAC, 0x80818800
# GeoHitTableKart    = 0x8082A470, 0x8081695C, 0x80829ADC, 0x80818830
# GeoHitTableKartObj = 0x8082A4A0, 0x8081698C, 0x80829B0C, 0x80818860

# Free registers = r3, r4, r5

# Original instruction
stw r3, 0(r30)

# Load pointer to data (equivalent of offset 0x6 in the .bin file)
lwz r3, 0x24(r30)

################
# Example Code #
################

# This code patches the Geysers' damage in GeoHitTableKart
# You can do anything you want in this part
# See tockdom for more details on each file' structure

# Load damage type 11
li r4, 0xB

# Store damage to FlamePole_v and FlamePole_v_big
sth r4, 0x974(r3)
sth r4, 0x99C(r3)

Code created by: CLF78