The following warnings occurred:
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.2.18 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/printthread.php(287) : eval()'d code 2 errorHandler->error_callback
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



Mario Kart Wii Gecko Codes, Cheats, & Hacks
How to Make your own Cheat Codes - Printable Version

+- Mario Kart Wii Gecko Codes, Cheats, & Hacks (https://mariokartwii.com)
+-- Forum: Guides/Tutorials/How-To's (https://mariokartwii.com/forumdisplay.php?fid=45)
+--- Forum: PowerPC Assembly (https://mariokartwii.com/forumdisplay.php?fid=50)
+--- Thread: How to Make your own Cheat Codes (/showthread.php?tid=830)

Pages: 1 2 3 4 5 6 7


RE: How to Make your own Cheat Codes - LightKingdom666 - 04-02-2023

But for example, in my case I want to create a code that allows me to select the same character twice or more times in a game called Mario Sports Mix, how do I do it? Since I consider that the code you gave as an example is quite specific.

P.D: I know that this tutorial is almost 5 years old, but I would greatly appreciate your answer.


RE: How to Make your own Cheat Codes - Vega - 04-03-2023

What's hard about creating codes is knowing where to start without any prior info/documentation.

If I had to make a guess, the Sports Mix game most likely uses hex byte values to represent character values. Chances are Mario will be a value of null (0x00).

Go to the character selection in the game (fyi Ive never played this game before so bare with me), and choose Mario. On Dolphin-memory-engine, run an Exact search for Hex Byte 0x00. You will probably get over 1 million results. Now navigate back to character selection again, choose something other than Mario. Now some options on the Memory Engine program will be changed. Click the drop down menu that's underneath Byte, select "Changed", and hit Continue Scan.

After that scan has completed, back out and choose Mario. Change the drop down menu option to Exact Value. Make sure the value is still on 0x00, hit Continue Scan. Back out to Character selection yet again, choose something other than Mario. Select "Changed" , hit Continue Scan.

Basically you're swapping between Mario (0x00) and other Character (Changed value) over and over to narrow down the lists of results. Eventually you will get to a small enough list to watch in real time as you select the Characters and see the values update. At that moment decide which Address you want to set Write Breakpoint. Once the Write BP is set, back out to Char selection, choose a Character, and the BP should hit. You will have a Hook Address with a Default Instruction to make a code with.

It's possible Mario isn't the value of 0x00. The character at the top left (or set on default selection) might be 0x00. You will have to tinker around with this and do some guesswork for the initial values being used for your search.


RE: How to Make your own Cheat Codes - LightKingdom666 - 04-04-2023

(04-03-2023, 11:52 PM)Vega Wrote: What's hard about creating codes is knowing where to start without any prior info/documentation.

If I had to make a guess, the Sports Mix game most likely uses hex byte values to represent character values. Chances are Mario will be a value of null (0x00).

Go to the character selection in the game (fyi Ive never played this game before so bare with me), and choose Mario. On Dolphin-memory-engine, run an Exact search for Hex Byte 0x00. You will probably get over 1 million results. Now navigate back to character selection again, choose something other than Mario. Now some options on the Memory Engine program will be changed. Click the drop down menu that's underneath Byte, select "Changed", and hit Continue Scan.

After that scan has completed, back out and choose Mario. Change the drop down menu option to Exact Value. Make sure the value is still on 0x00, hit Continue Scan. Back out to Character selection yet again, choose something other than Mario. Select "Changed" , hit Continue Scan.

Basically you're swapping between Mario (0x00) and other Character (Changed value) over and over to narrow down the lists of results. Eventually you will get to a small enough list to watch in real time as you select the Characters and see the values update. At that moment decide which Address you want to set  Write Breakpoint. Once the Write BP is set, back out to Char selection, choose a Character, and the BP should hit. You will have a Hook Address with a Default Instruction to make a code with.

It's possible Mario isn't the value of 0x00. The character at the top left (or set on default selection) might be 0x00. You will have to tinker around with this and do some guesswork for the initial values being used for your search.

Well, Mario Sports Mix has 18 characters in total (19 if we count the Mii), and their values are as follows:

00 = Mario
01 = Luigi
02 = Peach
03 = Daisy
04 = Yoshi
05 = Wario
06 = Waluigi
07 = Donkey Kong
08 = Diddy Kong
09 = Toad
0A = Bowser
0B = Bowser Jr.
0C = Moogle
0D = Cactuar
0E = Ninja
0F = White Mage
10 = Slime
11 = Black Mage
13 = Mii

The game has 4 sports, which are: Basketball, Volleyball, Dodgeball and Hockey (I will put a screenshot of the character selection below):

[Image: RosterComplete-MarioSportsMix.png]

P.S: For example (I'll move on to another topic), if in a game (whatever it is, in this case I'm referring to a Wii game) I want a certain character to be unable to be controlled under any circumstances by the CPU, what do I do? In other words, without going too far, for example, in Mario Kart Wii the Mii cannot be controlled by the CPU (but that already comes by default) but only by the player (us), in this case I would like to make a code so that Rosalina ( just to give an example) cannot be controlled by the CPU, this would imply that she would not appear in the Grand Prix or VS races.

It's that I really want to create various codes for various Wii games.


RE: How to Make your own Cheat Codes - Vega - 04-06-2023

(04-04-2023, 02:59 AM)LightKingdom666 Wrote: P.S: For example (I'll move on to another topic), if in a game (whatever it is, in this case I'm referring to a Wii game) I want a certain character to be unable to be controlled under any circumstances by the CPU, what do I do? In other words, without going too far, for example, in Mario Kart Wii the Mii cannot be controlled by the CPU (but that already comes by default) but only by the player (us), in this case I would like to make a code so that Rosalina ( just to give an example) cannot be controlled by the CPU, this would imply that she would not appear in the Grand Prix or VS races.

It's that I really want to create various codes for various Wii games.

There's no straight answer to this. With Assembly, every situation (how you create a code) will vary. Nothing is cut & paste. You have to learn how to problem solve. If you force me to take a guess, the Wii Sports Mix Game probably uses some table in memory where the CPU's assigned character values get written to sometime right before an event takes place, then those values are read during event load up. If such a case exist, you could find a way write a code to make sure a particular value will never get written to said table.

First I recommend attempting the method I've described to see how successful you are in forcing Character selection. You need to get some experience under your belt.


RE: How to Make your own Cheat Codes - LightKingdom666 - 04-07-2023

(04-06-2023, 11:06 PM)Vega Wrote: There's no straight answer to this. With Assembly, every situation (how you create a code) will vary. Nothing is cut & paste. You have to learn how to problem solve. If you force me to take a guess, the Wii Sports Mix Game probably uses some table in memory where the CPU's assigned character values get written to sometime right before an event takes place, then those values are read during event load up. If such a case exist, you could find a way write a code to make sure a particular value will never get written to said table.

First I recommend attempting the method I've described to see how successful you are in forcing Character selection. You need to get some experience under your belt.

Well, if I did what you asked me to do (the Mario Sports Mix character selection thing), although I could only reduce the results between 285 and 305 (there are too many, isn't there a way to reduce even more?), the good thing It is that if it showed me the results in real time, but I still think that there are too many, does it matter anyway?


RE: How to Make your own Cheat Codes - Vega - 04-10-2023

(04-07-2023, 03:41 AM)LightKingdom666 Wrote: Well, if I did what you asked me to do (the Mario Sports Mix character selection thing), although I could only reduce the results between 285 and 305 (there are too many, isn't there a way to reduce even more?), the good thing It is that if it showed me the results in real time, but I still think that there are too many, does it matter anyway?

That is indeed too many results. Now that you have all the character values, this should help narrowing down to a manageable list. Retry the method but do something like this..

Select Luigi search for 0x01, go back
Select Toad, continue search but with value 0x09, go back
Select Moogle, continue search but with value 0x0C, go back
etc etc til you get a small enough list

If that doesn't work, you can slightly change the method...
On the character selection screen...
pre-select Luigi (don't actually select/click on him), search for 0x01
now pre-select Toad, change value to 0x09, continue search
now pre-select Moogle, change value to 0x0C, continue search
etc etc


RE: How to Make your own Cheat Codes - LightKingdom666 - 04-11-2023

(04-10-2023, 03:18 PM)Vega Wrote: That is indeed too many results. Now that you have all the character values, this should help narrowing down to a manageable list. Retry the method but do something like this..

Select Luigi search for 0x01, go back
Select Toad, continue search but with value 0x09, go back
Select Moogle, continue search but with value 0x0C, go back
etc etc til you get a small enough list

If that doesn't work, you can slightly change the method...
On the character selection screen...
pre-select Luigi (don't actually select/click on him), search for 0x01
now pre-select Toad, change value to 0x09, continue search
now pre-select Moogle, change value to 0x0C, continue search
etc etc

I followed all the steps that you indicated and surprisingly it worked for me, in fact I already created the code and it works perfectly, but there is something else I want to do.

Look, in Mario Sports Mix you have the option to play 2 vs 2 or 3 vs 3, in case you play 3 vs 3 the first character you choose represents player 1 (P1), the second represents player 2 (P2) and the third to player 3 (P3), and in case you play in Exhibition (a gameplay option that the game has) you have the option to choose your opponents, which would represent player 4 (P4), player 5 (P5) and player 6 (P6) respectively. Simply put, Players 1, 2, and 3 (P1, P2, and P3) represent you as a player, while Players 4, 5, and 6 (P4, P5, and P6) would basically represent the CPU-controlled characters.

Well, what I want to do is modify the spaces occupied by those characters so that, for example, in P1 you can only choose Daisy (for example), in P2 a Ninja and in P3 a White Mage, in the same way in P4 a Daisy, in P5 to Ninja and in P6 to White Mage so that it looks something like this:

P1. Daisy                                   P4. Daisy
P2. Ninja                      vs          P5. Ninja
P3. White Mage                          P6. White Mage

In short, in order to compete against the same characters, since the code I created only allows me to choose a single character in the 6 character slots, I actually found a code that works precisely for what I'm telling you, only that unfortunately it's not in the region that I want and it's defective (it's quite unstable), I'll give it to you here:

P1 Character Modifier by Bully@Wiiplaza
48000000 805C1C04
DE000000 80008180
58010000 00000010
DE000000 80008180
30000490 00000000
10000498 000000XX
E0000000 80008000

P2 Character Modifier by Bully@Wiiplaza
48000000 805C1C04
DE000000 80008180
58010000 00000010
DE000000 80008180
30000490 00000000
100004C0 000000XX
E0000000 80008000

P3 Character Modifier by Bully@Wiiplaza
48000000 805C1C04
DE000000 80008180
58010000 00000010
DE000000 80008180
30000490 00000000
100004E8 000000XX
E0000000 80008000

P4 Character Modifier by Bully@Wiiplaza
48000000 805C1C04
DE000000 80008180
58010000 00000010
DE000000 80008180
30000490 00000000
10000510 000000XX
E0000000 80008000

P5 Character Modifier by Bully@Wiiplaza
48000000 805C1C04
DE000000 80008180
58010000 00000010
DE000000 80008180
30000490 00000000
10000538 000000XX
E0000000 80008000

P6 Character Modifier by Bully@Wiiplaza
48000000 805C1C04
DE000000 80008180
58010000 00000010
DE000000 80008180
30000490 00000000
10000560 000000XX
E0000000 80008000


RE: How to Make your own Cheat Codes - Vega - 04-12-2023

That's a load pointer code which I personally hate. Assembly is always easier imo.

That code is checking a pointer (memory address value) located at 805c1c04. It will then use the pointer there (which will vary) to use as a storing reference.

The old mkwii license unlock codes are setup in a similar fashion

https://mariokartwii.com/showthread.php?tid=639

This code has a similar structure. Scroll down in that post you will see an ASM equivalent I've made. That will give you an idea of what is going on in such a code.

Either way these pointer codes are tough to port sometimes. Your best bet would be to get the version of the game for that code. Launch that game to character selection. Then go to 805c1c04 in a memory viewer. Find a nearby string to use as a porting constant and attempt to manually port. You won't be able to use or include the contents of 805c1c04 as part of your string for porting because the contents there always varies. Hopefully that makes sense.


https://mariokartwii.com/showthread.php?tid=113&highlight=How+to+port


RE: How to Make your own Cheat Codes - LightKingdom666 - 04-12-2023

(04-12-2023, 02:32 PM)Vega Wrote: That's a load pointer code which I personally hate. Assembly is always easier imo.

That code is checking a pointer (memory address value) located at 805c1c04. It will then use the pointer there (which will vary) to use as a storing reference.

The old mkwii license unlock codes are setup in a similar fashion

https://mariokartwii.com/showthread.php?tid=639

This code has a similar structure. Scroll down in that post you will see an ASM equivalent I've made. That will give you an idea of what is going on in such a code.

Either way these pointer codes are tough to port sometimes. Your best bet would be to get the version of the game for that code. Launch that game to character selection. Then go to 805c1c04 in a memory viewer. Find a nearby string to use as a porting constant and attempt to manually port. You won't be able to use or include the contents of 805c1c04 as part of your string for porting because the contents there always varies. Hopefully that makes sense.


https://mariokartwii.com/showthread.php?tid=113&highlight=How+to+port

Well, I understand your point (yes, the porting of the code better to save me the difficulty, or that's at least what I understood) but the problem is that, as I said before, the code is poorly done, because look, Mario Sports Mix It has 4 sports, which as I had already said are Basketball, Volleyball, Dodgeball and Hockey, the code only works in Basketball and Volleyball, while in Dodgeball it doesn't even load (the screen stays black) and in Hockey the game crashes at the time of throwing the puck into the goal (that's what I meant by the fact that the code was quite unstable).

But from what you say, apparently it is quite a complicated code to be created from scratch, which already says enough, considering you're more advanced than me, I think that I cannot even consider myself at least as a beginner (much less than that), the code I created was just my first code, and I had no idea how to create code until I came across your post.

In the same way, I will try to do what you told me to do (try to port the code to my version), and the last thing you mentioned about the best thing to do would be to try to get the version of the game for that code, it would not be an option for me (the code is PAL), since my Wii (yes, i still have one) is NTSC-U, and I want to have all the codes that I create/modify exclusively for that version, so I prefer the first option.

But hey, changing the subject in case portability doesn't work, I have another idea for another code (I suppose this should be easier), in Mario Sports Mix there are 2 teams, blue (you) and red (CPU), each team has a bar to do a special attack, said bar has 5 levels, and when those 5 levels are completed you can perform the special attack.

Well, the idea is to create a code so that the bar of the blue team (you) is always full, while the bar of the red team (CPU) never fills up, I also forgot to mention that for said bar to fill up varies depending on of sports, in Basketball it fills up when you throw the ball, in Volleyball when you catch the ball, in Dodgeball when you throw the ball, and in Hockey when you throw the puck, all this 5 times (because as I said before, that the attack bar specials has 5 levels, and 5 is the maximum).

It goes without saying that the idea already exists (yes, I mean, there are already codes for that), the downside is that none of them have worked for me (in any version, just to be clear), here I post them, it's not a code with many lines, so maybe I assume it's easier:

Blue Team: SP Modifier [Bully@Wiiplaza] - NTSC-U
04A4202C SSSSSSSSS

00000000 = Empty
3F800000 = Full

Red Team: SP Modifier [Bully@Wiiplaza] - NTSC-U
04A42030 SSSSSSSS

00000000 = Empty
3F800000 = Full

Both Teams: SP Modifier [Bully@Wiiplaza] - NTSC-U
0418B1CC SSSSSSSSS

FC20B090 = Empty
FC201090 = Full

Instant SP Bar Gain [hetoan2] - NTSC-U
0418B300 D0A5010C

Blue Team has Max SP [hetoan2] - NTSC-U
04A41F6C 3F800000

Blue Team: SP Modifier [Bully@Wiiplaza] - PAL
04A78B6C SSSSSSSSS

00000000 = Empty
3F800000 = Full

Red Team: SP Modifier [Bully@Wiiplaza] - PAL
04A78B70 SSSSSSSS

00000000 = Empty
3F800000 = Full

Both Teams: SP Modifier [Bully@Wiiplaza] - PAL
0418B250 SSSSSSSSS

FC20B090 = Empty
FC201090 = Full


RE: How to Make your own Cheat Codes - Vega - 04-13-2023

(04-12-2023, 07:14 PM)LightKingdom666 Wrote: Well, I understand your point (yes, the porting of the code better to save me the difficulty, or that's at least what I understood) but the problem is that, as I said before, the code is poorly done, because look, Mario Sports Mix It has 4 sports, which as I had already said are Basketball, Volleyball, Dodgeball and Hockey, the code only works in Basketball and Volleyball, while in Dodgeball it doesn't even load (the screen stays black) and in Hockey the game crashes at the time of throwing the puck into the goal (that's what I meant by the fact that the code was quite unstable).

I'm suprised that code works at all considering it's not meant for NTSC-U.

(04-12-2023, 07:14 PM)LightKingdom666 Wrote: But from what you say, apparently it is quite a complicated code to be created from scratch, which already says enough, considering you're more advanced than me, I think that I cannot even consider myself at least as a beginner (much less than that), the code I created was just my first code, and I had no idea how to create code until I came across your post.

In the same way, I will try to do what you told me to do (try to port the code to my version), and the last thing you mentioned about the best thing to do would be to try to get the version of the game for that code, it would not be an option for me (the code is PAL), since my Wii (yes, i still have one) is NTSC-U, and I want to have all the codes that I create/modify exclusively for that version, so I prefer the first option.

What about playing on ISOs w/ USB Loader? I personally have all 4 MKWii's (NTSC-U/J/K and PAL) on 1 USB stick and choose whatever one I feel like playing at the time (granted I only boot MKWii upon request for code help nowadays, haven't actually played in 2 years lol)

(04-12-2023, 07:14 PM)LightKingdom666 Wrote: But hey, changing the subject in case portability doesn't work, I have another idea for another code (I suppose this should be easier), in Mario Sports Mix there are 2 teams, blue (you) and red (CPU), each team has a bar to do a special attack, said bar has 5 levels, and when those 5 levels are completed you can perform the special attack.

Well, the idea is to create a code so that the bar of the blue team (you) is always full, while the bar of the red team (CPU) never fills up, I also forgot to mention that for said bar to fill up varies depending on of sports, in Basketball it fills up when you throw the ball, in Volleyball when you catch the ball, in Dodgeball when you throw the ball, and in Hockey when you throw the puck, all this 5 times (because as I said before, that the attack bar specials has 5 levels, and 5 is the maximum).

It goes without saying that the idea already exists (yes, I mean, there are already codes for that), the downside is that none of them have worked for me (in any version, just to be clear), here I post them, it's not a code with many lines, so maybe I assume it's easier:

Blue Team: SP Modifier [Bully@Wiiplaza] - NTSC-U
04A4202C SSSSSSSSS

00000000 = Empty
3F800000 = Full

Red Team: SP Modifier [Bully@Wiiplaza] - NTSC-U
04A42030 SSSSSSSS

00000000 = Empty
3F800000 = Full

Both Teams: SP Modifier [Bully@Wiiplaza] - NTSC-U
0418B1CC SSSSSSSSS

FC20B090 = Empty
FC201090 = Full

Instant SP Bar Gain [hetoan2] - NTSC-U
0418B300 D0A5010C

Blue Team has Max SP [hetoan2] - NTSC-U
04A41F6C 3F800000

Blue Team: SP Modifier [Bully@Wiiplaza] - PAL
04A78B6C SSSSSSSSS

00000000 = Empty
3F800000 = Full

Red Team: SP Modifier [Bully@Wiiplaza] - PAL
04A78B70 SSSSSSSS

00000000 = Empty
3F800000 = Full

Both Teams: SP Modifier [Bully@Wiiplaza] - PAL
0418B250 SSSSSSSSS

FC20B090 = Empty
FC201090 = Full

Fyi some games require a special hooktype for codes to be reliable. By default your HBC app (w/e you use to launch your games), uses the VBI hooktype (located in the Ocarina setting of said app). Try GXDraw or OSSleepThread.

If those codes still botch, recreating what you asked about shouldn't be too difficult. It reminded me of several DBZ BT3 codes I've made (ki, stock blasts, health etc).

Usually those type of things are Word or Halfword integers. Focus on your special attack bar first. If bar is zero search for zero. Get the bar to increase, continue the search but select "increased". When bar increases again, continue search using "increased" again. If decreases, continue search using "decreased", etc etc.

If you end up making this code successfully, it's a high chance the code will effect both Blue and Red team. If that's the case, you will need to learn about the "GVRs". as those may hold the key to "upgrading" the code to allow choosing between Blue vs Red

https://mariokartwii.com/showthread.php?tid=1962

You also mentioned about stumbling onto my post (How to Make codes thread). If you haven't ran into my "Noob to ASM Coder" index, I recommend it. If puts all the important ASM tutorials i've made into the order they should be followed in.

https://mariokartwii.com/showthread.php?tid=1114