MKW LAN Mod Guide [w/ USB Loading & Gecko Codes]
#1
Ramble-y Preamble: Feel Free to Skip

So, I had a MKW LAN party late last year using DWC emulator, and while it went great, I don't think I'll ever bother to set up (or maintain/keep around) DWC emulator again, since its honestly kind of a pain in the ass, and it doesn't seem to have been maintained in a few years now, so it'll only continue to be more and more of a pain in the ass as time goes on.

So, I wanted to find a better solution that wasn't "Fuck it, I'mma just use Wiimmfi", so I turned my attention back to the MKW LAN mod made by Chadderz and MrBean35000vr. The reasons I hadn't used it then were pretty simple: I couldn't USB Load with it (big deal breaker, this game is like $40 a pop!), I couldn't run any Gecko codes with it (I need my 150cc), and it doesn't work in Dolphin (which is through no fault of the mod as far as I know, its an issue with Dolphin, sadly). Well, I managed to find solutions to both how to USB load it, and how to run Gecko codes alongside the LAN mod, making it much easier to set up a LAN party without nearly as much fuss.

I set to work first to figure out how to get it to USB load. I already knew it couldn't be ISO patched at all, and while its not impossible for BrainSlug module support to be added into a USB loader directly, no one has done it. I've got to use the BrainSlug boot.dol no way around it. Well, it just so happens I lucked, out: You can go into your game settings and simply enable alternate dol and place the BSlug .dol according, and the USB loader will load BrainSlug, and then BrainSlug will load its modules and then the game .dol like a charm. I can't believe I didn't think to do that before, but now I don't have to worry about spending tons to get 6 copies of Mario Kart Wii.

The biggest effort I had to put in was not having Gecko Codes of course. The first thing I tried was turning on Ocarina codes in USB Loader GX, and no dice. Nothing changed. In the same vein as the last problem, I also tried to see if I could get BrainSlug to load GeckoOS or the other way around, and then load into the game, but I just couldn't find any way to do this. Finally, I simply tried to patch the codes into the game's main.dol with wstrt, and again nothing. Nothing changed at all even though no vanilla dol was available! Well, I guess BrainSlug just wacks off extra hooks or something, and there ain't much to change about that.

If I'm getting cheats to run with the LAN Mod, its going to be in BSlug module form. Originally I had no clue how to pull off making a Gecko codehandler module, and in this guide's original form I had instead just figured out how to do basic RAM writes directly to convert basic 00/02/04 codes into stand alone modules. For what it was worth, it did its job fine enough, but it left ASM/C2 codetypes unusable, and still had a lot to be desired tho. Thankfully InvoxiPlayGames dropped me some great info in this thread, and helped me out in Discord DMs, and I was able to make a complete Gecko codehandler module that loads GCTs right from the SD card. Its ended up being really simple (much simplier than coverting codes into modules lol), and it works for any game too. I can't really say I can take credit for it though, IPG basically make the code for me, and while I managed to figure out a good bit of it on my own before that I wouldn't have gotten anywhere without her, so big shout outs to InvoxiPlayGames!

I've left the old code conversion modules I made in the post below, if you happen to be interested for whatever reason.



MKW LAN Mod: Pros & Cons, Requirements

Requirements:
* All Wiis will need to have the homebrew channel installed (and cIOS if you plan to use a USB loader). Check out https://wii.guide/ for a good tutorial on Wii, and https://wiiu.hacks.guide/ on Wii U.
* You'll need at least half as many Wiis as you do players (you can have 1 or 2 players per Wii), 1 TV per Wii, 1 controller per player, and a router to network them all together. If you're at a huge event (tournament, convention, etc) you might want to be mindful of all the wireless talk around and use ethernet if you can, but otherwise Wifi works just fine.

Pros:
+ Simple, easy
+ Doesn't require any extra computers, just Wiis
+ Can be used with a USB loader and Gecko codes, for custom tracks and more

Cons:
- Can't use Dolphin (emulator bug)
- Can't invite remote players, if the whole gang can't be there in person
- Does not support NTSC-K (intentional crash)

If you know your way around Linux, got an extra computer/VPS/Rasberry Pi, and want to suppliment your Wiis with PCs running Dolphin and/or want to invite remote friends to join in, you'd be better off using DWC Emulator (or if you're not good with Linux, saying fuck it and using Wiimmfi).

If you just want simple and easy, and you've got enough Wiis, this is the guide for you.



Tutorial: How to get set up and running

0) Ensure you have a disc copy of MKW, or have a WBFS of the game on your USB and ready to rock for each Wii (U) console you will be using. You can use discs and WBFSs in any mixture, you just need 1 per Wii. Every following step will focus on just one Wii, repeat for each Wii.

1) Download the MKW LAN mod from here: http://www.chadsoft.co.uk/downloads/LAN_MKW_v0.9.zip

2) Copy the contents of the release folder to the root of your SD card.

2.1) If you are USB Loading, you will need to make a copy of the boot.dol file in the /apps/brainslug folder and move/rename to the appropriate location to use it as an alternate dol. For USB Loader GX, you should rename boot.dol to RMCE01.dol (for NTSC-U, use RMCP01 for PAL, and RMCJ01 for NTSC-J) and put it on the root of your USB or SD card.

3) If you want to use Gecko Codes (ex: Force 150cc in Friend Rooms), download the attached files on this post for a zip folder containing a Gecko codehandler BrainSlug module, and copy the contents to the root of the SD card (you should have 4 new .mod files in /bslug/modules). Then just make a GCT of all the codes you want to use (https://mkwii.com/gct) and copy it to /codes/RMCE01.gct (RMCP01 for PAL, RMCJ01 for JP). You only need to make the GCT once, you can copy the same GCT for every Wii.

4) Once you have everything copied over, insert your SD card (and USB) into your Wii and turn it on. If you are playing on a disc, you can just launch BrainSlug from the homebrew channel. BrainSlug will now load all your modules and boot the game. This Wii is now ready to go, rinse and repeat this process for all Wiis.

4.1) If you are USB loading, launch your USB loader, and turn "alternate dol" on, then launch the game. You should see BrainSlug appear and start loading modules. It should boot into the game once it is done. This Wii is now ready.

Pro tip: BrainSlug modules are loaded entirely into RAM, so once the game boots you can remove the SD card and reuse it on the next Wii!

5) Now that all the Wiis are ready, if they are all set up on the same network, you should be able to hit 1 or 2 player LAN Multiplayer on all of them, have one of them open a room, and the rest of them can check the friends list and join the host. Thats it! Its time to play!



Misc Notes

Just some useful observations that I honestly don't know where to put.

1) The Gecko codehandler module I made and provided in this post has a GCT limit much lower than you'd normally expect out of other codehandlers. Your GCT can only be about ~230 lines long or 1880 bytes long. Any longer, and you'll get a crash on the strap screen. I'm honestly not entirely sure what the issue is, since I swapped the USB Gecko modules codehandler with JoshuaMKW's full codehandler, which is supposed to do up to 450 codes. Source code is provided with the Gecko codehandler module, so if you think you can extend/increase the modules GCT space before it crashs, feel free to give it a crack.

TL;DR: Keep your GCT under 230 lines of gecko codes. This shouldn't be too hard to do, so long as you stay away from MrBean's item rain code (or other obscenely long codes). That thing is 201 lines alone! Yeesh!

2) Despite being able to use alternate dol in USB Loader GX to load BrainSlug and then load into the WBFS, trying to load into BrainSlug from Riivolution just results in a crash. BrainSlug seems to shake off hooks or something as it boots, which includes ingoring sections of the dol it is booting. Even tho you can inject a GCT directly into MKW's dol file with wstrt, it does nothing after BrainSlug boots it. This is probably due to how BrainSlug modules work, being relocatable ELF files in a similar way to how StaticR.rel works, and Brainslug ends up dropping the dol section with the GCT. Due to the above two factors combined, you won't be able to use an Riivolution mod packs you already have with the LAN mod. InvoxiPlayGames does have a Emvolution module that reads game files off the SD card similar to Riivolution, but it currently requires you complie the module yourself to use your own list of file replacements, so I wouldn't recommend it for casual player. A modded WBFS works better, since a lot of mods out there provide a pre-made WBFS, but most all mod packs now a days both use some Gecko code or another somewhere, and usually embed it into the game dol, so even with a pre-made WBFS, you'll still be missing the critical Gecko codes other parts of the mod may rely on if launched with BrainSlug.

TL;DR: While its possible to play with custom tracks using this guide, its beyond the scope of this guide to help you do that. If you don't have the tech know how to do it, tehn you should just use CTGP instead. It has the LAN Mod built in, and you get access to all of CTGP's usual features. All you have to do is install CTGP and change your online setting from Wiimmfi to LAN in the CTGP channel. This will mean you'll need a real disc for every Wii though, so I hope your wallet is ready.



Conclusion: Thanks to all you dedicated modders

Honestly, I already put all my words (too many words!) into the rest of this thread, so I don't have too much more to say. A massive thanks and shout out to all the dedicated modders out there that have done so much to learn and document so much stuff about the Wii and modding it, Mario Kart Wii and how it works, as well as mod the game to hell and back with ASM cheat codes, custom tracks, and just tons of insane work I can't even begin to mention like the LAN Mod this guide is about, and all the tools and info out there to be find and used. I wouldn't have been able to do any of it if I didn't have all this stuff to use as a foundation. Thank you all so much!

I'd especially like to give a shout out to InvoxiPlayGames, thank you so much for the help with making a Gecko codehandler BrainSlug module!


Attached Files
.zip   Gecko Codehandler BrainSlug Module.zip (Size: 40.02 KB / Downloads: 54)
Reply


Messages In This Thread
MKW LAN Mod Guide [w/ USB Loading & Gecko Codes] - by Yuri Bacon - 08-31-2021, 11:17 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)