Skip to main content

Prerequisites

Before building for Wii, ensure you have:
  1. Completed the dependency setup
  2. Installed the devkitPro toolchain
  3. Installed required Wii libraries

Install devkitPro

1

Download devkitPro

Follow the official installation guide at https://devkitpro.org/wiki/Getting_Started for your operating system.
2

Install Wii development packages

Use the devkitPro package manager to install the required libraries:
dkp-pacman -S wii-dev ppc-zlib
3

Set environment variables

Ensure DEVKITPPC is set in your environment. This is typically done automatically by the devkitPro installer.If using a shell other than bash (e.g., fish), you may need to manually load the environment:
source /etc/profile.d/devkit-env.sh

Build Process

1

Navigate to source directory

cd /path/to/fcavex/source
2

Run make

Build the project using the Makefile:
make
This will compile fCavEX and produce a .dol file in the root directory.

Build Configuration

The Wii build uses the following compiler flags (from Makefile:35):
CFLAGS = -std=c99 -pedantic -Wextra -Wno-unused-parameter \
         -flto=auto -O3 -Wall -DNDEBUG -DPLATFORM_WII

Compiler Options

  • -std=c99 - Use C99 standard
  • -O3 - Maximum optimization level
  • -flto=auto - Link-time optimization for better performance
  • -DPLATFORM_WII - Platform-specific compilation flag
  • -DNDEBUG - Disable debug assertions

Linked Libraries

The following libraries are linked (from Makefile:43):
LIBS := -lwiiuse -lfat -lbte -logc -lm -lz
  • libwiiuse - Wii remote input handling
  • libfat - FAT filesystem support (SD card access)
  • libbte - Block transfer engine
  • libogc - OGC/libogc core library
  • libm - Math library
  • libz - zlib compression

Deployment

1

Prepare directory structure

Create the following structure on your SD card:
apps/cavex/
├── assets/
│   ├── terrain.png
│   ├── items.png
│   ├── anim.png
│   ├── default.png
│   ├── gui.png
│   └── gui2.png
├── saves/
│   └── world/
├── boot.dol
├── config.json
├── icon.png
└── meta.xml
2

Copy the DOL file

Copy the compiled .dol file from the build directory to apps/cavex/boot.dol on your SD card.
3

Copy assets

Ensure all required texture files are in the assets/ directory.
4

Launch on Wii

Use the Homebrew Channel on your Wii to launch fCavEX.

Optional: Direct Loading

If you have wiiload set up on your network, you can load the game directly to your Wii:
make run
This executes wiiload $(OUTPUT).dol (from Makefile:120).

Performance Considerations

fCavEX is optimized for Wii hardware and typically runs at around 60fps with a 5-chunk render distance. Adjust video settings before building to optimize performance for your needs.
For optimal performance on Wii hardware:
  • Keep GFX_GUI_SCALE at 2 for 640x480 resolution
  • Consider disabling GFX_FANCY_LIQUIDS if experiencing frame drops
  • GFX_CLOUDS can be disabled for a small performance boost
See the Video Settings page for more details.

Cleaning Build Files

To clean the build directory:
make clean
This removes all build artifacts and the generated .dol and .elf files.

Build docs developers (and LLMs) love