The Legend of Zelda: Ocarina of Time (Nintendo Switch 2) running natively on Windows & Linux, with no emulator.
Status | How to build | In-game menu | How it works | Want to help? | Credits | License
Hookshot is a static recompilation. The game's code is translated to C and compiled into a Windows program, the console's system software is reimplemented, and the Switch 2 graphics are rebuilt on Vulkan. All of this happens on your PC, from your own copy of the game.
Disocrd: https://discord.gg/EajnD2AJD9 Please use the hookshot-discussion channel, as the main point of the discord is for webports, not my work
Important
This repository does not contain the game, keys or an executable, and it does not explain how to get them. You
need your own copy. Everything the build creates (hookshot.exe, the generated code, the shader caches and your
saves) comes from your game and stays on your PC. Never share those files.
Experimental. It has only been tested on one PC (Ryzen 5 7600X, RTX 4060 Ti 16 GB), mostly in the area at the start of the game.
| What | Status |
|---|---|
| Kokiri Forest: reaching gameplay and walking around | ✅ Works |
| Sound, controller, keyboard and saves | ✅ Works |
| In-game menu, frame generation and upscaling | ✅ Works |
| Black flashes while moving | ✅ Fixed in testing, more play needed |
| Performance without frame generation | |
| Models with missing pieces (doors, fences, parts of trees) | ✅ Fixed where tested, more play needed |
| Stutter when entering new areas | |
| Ultrawide | |
| Hyrule Field and the rest of the game | ❓ Not tested yet |
| AMD and Intel cards | ❓ Never tested |
The game does not come ready-made: it is built on your PC from your copy.
With Hookshot Builder, the easiest:
- Download the HookshotBuilder zip from the Releases page, extract it, and run
HookshotBuilder.exe. Keep thetoolsfolder beside it. - Choose your game's
.nup, or yourromfsandexefsfolders. The builder checks that it is the right version. - Choose a language and a folder for the finished game, and start the build.
- When it finishes, open
hookshot.exein that folder.
From the command line:
python -I nx2/make_game.py --nup "C:\path\your-game.nup" --out "C:\Games\Hookshot" --language en-USOr with folders:
python -I nx2/make_game.py --romfs "C:\path\romfs" --exefs "C:\path\exefs" --out "C:\Games\Hookshot" --language en-USAdd --check with your .nup or --exefs to only check the game's version. It builds nothing.
A build takes about 40 minutes, and you can use your PC in the meantime.
- Download
Hookshot-<version>-x86_64.AppImagefrom the Releases page (or the Linux AppImage workflow's artifact), make it executable (chmod +x) and start it. It is Hookshot Builder with everything it needs inside: the compiler, the libraries and the Vulkan renderer. Nothing else has to be installed. - Choose your
.nup(or yourromfsandexefsfolders), a language and a folder for the game, and build. - When it finishes, press Play. The game is also added to your applications menu, and starting the AppImage again
offers Play. The game itself is
hookshotin the folder you chose: it runs without the AppImage.
From the command line: ./Hookshot-<version>-x86_64.AppImage --cli --nup ~/your-game.nup --out ~/Games/Hookshot
(the same options as make_game.py).
You need a 64-bit x86 PC with glibc 2.35 or newer (Ubuntu 22.04, Debian 12, Fedora, Arch, SteamOS ...), a Vulkan 1.3
driver with mesh shaders (Mesa or NVIDIA), and the same memory and disk space as on Windows. The build's own files go
to ~/.cache/hookshot-builder. Saves go in $XDG_DATA_HOME/hookshot (~/.local/share/hookshot). A user folder
beside the game from an earlier build is moved there once. HOOKSHOT_JOBS sets how many files compile at once.
Switches to test (RX_VK_NOOPT=1 and the others) go in hookshot_env.txt beside the game, one NAME=VALUE a line,
as on Windows.
Building it yourself without the AppImage: clang and lld (LLVM 23 or newer reads the play profile; an older one
builds without it), Python 3 with lz4, numpy, capstone, unicorn and zstandard, FFmpeg's development files
(with dav1d, for the movies) and SDL2. Then python -I nx2/make_game.py ... as above, with RX_CPM pointing at a folder
with Vulkan-Headers, SPIRV-Headers and VulkanMemoryAllocator in CPM's layout (scripts/linux/deps.sh makes one).
scripts/linux/deps.sh and scripts/linux/appimage.sh make the AppImage.
A new release is not a patch to your game folder: the game is built again from your copy, with the new code. Your saves and settings are kept.
- Close the game.
- To be safe, copy your saves somewhere first: the
userfolder besidehookshot.exeon Windows, or~/.local/share/hookshoton Linux. - Get the new release:
- Hookshot Builder: download the new HookshotBuilder zip and extract it to a new folder (with its
toolsfolder). The old builder folder can then be deleted. - Linux: download the new AppImage and make it executable. The old one can be deleted, the game is not removed with it.
- Command line:
git pullin your clone, and take thetoolsfolder's contents (see What you need) from the new HookshotBuilder zip, as they can change between releases.
- Hookshot Builder: download the new HookshotBuilder zip and extract it to a new folder (with its
- Build again with the same
.nup(orromfsandexefsfolders) and the same game folder as before. With the same.nup, the game is not read again, but the translation and the compile still run, so it takes about as long as the first build. - Start the game as before.
What a new build keeps and what it replaces in the game folder:
| Kept | Replaced |
|---|---|
Your saves (user, or ~/.local/share/hookshot on Linux) |
hookshot.exe (hookshot on Linux) and its files |
hookshot_options.ini, the in-game menu's choices |
image.bin and the shader list |
hookshot_env.txt |
language.txt, written again with the language you choose |
- Nothing to install for the build itself: Hookshot Builder brings its own compiler (llvm-mingw, as TotK Recomp does), Python and libraries. Visual Studio and the Windows SDK are no longer needed.
- 64-bit Windows 10 or 11.
- A graphics card with Vulkan 1.3 and mesh shaders, with an up-to-date driver. Only NVIDIA has been tested.
- 16 GB of RAM or more. A run uses about 10 GB.
- About 60 GB free while building.
- Your copy of the game at the supported version: program
0400486024DEC000, update v131072, builde0f3ccfa. Other versions do not work.
To build from the command line you also need:
- Python 3 with
lz4,numpy,capstone,unicornandzstandard:pip install lz4 numpy capstone "unicorn>=2.1,<2.2" zstandardUse Python from python.org: the Microsoft Store's Python installs packages wherepython -Idoes not look. - llvm-mingw (the
ucrt-x86_64build), withHOOKSHOT_MINGWset to its folder. Without it the build uses the clang from emsdk atC:\emsdkwith Visual Studio's C++ tools and the Windows SDK (HOOKSHOT_MSVC=1forces that route). - Visual Studio 2022 with .NET 8, only if you want to change the builder itself.
- The prebuilt tools that go in
third_party/:a64emit,lld-link,zbicand SDL2. - What the HookshotBuilder zip carries in its
toolsfolder and a clone does not. The builder sets the variables below itself; from the command line, set them before you runmake_game.py:tools\cpm: the Vulkan headers and FFmpeg. SetRX_CPMto this folder. Without it the build leaves outhookshot_vk.dll, the Vulkan renderer, and says nothing.tools\wgpu-native: setWGPU_NATIVEto this folder.tools\third_party\sdl2\SDL2.dll: copy it tothird_party\sdl2\.tools\work: copy it, with itsimagefolder, towork\. It holds the hot-function list, the link order, the profile and the icon; without them the game builds but runs slower.
- The build reads your game and never changes it. It writes to the folder you choose and to
%LOCALAPPDATA%\HookshotBuilder. - The romfs is hard-linked instead of copied where the disk allows it.
- To uninstall, delete the game folder and
%LOCALAPPDATA%\HookshotBuilder.
| Problem | What to do |
|---|---|
| "Hookshot supports build e0f3ccfa" | Check that you chose the right game with its update installed |
| The game opens and closes | Update your graphics driver |
| Stutter the first time you see something | Normal for now: shaders are being prepared. It gets better when you pass through the same place again |
| The game is in the wrong language | Change the code in language.txt beside the game. The file lists them all |
If the problem continues, report it with where you were in the game, your graphics card and a screenshot or video. Never send game files.
Press Insert in game. Everything is off by default, and your choices are saved in hookshot_options.ini
beside the game.
| Option | Choices |
|---|---|
| Frame generation | Off, 2x, 3x, 4x |
| Frame pacing | Off, On |
| Resolution | Auto (the game's own dynamic resolution), 100%, 75%, 67%, 50% |
| Upscaling | Off, Catmull-Rom, Lanczos |
| Sharpness | 0 to 100% |
| Game speed | Per frame, Real time |
| Handheld profile | Off, On |
| Ultrawide | 16:9, Monitor's shape |
| FPS counter | Off, On |
With Game speed on Per frame, the game runs slower whenever it is below 60 fps. Real time keeps it at normal speed.
Use a controller, or the keyboard and mouse. On the keyboard, W A S D move and the arrow keys turn the camera.
nx2/lift.pytranslates the game's ARM64 code to C.nx2/build.pycompiles that C together withhost/, which plays the part of the console's system.host/nvn_native.crecords the game's NVN2 graphics calls, andgpu/vk/replays them on Vulkan.- Switch 2 Ampere shaders are lowered to Maxwell (
lower_to_maxwell.h) and translated to SPIR-V by Eden's shader recompiler.
More detail is in the development guide and the design notes.
Testing on other graphics cards and reporting the result already helps a lot, and so does playing further into the game than anyone has yet.
Bigger ways to help:
- Linux testing. The Linux build (
host/posix) has been tested on one PC so far: reports from other distributions and graphics cards help. - Fixes in your own fork. Fork the project, fix what you find and send the change back. Keep game files, keys and anything generated from your game out of it.
Hookshot exists thanks to the work of many people:
- NotRexed: Hookshot, BlueShell (Mario Kart World), Skybound (Tears of the Kingdom) and the a64-kit tools.
- Eden and Eglantine: the shader recompiler and Switch 2 shader work.
- suyu: the graphics decoders and the AArch64 translator.
- seedds/nxnative: reference for how task and mesh shaders work.
- EvilBoyce / evilmfkr (EvilOOT): the GPU culling that brings back Kokiri's foliage (trees, ferns, grass, falling leaves, fireflies), the ambient light probes, the pond's water, the game's own fog, the freeze after Load (Horizon's mutex handoff) and the exposure flicker fix.
- zortos293/Lichii: reference for Ampere shader lowering, and its compare-exchange retry fix.
- mstorsjo/llvm-mingw: the bundled Windows compiler (no Visual Studio needed).
- kinnay/zbic, Opus and SDL: decompression, audio and controllers.
- sostenesfreitas/ocarina-recomp: this README's layout, and its notes confirmed the mesh stage's control section.
- MythosOfs/Orchid: the fog and exposure workaround for Ocarina of Time.
- Mesa (NAK): the reference for Ampere's instruction encoding.
- Everyone who sent fixes: SkippySteve (Linux and the AppImage, and many more), klimovich008, d3zessete, chrispository, vzeol, monsterlag, leonidasmark, Segmentree, Zorkats, ShyVortex, hiKareeem, gab9281 and i900gaming, among others.
Hookshot is free software under the GNU General Public License, version 3 or later (GPL-3.0-or-later). It includes code from Eden, suyu and Orchid, which are under the GPL too. Third-party parts under other licenses that work with the GPL (Sirit, the Vulkan Memory Allocator, SDL, Opus, stb, zbic and the a64-kit tools) keep their own notices in their folders.
Hookshot is an unofficial fan project, not affiliated with or endorsed by Nintendo. The Legend of Zelda and Ocarina of Time are trademarks of Nintendo.
