NX2navi Rewrites Ocarina of Time's Switch 2 Code Into a Native Windows Game
No emulator, no game files in the repo. NX2navi lifts the ARM64 build of Ocarina of Time into C, compiles it on your PC, and replays its graphics through Vulkan.
- NX2navi translates the Switch 2 build of Ocarina of Time into x86-64 C ahead of time, so the game runs as an ordinary Windows binary instead of being interpreted by an emulator.
- The project supports specific game builds, not a console, and expresses compatibility as measured checkpoint addresses that must be re-derived whenever the game is patched.
- Floating-point and SIMD bit-exactness is the central correctness risk, and NX2navi pays for it with two separate lowering paths rather than one.
- Function boundaries in the stripped Switch binaries are reconstructed from control flow alone, with a jump-table heuristic that keeps switch statements from being split in half.
There Is No Emulator in This Box
When most people hear "play a console game on PC," they picture an emulator: a program that pretends to be a Nintendo Switch, decoding every instruction at runtime. NX2navi does something else entirely. It reads the ARM64 machine code of the Switch 2 build of Ocarina of Time, rewrites it ahead of time into x86-64 C, compiles that C, and hands you a native Windows executable. There is no console inside the box. There is no interpreter sitting between the game and your CPU. The game's own code runs, just in a different language.
The second surprise is what the repository does not contain. NX2navi ships zero game data. You supply your own .nup dump from your own console, and the launcher does the rest: it extracts the ExeFS and RomFS, generates C, fetches a toolchain, and compiles the game on your machine. The first build takes 10 to 25 minutes. The project's release notes put the distribution model plainly:
No game files are included: the setup builds the game on your PC from your own dump.
That single sentence reframes the whole project. An emulator is a machine that pretends to be another machine. NX2navi is a translator that produces a program you compile yourself, from data you already own, on hardware you already have.
Translation Is Not Simulation
The distinction is categorical, not incremental. An emulator translates at runtime: every time the guest program executes, the emulator intercepts each instruction and performs the equivalent on the host. That is flexible. It also means the emulator must be present, and correct, for every instruction path the game takes, every time it takes it.
A static recompiler moves that work to build time. The whole program is translated once, ahead of time, into the host's language. What you run afterward is an ordinary Windows binary. There is no dynamic dispatch between guest and host, no per-instruction interpretation overhead, no emulator process mediating access to the real CPU.
The trade is stark. Emulation bends toward generality: one emulator, many games, with compatibility that improves as the emulator matures. Recompilation bends toward specificity: one game, one build, translated precisely, with no general-purpose machinery to maintain. NX2navi chose the second path, and the rest of this article is about what that choice costs.
The Lifter: 32 Bits In, One C Statement Out
At the center of the recompiler is recomp/lifter.py. It decodes 32-bit AArch64 words and emits C statements that operate on a Cpu struct. The top-level dispatch follows ARMv8's encoding tree, branching on the op0 bits at position 25:
op0 = bits(w, 25, 4)
if (op0 & 0b1110) == 0b1000: return self.dp_imm(w, pc)
if (op0 & 0b1110) == 0b1010: return self.branch_sys(w, pc)
if (op0 & 0b0101) == 0b0100: return self.ldst(w, pc)
if (op0 & 0b0111) == 0b0101: return self.dp_reg(w, pc)
if (op0 & 0b0111) == 0b0111: return self.fp_simd(w, pc)
return Insn('trap', f'rt_udf(c, {hx(pc)});')
Anything the lifter does not recognize becomes a trap rather than a compile error. That choice is deliberate. The lifter cannot always tell code from data, because padding and inline constants live in the same section as instructions. Deferring the failure to runtime means the translation always completes, and the trap only fires if that word is actually executed.
The Cpu struct is the contract between generator and runtime. Offsets like OFF_X = 0, OFF_SP = 256, and OFF_PC = 264 are explicit constants that must match runtime/cpu.h. Generated code reads and writes guest registers through this layout, so the coupling is by convention rather than through a shared generated header. It is the kind of interface that stays correct only if both sides are changed together.
Register semantics get their own care. Writing a W register must clear the upper 32 bits of the X register, and the code does that explicitly. Register 31 is the classic trap: as a source it reads as zero (XZR), as a destination it discards the result, but with the SP flag set it means the stack pointer. Getting XZR versus SP right is one of the recurring pitfalls of AArch64 translation, and NX2navi handles it as a first-class case rather than a special case bolted on later.
The Bit-Exact Problem
Here is the hardest correctness problem in the whole project. ARM and x86 do not agree on floating-point rounding, on NaN propagation, or on fused multiply-add behavior. If the recompiled game computes slightly different numbers than the console did, the consequences compound: physics drifts, animations desync, and save data disagrees with itself.
The project's answer is unusual. It maintains two SIMD strategies rather than one. On an AArch64 host, it re-emits the exact instruction word as inline assembly, marshaling guest V registers around each batch. The module docstring describes the result as "bit-exact by construction." There is no translation step to get wrong, because there is no translation: the host runs the same instruction the console did.
On the x86-64 Windows target, that option disappears. Each SIMD instruction must be lowered to portable C, which is far harder to make bit-exact. The project carries both paths from one source of truth, so the two lowerings can be reasoned about side by side. It is the clearest signal of where the real difficulty lives.
Finding Functions in a Stripped Binary
The Switch binaries are largely stripped, so function boundaries cannot be read off a symbol table. NX2navi derives them from control flow instead. Seeds come from three sources: .eh_frame_hdr entries, exported FUNC symbols, and R_AARCH64_RELATIVE relocation targets. Then every BL target becomes a start, and so does every address materialized by ADR or ADRP+ADD.
Then it iterates. A direct branch whose target lies outside its function makes that target a new start, and the process repeats until no new start appears. It is a fixpoint computation: function boundaries emerge from the code's own control flow, not from metadata that has been thrown away.
The subtlety is the jump-table anchor exclusion. Clang emits a switch statement as adr xA, L, a table load, then br xA. The ADR anchor is not a function. If discovery treated it as one, it would split a single switch statement across two functions, a silent bug that would be very hard to trace back to its cause. The heuristic excludes an ADR whose destination register is used as the base of an ADD within four instructions, or one followed by a br within sixteen. The comment notes this holds however far the scheduler moved the branch.
The discovery pass is vectorized with numpy over the entire .text section as a word array. Instead of decoding instruction by instruction, it masks the array for each branch encoding family at once. On a large binary, that is the difference between a scan you can run interactively and one you cannot.
It Supports Builds, Not a Console
This is where the opening hook pays off. NX2navi does not support "the Switch 2." It supports specific builds of a specific game, down to the call site. runtime/boot.c hardcodes checkpoint addresses for each supported version:
#define CHECKPOINT_RET (RT_V111 ? 0x1202d44ull : RT_V143 ? 0xbdb48cull : RT_V110 ? 0xeb8c14ull : 0xe7a954ull)
#define NVN_RET (RT_V111 ? 0x346bf8cull : RT_V143 ? 0xbe0360ull : RT_V110 ? 0xebcdecull : 0xe7eb2cull)
static const InitCount inits_111[] = {{"main", 9783}, {"subsdk0", 0}, {"sdk", 96}};
static const InitCount inits_121[] = {{"main", 10673}, {"subsdk0", 45}, {"sdk", 116}};
Each RT_V* macro is a compile-time version selector. The init_array counts are measured per version too. A mismatch produces a diagnostic rather than silent corruption, which matters because silent corruption in a recompiled binary can look like a game bug and waste hours of debugging.
| Build | Checkpoint return | NVN return | init_array (main / subsdk0 / sdk) |
|---|---|---|---|
| 1.1.0 | 0xeb8c14 | 0xebcdec | not listed |
| 1.1.1 | 0x1202d44 | 0x346bf8c | 9783 / 0 / 96 |
| 1.2.1 | 0xe7a954 | 0xe7eb2c | 10673 / 45 / 116 |
| 1.4.3 | 0xbdb48c | 0xbe0360 | not listed |
The mental model here is different from emulation in a way that matters. An emulator's compatibility is expressed as a console: this emulator runs Switch games. NX2navi's compatibility is expressed as a build fingerprint. Updating the game means re-measuring addresses and adding a branch, not "adding support for a game." That is the price of translation, and it is also the reason the output is native.
How It Compares
The Ocarina of Time on PC landscape already has strong entries. The key axis that separates them is which game they start from and what method they use. Every established alternative targets the Nintendo 64 release.
| Project | Input / foundation | Method | Guest platform | Graphics path |
|---|---|---|---|---|
| NX2navi | Switch 2 OoT 1.1.1 ExeFS/RomFS from your own dump | ARM64 lifted to C, compiled natively | Switch 2 (ARM64) | NVN commands replayed through Vulkan 1.3 |
| Ship of Harkinian / Shipwright | N64 OoT decompilation | Native port from decompiled source | N64 | Native PC renderer |
| Zelda 64: Recompiled | N64 OoT | Static recompilation | N64 | Native PC renderer |
| N64Recomp | N64 binaries | General N64 recompilation tooling | N64 | Tooling, not a renderer |
The table lands one point. NX2navi is the only row whose guest platform is the Switch 2, and that single difference drags in an entire graphics-API translation problem the N64 projects never face. NVN, Nintendo's proprietary graphics interface, has to be replayed through Vulkan 1.3, which means translating shaders, pipeline state, and GPU memory handling rather than reusing a well-documented N64 renderer.
That is the honest shape of the niche. NX2navi is not competing on being the best way to play the 1998 game. It is competing on being a way to run the Switch 2 build's own code and presentation natively, with the widescreen, high-refresh, upscaling, and HDR features that come with a PC backend. Those features are project-reported, not independently benchmarked, and the issue tracker shows the usual early-stage friction: startup crashes, performance tied to texture pins and fence waits, and allocation failures on some integrated GPUs.
What Translation Buys and Costs
NX2navi is best understood as a bet on specificity. By translating ahead of time, it avoids the per-instruction overhead and generality of emulation and produces something that behaves like a native Windows program, because it is one. The cost is that compatibility is no longer a property of a console but of a build fingerprint, re-measured by hand for each version.
The same specificity drives the hardest engineering in the repo. Bit-exact floating point and SIMD, reconstructed function boundaries in stripped binaries, and a graphics-API translation layer are all problems you inherit the moment you decide to rewrite the game's code instead of impersonating its machine. For a project that runs a console game on PC without ever being an emulator, that is exactly the right set of problems to have.




