Hacking [Question] Applying Gecko Codes to Wii VC Titles?

aasfhls

Member
OP
Newcomer
Joined
Nov 1, 2017
Messages
13
Trophies
0
Age
44
XP
93
Country
United States
I'm currently having some trouble getting Gecko .gct files to work with Virtual Console titles. I would like to apply certain Gecko codes onto Mario Kart Wii, like the Change Characters in Worldwides code, but can't seem to find a way to do so. Is there any way to do this? I know I could play the game through vWii and use Gecko codes there, but I would rather play it as a Wii U VC install as it supports the Gamepad. Any help would be greatly appreciated!
 

damysteryman

I am too busy IRL these days...
Member
Joined
Oct 4, 2007
Messages
1,223
Trophies
1
XP
1,129
Country
Antarctica
Hmm... Interesting.
Well, I have not touched Wii / WiiU stuff for a long time now, but AFAIK it should be possible if you embed the gecko codehandler.bin file and .gct file into the Mario Kart Wii .iso file by using the DOLPATCH command inside Wiimm's WIT tool, then rebuild the VC title wsith the modified .iso, then reinstall it.

My WiiU is packed away, so I cannot test it out right now, maybe you could give it a go and report the results here?
 

damysteryman

I am too busy IRL these days...
Member
Joined
Oct 4, 2007
Messages
1,223
Trophies
1
XP
1,129
Country
Antarctica
Alright, did some more research, and found out that Wiimm's SZS Tools can do what I suggested quite easily...

...so using that, I made a little script pack thingy that can easily Embed your .gct file into your Mario Kart .iso!
I idea here is that, you would embed your .gct into the .iso, then inject the .iso into the the Wii VC for install on your WiiU.

@aasfhls could you please give this a go, and post the results here?
https://www.dropbox.com/s/q0g20rh40tjgktu/Easy_Wii_ISO_gct_Cheat_Embedder_v1.00_dmm.zip?dl=0

How to use:
1. Download that and extract it into a folder somewhere
2. Grab your .gct file for your game and put it into the "gct" folder (make sure your .gct has its proper GameID name (For Example: RMCE01.gct for Mario Kart USA version)
3. Drag and drop your Wii .iso onto the "Drag ISO file here.bat" file

Also, if anyone else is interested in quickly trying this out and post feedback here, that would be awesome.
 

MichiS97

"Leftist snowflake milennial"
Member
Joined
Jun 14, 2011
Messages
1,832
Trophies
3
Age
27
Location
Munich
XP
3,846
Country
Germany
Would be great if we could do this for all games, not just Mario kart. Though I suppose you could just HEX edit the main.dol to get ASM based cheats working. Dolphin supports breakpoints, right?
 

damysteryman

I am too busy IRL these days...
Member
Joined
Oct 4, 2007
Messages
1,223
Trophies
1
XP
1,129
Country
Antarctica
I only tested it with Mario Kart, but it should with just about any Wii game.
(as long as the codes you are using do not require a custom code handler)

Try giving it a go and letting us know how you go :)

Just make sure your .gct file is named with your game''s GameID.
For Example:
RMCx01.gct for Mario Kart
RMGx01.gct for Super Mario Galaxy
SMNx01.gct for New Super Mario Bros. Wii
RZZx8P.gct for MadWorld
...etc.

...where x = J, E, or P depending on then game's region.

That said, most .gct creator apps usually do name them properly like this anyway, but I thought I would point it out just to be sure.

As for editing the .dol, this tool actually uses wszst to add the gecko code handler and the gct as extra sections in the .dol to accomplish what it does.
 
Last edited by damysteryman,

aasfhls

Member
OP
Newcomer
Joined
Nov 1, 2017
Messages
13
Trophies
0
Age
44
XP
93
Country
United States
Alright, did some more research, and found out that Wiimm's SZS Tools can do what I suggested quite easily...

...so using that, I made a little script pack thingy that can easily Embed your .gct file into your Mario Kart .iso!
I idea here is that, you would embed your .gct into the .iso, then inject the .iso into the the Wii VC for install on your WiiU.

@aasfhls could you please give this a go, and post the results here?
https://www.dropbox.com/s/q0g20rh40tjgktu/Easy_Wii_ISO_gct_Cheat_Embedder_v1.00_dmm.zip?dl=0

How to use:
1. Download that and extract it into a folder somewhere
2. Grab your .gct file for your game and put it into the "gct" folder (make sure your .gct has its proper GameID name (For Example: RMCE01.gct for Mario Kart USA version)
3. Drag and drop your Wii .iso onto the "Drag ISO file here.bat" file

Also, if anyone else is interested in quickly trying this out and post feedback here, that would be awesome.
Thank you for making this script! I'm still having trouble getting the codes to work, however. I'm trying to use Gecko codes alongside the Wiimmfi custom online servers patch, so that might also be an issue. Here's what I did:
1. I used your tool to patch the .gct code I wanted (Mario Kart Wii's Change Characters in Worldwides code) to my .iso file
2. Then, I used the MKW Wiimmfi tool to patch Wiimmfi onto my .iso
3. After that, I converted my .iso into a Wii U VC title

The game booted up fine and everything, however, it froze when I entered the Worldwide's VR/course select screen, when that code is used. I tried patching the iso again, only this time patching Wiimmfi first and then patching the .gct, but I got the same result. Since the code is online-based, I have not tried out your tool without the Wiimmfi patch.
Is there any way to use .gct codes while also having Wiimmfi active?

Edit: I tried using an offline-based code now. This time, I used a VR modifier code without Wiimmfi being patched into the .iso. The code worked just fine, so I'm certain that Gecko .gct codes and the Wiimmfi patch clash with each other, causing it to not work properly. Would it be possible to create some sort of tool or editor that could add both without having it conflict with each other?
 
Last edited by aasfhls,
  • Like
Reactions: salmon01

damysteryman

I am too busy IRL these days...
Member
Joined
Oct 4, 2007
Messages
1,223
Trophies
1
XP
1,129
Country
Antarctica
Hmm... a conflict between the two could very well be the case...
If that is so, it might be beyond me to fix that, as that would require that either the Wiimmfi patch or Gecko Code itself be modified to accommodate the other, which is not something I know much about.

BUT, just to double check before drawing this conclusion, could you please do one more test?
Basically, could you please do what you mentioned in your first post, that is, just run the Wiimmfi-patched Mario Kart .iso in vWii, and load the your gecko code on it the normal way (such as via a loader homebrew), WITHOUT using my script, and tell us the results?

For example:
Does loading the Gecko Code on the Wiimmfi-patched .iso the normal way via Disc Loader/USB Loader/similar homebrew work fine?
Or does the same problem happen when loading this Gecko code the normal way?
 

aasfhls

Member
OP
Newcomer
Joined
Nov 1, 2017
Messages
13
Trophies
0
Age
44
XP
93
Country
United States
Hmm... a conflict between the two could very well be the case...
If that is so, it might be beyond me to fix that, as that would require that either the Wiimmfi patch or Gecko Code itself be modified to accommodate the other, which is not something I know much about.

BUT, just to double check before drawing this conclusion, could you please do one more test?
Basically, could you please do what you mentioned in your first post, that is, just run the Wiimmfi-patched Mario Kart .iso in vWii, and load the your gecko code on it the normal way (such as via a loader homebrew), WITHOUT using my script, and tell us the results?

For example:
Does loading the Gecko Code on the Wiimmfi-patched .iso the normal way via Disc Loader/USB Loader/similar homebrew work fine?
Or does the same problem happen when loading this Gecko code the normal way?
I've tested out the Gecko code on a Wiimmfi-patched .iso through USB Loader, and it worked fine there. I'd assume the issue happens when both Wiimmfi and the Gecko code get patched onto the iso file.
 

damysteryman

I am too busy IRL these days...
Member
Joined
Oct 4, 2007
Messages
1,223
Trophies
1
XP
1,129
Country
Antarctica
Yeah, it definitely seems that way... I am not having much luck here...

I have been researching and attempting various things over the last several hours, but I am not making any progress...
I found a copy of the Gecko code you were talking about, and noticed it was injecting extra code (ASM) to the game on the fly to pull off what it does, but it was hooking into code that didn't seem to be part of the game's main.dol (which is its main executable file). Apparently, some of Mario Kart's code is inside another file called StaticR.rel which I don't know anything about...

That said, I converted the Gecko Code back to regular ASM code, and tried using the WIT DOLPATCH command to add it into the .iso manually, removing the need to inject the gecko codehandler into the .iso, but Dolphin softlocked when I tested that.
I do not know what else the USB loader is doing differently, aside from not having to add the gecko codehandler and .gct file to the .iso.
Also, I do not know how the WiiU's Wii VC channel's code actually handles the Wii .iso or if it does anything weird or not.

So I cannot figure out the root cause of the conflict or how to solve it... Sorry about that, but that is beyond my knowledge. You may need to find a Wii/WiiU hacker who knows a lot more about Mario Kart Wii hacking, Ocarina codes, and how the WiiiU Wii VC works I am afraid...

The only other thing I can think of is:
What if you made a USB Loader that could autoload Mario Kart, make a homebrew .iso out of that USB Loader, then inject THAT into a Wii VC Channel?
It is a real dumb idea, but I wonder what would happen if someone tried that?
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,745
Trophies
4
Age
46
Location
Engine room, learning
XP
15,689
Country
France
USB Loaders can't be used in WiiU WiiVC mode, IOS can't be reloaded to cIOS. USB is disabled.
SD is available, but without wbfs lib patched in cIOS it can't read the ISO.
Maybe injecting geckoOS or Wiiloader, which are used to load the "mounted disc" with external cheats could work. but the "mounted disc" would be the injected iso with geckoOS, not the wii ISO.


someone asked me the same things not long ago but for WiiWare, and I suggested wiimm's dol patcher, but I didn't know how or where to put the codehandler in the dol.
I forgot about szs, thanks for reminding me and doing a script to patch the dol!

how do you convert the cheat to ASM and insert it to the dol ? you recreated all the conditions (if/else, etc?) for button check, and memory check, and then place the ASM at the location the code handler should be?


It's nice seeing you here and still doing things for users :)
 
Last edited by Cyan,

damysteryman

I am too busy IRL these days...
Member
Joined
Oct 4, 2007
Messages
1,223
Trophies
1
XP
1,129
Country
Antarctica
Ah OK, I have been out of the loop with WiiU stuff for a while, so I did not know any of that... well, that makes things difficult :lol:

WIT's DOLPATCH command can also be used to add new Text and Data sections to the dol, to add the codehandler and .gct file (which is what I used when making this a while ago), rather than trying to overwrite unusued space already inside the dol.
And yeah, I discovered that the WSTRT tool inside of WIimm's SZS Toolset has an "--add-section" option to it's PATCH command, specifically for easily adding .gct files to .dol files only a few days ago, when I first researched solutions to OP's specific request here. So for this script, I just had to unpack the iso, use that feature in WSTRT then repack, which was much less work for me than using WIT's DOLPATCH command :lol:
So, in this case AFAIK, WSTRT adds the codehandler to the end of the .dol as a new Text section, to be loaded to RAM address 0x80001800, along with the .gct file as a Data section, then patches the .dol to hook the codehandler into the game. I think it uses the VI hooktype by default.

As for the that code, I tried this code, made my MrBean35000vr. The Code is already a few compiled ASM routines, but in Gecko Ocarina Code form. I just had to omit the Gecko-specific stuff, recalculate a few Branch commands to point to where I placed the code in RAM, then add them as new sections to the .dol manually using WIT's DOLPATCH command. But loading it in dolphin failed wth a softlock; It looks like dolphin failed/refused to load this manually-patched .dol, since my memory viewer displaying all 00s in RAM where the dol should have been.

Thanks, and you too man, looking at the forums, I see you are still helping users here. :)
As for me, I sometimes lurk, but hardly log in, usually just too busy with life. But OP's rather interesting and specific request here really caught my attention :lol:
 
  • Like
Reactions: Cyan

wolf_

Well-Known Member
Member
Joined
Jan 22, 2012
Messages
521
Trophies
1
Age
43
XP
1,646
Country
United States
anyone know if its possible to inject cheats into wii vc wads? id like to play vc with gamepad support
 

salmon01

Well-Known Member
Newcomer
Joined
Sep 15, 2017
Messages
57
Trophies
0
Age
23
XP
934
Country
United States
Sorry to bump this, but I was wondering, does this script work for any ASM Inject (C2) codes? I already tried to inject one of this type into SMG2, to no avail. Thanks for the tool, regardless!
 

ppPooPoo69420

Member
Newcomer
Joined
Jan 8, 2021
Messages
5
Trophies
0
Age
26
XP
70
Country
United States
Hello everyone, I took a look at this yesterday for COD Black Ops Wii and came across the issue with the .gct file not being found. However I took a look at the actual batch code and realized that what wasn't being recognized was actually the game ID, as it should be printed on that line before ".gct not found" or whatever it was...

I got it supposedly working for Black Ops by explicitly setting the Game ID and FILENAME location. I also ran this script in administrator mode and navigated to the corresponding script location, running it as a batch file (.bat) and passing the ISO as a parameter with .iso at the end. Some of this stuff, like possibly the explicit setting of the game ID in the batch file may not be needed, and I plan to look some more at this later hopefully. I'll attach my edited "Drag ISO file here" script file in plain text below:

To wrap this all up, I was able to actually extract and repack the game ISO but have seen no change in behavior with the attached gct file... I'm yet to test in on an actual Nintendo Wii later today, as I've been testing the ISO/it's VC injection for wii u, so far, again hopefully.

If someone has the time to read all this, care about it ;), make sense of it, change the script to their ISO info, and test it on native hardware, that would be cool. I plan to change the original script posted by @damysteryman to allow its intended purpose, (not having to explicitly declare and define ISO files and locations etc..).
 

ppPooPoo69420

Member
Newcomer
Joined
Jan 8, 2021
Messages
5
Trophies
0
Age
26
XP
70
Country
United States
Hello again everyone! I tested the Black Ops Wii ISO on a Nintendo Wii and am able to confirm that the gecko code was patched within the iso successfully. Unfortunately and oddly, it doesn't look like it applies successfully as a Wii U virtual console injection. It may just work as a Wii U virtual console injection on a game by game basis though. I have also completely updated the "Drag ISO file here" script and it should be working successfully for every game ID, if a correct gct file is created. Thanks to @damysteryman for the original script, and if you could offer feedback on the things I changed between your original and the one I have updated below that would be appreciated! In order for this to work, download my script file attached below, and move it to the same directory as the original "Drag ISO file here" script, click yes to allow overwrites/replacing, or delete the previous version of the script. Then drag your iso to the batch file like before!
 

Attachments

  • Drag ISO file here.txt
    1.8 KB · Views: 230

elbassman

Member
Newcomer
Joined
Mar 27, 2020
Messages
7
Trophies
0
Age
38
XP
78
Country
United States
I want to inject Call of Duty Black Ops into wiiU for gamepad support, but this requires Gecko codes embedded and to not be patched for Wiimmfi, since it uses Activision servers.
I used the "Easy Wii ISO GCT Embedder" and it seems to complete fine.
The game loads with gamepad support just fine.
BUT, I'm not getting online connection.
I know my iso and codes are fine since I play online all the time using USBLoaderGX

Sooo, I'm not sure if the codes aren't being embedded or if it's being patched for Wiimmfi support.

Anyone else accomplish this or have any ideas?

Greatly appreciate all the previous info!
 
Last edited by elbassman,

ppPooPoo69420

Member
Newcomer
Joined
Jan 8, 2021
Messages
5
Trophies
0
Age
26
XP
70
Country
United States
I want to inject Call of Duty Black Ops into wiiU for gamepad support, but this requires Gecko codes embedded and to not be patched for Wiimmfi, since it uses Activision servers.
I used the "Easy Wii ISO GCT Embedder" and it seems to complete fine.
The game loads with gamepad support just fine.
BUT, I'm not getting online connection.
I know my iso and codes are fine since I play online all the time using USBLoaderGX

Sooo, I'm not sure if the codes aren't being embedded or if it's being patched for Wiimmfi support.

Anyone else accomplish this or have any ideas?

Greatly appreciate all the previous info!
Hello elbassman, I had successfully packaged the code you're referring to into the iso like you did, but for some reason the wii u handles the code(s) differently than the wii does. I think the code to remain online in black ops wii would have to be remade by someone who actually knows how to create a gecko code from the ground up. I also packaged an infinite ammo code in with the iso, and it works on the wii, but has different behavior on the wii u vwii installation.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Kirbydogs @ Kirbydogs: sometimes how I feel with life in general, gonna subscribe to the guy