Resources and links
Everything we read while building this, grouped by layer, with a note on what each one told us. Started 2026-11-03. Every external link was checked that day. dolphin-emu.org refuses scripted requests, but it opens fine in a browser.
Wii homebrew in general
- WiiBrew: the community wiki. Start here for anything about the console, its hardware, or homebrew tools.
- Homebrew Channel: the launcher homebrew runs from, and the
apps/<name>/boot.dol+meta.xmllayout it reads from SD or USB. - wii.hacks.guide: the softmod guide most people follow to install the Homebrew Channel.
- wiiload: sends a
.dolto the Homebrew Channel over the network. It ships in the devkitPPC image at/opt/devkitpro/tools/bin/wiiload. - Running GameCube homebrew on the Wii and Gcube: the Wii-mode versus GameCube-mode split. We target Wii mode, which is what gives us the Wiimote and MEM2.
Toolchain
- devkitPro: Getting Started: the official install route. We use the Docker image instead.
- devkitpro/devkitppc on Docker Hub: the image
scripts/dkpruns. As pulled on 2026-11-03 it carries libogc 3.2.1, wii-sdl2 2.28.5, wii-opengx 0.17.0, newlib with pthreads, and portlibs including lz4 and zlib. - libogc and its API docs: the Wii's system library.
- devkitPro's SDL fork,
ogc-sdl-2.28branch: the SDL2 the image ships. - OpenGX: OpenGL 1.x over the GX GPU.
- The image's own examples, at
/opt/devkitpro/examples/wii.
Two toolchain facts that each cost a probe:
powerpc-eabi-gcc -mrvldefines__wii__,HW_RVL,__PPC__,PPCand__BIG_ENDIAN__, but not__powerpc__.- The image only puts devkitPPC on
PATHfor a login shell.docker run image cmddoesn't get it, so our scripts passPATHexplicitly.
Dolphin
- Dolphin: installed with
brew install --cask dolphin(build 2609a here).Dolphin --helplists the command-line options, and-C System.Section.Key=Valuesets any config value for one run, which is howscripts/dolphin-shotturns on MMU emulation and logging without touching ini files.
Scripting Dolphin's emulated Wiimote
- Dolphin
Core.cpp,UpdateInputGate: every controller expression reads 0 while the game window isn't focused, unless background input is on. - Dolphin
MainSettings.cpp:MAIN_INPUT_BACKGROUND_INPUT,Input.BackgroundInput, default false. We set it with-C Dolphin.Input.BackgroundInput=True. - Dolphin
WiimoteEmu.cpp,Wiimote::LoadDefaults: the Mac's default mapping (left click A, right click B, arrows for the D-pad, Return for HOME, middle click to shake, no tilt keys). - Dolphin
QuartzKeyboardAndMouse.mm: the Mac key names an expression can use, such asSpaceandReturn. - Dolphin
FunctionExpression.cpp: the functions a controller mapping can use (timer,sin,toggle,pulse, ...).timer(s)is a 0-to-1 sawtooth everysseconds. - Dolphin
WiimoteSettings.cpp: Wiimote 1 defaults to the emulated source.
raylib
- raylib: we vendor the 6.0 release source unmodified.
- raylib #1732: an older GL 1.1 build regression. Not a problem in 6.0, but it explains why GL 1.1 builds are rare.
- raylib-extras game-premake: the one place we found pairing raylib's SDL backend with GL 1.1.
- No earlier raylib port to the Wii turned up on GitHub or WiiBrew.
The keyboard crash, source by source:
- libwiikeyboard
keyboard.c:KEYBOARD_Initreturns before__lwp_queue_init_empty(&_queue)when USB init fails, andKEYBOARD_GetEventdoesn't check. - SDL
SDL_ogcvideo.c: callsKEYBOARD_Init(NULL)and ignores the result. - SDL
SDL_wii_main.c: SDL's ownmainfor the Wii, which callsWPAD_Init(). A raylib app has to includeSDL_main.hto get it. - SDL
SDL_ogcevents.c: every remote's IR pointer is sent as the same SDL mouse. - SDL
SDL_ogckeyboard.c: callsKEYBOARD_GetEventevery frame. - The only open libogc issue mentioning keyboards, #256, is about something else.
Chez Scheme
- Chez Scheme: we build tag
v10.4.1from a local clone. ChezScheme/BUILDING: the--pb,--pbarchand Emscripten sections, which describe portable bytecode and booting from embedded boot files.ChezScheme/s/cmacros.ss: the machine type list wherepb32b/tpb32blive.ChezScheme/c/version.h: per-OS kernel configuration. The__EMSCRIPTEN__branch is what our__wii__branch is modelled on.- devkitPro newlib's
sys/iosupport.h(in the image, and in devkitPro/newlib on thedevkitProbranch): the__syscall_tls_*and__syscall_thread_detachhooks libogc leaves unimplemented.
jolt
- jolt, and #375, the cross-compilation issue that produced
jolt build --target. jolt/tools/cross-compile/README.md: target packs,make-pack.sh, and the cross builds that were verified before this one.jolt/host/chez/hasheq.ss:define-width-opand its comment about cross builds to narrower targets.- jolt's
CHANGELOG.md, the #801 entry: the 32-bit hash engine fix, and the note that other host code still uses checked fx ops on int-width values. jolt/host/chez/build.ss: the generatedcompile.ssandmain.c, and where$JOLT_TARGET_CC,link-libsand the xpatch come in.
Prior art in our own trees
~/dev/jlt-commons/raylib-ios: jolt ontpb64lwith raylib and SDL2 statically linked, and the "who owns thread 0" design notes. The closest relative of this project.- jasalt/jolt-wasm-raylib-experiment: jolt on
tpb32lunder Emscripten. It found that jolt needs the threaded machine type (the non-threadedpbaborts atmake-mutex), and it's where the #801 hash fix came from.
libogc source we read for the console bug
libogc/exi.c,WriteUARTN: rewrites\nto\rin the caller's buffer.libogc/console.c,consolePrintChar:\nstarts a new row,\ronly returns to column 1.