OpenPayload, an open-source reimplementation of the Wiimmfi payload

      OpenPayload, an open-source reimplementation of the Wiimmfi payload

      I am proud to present my latest Wiimmfi-related project, OpenPayload!

      OpenPayload is an open-source reimplementation of the Wiimmfi payload for Mario Kart Wii. The reasons behind the project are the following:
      • An open implementation allows for potential improvements and additional vetting on the patches;
      • Not applying the patches at runtime means the game can connect to the server faster than it normally would;
      • Features can be integrated by mods or left out entirely.
      OpenPayload is an opinionated port, meaning that some features are not reimplemented and some others are implemented differently, in order to follow proper programming practices and provide cleaner, less bloated code. Major features that were not ported include:
      • Auto Reconnect: Benefits of this feature are seemingly nonexistent, and the amount of code added is too much to justify the effort;
      • Cheat Reporting: Since these are basically self-reports that generally do not lead to a ban (the reports themselves are not accessible to moderators), these hooks have been skipped. Once in-game reporting is properly implemented on both client and server side, porting will be considered;
      • Custom Error Messages: Due to this feature being prone to breakage, it has been chosen to rely on an offline set of fixed error messages instead. My version of the feature also displays the error code when the "disc error" occurs;
      • Frameskip: The amount of code and its unreadability proved too much to handle. A skill issue, one could argue;
      • IOS Operation Protection: This measure is extremely easy to bypass, offers no additional protection and only serves to make IOS access more annoying for mods.
      More details (including a list of hooks and changes) can be found on the GitHub repository.
      Interesting project. Not yet sure if I like or hate it, but I will definitely take a look at it asap and maybe comment on some parts.

      It's middle of the night for me right now so I didn't look at the GitHub yet but I do want to give a couple comments / explanations to the things you mentioned here.

      The auto reconnect feature has been suggested and implemented by MrBean, and it does seem to help quite a few people with a shady internet connection. Sure, it doesn't help with the peer to peer connections if these break, but maybe that'll be added in the future.

      As for the self-Reports, I agree that these aren't a high level of cheat protection and easy to disable (and discover) for anyone seriously looking for it. The reason they're still not implemented on wiimmfi and aren't visible to moderators is (as with many other things) that Wiimm didn't have time to implement that yet / considered other things as more important. If there's any suggestions to have some kind of client-based anticheat that would work a bit better without breaking a bunch of mods, I'm happy to hear about them.

      As for the custom error messages, what kind of breakage do you mean here? Conflicts when other mods also want to change text somewhere?
      When we introduced the payload we weren't sure if we would be using more custom error messages for other things so we didn't want to add a static list of messages and instead rely on the server. Though we didn't actually really use that feature, we're instead using the msg parameter in the Nas response to pop up an additional dialog message when needed (console assignment, DNS exploit, maintenance announcement, ...).

      As for Frame skip, I don't think these patches are really a lot of code. I can take a look at our source, but MrBean wrote that code part and he knows way more about how it works and what it does than I do.

      The fact that the IOS Open protection is easy to bypass is correct. It was added not to prevent mods from using IOS. It was introduced shortly after the payload was first released and given that the "brick other consoles" cheat code that was the reason for this whole payload used that, it seemed like a good 2nd level of protection in case the hackers found an easy workaround to our exploit patch (which they did not, thankfully).

      As for the Wiimmfi payload having bloated or shitty code in general - there is definitely parts of the code where I'm also not happy with its quality but I just haven't had the time for restructuring and/or rewriting it.

      I will take a look at your reimplementation and see if we can maybe use some of its parts instead of our old implementation, if you allow us to do that. The MIT licence is going to be a bit of an issue here. Of course I could follow the license and just throw the copyright texts at the end of the payload binary but that seems to be silly and wasting space which nobody can read without dumping the binary from RAM...

      DevkitPro Archiv (alte Versionen / old versions): wii.leseratte10.de/devkitPro/
      Want to donate for Wiimmfi and Wii-Homebrew.com? Patreon / PayPal

      Dieser Beitrag wurde bereits 0 mal editiert, zuletzt von Leseratte ()

      I forgot to mention that basically the entire code is currently untested and I'm still looking into getting some testing done. I can connect online fine and create a room, and i added tons of debug reports (that can be turned off) to check if the code is misbehaving.

      As for the mentioned features:
      • Like i said, I've never heard of anyone actually benefitting from this, because when would someone disconnect from the server and not to the other clients? Personally i think it just messes too much with the networking code, and i would rather not introduce further instability.
      • Simple received packet data validation and in-game reporting would already do a lot. Of course that would be completely impractical without an open source solution that mods can update at their leisure :)
      • Custom error messages break when there's a HTTP error and that looks fairly ugly, and yes the original Wiimmfi hook causes a lot of conflicts. The new code also makes the game display an error code when the online disc error occurs, so it also has upsides. Besides, i think the error code set used by Wiimmfi is fairly stable by now.
      • Frameskip wasn't meant to be skipped initially, but i really could not understand what the code was doing and i didn't feel like delaying the release further. I would be happy to try and port it in source form though.
      Obviously, i mean to keep this project updated in the future, so it would be nice to avoid needing extra reverse engineering work :)

      Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von CLF78 ()

      It's happened before. And also, it means we can do maintenance on Wiimmfi and stop the server temporarily and everyone will just be able to continue playing. In the past we were like "Okay, lets stop new races from occuring and kick players when their GP / race is over to not interrupt matches", but since we now have the auto-reconnect, when we need to do (pre-announced) maintenance we just hard-stop the server since normal clients (not using your payload) wouldn't notice anyways. Also, it makes some Wiimmfi server updates easier when we can just force-restart the whole GPCM process and it'll only impact the few players on other games, not players on MKWii. If you're fine with users of your payload getting kicked when that happens, I don't mind the auto-reconnect not being supported.

      As for the error messages, yeah, I agree, the HTTP error issue is stupid, forgot about that. We've always wanted to add some magic bytes to the Wiimmfi error message and only show the custom dialog when these bytes are present, but as with so many other things, didn't get around to doing that.

      I've skimmed through the code already and just posted a github issue where I've answered a bunch of the questions in the code's comments, and a couple comments / questions I have myself, maybe you can take a look and respond to that, too: github.com/CLF78/OpenPayload/issues/1

      DevkitPro Archiv (alte Versionen / old versions): wii.leseratte10.de/devkitPro/
      Want to donate for Wiimmfi and Wii-Homebrew.com? Patreon / PayPal

      Dieser Beitrag wurde bereits 0 mal editiert, zuletzt von Leseratte ()