From 3a72dd6bee44a0506db077e93abab5769838d9e4 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Wed, 15 Apr 2020 02:38:38 +0100 Subject: [PATCH] Add Wii U compilation instructions to readme --- README.md | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a4432505..86385af7 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,8 @@ Many months of copypasting and tinkering later, here is the result. ## Dependencies -* SDL2 -* GLFW3 +* SDL2 (if `BACKEND_AUDIO` or `BACKEND_PLATFORM` are set to `SDL2`) +* GLFW3 (if `BACKEND_PLATFORM` is set to `GLFW3`) * FreeType If these are not found, they will be built locally. @@ -97,6 +97,43 @@ If you're a Visual Studio user, you can open the generated `CSE2.sln` file inste Once built, the executables can be found in the `game_english`/`game_japanese` folder, depending on the selected language. +### Building for the Wii U + +To target the Wii U, you'll need devkitPro, and WUT. + +First, add the devkitPPC tools directory to your PATH (because WUT's CMake support is broken, as of writing): + +``` +PATH=$PATH:$DEVKITPPC/bin +``` + +Then, generate the build files with this command: + +``` +cmake -B buildwiiu -DCMAKE_BUILD_TYPE=Release -DFORCE_LOCAL_LIBS=ON -DBACKEND_PLATFORM=WiiU -DBACKEND_RENDERER=Software -DBACKEND_AUDIO=Null -DBUILD_DOCONFIG=OFF -DCMAKE_TOOLCHAIN_FILE=$DEVKITPRO/wut/share/wut.toolchain.cmake +``` + +Finally, build the game with this command: + +``` +cmake --build buildwiiu +``` + +This will build a binary, but you still need to convert it to an `.rpx` file that can be ran on your Wii U. + +First, we need to strip the binary: + +``` +powerpc-eabi-strip -g game_english/CSE2 +``` + +Then, we convert it to an `.rpx`: +``` +elf2rpl game_english/CSE2 game_english/CSE2.rpx +``` + +`game_english/CSE2.rpx` is now ready to be ran on your Wii U. This port expects the data folder to be in a folder called `CSE2` on the root of your SD card. + ## Licensing Being a decompilation, the majority of the code in this project belongs to Daisuke "Pixel" Amaya - not us. We've yet to agree on a licence for our own code.