· via Hacker News – Front Page (hnrss.org)
Ogre Battle 64 nears full static recompilation to a native PC executable
A GitHub project has recompiled Ogre Battle 64's 807-function main code segment into native C using N64Recomp, with most of the work credited to an AI model. Players supply their own ROM.
A GitHub project has statically recompiled Ogre Battle 64: Person of Lordly Caliber into a native PC executable, with a Hacker News post that carried the repository to the site's front page putting the effort at 99.05% complete. The project, maintained under the GitHub account lfarroco, uses the open-source N64Recomp toolchain to translate the Nintendo 64 tactical RPG's machine code into C that compiles for modern hardware rather than being interpreted by an emulator at runtime.
What has been recompiled
According to the project's README, the game's main code segment — 807 functions — has been fully recompiled to C. What remains is the runtime application layer covering rendering, input and audio, which the maintainer lists as the next milestone. A planning document in the repository tracks progress and technical findings.
The pipeline works from the player's own ROM dump. The splat tool generates the disassembly, a MIPS link step and 34 bank units are processed, and then the main recompilation and the RSP microcode are produced, all in a single specific order invoked through one make target. The generated C files are deliberately kept out of the repository: every user regenerates them locally from their own dump, which is how the project avoids distributing copyrighted material.
The AI angle
The README carries a notable disclaimer stating that most of the work was performed by the DeepSeek v4/v4.1 Flash model. If accurate, that would make this one of the more visible examples of a large language model shouldering the bulk of the function-by-function translation that has historically turned decompilation projects into multi-year volunteer efforts. The claim is the project's own, and the output still needs human verification and integration — but it indicates where reverse-engineering work may be heading.
Bring your own ROM
The repository contains no game data. Users must supply a dump of the USA Rev A release — a 40 MB big-endian .z64 file — with a bundled conversion script for byte-swapped .n64 dumps. The finished application opens on a start screen prompting the player to load or drag in their ROM, or to simply place it next to the executable. The dump is validated by hash and stored, so later launches go straight into the game, and battery saves are written to a saves folder beside the program.
The project frames itself as preservation and interoperability research, acknowledges that Ogre Battle 64 remains the copyright of Quest and Nintendo, and asks that no ROM or extracted assets be redistributed.
Building and packaging
Building from source requires the N64Recomp tools, CMake and a MIPS binutils, and the README walks through cloning, patching and compiling them. Rendering is handled by RT64, pinned to a specific upstream commit as a git submodule, with a supplied patch for systems running SDL older than 2.0.22 — Ubuntu 22.04 ships 2.0.20, which lacks the SDL_GetWindowSizeInPixels call the renderer needs.
A distribution target produces a single self-contained executable with SDL2 linked statically. The build fetches and compiles a pinned upstream SDL2 itself because Homebrew's sdl2 package is an SDL3-based compatibility shim with no static library. The repository also includes headless-browser debug probes for a WebAssembly build, hinting that the same code path can target the browser.
Why it matters
Static recompilation is settling in as a serious alternative to emulation for playing classic games on modern hardware. Instead of interpreting MIPS instructions at runtime, the original code is translated once into C and compiled natively, which can mean better performance and a cleaner foundation for mods and fixes.
The Ogre Battle 64 project shows the N64Recomp toolchain stretching beyond first-party flagship titles to a third-party game with a segmented, bank-based code layout, while the bring-your-own-ROM model keeps such projects distributable and leaves copyright with the original rights holders. Just as significant is the AI disclaimer: if large models really are doing most of the translation, the bottleneck for game preservation may be shifting from person-hours of reverse engineering toward review, verification and integration.
- #nintendo-64
- #recompilation
- #game-preservation
- #open-source
- #ai