Hookshot is the port's name (as Skybound is TOTKPort's and BlueShell is mkw-recomp's); the repository folder
stays oot-recomp. The game builds as hookshot.exe + hookshot_vk.dll.
A static recompilation of the Switch 2 The Legend of Zelda: Ocarina of Time remake to native x86-64 Windows:
the game's code lifted to C (NotRexed's a64-kit, Rexcomp's AArch64 kit), the Horizon OS and NVN2 implemented
natively, the GPU work replayed on Vulkan. It is a fork of mkw-recomp (..\mkw-recomp, Mario Kart World), whose
paths it keeps so MKW's fixes apply here.
No game files are in this repository. The dump is read where it lies (work/dump.txt); everything made from it
(modules, image, lifted C, builds, runs) goes to work/, which git ignores.
Status: the dump is read and lifted (100 % translated, the instruction test passes); the standalone build is next. Plan, stages and the lessons carried over from MKW: DESIGN.md.
Requirements: Python 3 with lz4, numpy, capstone, unicorn (2.1), zstandard; emsdk's clang at C:\emsdk (or EMSDK);
for the Vulkan back end, Eden's CPM package cache (found in mkw-recomp's work/eg or ..\Eglantine\.cache\cpm, or
RX_CPM).
Run everything with python -I from this folder.
| Command | What |
|---|---|
python -I nx2/nup.py <file.nup> --extract work/dump |
the .nup dump package to work/dump/exefs + romfs (newest title; ZBIC NSOs made plain by nx2/unpack.py) |
python -I nx2/dump.py --dump <folder with exefs/ and romfs/> --set |
what the dump is (Switch 1 or 2, ids, modules, SDK, NVN); --set records it in work/dump.txt |
python -I nx2/lift.py [--write] |
image + discovery + coverage (work/image/coverage.txt); --write emits the C to work/gen |
python -I nx2/census.py --nx2 |
instruction census per module, after the Switch 2 forms |
python -I nx2/test_insn.py [--per 6 --states 12] |
every instruction form the game uses, Unicorn vs lifted C |
python -I nx2/test_leaf.py [--count 3000 --states 4] [--calls] |
random whole functions (or call trees), Unicorn vs recompiled native code on the real image |
python -I nx2/lift.py --standalone --write then python -I nx2/build.py --standalone --jobs 4 |
the standalone game: work/sa/build/hookshot.exe + hookshot_vk.dll |
powershell -File scripts/run-vk.ps1 [-Window] [-Seconds 120] [-Name x] |
a muted test run on Vulkan, with screenshots in work/runs/<name>/shots |
python -I scripts/prof.py <stacks file> |
a profile sampled with HOS_SAMPLE=<thread> + HOS_SAMPLE_FILE=<stacks file>, named from the linker maps |
The dump can also come from OOT_DUMP (its folder) or OOT_EXEFS; OOT_WORK moves the work folder.
| Path | What |
|---|---|
DESIGN.md |
why mkw-recomp's pipeline, the architecture, MKW's lessons as rules, stages, testing |
nx2/ |
the lift pipeline and its tests (mkw-recomp's, made game-neutral; kit.py has the paths) |
host/ |
the standalone Horizon runtime (TOTKPort's hos/ as adapted by mkw-recomp), with the native NVN2 layer nvn_native.c |
gpu/vk/ |
the Vulkan back end (hookshot_vk.dll), with Eden's shader recompiler and sirit |
gpu/render/, gpu/third_party/ |
the WebGPU renderer the exe falls back to, its op stream (rx_nvn.h), suyu's decoders |
scripts/ |
test runs and the profile reader |
third_party/ |
a64-kit (unmodified), libopus, zbic (Atmosphere's zstd with ZBIC, for unpacking only) |
License: GPL-3.0-or-later, as mkw-recomp: a64-kit's translator is suyu's (GPL-2.0-or-later) and Eden's code is GPL-3.0.