Everything specific to the Nintendo Wii U lives here. The upstream game code
under ../planetblupi-master/ is kept pristine; the
only edits made there are small, #ifdef __WIIU__-guarded blocks, so upstream
stays easy to diff.
This tree is licensed under GPLv3+, same as the rest of the repository —
see the root LICENSE.
| Path | Purpose |
|---|---|
build-wiiu.sh |
Docker build wrapper (devkitPPC/WUT); configure / clean / shell |
CMakeLists.txt |
Out-of-tree build: globs ../planetblupi-master/src/*.cxx for devkitPPC |
cmake/wiiu-devkitpro.cmake |
Toolchain file |
compat/libintl.h |
Stub for gettext/libintl (the port is English-only) |
src/platform_wiiu.cxx |
Frame loop + VPAD touchscreen → SDL mouse + left-stick map scroll |
src/movie_wiiu.cxx |
FMV backend (demux + playback), replaces movie_stub.cxx |
src/cinepak.c / .h |
Self-contained Cinepak ("cvid") video decoder |
src/movie_stub.cxx |
No-op FMV backend (kept for reference; not compiled) |
assets/movie/ |
FMV transcoded to Cinepak .avi + Ogg .ogg, embedded in the romfs |
build-wiiu.sh mounts the whole project into the official
devkitpro/devkitppc Docker image and runs CMake + make there, so the host
only needs Docker and bash. The wiiu/CMakeLists.txt compiles the upstream
.cxx sources together with the src/ backends above and links the wiiu
SDL2 / SDL2_image / SDL2_mixer / SDL2_ttf portlibs, producing a self-contained
build-wiiu/planetblupi.wuhb with all freeware assets baked into the romfs.
./build-wiiu.sh # configure + build + package
./build-wiiu.sh configure # configure only
./build-wiiu.sh clean # rm -rf build-wiiu/
./build-wiiu.sh shell # interactive container shellEnvironment overrides: DOCKER, IMAGE, BUILDDIR, JOBS (see the script
header).
These are the non-obvious things that made the port work; the code comments at each site go into more detail.
-
Touch input is read directly from VPAD. The devkitPro SDL2 wiiu backend does not deliver the GamePad touchscreen as SDL mouse or finger events, so
platform_wiiu.cxxreadsVPADGetTPCalibratedPointEx(inVPAD_TP_854X480space) and synthesises SDL mouse events itself. VPAD is polled once per frame tick (polling every loop spin is very slow under emulation). -
Frame loop is self-paced. The upstream loop is driven by an
SDL_AddTimercallback that does not fire on this backend, so the wiiuPlatform::runpushesEV_UPDATEmanually fromSDL_GetTicks. -
Big-endian save format. The
.blplevel/demo/save files are little-endian on disk; on the PowerPC Wii U every multi-byte header/field is byte-swapped viaSDL_SwapLE*after reading and before writing (seedecio.cxxand the demo helpers inevent.cxx, both upstream files under#ifdef __WIIU__). -
TTF glyph cache disabled on wiiu. A
shared_ptr/unordered_mapteardown crashed on this GX2/libstdc++ combo, so text is rendered per frame and the textures freed with a one-frame defer (GX2 is async — freeing immediately caused a use-after-free glitch on multi-line labels). -
FMV is offline-transcoded. The desktop uses SDL_kitchensink/ffmpeg on
.mkv(Cinepak + MSVideo1 + Vorbis). All clips are transcoded to a single codec (Cinepak.avi+ separate Ogg) so only one small decoder (cinepak.c) is needed on-device. -
No GPU pixel readback.
SDL_RenderReadPixelsfrom a render target does not work on the GX2 backend (returns 0). Blupi hit-testing was fixed to sample the source surface kept in RAM instead — this also fixed selecting a Blupi by tapping its head during normal play.