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)
|
![]() |
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) |
RE: How to Make your own Cheat Codes - LightKingdom666 - 05-09-2025 (05-08-2025, 08:01 PM)Vega Wrote: So it appears there are two responsible instructions (funcs) that writes the character slot during character selection. Which is not too big of an issue. More code testing would need to be done to know which hook is best. Do you mean "li r3, 0" and "blr"? (05-08-2025, 08:01 PM)Vega Wrote: You cannot hook my code's source using the address you've found for numerous reasons: My question was more about why we have the exact same instructions but our addresses are completely different even though we are using the same region of the game. (05-08-2025, 08:01 PM)Vega Wrote: With all that being said, we simply change the Hook address to 0x815B59e8, and it should work as long as those character values you filled in are valid. What I wanted to know was why that code only works for me in Dolp hin but not on the Wii (it freezes when I select any character). RE: How to Make your own Cheat Codes - Vega - 05-09-2025 To your first question: No I'm talking about your hook instruction vs mine To your second question: We do have the same game, it's just for whatever reason, the game is using a diff func for setting slots in the character selection hence why you have a diff hook address after your Mem BP hit. This isn't a huge issue, in fact its pretty normal to stumble across incidents like this. To your last question: It does crash on Dolphin, its just that Dolphin has certain exceptions bypassed by default (which shouldn't be configured in my opinion). You can change this setting btw to more accurately replicate real hardware RE: How to Make your own Cheat Codes - LightKingdom666 - 05-09-2025 (05-09-2025, 01:30 PM)Vega Wrote: To your first question: No I'm talking about your hook instruction vs mine Okay, I understand, but... why do you say "More code testing would need to be done to know which hook is best" when in your case and in mine it's the exact same hook instruction? stb r5, 0x0498 (r3) (05-09-2025, 01:30 PM)Vega Wrote: To your second question: We do have the same game, it's just for whatever reason, the game is using a diff func for setting slots in the character selection hence why you have a diff hook address after your Mem BP hit. This isn't a huge issue, in fact its pretty normal to stumble across incidents like this. Isn't there a way to fix that? Does that guarantee that my code will always work regardless of the site where I download the games? (05-09-2025, 01:30 PM)Vega Wrote: To your last question: It does crash on Dolphin, its just that Dolphin has certain exceptions bypassed by default (which shouldn't be configured in my opinion). You can change this setting btw to more accurately replicate real hardware Yes, in fact, I notice that when I press the + button (in Dolphin), which is basically used to change the character's costume or color palette, I get this error: "Invalid write to 0x000084b4, PC = 0x80002370" I actually notice that depending on the character's slot, the "Invalid write to 0x00" varies considerably: Slot 0: "Invalid write to 0x000084a9, PC = 0x80002370" Slot 1: "Invalid write to 0x000084a9, PC = 0x80002370" Slot 2: "Invalid write to 0x000084b4, PC = 0x80002370" Slot 3: "Invalid write to 0x000084b4, PC = 0x80002370" Slot 4: "Invalid write to 0x000084a9, PC = 0x80002370" Slot 5: "Invalid write to 0x000084b7, PC = 0x80002370" I don't know if this has anything to do with it. But anyway, what could I do to fix the error so it doesn't crash on the Wii? RE: How to Make your own Cheat Codes - Vega - 05-09-2025 (05-09-2025, 06:23 PM)LightKingdom666 Wrote: Okay, I understand, but... why do you say "More code testing would need to be done to know which hook is best" when in your case and in mine it's the exact same hook instruction? Yes they are the same instructions but this instruction is at two diff hooks (locations/functions). As mentioned earlier, the game uses 2 (or more) funcs that involve a store instruction (i.e. the stb) to write the slot to the character packet in memory. Now why did you end up finding a different hook/func than me? It means under certain circumstances, "your" func is used by the game at times instead of "mine". Figuring out exactly why would require more analysis. Which one to use? Not sure, but in similar situations you may need to use both codes. Meaning you would use both C3 codes when running the game. It's crucial that you understand how C2/C3 codes actually work. 1. The Code Handler placees a backwards branch at the hook address (i.e. 0x815B59E8) replacing w/e instruction was originally there (i.e. default instruction, this is why C2/C3 codes need their default instruction in the source) 2. The backwards branch goes to where the rest of your code is located (determined automatically by the Code Handler, around 0x80002XXX memory) 3. The "00000000" final part of a C2/C3 code tells the code handler to use a forward branch (exact branch auto calc'd by Code Handler). 4. Once code has completed, forward branch goes to hook address + 4 (0x815B59EC) If the game doesnt execute the hook address, it means the code won't get executed. (05-09-2025, 06:23 PM)LightKingdom666 Wrote: Isn't there a way to fix that? Does that guarantee that my code will always work regardless of the site where I download the games? It just means we need to find a better hook, or it's the case where you need both C3 codes in your GCT/Cheat-Manager to ensure the character selection mods occur 100% of the time. It has nothing to do with what site you got the game from. (05-09-2025, 06:23 PM)LightKingdom666 Wrote: But anyway, what could I do to fix the error so it doesn't crash on the Wii? Your current code simply won't work for the reasons I've mentioned in my previous posts. Did you try the code I've created using your Hook? C35B59E8 00000008 7D8802A6 4800000D 030E0F03 0E0F0000 7D6802A6 396BFFFF 38600006 395B0470 7C6903A6 8C0B0001 9C0A0028 4200FFF8 7D8803A6 38600000 60000000 00000000 Btw if nothing happens (as if code doesnt exist), that means the game probably used my hook/func. Meaning you would need both codes applied. Here's mine if you need it C35B5268 00000008 7D8802A6 4800000D RRTTVVXX YYZZ0000 7D6802A6 396BFFFF 38600006 395B0470 7C6903A6 8C0B0001 9C0A0028 4200FFF8 7D8803A6 38600000 60000000 00000000 |