A native PC port of The Legend of Zelda: The Minish Cap (GBA, 2004) built on
SDL3, a software PPU renderer (libs/ViruaPPU), and the agbplay audio engine.
Targets x86-64 Linux, Windows, and macOS (Apple Silicon and Intel).
The port is work in progress — many rendering and gameplay paths are still rough; please file issues for anything that breaks.
A copy of the original game is required. This repository does not ship the ROM.
| Version | Filename | SHA1 |
|---|---|---|
| USA | baserom.gba |
b4bd50e4131b027c334547b4524e2dbbd4227130 |
| EU | baserom_eu.gba |
cff199b36ff173fb6faf152653d1bccf87c26fb7 |
Pre-built tarballs are published on the Releases page. Each tarball contains:
tmc_pc sounds.json assets/ assets_src/
Setup, once:
-
Download
tmc-usa-{linux,windows,macos}-<version>.tar.gzand unpack it anywhere. -
Drop your own
baserom.gbanext to the binary. -
Run the game:
./tmc_pc # Linux / macOS tmc_pc.exe # Windows (double-click works)
The first launch self-extracts a runtime asset cache from the ROM (≈3–5 s,
shows a progress bar). Every subsequent launch is instant. The binary
resolves baserom.gba, sounds.json, and the asset trees relative to its
own location, so the install directory can live anywhere — no cd dance.
Place your ROM in the repository root, then run:
python3 build.pyThe script will:
- Check and prompt to install missing dependencies (xmake, SDL3, libpng, fmt, nlohmann-json)
- Initialize git submodules automatically
- Scan for ROM files and verify their checksums
- Let you choose USA, EU, or both
- Compile the native binary for your platform
- Place everything under
dist/<VERSION>/
Run the result:
cd dist/USA
./tmc_pcSaves are written to tmc.sav in the working directory.
Linux (Arch / CachyOS):
sudo pacman -S xmake sdl3 libpng fmt nlohmann-json git curlLinux (Ubuntu / Debian):
sudo apt install xmake libsdl3-dev libpng-dev libfmt-dev nlohmann-json3-dev git curlmacOS (Apple Silicon or Intel):
xcode-select --install # Apple's compiler + git
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Homebrew, if you don't have it
brew install xmake pkg-config fmt nlohmann-json libpng libompWhat each piece does, in plain English:
- Xcode Command Line Tools — Apple's C/C++ compiler (
clang), linker, andgit. You can't build any native code on a Mac without them, and Homebrew won't install them for you. - Homebrew — the package manager that fetches everything else. If you've never used a Mac for development, this is the one prerequisite you'll always end up installing.
- xmake — the build system that drives the whole compile (think
make/cmake, but it auto-downloads any C/C++ libraries that aren't already on your system). - pkg-config — a tiny tool xmake uses to ask "where did Homebrew put libpng?". Without it, xmake can't find the brew-installed libraries and will rebuild them itself (slow and sometimes broken).
- fmt and nlohmann-json — small C++ helper libraries the asset tools and game code use for text formatting and JSON parsing.
- libpng — needed by the graphics tools to read and write PNG sprite sheets.
- libomp — Apple Clang doesn't ship with an OpenMP runtime, so VirtuaPPU's
parallel scanline renderer needs Homebrew's
libomp. If it's missing, the build still works but falls back to a single-threaded path. - SDL3 — the cross-platform window/input/audio layer. Not in the brew list because xmake builds its own copy automatically on macOS (the Linux path uses the system one when available, but on macOS the bundled build is the default and Just Works).
Windows: Install xmake and git. SDL3 and other libraries are downloaded automatically by xmake.
See INSTALL.md for slim builds, the xmake build tmc_pc
single-target invocation, and other build options.
- Linux (Wayland preferred, X11 fallback)
- Windows via MinGW static link
- macOS (Apple Silicon and Intel) — builds cleanly with Homebrew + Xcode Command Line Tools; lightly tested compared to Linux/Windows.
| Action | Keyboard | Gamepad |
|---|---|---|
| Fast-forward (hold) | Tab | Right trigger |
| Toggle fullscreen | F11 / Alt+Enter | — |
| Cycle upscaler | F12 | — |
| Toggle text-to-speech | F7 | — |
| Open debug menu | F8 | — |
| Capture bug report | F9 | — |
| Quicksave | F5 | — |
| Quickload (also stops speech) | F6 | — |
The F8 debug menu also covers warp, items, heal, internal render scale, the renderer/shader toggles (see Renderer & shaders) and an Accessibility tab (see Accessibility).
Default upscaler is nearest-neighbor (sharp pixels). F12 cycles through: nearest-raw → xBRZ 4× (linear, smooth) → xBRZ 4× (nearest, sharp) → linear-raw.
The window title shows the running port version — please include it when filing issues.
The default renderer is the software PPU (libs/ViruaPPU) presented through
SDL. An optional SDL_GPU backend adds post-processing shader presets (CRT,
LCD, scanline looks, …). In the F8 menu:
- Renderer toggles software ↔ GPU.
- CRT filter cycles the stock CPU/GPU presentation filters.
- Shader Preset picks a
.glslppreset when the SPIR-V/Vulkan GPU backend is active.
The GPU backend is compiled into the pre-built releases and build.py builds
it by default. A bare xmake configure needs --gpu_renderer=y — without it
the GPU options are present but show "GPU backend required". On macOS the GPU
backend uses Metal for the stock filters; runtime .glslp shader presets still
require the SPIR-V/Vulkan backend.
The port has built-in text-to-speech for screen-reader users. Press F7 to toggle it on or off; dialog text, figurine descriptions, file-select hints and other text surfaces are read aloud. While TTS is on, plain F6 silences the current utterance, and the F8 → Accessibility tab has rate / pitch / volume sliders.
The speech backend is selected automatically per platform:
- Windows — the NVDA Controller Client if NVDA is running (using your configured NVDA voice; the F8 sliders are ignored while NVDA owns the queue), otherwise SAPI.
- Linux / macOS — the first available of
spd-say,espeak-ng,espeak, or macOSsay.
See CHANGELOG.md for per-release notes.
A flake.nix is provided with all dependencies. Run the port directly with:
nix runOr enter a development shell:
nix developIssues and pull requests are welcome — port improvements, tools, and documentation. Open an issue describing the bug or proposed change before larger work so we can coordinate.
libs/agbplay_core contains code derived from:
- Project: agbplay
- Repository: https://github.com/ipatix/agbplay
- Author: ipatix and contributors
- License: GNU Lesser General Public License v3.0
The original agbplay project is licensed under the LGPL-3.0. The copied and modified files in this directory remain under that license.
The rest of this repository is not automatically relicensed as LGPL-3.0 solely because it links to or uses this LGPL component.
