nx2/ Static Recompilation & AArch64 LifterAOT Lifter | nx2/lift.py, nx2/insn.py, nx2/nso2.py, nx2/image.py | Python 3 (Capstone, Unicorn 2.1, LZ4, Zstandard)mkw-recomp (7336f0a) + Rexcomp a64-kit | work/sa/gen/*.c (~1.4 GB across 57 C chunks, 294,450 functions) | Loads Switch 2 NSO modules at 0x80000000 with DT_RELR relocations, resolves jump tables (1,475 tables), and translates 17,668,191 ARMv8.2+ instructions (including UDOT) to C. |
nx2/nup.py & nx2/unpack.py Dump ExtractorDump Ingestion | nx2/nup.py, nx2/unpack.py, nx2/dump.py, third_party/zbic | Python 3 + C (Atmosphere ZBIC decoder)Hookshot / mkw-recomp | work/dump/exefs + work/dump/romfs (26.2 GB extracted) | Validates the seven Switch 2 dump signals for 0400486024DEC000 v131072, extracts .nup archives, and decompresses firmware 22.0.0+ ZBIC-encoded main NSO binaries. |
nx2/build.py & nx2/make_game.py Native Compiler DriverBuild & Link System | nx2/build.py, nx2/make_game.py, nx2/split_hot.py, nx2/pgo_pieces.py | Python 3 + Clang / LLD (llvm-mingw ucrt-x86_64)mkw-recomp + Hookshot split_hot PGO pipeline | hookshot.exe (426 MB) / hookshot + image.bin | Splits hot lifted code across 8 parallel translation units, applies LLVM raw format 11 PGO branch profiles, compiles cold chunks at -O1 and hot chunks at -O2, and links the native executable. |
host/ Native Horizon OS & SDK 22.2.8 HLE RuntimeOS & Service Runtime | host/hos_main.c, host/hos_setjmp.c, host/nn_hid.c, host/nn_applet.c, host/posix/ | C11 / Win32 & POSIX Threads / AssemblyTOTKPort hos/ adapted via mkw-recomp | Linked directly into hookshot.exe / hookshot | Replaces 485 nn:: SDK boundaries at runtime, reserves a 512 GB guest virtual address space, maps nn::os fibers onto native fibers, and handles filesystem, audio (libopus), and HID controllers. |
host/nvn_native.c NVN2 (API 231.40) Command RecorderGraphics API Front-End | host/nvn_native.c, host/nvn2.c, gpu/render/rx_nvn.h | C11mkw-recomp NVN2 layer | In-memory NVN2 op stream for gpu/vk/ | Implements Switch 2 NVN2 API 231.40 procedures in place over guest memory, captures memory pools at submit time, and streams command buffer submissions to the Vulkan backend. |
gpu/vk/ Vulkan 1.3 Backend & Queue Replay EngineVulkan 1.3 Renderer | gpu/vk/vk_main.cpp, gpu/vk/vk_replay.cpp, gpu/vk/vk_memory.cpp, gpu/vk/vk_draw.cpp, gpu/vk/vk_coopmat.cpp | C++20 (Vulkan 1.3, VMA, Dear ImGui)mkw-recomp gpu/vk + Hookshot OoT fixes | hookshot_vk.dll (Windows) / hookshot_vk.so (Linux) | Replays NVN2 command streams on Vulkan 1.3 with VK_EXT_mesh_shader, honours cross-queue WaitEvent syncs, runs HMMA f16 cooperative matrices for TAAU/movie upscaling, and manages VRAM pool mirrors with write-back diffing. |
gpu/vk/eden/ Ampere SM86-to-Maxwell Lowering & SPIR-V RecompilerShader Recompiler | gpu/vk/eden/, lower_to_maxwell.h, structured_control_flow.cpp | C++20 (Eden shader recompiler + sirit)Eden (Eglantine build 181) + Lichii control flow fixes | hookshot_programs.bin, hookshot_programs.idx, hookshot_pipelines.bin | Lowers 10,154 Switch 2 Nin_Ounce_NVN2 Ampere SASS (SM86) shaders (including 249-GPR REGMAP_nx2 vertex/mesh programs and task shaders) to Maxwell IR and emits Vulkan SPIR-V. |
gpu/vk/vk_dlss.cpp NVIDIA DLSS & Built-In AMD FSR 3.1 UpscalersTemporal Upscaling & Frame Generation | gpu/vk/vk_dlss.cpp, gpu/vk/vk_menu.cpp | C++20 (NVIDIA NGX SDK 310.9.16, AMD FidelityFX SDK 1.1.4)Hookshot native integration | Built-in FSR 3.1 + runtime nvngx_dlss.dll loader | Intercepts OoT's dynamic resolution jitter, motion vectors, and depth buffers to drive built-in AMD FSR 3.1 on all GPUs or optional NVIDIA DLSS Super Resolution (Transformer presets K/M/L) when nvngx_dlss.dll is present. |
builder/ Hookshot Builder GUI (Windows WPF & Linux AppImage)Player Launcher & Builder UI | builder/HookshotBuilder.sln, scripts/linux/appimage.sh | C# (.NET 8 WPF on Windows) / Shell & Python on LinuxHookshot first-party builder | HookshotBuilder.exe / Hookshot-x86_64.AppImage | Verifies user-supplied .nup or romfs+exefs dumps, orchestrates the one-time 10-45 minute local C build without shipping copyrighted assets, and provides Play/Update controls. |
scripts/ & tests/ Save Transfer Utility, Profilers & Regression SuiteTooling & Verification | scripts/oot_saves.py, scripts/prof.py, scripts/framelog.py, tests/run_all.py | Python 3 & PowerShellHookshot first-party tooling | oot-save-backups/, CI game-free regression gate | Provides bidirectional save migration between Hookshot and Switch 2 emulators (Lichii, Eglantine, Orchid, NX2navi), 1 ms stack sampling analysis, and game-free source regression tests. |