Mario Kart Wii Gecko Codes, Cheats, & Hacks

Full Version: Boot into any menu [Melg]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This code boots the game into a specified menu. By intelligently selecting which menu to boot into, you can start the game directly into a screen of your choice. For example menu 0x49 "Single Player (coming from Time Trial Change Character)" will boot the game directly into that screen.

Please note that the code should be seen as a base. Some menus will work as is, by just changing the menu ID, but others will need some values (such as character, vehicle, number of races, etc...) to be initiated. Considering the sheet amount of menus (roughly 150), I did not make a version of the code for every single one of them.

Refer to: https://mariokartwii.com/showthread.php?tid=1950 for an example on how values should be initiated. The exact hook and method will differ depending on the menu, but it still gives a good idea of what to do.


Code:
NTSC-U
C261F85C 00000005
48000019 2D733133
32202D6C 3L202D70
CCCCCCCC 00000000
7F8802A6 93830098
60000000 00000000
0462055C 386000MM
C251FF68 00000007
3C60809C 8063D508
8883003B 2C040024
389E1720 38A00920
40A2000C 389E3BA0
38A000B0 8863003A
3863FFFF 7C6329D6
7C841A14 00000000

PAL
C25b9368 00000005
48000019 2D733133
32202D6C 3L202D70
CCCCCCCC 00000000
7F8802A6 93830098
60000000 00000000
045BA068 386000MM
C25243dc 00000007
3C60809C 80631E38
8883003B 2C040024
389E1720 38A00920
40A2000C 389E3BA0
38A000B0 8863003A
3863FFFF 7C6329D6
7C841A14 00000000

NTSC-J
C25B8CE8 00000005
48000019 2D733133
32202D6C 30202D70
CCCCCCCC 00000000
7F8802A6 93830098
60000000 00000000
045B99E8 386000MM
C2523D5C 00000007
3C60809C 80630E98
8883003B 2C040024
389E1720 38A00920
40A2000C 389E3BA0
38A000B0 8863003A
3863FFFF 7C6329D6
7C841A14 00000000

NTSC-K
C25A73C0 00000005
48000019 2D733133
32202D6C 30202D70
CCCCCCCC 00000000
7F8802A6 93830098
60000000 00000000
045A80C0 386000MM
C2512400 00000007
3C60809B 80630478
8883003B 2C040024
389E1720 38A00920
40A2000C 389E3BA0
38A000B0 8863003A
3863FFFF 7C6329D6
7C841A14 00000000


Values to fill:
MM = which menu to use: https://wiki.tockdom.com/wiki/List_of_Id...dentifiers

L = which license to boot into:
0 = Top-Left
1 = Top-Right
2 = Bottom-Left
3 = Bottom-Right

CCCCCCCC = which controller and slot to use; the physical slot for GCN, and the light that is turned on for the wiimote based ones (which in most cases is just the first one):
GCN Controller
32393200 slot 1
35343800 slot 2
38303400 slot 3
31303630 slot 4

Wii Wheel
32373300 slot 1
35323900 slot 2
37383500 slot 3
31303431 slot 4

Nunchuck:
32373400 slot 1
35333000 slot 2
37383600 slot 3
31303432 slot 4

Classic Controller:
32373500 slot 1
35333100 slot 2
37383700 slot 3
31303433 slot 4


Source:
Code:
#1st ASM:
#inject(0x805b9368)\n\n (PAL)
#inject(0x8061F85C)\n\n (NTSC-U)
#inject(0x805B8CE8)\n\n (NTSC-J)
#inject(0x805A73C0)\n\n (NTSC-K)

#Args: r3 = SystemManager::StaticInstance

bl string
.string "-s132 -l0 -p292"  #-p set to GCN just for compiling purposes; you can get the decimal values by converting the ASCIII strings provided above
.byte 00
.align 2
string:
mflr r28
stw r28, 0x98 (r3)      
#Store pointer to string, which will be used by the function later, also loads the pointer into r28; this hook is followed by a cmpwi r28

#The function this hooks into returns the menu ID to boot into (-1 usually, but the 04 changes it)

Code:
#inject(0x805243dc)\n\n (PAL)
#inject(0x8051FF68)\n\n (NTSC-U)
#inject(0x80523D5C)\n\n (NTSC-J)
#inject(0x80512400)\n\n (NTSC-K)

.set region, 'P' #Must set region value, or else source will not compile
.if (region == 'P')
    .set MENUDATA, 0x809c1e38 
.elseif (region == 'E')
    .set MENUDATA, 0x809bd508
.elseif (region == 'J')
.set MENUDATA, 0x809c0e98
.elseif (region == 'K')
    .set MENUDATA, 0x809B0478
.else
  .err
.endif

#Fixes controller not being properly initiated since we skip the title screen "Press A". Stores the correct InputData substruct pointers depending on the controller. Without this, the correct controller buttons are displayed but the game does not fetch the inputs from the right place.
#r30 = INPUTDATA

lis r3, MENUDATA@ha
lwz r3, MENUDATA@l (r3)
lbz r4, 0x3B (r3)            #Get the controllerType from MenuDataSub
cmpwi r4, 0x24               #Check if it's a GCN
addi r4, r30, 0x1720
li r5, 0x920 
bne+ end
addi r4, r30, 0x3ba0
li r5, 0xB0
end:
lbz r3, 0x3A (r3)            #Get the slot
subi r3, r3, 0x1
mullw r3, r3, r5   
add r4, r4, r3               #Correct pointer depending on controller and slot


Code Creator: Melg
In case you're wondering what happens when you don't initiate any values on menus that evidently would need to...it either crashes or you get the default values. Here's me booting into menu 0x20 which is single player Versus Mode (yes you can boot directly into a race):
 
NTSC-J and NTSC-K L values are filled in.