Mario Kart Wii Gecko Codes, Cheats, & Hacks
C0 Randomizer/Incrementer - Printable Version

+- Mario Kart Wii Gecko Codes, Cheats, & Hacks (https://mariokartwii.com)
+-- Forum: Hacks/Modding (https://mariokartwii.com/forumdisplay.php?fid=14)
+--- Forum: Coding & Hacking General Discussion (https://mariokartwii.com/forumdisplay.php?fid=23)
+--- Thread: C0 Randomizer/Incrementer (/showthread.php?tid=1174)



C0 Randomizer/Incrementer - Vega - 07-25-2019

Here's a simple 'randomizer' (done by numbers incrementing and repeating every frame) via the C0 code type

C0000000 00000004
3D808000 896CXXXX
396B0001 280B00YY
41A00008 39600000
996CXXXX 4E800020

YY  is 1 above whatever your byte limit is
XXXX is ofc the 2nd half of the mem address for whatever exception vector area you are utilizing.

Code:
lis r12, 0x8000
lbz r11, 0xXXXX (r12)

addi r11, r11, 1

cmplwi r11, 0xYY
blt+ dont_reset

li r11, 0x0

dont_reset:
stb r11, 0xXXXX (r12)