Ogre Battle 64 重制项目进度 99.05%
Ogre Battle 64 Recompiled Project at 99.05%

原始链接: https://github.com/lfarroco/ogre-battle-64-recomp

本项目是一项技术性尝试,旨在通过 N64Recomp 工具链,将 N64 经典游戏《皇家骑士团 64:人事之高贵》(美版 Rev A)静态重新编译为原生 PC 可执行文件。目前,该项目已成功将游戏的主要代码段(807 个函数)转换为 C 语言代码,开发工作正致力于实现渲染、输入和音频等运行时功能。 为确保符合法律规定,本代码库不包含任何受版权保护的游戏数据。用户必须提供自有的 ROM 镜像,系统将在加载时通过哈希值进行校验。构建过程涉及使用 `splat` 进行反汇编,随后通过 N64Recomp 流水线生成原生代码。构建完成后,项目将生成一个便携且独立的可执行文件,并支持在本地处理存档。 本项目旨在进行游戏保存与互操作性研究。有关详细的构建说明(包括 macOS 环境配置以及如何通过 RT64 渲染器处理 SDL2 等依赖项),请参阅项目中的 `PLAN.md`。严禁用户分发 ROM 或提取出的资源文件。

Hacker News 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Ogre Battle 64(皇家骑士团64)重编译项目进度已达 99.05% ( github.com/lfarroco ) 4 点积分 由 frozenlettuce 发布于 1 小时前 | 隐藏 | 过往 | 收藏 | 2 条评论 帮助 frozenlettuce 1 小时前 | 下一条 [–] 这个百分比是根据仍需重编译的函数数量估算的。目前已经可以游玩,甚至可以制作模组了!和其他重编译项目一样,你需要提供你自己的 ROM。 回复 Founderarcstone 35 分钟前 | 上一条 [–] 太棒了,我已经好多年没想起这款游戏了。 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Static recompilation of the N64 game Ogre Battle 64: Person of Lordly Caliber (USA, Rev A) to a native PC executable, using the N64Recomp toolchain.

This repository contains no copyrighted game data. You must supply your own ROM dump (see below).

This work in this project was mostly performed by the DeepSeek v4/v4.1 Flash model.

The main code segment (807 functions) has been fully recompiled to C. The runtime app (rendering, input, audio) is the next milestone. See PLAN.md for the full plan, current status, and technical findings.

assets/                your ROM (gitignored; big-endian .z64 expected)
asm/                   splat-generated disassembly
debug/                 headless-browser probes for the wasm build (see debug/README.md)
config.yaml            splat config (segments, vram mapping)
config.toml            N64Recomp config
Makefile               assemble + link + recompile
n64recomp-ob64.patch   our N64Recomp modifications (apply to upstream clone)
rt64-plume-sdl.patch   our RT64 plume patch — SDL >= 2.0.22 guard (apply to the
                       tools/RT64 submodule on systems with older SDL2, e.g. Ubuntu 22.04)
PLAN.md                the project plan

See Reproduce in PLAN.md. Summary:

# tools (macOS)
brew install mips-linux-gnu-binutils cmake
python3 -m venv tools/venv && tools/venv/bin/pip install 'splat64[mips]'
git clone --recurse-submodules https://github.com/N64Recomp/N64Recomp.git tools/N64Recomp
git -C tools/N64Recomp apply ../../n64recomp-ob64.patch
cmake -S tools/N64Recomp -B tools/N64Recomp/build -DCMAKE_BUILD_TYPE=Release
cmake --build tools/N64Recomp/build --target N64RecompCLI -j4

# ROM: put your .z64 dump in assets/, then regenerate the recompiled code
# (see docs/guides/app-build.md -> "Regenerating the recompiled code")
make regenerate

The ROM must be the USA Rev A dump (40 MB, .n64 16-bit byte-swapped or already converted .z64). tools/convert_rom.py converts .n64.z64.

A fresh clone cannot build the app until make regenerate has run once: the recompiled C (RecompiledFuncs/, Bank*Funcs/, RspFuncs/, app/src/bank_funcs.inc) is generated from your own ROM and is deliberately not committed. make regenerate runs splat, the MIPS link, the 34 bank units, the main recompilation and the RSP microcode in the one order that works.

cmake -S app -B build-app -DCMAKE_BUILD_TYPE=Release
cmake --build build-app -j
./build-app/ogrebattle64

On launch the app shows a black start screen — OGRE BATTLE 64: RECOMP / CLICK TO LOAD YOUR ROM (OR DROP IT IN THIS WINDOW). Click it to pick your ROM, drag the ROM onto the window, or just put the ROM next to the executable. The ROM is validated by hash and stored, so later launches go straight into the game. The battery save lands in saves/ beside the executable.

make dist        # -> dist/ogre-battle-64-recomp/   (one self-contained executable)
make dist-zip    # -> dist/ogre-battle-64-recomp-<platform>.zip

The package is a single file: SDL2 is linked statically (make dist fetches and builds a pinned real SDL2 once, because Homebrew's sdl2 is the SDL3-based compat shim and has no static library). No game data is included, so the player supplies their own ROM on the start screen. See docs/guides/app-build.md → "Distribution".

The renderer (tools/RT64) is a git submodule pinned to an upstream commit and needs its own one-time patch on systems with SDL < 2.0.22 (e.g. Ubuntu 22.04 ships SDL 2.0.20, but SDL_GetWindowSizeInPixels requires 2.0.22+):

git submodule update --init --recursive
git -C tools/RT64/src/contrib/plume apply ../../../../rt64-plume-sdl.patch

Re-apply after any git submodule update inside tools/RT64, which resets the submodule and discards the patch.

Ogre Battle 64 © Quest / Nintendo. This project is for preservation and interoperability research. Never distribute the ROM or its extracted assets.

联系我们 contact @ memedata.com