Mario Kart Wii - Selecting Miis stored in Wii Remote (Unused)
Normally, the Miis the player can select from are those from either their Wii console or the predefined Guest Miis. However, unused functionality exists that would've also supported loading Miis stored in the Wii remotes, similar to other games like Wii Sports.
In this video, I demonstrate this by creating a new Mii and then storing it in the Wii remote (I then removed that Mii from the Wii console to demonstrate that this data is indeed coming only from the remote). Afterwards, you can see that the Mii indeed gets loaded from the remote in Mario Kart Wii.
In the Mii selection page, an extra button exists, named "TabRemote", that would've shown the list of Miis from the Wii remote, but got scrapped. In this video, I've replaced the button normally used for the Guest Mii list with the unused "TabRemote" one. This unused button is placed on the far right of the screen, and has empty text.
== Code ==
You can try this for yourself by using the following Gecko code. This code replaces the Guest Mii button in the Mii selection screen with the "TabRemote" one, and will load the first Mii saved in your first Wii controller.
Note that this is just a experimental proof of concept for demonstration purposes, and needs more work in order to properly support all remotes + loading all the Miis in the controller and not just one. Because of this, please ensure that you have backups of your savegame, Wii NAND, etc, before trying this code.
(PAL)
C2527D44 00000005
3C60809C 8063D710
38800000 38A00000
7FE6FB78 3CE08052
60E79420 7CE903A6
4E800421 00000000
C28487C4 00000004
98030265 38800000
3CA08052 60A59530
7CA903A6 4E800421
60000000 00000000
040ca820 38600000
040ca824 4e800020
04849068 38000001
048490bc 4bdb16f5
068ad99f 00000006
52656D6F 74650000
== Code documentation (PAL) ==
Inside the function that loads either a Mii from the console or a guest Mii, replace the "find Guest Mii" function call with a call to find the first Mii from the first Wii remote instead.
C2527D44 00000005
3C60809C 8063D710
38800000 38A00000
7FE6FB78 3CE08052
60E79420 7CE903A6
4E800421 00000000
Inject at 0x80527d44 (PAL)
.set MiiManager_insertMiiFromController, 0x80529420 # (PAL)
.set ptr_MiiManager, 0x809bd710 # (PAL)
lis r3, ptr_MiiManager@ha
lwz r3, ptr_MiiManager@l(r3)
li r4, 0 # Mii index (first Mii on the list)
li r5, 0 # Wii controller index (first Wii remote)
mr r6, r31 # heap
lis r7, MiiManager_insertMiiFromController@h
ori r7, r7, MiiManager_insertMiiFromController@l
mtctr r7
bctrl
When loading the Mii selection screen, load the Mii list from the first Wii remote controller. Needed for the code above so that the list is available to choose Wii remote Miis from.
C28487C4 00000004
98030265 38800000
3CA08052 60A59530
7CA903A6 4E800421
60000000 00000000
Inject at 0x808487c4 (PAL)
.set MiiManager_loadMiisFromControllerAsync, 0x80529530 # (PAL)
.set ptr_MiiManager, 0x809bd710 # (PAL)
Original instruction
stb r0, 0x265(r3)
li r4, 0 # Wii controller index (first Wii remote)
lis r5, MiiManager_loadMiisFromControllerAsync@h
ori r5, r5, MiiManager_loadMiisFromControllerAsync@l
mtctr r5
bctrl
Since this code replaces all of the Guest Mii loading functionality with the functionality for loading Wii remote Miis, this "is Guest Mii" function will always return "false".
040ca820 38600000
040ca824 4e800020
Force Wii remote Mii list in the Mii selection screen to only have 1 Mii. This is a temporary solution until more code is written to load the rest of the Miis from the list.
04849068 38000001
Replace load Guest Mii function call in the Mii selection screen with call to find Wii remote Mii function.
048490bc 4bdb16f5
Load the unused "TabRemote" button instead of the Guest Mii one.
068ad99f 00000006
52656D6F 74650000
== More functionality documentation ==
The relevant functions are as follows (PAL):
0x80529530: Loads the controller data. This function must be called first to load the list of Miis from the controller into memory. Arguments: (MiiManager *this,uint controllerIdx). This function calls `RFLLoadControllerAsync` (0x800c8680)
0x805fa7b0: Loads a a certain Mii from a given controller. Arguments: (MiiGroup *this,int miiListIndex,int controllerIdx,uint miiIndex)
0x80529420: Called from the function above to load the Mii data. Arguments: (MiiManager *this,uint controllerIdx,uint miiIndex,Heap *heap). This function calls `RFLIsAvailableControllerData` (0x800c8780)
Other relevant things:
Field 0x2E8 of `MiiManager` (instance at 809bd710) is an array of four bytes, and each byte is the amount of Miis found in the controller
Field 0xD9C of the Mii Selection page is the source where the currently viewed Miis come from. 0 is from the console and 1 is Guest Miis. However, 2 goes unused, which represents that the Miis come from the controller (see 80848efc for an example usage)
Other Videos By B_squo
Other Statistics
Mario Kart Wii Statistics For B_squo
There are 305,794 views in 173 videos for Mario Kart Wii. The game makes up 5 hours of published video on his channel, roughly 28.21% of Mario Kart Wii content that B_squo has uploaded to YouTube.