BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the community, you simply need to register an account or log into an existing one.

Be sure to check out disposable e-mail services, in case you prefer using one for this site instead of your legit address: http://10minutemail.com/10MinuteMail/

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can see and download all content provided for regular members even without an account!

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup
BullyWiiHacks

Gaming, Modding & Programming

Important reminders:

- Click *HERE* for advanced forum search or check out the text field below on the front page for Google before posting
- NO support via private message (use the forum)
- Write meaningful topic titles
Site Translation
Search
 
 

Display results as :
 


Rechercher Advanced Search

December 2017
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
25262728293031

Calendar Calendar

Country Statistics
Free counters!
LaTeX Generator


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Mario Kart Wii Item Replacement on 10/23/2014, 9:07 am

Bully@WiiPlaza

avatar
 
 
In this tutorial we'll discuss how to replace certain items with other ones in Mario Kart Wii. This is done with a conditional "Force Next Item" code.

First, we need the values for all items.

Item Values:
Code:
14 = Nothing
12 = Triple Bananas
11 = Triple Red Shells
10 = Triple Green Shells
0F = Bullet Bill
0E = Thunder Cloud
0D = POW
0C = Blooper
0B = Mega Mushroom
0A = Golden Mushroom
09 = Star Power
08 = Lightning
07 = Blue Shell
06 = Bomb
05 = Triple Mushrooms
04 = Single Mushroom
03 = Fake Box
02 = Banana
01 = Red Shell
00 = Green Shell
Item amount values:
Code:
0 = Nothing
3 = Triple Mushrooms
3 = Triple Green Shells
3 = Triple Bananas
3 = Triple Red Shells
1 = Otherwise

Next, we need to know the way the assembly code needs to be written for this purpose.
Spoiler:
The original instruction
Code:
stw r0,8(r3)
is placed at the bottom. The address is
Code:
807BC95C
for PAL. Feel free to port the address to your desired region by hand or by using my porting tool. In order to check which item we are about to receive we need to write
Code:
cmpwi r28, 0xORIGINAL_ITEM
where ORIGINAL_ITEM is an item value. Then the condition branch
Code:
bne- SKIP1
To set a new item value, we write
Code:
li r28, 0xNEW_ITEM
where NEW_ITEM is an item value. To store this new item value, we need to add
Code:
stw r28, 4 (r3)
For the item amount, we use
Code:
li r0, 0xNEW_ITEM_AMOUNT
where NEW_ITEM_AMOUNT is an item amount value. Then we need to specify the destination of the conditional branch with
Code:
SKIP1:
What we've got so far:
Code:
cmpwi r28, 0xORIGINAL_ITEM
bne- SKIP1
li r28, 0xNEW_ITEM
stw r28, 4 (r3)
li r0, 0xNEW_ITEM_AMOUNT
SKIP1:

stw r0,8(r3)
This code now allows us to replace an item with another one but wait! You can't just do multiple items by repeatedly creating a modified assembly code since inserting multiple assembly codes into the same address doesn't work. The current one has to be expanded by copying the first block of code and changing the branch label
Code:
SKIP1
to something like
Code:
SKIP2
Result:
Code:
cmpwi r28, 0xORIGINAL_ITEM
bne- SKIP1
li r28, 0xNEW_ITEM
stw r28, 4 (r3)
li r0, 0xNEW_ITEM_AMOUNT
SKIP1:

cmpwi r28, 0xORIGINAL_ITEM
bne- SKIP2
li r28, 0xNEW_ITEM
stw r28, 4 (r3)
li r0, 0xNEW_ITEM_AMOUNT
SKIP2:

stw r0,8(r3)
Let's do an example. We want to replace a single banana with triple bananas, a single green shell with triple green shells and a single red shell with triple red shells. For this we need 3 replacement blocks in the assembly:
Code:
cmpwi r28, 0xORIGINAL_ITEM
bne- SKIP1
li r28, 0xNEW_ITEM
stw r28, 4 (r3)
li r0, 0xNEW_ITEM_AMOUNT
SKIP1:

cmpwi r28, 0xORIGINAL_ITEM
bne- SKIP2
li r28, 0xNEW_ITEM
stw r28, 4 (r3)
li r0, 0xNEW_ITEM_AMOUNT
SKIP2:

cmpwi r28, 0xORIGINAL_ITEM
bne- SKIP3
li r28, 0xNEW_ITEM
stw r28, 4 (r3)
li r0, 0xNEW_ITEM_AMOUNT
SKIP3:

stw r0,8(r3)
Let's fill this out using the value lists from above:
Code:
#Banana -> Triple#
cmpwi r28, 0x02
bne- SKIP1
li r28, 0x12
stw r28, 4 (r3)
li r0, 0x3
SKIP1:

#Green Shell -> Triple#
cmpwi r28, 0x00
bne- SKIP2
li r28, 0x10
stw r28, 4 (r3)
li r0, 0x3
SKIP2:

#Red Shell -> Triple#
cmpwi r28, 0x01
bne- SKIP3
li r28, 0x11
stw r28, 4 (r3)
li r0, 0x3
SKIP3:

stw r0,8(r3)
Once done, the assembly code can be converted to a gecko code using ASMWiiRd by clicking the right arrow:



The code on the right is now ready to use.

Note
Make sure comments (text included in ## tags) or instructions do not line-wrap otherwise you'll have to expand the window to successfully compile the code.

Code credits go to XeR and me.

I hope you enjoyed this tutorial! Leave some feedback if you want Wink



Last edited by Bully@WiiPlaza on 1/31/2015, 8:08 am; edited 6 times in total


_________________

2 Re: Mario Kart Wii Item Replacement on 10/23/2014, 10:43 pm

Vikcso

avatar
This is a very clearly explained tutorial! Thank you!

3 Re: Mario Kart Wii Item Replacement on 1/29/2015, 2:35 am

Gucci

avatar
If I was to add more than 3, ex. 5 item replacments would something need to change in the code or would I just add 2 more replacment blocks? (with my values filled in and skip 4 and 5 added)

cmpwi r28, 0xORIGINAL_ITEM
bne- SKIP1
li r28, 0xNEW_ITEM
stw r28, 4 (r3)
li r0, 0xNEW_ITEM_AMOUNT
SKIP1:

stw r0,8(r3)

4 Re: Mario Kart Wii Item Replacement on 1/29/2015, 4:18 am

Bully@WiiPlaza

avatar
 
 
Gucci wrote:If I was to add more than 3, ex. 5 item replacments would something need to change in the code or would I just add 2 more replacment blocks? (with my values filled in and skip 4 and 5 added)
Yes. You would just continue copying the replacement blocks in and increasing the branch label number every time. Just like you said.


_________________

5 Re: Mario Kart Wii Item Replacement on 1/29/2015, 11:05 am

Gucci

avatar
By any chance has anyone ever managed to replace a thunder cloud with any other item? I can't seem to be able to do it.

6 Re: Mario Kart Wii Item Replacement on 1/30/2015, 4:02 am

Bully@WiiPlaza

avatar
 
 
Gucci wrote:By any chance has anyone ever managed to replace a thunder cloud with any other item? I can't seem to be able to do it.
I'm pretty sure I did it before. There shouldn't be an issue.


_________________

7 Re: Mario Kart Wii Item Replacement on 1/31/2015, 6:58 am

Gucci

avatar
Bully@WiiPlaza wrote:
Gucci wrote:By any chance has anyone ever managed to replace a thunder cloud with any other item? I can't seem to be able to do it.
I'm pretty sure I did it before. There shouldn't be an issue.

No, I just tried again and the thunder cloud doen't replace with anything. This tutorial is complete garbage. Nah I'm kidding, thank you. Everything else works perfectly!

Vikcso

avatar
I'm sorry that I'm writing too late (6 months after the last post) but that thunder cloud thing interests me too. That's the only item I couldn't change. What else do I have to change in the game with the codes in order to get it changed? It's the only item which activates itself.

9 Re: Mario Kart Wii Item Replacement on 7/7/2015, 10:40 am

Bully@WiiPlaza

avatar
 
 
Vikcso wrote:I'm sorry that I'm writing too late (6 months after the last post) but that thunder cloud thing interests me too. That's the only item I couldn't change. What else do I have to change in the game with the codes in order to get it changed? It's the only item which activates itself.
You can stop it from activating automatically by using some code made by a japanese hacker. Let me know if that helps. I can't test anything myself right now and I'm kinda done with Wii :/


_________________

10 Re: Mario Kart Wii Item Replacement on 7/9/2015, 3:52 am

Vikcso

avatar
Bully@WiiPlaza wrote:
You can stop it from activating automatically by using some code made by a japanese hacker. Let me know if that helps. I can't test anything myself right now and I'm kinda done with Wii :/
I found that code but in NTSC-U so I had to port it to PAL. In about 3 hours I'm going to try the code I got. Can I post it here if it works?

Edit: hmmm... It is true that I can force the PAL console to play NTSC-U games. Can I force a PAL game to use NTSC-U codes? (I think no because the PAL game doesn't have NTSC-U "codes" but I don't know. Smile ) Is it possible to test NTSC-U codes on a PAL console with a PAL game?

11 Re: Mario Kart Wii Item Replacement on 7/9/2015, 9:55 am

SnB@BWH

avatar
Admin & Writer
Not with Mario Kart Wii. All the regions in Mario Kart Wii are different. The only way to use a code from one region into another is to port the code.


_________________

12 Re: Mario Kart Wii Item Replacement on 7/9/2015, 1:01 pm

Vikcso

avatar
shitnbitch@BWH wrote:Not with Mario Kart Wii. All the regions in Mario Kart Wii are different. The only way to use a code from one region into another is to port the code.
And if I use the dolphin emulator and an NTSC-U version of the game? That should work. However, here I don't have a powerful computer, I'm not home but I'll give it a try.

Edit: Can you help me a little? I'm searching a code that stops the thunder cloud self-activating. I've got a clue from Bully that a Japanese hacker found the code for it. But I can't find anything. However I found the NTSC-U version of the code and I ported it but it didn't work. I used the code porter and I got the same address,the same value so I think I ported the code well. Smile And this is why I need the NTSC-U version, to test if the code I found works.

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum