# Castlevania: Symphony of the Night：覆盖 PlayStation、PSP 与 Saturn 版本的一致性反编译

> 从《恶魔城 月下夜想曲》的 PlayStation、PSP 和 Saturn 版二进制重建 C 源码，目标是逐字节编译出与原游戏文件一致的产物。这一进行中的构建将已反编译代码与从使用者自备光盘镜像提取的素材和汇编结合，再按版本检查 SHA-1 哈希。同一仓库中的原生 PC 实验被文档说明为尚未完成，并不是已发布的移植。

- 类型：案例
- 目标：游戏
- 类别：独立重建案例
- 关联：独立重建项目
- 来源复核于：2026-10-18
- 收录于：2026-10-18
- 原始资源：<https://github.com/Xeeynamo/sotn-decomp>
- 一手来源：<https://github.com/Xeeynamo/sotn-decomp/blob/eddaf22fe86f5189b85fd34915afe6564f19df20/README.md>
- 目录页面：<https://awesomerea.org/zh/resources/sotn-matching-decomp-case/>
- 记录 JSON：<https://awesomerea.org/resources/sotn-matching-decomp-case/record.json>
- 英文版：[English](https://awesomerea.org/resources/sotn-matching-decomp-case/index.md)

## 使用条件与局限

- **前提条件：**仓库不含游戏素材，也不含编译所需的汇编；README 要求事先拥有游戏副本。Build wiki 要求未经修改的美版 PlayStation 光盘的 BIN/CUE 镜像；固定版本的 Makefile 则从欧版 Dracula X Chronicles ISO 读取两个 PSP 来源的构建，并从 Saturn 的 BIN/CUE 镜像读取 Saturn 构建，这些文件均以对应版本的名称放在 disks/ 下。
- **前提条件：**Build wiki 以 CI 所用的 Ubuntu 24.04 LTS 为测试环境，也涵盖通过 WSL 2 使用 Windows 以及基于 Arch 的发行版；Dockerfile 提供 Ubuntu Noble 环境。构建需要 Go、Rust、Python 3.12+、MIPS 与 SH binutils、MIPS GCC、ninja，以及 m2c、maspsx、asm-differ、mipsmatch、decomp-permuter 等子模块工具。项目托管的预编译归档（包括 cc1-psx、mwccpsp、Cygnus 2.7 工具链和 wibo）会依据 SHA-256 文件校验；Saturn 构建还需要 dosemu。
- **范围：**README 将其描述为进行中的一致性反编译，涵盖四个构建：us（PlayStation 版 SLUS-00067，为参考版本）、hd（在 Castlevania: Dracula X Chronicles 数据中发现的未发售日版 PS1 构建）、pspeu（Dracula X Chronicles 欧版）和 saturn（由外部团队开发的 Saturn 移植版）。Build wiki 说明仍有部分不一致函数置于 NON_MATCHING 宏下，不保证功能等价。README 链接 sotn.xee.dev 和 decomp.dev 上会变动的进度页面。
- **测试证据：**除非设置 SKIP_CHECK，固定版本的构建代码会依据 config/check.<version>.sha 对产物计算哈希：us 清单列出 main.exe、DRA.BIN、RIC.BIN 及关卡和覆盖模块文件，hd、pspeu 与 saturn 的清单较短。wiki 仍提到 make check 步骤，但固定版本的 Makefile 并未定义该目标。这些检查比较所供版本的文件一致性。
- **许可：**Makefile 也接受 pc 版本，src/pc 中有原生移植代码，但 PC Port wiki 页面说明目前尚无基于反编译、可端到端运行的移植。仓库声明采用 AGPL-3.0，光盘镜像、提取的素材和汇编以及下载的编译器各有权利约束。CONTRIBUTING 仅允许贡献者能够说明理由并可手动操作的编码代理辅助改动，并要求提交与拉取请求不得由自主工具生成。

## 一手来源

1. <https://github.com/Xeeynamo/sotn-decomp/blob/eddaf22fe86f5189b85fd34915afe6564f19df20/README.md>
2. <https://github.com/Xeeynamo/sotn-decomp/blob/eddaf22fe86f5189b85fd34915afe6564f19df20/Makefile>
3. <https://github.com/Xeeynamo/sotn-decomp/blob/eddaf22fe86f5189b85fd34915afe6564f19df20/LICENSE>
4. <https://github.com/Xeeynamo/sotn-decomp/blob/eddaf22fe86f5189b85fd34915afe6564f19df20/CONTRIBUTING.md>
5. <https://github.com/Xeeynamo/sotn-decomp/blob/eddaf22fe86f5189b85fd34915afe6564f19df20/.gitmodules>
6. <https://github.com/Xeeynamo/sotn-decomp/blob/eddaf22fe86f5189b85fd34915afe6564f19df20/Dockerfile>
7. <https://github.com/Xeeynamo/sotn-decomp/blob/eddaf22fe86f5189b85fd34915afe6564f19df20/disks/README>
8. <https://github.com/Xeeynamo/sotn-decomp/blob/eddaf22fe86f5189b85fd34915afe6564f19df20/tools/requirements-debian.txt>
9. <https://github.com/Xeeynamo/sotn-decomp/blob/eddaf22fe86f5189b85fd34915afe6564f19df20/tools/sotn-assets/build.go>
10. <https://github.com/Xeeynamo/sotn-decomp/blob/eddaf22fe86f5189b85fd34915afe6564f19df20/tools/sotn-assets/check.go>
11. <https://github.com/Xeeynamo/sotn-decomp/blob/eddaf22fe86f5189b85fd34915afe6564f19df20/config/check.us.sha>
12. <https://github.com/Xeeynamo/sotn-decomp/blob/eddaf22fe86f5189b85fd34915afe6564f19df20/config/check.hd.sha>
13. <https://github.com/Xeeynamo/sotn-decomp/blob/eddaf22fe86f5189b85fd34915afe6564f19df20/config/check.pspeu.sha>
14. <https://github.com/Xeeynamo/sotn-decomp/blob/eddaf22fe86f5189b85fd34915afe6564f19df20/config/check.saturn.sha>
15. <https://github.com/Xeeynamo/sotn-decomp/wiki/Build/720bcf3b1212d130b28bb6ccbeda2b887ea96457>
16. <https://github.com/Xeeynamo/sotn-decomp/wiki/PC-Port/ebe1b37979d1a1966abb68d388b753e4407cfd3c>

## 同分区更多条目：游戏

- [DX-Ball：借助 REA 并由 Codex 完成的函数级重建](https://awesomerea.org/zh/resources/dx-ball-rea-reconstruction-case/index.md) · 案例
- [DX-Ball：重建声音声像计算](https://awesomerea.org/zh/resources/rea-dxball-case/index.md) · 案例
- [Final Fantasy VII：PlayStation 版一致性反编译](https://awesomerea.org/zh/resources/ff7-ps1-matching-decomp-case/index.md) · 案例
- [GoldenEye 007：覆盖三个版本的一致性 Nintendo 64 反编译](https://awesomerea.org/zh/resources/goldeneye-007-matching-decomp-case/index.md) · 案例
- [Gran Turismo 4：借助智能体的 PS2 引擎匹配反编译](https://awesomerea.org/zh/resources/gran-turismo-4-matching-decomp-case/index.md) · 案例
- [Halo 2：智能体辅助的 LTCG Xbox 版一致性反编译](https://awesomerea.org/zh/resources/halo2-matching-decomp-case/index.md) · 案例

## 关于此条目

说明已依据一手来源复核。
原创说明采用 MIT 许可；外部项目、论文与素材保留各自的权利和许可。
