WiiXLaunch is a cross-platform C++ hooking framework for Nintendo Switch (AArch64 via ExLaunch), Nintendo Wii U (PowerPC via WUPS / libfunctionpatcher), and Cemu (PC Graphic Pack bare-metal code caves).
Write game mods once in C++, and build for Switch, Wii U, and Cemu (2.6+).
See overview.md for detailed documentation.
- Single C++ Codebase: Define hooks and memory patches once using ExLaunch-style syntax (
WIIXL_HOOK_DEFINE_TRAMPOLINE,Orig(...)). - Unified Config (
wiixlaunch.json): Manage project settings, memory sizes, Switch NPDM permissions, and Wii U Title IDs in one file. - ExLaunch Compatibility: Support for function replacement, trampolines, and raw memory patching (
CodePatch::Nop). - Game Modules (
vendor/wiixlaunch-botw): Pre-reverse engineered API methods for easy executable modding.
#include <wiixlaunch.hpp>
// Infinite Stamina in BotW: Switch 1.5.0 | Wii U v208
WIIXL_HOOK_DEFINE_TRAMPOLINE(PlayerStaminaHook) {
static void Callback(float amount, void* player) {
// Prevent stamina decrease by passing 0.0f
Orig(0.0f, player);
}
};
extern "C" void WiiXLaunch_Init() {
#if WIIXL_WIIU
if (!WiiXLaunch::Backend::InitWiiUBackend()) return;
#endif
// Install hook with (SwitchOffset, WiiUOffset)
PlayerStaminaHook::Install(0x00885bd0, 0x02d908b4);
}- Build Switch:
build_switch.bat - Build Wii U:
build_wiiu.bat - Build Cemu:
build_cemu.bat - Build All:
build_all.bat
cmake -B build/switch -DPLATFORM=SWITCH
cmake --build build/switchcmake -B build/wiiu -DPLATFORM=WIIU
cmake --build build/wiiucmake -B build/cemu -DPLATFORM=CEMU
cmake --build build/cemuTo package your compiled binaries into SD card and emulator folder structures:
python scripts/deploy.pyThis creates the output in deploy/:
- Switch:
deploy/switch/atmosphere/contents/<title_id>/exefs/(subsdk9+main.npdm) - Wii U:
deploy/wiiu/wiiu/environments/aroma/plugins/(<mod_name>.wps) - Cemu:
deploy/cemu/graphicPacks/<graphic_pack_name>/(rules.txt+patch_<mod_name>.asm)
Licensed under the GNU General Public License v3.0 (GPL-3.0).
WiiXLaunch builds upon and integrates the following open-source projects:
- ExLaunch - Created by shadowninja108 and contributors. Provides the AArch64 inline hooking engine, NSO loading, and memory patching for Nintendo Switch.
- WiiUPluginSystem (WUPS) - Maintained by wiiu-env (Maschell and contributors). Provides the plugin architecture and Aroma integration for Nintendo Wii U.
- libfunctionpatcher - Maintained by wiiu-env. Provides PowerPC function patching and memory page permission handling for Wii U.
- wut - Maintained by devkitPro (fincs and contributors). Provides C/C++ headers and OS bindings for Nintendo Wii U homebrew.
