Hookshot Doesn't Run the Game. It Rewrites It.

A high-school student's static recompiler turns the Switch 2 remake of Ocarina of Time into native x86-64 code that never needs an emulator.

9 min read • View on GitHub • More from NotRexed

A wide editorial illustration of a workshop bench. On the left sits a tall neat stack of stiff cards, each stamped with a single ARM opcode glyph. In the center, a bare hand and forearm write a long curling scroll of C source code with a fountain pen. On the right, the scroll feeds into a small dense clockwork mechanism that outputs a running, winding clockwork figure taking its first steps. The scene depicts the thesis that Hookshot translates instructions into source code and compiles them into a native machine rather than simulating a console.
Instructions in, C in the middle, a native machine out. Hookshot is a compiler wearing a game port's clothes.
Key Takeaways

This Is Not an Emulator

Every reaction to Hookshot reaches for the same word. Emulator. It is the wrong word, and the design document says so in the flattest possible terms: no CPU or GPU emulation at any point.

An emulator models a console. It builds a software replica of a CPU, a GPU, and an operating system, then feeds the original game to that replica one instruction at a time. Hookshot does none of that. It takes the game's AArch64 instructions, translates them to C ahead of time, and compiles that C into a native x86-64 binary with clang. The result is a program your PC runs directly. There is no Switch 2 anywhere in the loop.

This technique is called static recompilation. The word "static" matters. A dynamic recompiler (the kind inside a typical emulator or a Java virtual machine) translates code while the program is running. A static recompiler translates everything up front, once, and hands you a normal executable. The trade is brutal and the payoff is real: you give up the ability to handle code you did not predict, and in exchange you get a program that runs as if it were written for your machine.

So the interesting question is not whether Hookshot is cool. It obviously is. The question is how you translate a modern console game without simulating the console. That turns out to require two decisions that are worth more than the rest of the project combined.

Dump, Lift, Compile, Run

Here is the whole machine, left to right. You supply a dump of a game you own (a .nup file or romfs and exefs folders). The lifter reads its AArch64 code and emits C. clang, borrowed from the Emscripten toolchain, compiles that C into native x86-64. A hand-written host runtime reimplements Horizon OS, the Switch 2's operating system. And the GPU's command stream gets replayed through Vulkan rather than interpreted. Six stages, each one replacing a machine instead of simulating one.

The repository ships none of the interesting parts. As the README puts it, plainly: "This repository does not contain the game, keys or an executable." The builder compiles everything locally from files you provide. That is not just legal caution. It is the architecture. A static recompiler has to be run against a specific binary, so the tool has to travel and the output has to be generated on the user's machine.

Six stages, one track, and no emulator in the loop. Click any node to see what it replaces.

The Address Trick

Most ports of this kind die on a single problem: pointers. When lifted code stores a memory address, it stores the address the original game expected. If your recompiled binary puts things somewhere else, every pointer is wrong, and you have to either translate them all or rewrite the code that uses them.

Hookshot sidesteps the entire problem by refusing to move anything. It reserves 512 GB of virtual address space and places the game image at 0x80000000, exactly where the Switch 2 puts it. The heap starts at 64 GB. A guest pointer keeps its original value, so lifted code runs with zero address translation. The addresses in the compiled binary and the addresses the game believes in are the same numbers.

0x0000000000000000  ┌──────────────────────────┐
                    │   reserved (512 GB)      │
0x0000000080000000  ├──────────────────────────┤
                    │   game image             │
                    │   (lifted addresses      │
                    │    keep their values)    │
0x0000001000000000  ├──────────────────────────┤
                    │   heap (from 64 GB)      │
                    │                          │
                    └──────────────────────────┘

A guest pointer stored by the game needs no rewrite:
its value is already a valid address in the host process.

This is the kind of decision that looks like a footnote and behaves like a foundation. Virtual address space is cheap on a 64-bit machine; 512 GB of reservation costs nothing if you never touch most of it. In return, an entire category of bugs (pointer fixups, relocation tables, address aliasing) simply does not exist. The design document treats it as a given. It is closer to the whole ballgame.

The Gate Before the Code

The second clever decision is subtler, and it is the one that separates this from a weekend hack. The entire project rests on one assumption: that the thing you dumped is a Switch 2 binary with a specific shape. Get that wrong and every downstream choice is wrong too.

So before a line of the port is trusted, nx2/dump.py has to confirm six independent signals. Each one is a separate fingerprint of the Switch 2 platform, and they do not all point the same way by accident.

If any signal fails, the architecture changes. That is the point. The port's central assumption is made falsifiable before the code is written, so a bad dump fails loudly at the gate instead of quietly producing a broken build three stages later. It is unglamorous engineering, and it is exactly why a one-person project can survive contact with real users who dump all kinds of things.

One Student and a Fork

Now that the technique has earned some respect, here is who built it. NotRexed is a high-school student. Hookshot is a fork of mkw-recomp, a static recompilation of Mario Kart World, and the fork deliberately keeps its upstream's directory paths so that fixes to Mario Kart flow into Hookshot. The host runtime traces its lineage to TOTKPort's Horizon OS layer, adapted through mkw-recomp.

The sync strategy is a single diff. The design document describes generating a patch across nx2, host, gpu, and third_party, then applying it forward. Keeping the paths identical is what makes that possible. It is a maintenance decision disguised as a layout decision, and it is the difference between a fork that tracks upstream and a fork that drifts.

This is not a studio with a roadmap. It is one person who chose the right ancestor and kept the seams intact, and the design document reads like a decision record written by someone who has been burned before.

This is the first release of hookshot, expect visual bugs, stutters, and crashes. Only Kokiri Forest has been tested so far. If you find an issue please make an issue in the repo and ill do my best to fix it, Expect shader stutter or pop-in the first time you visit each area

NotRexed, Hookshot creator · NotRexed posts (Nitter mirror)

Recompiler, Emulator, or Remake?

Hookshot is not competing with emulators on speed or compatibility. It sits at a different point on a single spectrum: how much of the original machine do you reproduce? Hookshot reproduces the least and translates the most. The table below is not a scorecard. It is a map of positions.

HookshotSwitch emulatorsZelda 64: RecompiledShip of Harkinian
Target softwareSwitch 2 remakeAny Switch titleN64 originalN64 original
What runs the gameLifted to C, compiled to x86-64Emulated consoleRecompiled N64 codeDecompiled N64 source
OS and graphicsHorizon OS and NVN2 reimplemented, Vulkan replayEmulated OS and GPUN64 SDK reimplementedN64 SDK reimplemented
What the user suppliesTheir own dumpTheir own dumpTheir own ROMTheir own ROM

Read the second row carefully. An emulator reproduces the console and runs the game inside it. Ship of Harkinian decompiles the original source and rebuilds it. Zelda 64: Recompiled lifts the N64 binary and reimplements the N64 SDK. Hookshot lifts the Switch 2 binary and reimplements Horizon OS and NVN2. Four projects, four answers to the same question, and Hookshot's answer is the most aggressive: reproduce almost nothing, translate almost everything.

A close-up editorial illustration of a punched paper piano roll running across a metal guide. The holes in the roll are sharp and specific. Below the roll, a different instrument than the one the roll was cut for reads the same holes with a row of thin metal feelers and plays it. The original instrument sits dimly blurred in the far background, unused. The image depicts how Hookshot replays a GPU command stream through Vulkan, where the stream is a score and a second instrument reads the same score.
The GPU command stream is a score. Vulkan is a second instrument reading the same holes. The original instrument never plays.

What Actually Works Today

The honest state of the project is documented by the people using it. The first release was tested only in Kokiri Forest. Users report performance drops, floating vegetation, and garbled textures on some 6 to 8 GB GPUs. AMD hardware has known graphics issues. Higher resolution scaling and DLSS are requests, not features.

None of that is surprising for an early static recompiler. A native port only covers the code paths someone has actually exercised, and a game is enormous. The interesting part is the feedback loop: the author asks for GitHub issues rather than comment threads, and the issue tracker is where the compatibility map gets drawn one card at a time.

Hookshot, a native recomp of The Legend of Zelda Ocarina of Time for Windows! All credits to @NotRexed ! Only Kokiri Forest was tested, so expect some bugs beyond this area! Let’s test it out! https://t.co/K6runmb3n6

Sabuga, sabuga_jb on X · @sabuga_jb on X

The story here is not that Hookshot is finished. It is that a technique once reserved for patient teams with months of budget now fits in one student's fork, because the hard parts (address preservation, the verification gate, a synced upstream) were solved as decisions rather than as labor. The compiler does the labor. The person does the thinking.