Phantom Hourglass Recomp
Phantom Hourglass Recomp is a native port of The Legend of Zelda: Phantom Hourglass to Windows, Linux and Android with widescreen and HD dialogue text.
- Type: PC port
- Game: The Legend of Zelda: Phantom Hourglass
- Runs on Windows and Android
- By dguillot-gh
- Latest release v0.2.0, 2026-11-26
- Source: https://github.com/dguillot-gh/phantom-hourglass-recomp
README
Phantom Hourglass Recomp
A native port of The Legend of Zelda: Phantom Hourglass (Nintendo DS) to Windows, Linux and Android. The game's ARM9 code is statically recompiled to C and compiled ahead of time instead of emulated; the rest of the DS comes from melonDS.
https://discord.gg/P3nqgTarW - discord link here
For anyone who wants to join.
No game data is included. The game is built from your own dump, on your own PC or phone. The downloads (
PhantomHourglass.exe,PhantomHourglass.apk) contain only the program. If you build it yourself (below), please don't share what you make: that game folder and APK contain the game.
Features
- Software, OpenGL and Compute renderers, up to 8x on PC and 4x on Android
- Widescreen (16:9 and 21:9) with Compute
- HD dialogue text (vector font at screen resolution)
- 67 offline achievements with a Trophies viewer (matching RetroAchievements set #14323)
- 12 save-state slots, plus Continue from where you quit
- Language selector: English, French and Spanish, plus German and Italian on Europe dumps
- Touch, keyboard and gamepad; analog-stick movement; mic and blow buttons
- Android: movable on-screen controls, portrait mode with both screens stacked
- Android: dual-screen handhelds (AYN Thor, Ayaneo Pocket DS, a dual-screen add-on) or a TV: one DS screen on each display (on by default when a second display exists; ≡ menu → Display or the start screen's Settings: Dual screen, Second display shows, Touch screen for the AYN Thor). Phones with one screen are unchanged. Not yet tried on such a device.
- Android: a minimap of the other screen in the bottom-left corner (landscape), like a game's corner map: tap it to swap the screens, hold it to move it, pinch it to resize it, or hide it with the MAP button. It moves above dialogue boxes and hides in cutscenes.
- Temple of the Ocean King floor checkpoints: every floor Link reaches is remembered, and 1F's stairs down can take him straight to any of them (see below)
Tested devices and fps measurements: docs/TESTED.md.
Ideas and features being considered next: docs/WISHLIST.md.
Download and play
No building needed: download the program from the Releases page and bring your own dump (any one from the table below).
- Windows: download
PhantomHourglass.exe, run it and select your ROM. The game is built on your PC from it, once (about a minute); nothing from the game is downloaded. - Android (8+, arm64): install
PhantomHourglass.apk, open it, choose your ROM, and the game is built on the phone (about a minute). Later versions install over it and keep your saves.
D-pad: with a clean dump the D-pad doesn't move Link yet; turn on Analog stick in the menu and move with a gamepad's stick (on Android it turns the on-screen D-pad into a stick). With the USA or Europe D-pad patch dump, the D-pad works. D-pad movement on clean dumps is in progress (Spirit Tracks Recomp already has it).
The launcher, changing the ROM, starting over (Windows)
After the first build, PhantomHourglass.exe opens a launcher before the game. The game page has CONTINUE (where you last quit) or
PLAY, and Start game (from the title screen). The cog opens Settings, which has two tabs. Display holds the
main settings: screen, renderer, resolution, 3D textures, widescreen, fullscreen and HD text. The in-game menu (F1 or
Esc) has the rest. Game files has Change ROM... (pick another dump: the game is built again from it, saves
kept), Rebuild game (from the kept ROM) and Open folder (the data folder). The X quits. Mouse, keyboard
(arrows, Enter, Esc) and gamepad (D-pad, A, B, shoulder buttons) all work. --no-launcher starts the game straight away; --setup builds again from the command line.
Everything lives in the data folder (the launcher's Settings, Game files, Open folder opens it):
%APPDATA%\PH-Recomp\PhantomHourglass(paste it into Explorer's address bar), ordata\next to the exe when a file namedportable.txtis next to it (a portable copy, e.g. on a USB stick).
| Folder / file | What it is | Starting over |
|---|---|---|
game\ | the game built from your ROM (ph_game.dll, ph_game.id) | delete: it is built again at the next start |
rom\ | the copy of your ROM it was built from (azee.nds or azep.nds) | delete to be asked for a ROM again |
saves\ | your in-game save (azee.sav / azep.sav) | keep |
states\ | save states and the Continue state | keep (delete only to drop them) |
settings.ini | settings | delete to go back to the defaults |
To start over with a different ROM by hand: close the game, delete game\ and rom\, start PhantomHourglass.exe and select
the new dump. Your saves stay.
What you need
-
Your own dump. Supported (checked by SHA-1):
Dump SHA-1 USA 4c8f52dd719918bbcd46e73a8bae8628139c1b85USA, D-pad patch 7e0d26d143992f1eee182b24f1abb9e7f038eacfUSA, D-pad patch (PT-BR) 2e61c66d449c64e4d79a4b8694712803f45878c1USA, Button controls patch 8915d99da2dd99bd2c05bc7a79fd2660a5e8ce5eEurope 02be55db55cf254bd064d2b3eb368b92a5b4156dEurope, D-pad patch 8e3bbda6056c47f06fecf1a06d9f144a19283d88With a clean dump the D-pad doesn't move Link (the patch adds that); turn on Analog stick in the menu instead.
-
Windows 10/11 64-bit or Linux, about 10 GB of disk, and an OpenGL 3.3 GPU for the GPU renderer.
-
For Android: an Android 8+ arm64 phone (OpenGL ES 3.2 for the GPU renderer) and a USB cable.
Quick start (new to this?)
You build the game on a Windows PC from your own copy of the game. It takes about an hour the first time, mostly waiting. Step by step:
- Install Git (to download this project): open the Start menu, type
PowerShell, open it, and paste this line (right-click pastes), then press Enter:
Close PowerShell and open it again afterwards.winget install --id Git.Git -e - Make a folder for everything, for example
C:\Games\ph-workspace, and inside it a folder namedroms. Put your Phantom Hourglass dump inroms(any file name). - Download the project into that folder. In PowerShell, paste these two lines (change the path if you used another
folder):
Don't use GitHub's green "Download ZIP" button: the ZIP leaves out melonDS, and the build then fails. The folder should now look like this:cd C:\Games\ph-workspace git clone --recurse-submodules https://github.com/dguillot-gh/phantom-hourglass-recomp.git ph-recompC:\Games\ph-workspace\ ph-recomp\ (the project) roms\your-dump.nds (your game) - Build it (installs the build tools the first time; Windows asks for admin once):
When it says it's done, openpowershell -NoProfile -ExecutionPolicy Bypass -File ph-recomp\scripts\RUN-ALL.ps1C:\Games\ph-workspace\games\PhantomHourglass\and double-clickPhantomHourglass.exe(PLAY.cmddoes the same). That folder is the whole game: move it anywhere you like. - For an Android phone:
- Turn on USB debugging once: Settings → About phone → tap Build number seven times; then Settings → System → Developer options → USB debugging on.
- Plug the phone into the PC with a USB cable and tap Allow on the phone when it asks.
- In the same PowerShell window:
It builds the app, installs it and copies your game in. Without a cable, addpowershell -NoProfile -ExecutionPolicy Bypass -File ph-recomp\scripts\RUN-ANDROID.ps1-NoPhone: it only makes the app (inapks\); copy that file to the phone, tap it to install, and pick your ROM on the app's start screen.
If something goes wrong: the script stops with a FAIL line that says what's missing. Every step's full output is
in the logs\ folder; attach the newest log when you open an issue. Don't attach your ROM.
Building
The short version, for people who already use Git and PowerShell.
Put the repository and your ROM side by side:
workspace/
ph-recomp/ (this repository)
roms/your-dump.nds (any name)
Windows
git clone --recurse-submodules <this repository> ph-recomp
powershell -NoProfile -ExecutionPolicy Bypass -File ph-recomp\scripts\RUN-ALL.ps1
This installs the build tools, builds the game and makes a PhantomHourglass\ folder; run its PLAY.cmd. For the phone,
run scripts\RUN-ANDROID.ps1 next. Every script takes -DryRun. Details and what each script changes on your PC:
scripts/README.md.
Linux
nix develop --command ./scripts/build-linux.sh
nix develop --command games/PhantomHourglass/play.sh
Without Nix, install CMake 3.28+, Ninja, GCC and SDL3's build dependencies, then run ./scripts/build-linux.sh --rom <path>. Details: scripts/README-LINUX.md.
Controls
PC: mouse is the stylus. Arrows = D-pad, X/Z/S/A = A/B/X/Y, Q/W = L/R, Enter/Right Shift = Start/Select. M = mic (shout), N = blow, C = close the lid. F1 or Esc opens the menu. F5/F8 save/load a state, F9 continues. Tab/F2 switch screens, F11 fullscreen, ` (hold) fast-forward. Gamepads work too.
Gamepad (PC): Start taps the game's Menu button (on the touch screen), Select + Start opens the menu, L3 swaps the screen shown, R3 blows into the microphone. In the menu: D-pad, A to choose, B to close, L / R for the settings' categories (Display, Graphics, Game, Dev), Select for the next page.
Android: touch is the stylus. The small buttons are the menu (≡), TOP (top screen), ⟳ (portrait), MAP (the minimap), MIC, BLOW and LID. The menu has the renderer, save states and "Move and resize controls".
Temple of the Ocean King checkpoints: every floor Link walks down to is remembered (in temple_floors.txt, in
the data folder). Once he has been past B1, the Entry Hall (before 1F) shows 1F Stairs Down: B1 (L) at the top of
the screen: press L to step through the floors reached (B1, then the deeper ones). Then go down to 1F as usual, where
the sand timer starts, and 1F's stairs down lead to the floor picked instead of B1. Link arrives as if he had come
down that floor's own stairs: the floor starts fresh, and keys from floors above are not carried down. L is used only
while the picker is shown; R and everything else go to the game. The floors are kept for every save file alike.
Testing and reporting issues
Known issues and the devices it's been tested on are in docs/TESTED.md.
Found a bug? The quickest way is Report a bug: in the PC launcher's settings (Game files) or the in-game menu (F1 / Esc), on the phone in the launcher or the game's ≡ menu. It writes one text file with the app version, the ROM's release and SHA-1 (never the ROM itself), your system and GPU, your settings, the game build's logs and the end of the program's log.
- PC: the file (
bug-report-<date>.txt) is saved in the data folder (%APPDATA%\PH-Recomp\PhantomHourglass, ordata\beside the program withportable.txt), the folder opens, and so does a GitHub "new issue" page with a short summary filled in: describe what happened and drag the file into it. The program's own log islog.txtin the same folder. - Phone: the share sheet opens with the file attached: send it by email, Discord, Drive, or post it on GitHub.
Or open an issue yourself and include:
- Where: PC (Windows or Linux) or phone, with the phone model
- Settings: renderer (Software, OpenGL or Compute), resolution, widescreen on or off
- Dump: USA or Europe, clean or D-pad patch
- What happened: the steps to get there, plus a screenshot or a save state if you can
- Logs:
log.txtin the data folder (above), or for build problems the log in the workspace'slogs/folder.
Please don't attach your ROM or any game files.
For contributors: the unit tests need no ROM. After building, run ctest --preset release (Windows) or
ctest --preset linux-release (Linux). On Windows, scripts\4-TEST.ps1 also plays the game for a minute as a smoke
test. Before a PR that touches settings or menus, check both the PC menu and the Android menu and settings.
How it works
ntr-recomp turns the ROM's functions into C, which compiles into a game module that ntr-runtime runs natively,
with melonDS providing the rest of the DS hardware. Porting notes: PH-PORT.md.
Credits and licence
Recompiler and runtime from FFCCEOT-Recomp by JonathanDC64; DS hardware from melonDS; function boundaries from the zeldaret/ph decompilation. Details in NOTICE.md.
GPL-3.0 (LICENSE). The Legend of Zelda: Phantom Hourglass is © Nintendo; this project is not affiliated with or endorsed by Nintendo.