Mario Kart Wii Gecko Codes, Cheats, & Hacks

Full Version: Game Resets after "Next Race" [SeanMcNally]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Not even sure if I can call myself the creator of this one, since it basically just rips the activator out of Diamond's Press Button to Reset to Title Screen and puts it at an insertion address that I found.  The cup selection screen can be accessed from a bunch of different ways.  If r9 = 5, that means the cup selection screen was accessed from pressing "Next Race" after a race.  If r9 = 17, the cup selection screen was accessed from the starting a new grand prix or versus race and selecting your character, vehicle, and drift options.  This code checks for the first scenario.  Not ported, but here it is, for NTSC-U Only:

C270CA50 00000006
93DD0004 2C090005
41820008 48000020
3D80809B 618CD508
806C0000 3D808060
618C4CD8 7D8803A6
4E800021 00000000

Source Code:
# Insertion Address: 8070ca50 for NTSC-U
stw r30, 0x0004 (r29) # Default instruction
cmpwi r9, 5          # If r9 = 5, this instruction is running after pressing "next race"
# Worth noting that if r9 = 17, this instruction is running after the character select screen
beq game_reset # If five, reset the game
b end_code # If not, end the code
# This part resets the game, Diamond wrote this code
lis r12, 0x809B
ori r12, r12, 0xD508
lwz r3, 0(r12)
lis r12, 0x8060
ori r12, r12, 0x4CD8
mtlr r12

Credits: Diamond, for creating the part that resets the game.
Nice code. Regarding the rules for code credits, I would say the way you have it is fine. You as the creator and crediting Diamond for implementing his Reset Title Screen function/code.

Fyi you can change...
beq game_reset
b end_code

to this..
bne end_code
Thank you! And definitely, that would be a cleaner way to do this. Still learning Smile