Mario Kart Wii Gecko Codes, Cheats, & Hacks
GeoHit Patcher [CLF78] - Printable Version

+- Mario Kart Wii Gecko Codes, Cheats, & Hacks (https://mariokartwii.com)
+-- Forum: Cheat Codes (https://mariokartwii.com/forumdisplay.php?fid=51)
+--- Forum: Misc/Other (https://mariokartwii.com/forumdisplay.php?fid=55)
+--- Thread: GeoHit Patcher [CLF78] (/showthread.php?tid=1757)



GeoHit Patcher [CLF78] - CLF78 - 02-21-2021

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