N64Recomp statically recompiles N64 binaries into C code, enabling portability across platforms and potentially faster simulation than interpreters or dynamic recompilation. The project addresses the need for standalone execution of N64 code and offers a more performant runtime environment. It builds upon existing static recompilation projects like IDO static recompilation, adapting similar techniques for the N64 architecture.
The tool supports relocatable and statically linked overlays, handling jump-and-link registers through function lookup tables. It offers single-file output mode for patching, streamlining development iteration. The project leverages a flexible toml configuration file for comprehensive control over recompilation behavior. The use of standard C compilers ensures broad compatibility for output compilation.
- Core Functionality: Static recompilation of N64 binaries into equivalent C code.
- Overlays: Handles both statically linked and relocatable overlays with function lookup capabilities.
- Configuration: Uses a toml configuration file to specify input/output paths, function stubs, and patches.
- Output: Emits recompiled code into separate files, with options for single-file output mode.
- Runtime: Designed to work with a separate runtime environment (N64ModernRuntime) providing necessary functionality.
- Compatibility: Tested with various MIPS compilers (gcc, clang, msvc) and aims for broad C compiler compatibility.
- Patching: Supports single file output, facilitating rapid iterative patching and development.
The project is actively developed with recent commits and ongoing issue resolution. Documentation is improving, although complete coverage is still underway. The core functionality is tested with various compilers. A community exists around the core project and related projects like Zelda 64: Recompiled. Future development includes support for custom metadata formats and dynamic language output.
N64Recomp benefits developers interested in N64 emulation, porting, and analysis by providing a reliable and efficient means of converting N64 binaries into portable C code. This allows for the creation of standalone executables and facilitates faster simulation compared to traditional methods, expanding the ecosystem of N64 development and research.
