Case study
Castlevania: Symphony of the Night: matching decompilation across PlayStation, PSP and Saturn builds
Recreates C source for Castlevania: Symphony of the Night from its PlayStation, PSP and Saturn binaries, aiming for code that compiles byte for byte to the original game files. The work-in-progress build combines decompiled code with assets and assembly extracted from a user-supplied disc image, then checks per-version SHA-1 hashes. Native PC experiments in the same tree are documented as unfinished and are not a released port.
- Targets
- Game
- Category
- Independent reconstruction cases
- Relationship
- Independent reconstruction project
- Sources reviewed
Requirements & limits
- Prerequisites: The repository includes no game assets and none of the assembly needed to compile; README requires a prior copy of the game. The Build wiki asks for an unmodified US PlayStation disc as BIN/CUE, while the pinned Makefile reads both PSP-derived builds from a European Dracula X Chronicles ISO and the Saturn build from a Saturn BIN/CUE, each placed under disks/ with a version-specific name.
- Prerequisites: The Build wiki is tested against Ubuntu 24.04 LTS in CI and also covers Windows through WSL 2 and Arch-based distributions; a Dockerfile provides an Ubuntu Noble environment. Builds need Go, Rust, Python 3.12+, MIPS and SH binutils, a MIPS GCC, ninja and submodule tools such as m2c, maspsx, asm-differ, mipsmatch and decomp-permuter. Project-hosted prebuilt archives, including cc1-psx, mwccpsp, a Cygnus 2.7 toolchain and wibo, are checked against SHA-256 files; the Saturn build also uses dosemu.
- Scope: README describes a work-in-progress matching decompilation of four builds: us (PlayStation SLUS-00067, the reference), hd (an unreleased Japanese PS1 build found in Castlevania: Dracula X Chronicles data), pspeu (the European Dracula X Chronicles release) and saturn (the externally developed Saturn port). The Build wiki notes that some non-matching functions remain behind a NON_MATCHING macro and are not guaranteed to be functionally equivalent. README links mutable progress pages on sotn.xee.dev and decomp.dev.
- Testing evidence: Unless SKIP_CHECK is set, the pinned build code hashes its outputs against config/check.<version>.sha, which lists main.exe, DRA.BIN, RIC.BIN and stage and overlay files for us and shorter lists for hd, pspeu and saturn. The wiki still names a make check step that the pinned Makefile does not define. These checks compare file identity for the supplied version.
- License: The Makefile also accepts a pc version and src/pc holds native-port code, but the PC Port wiki page says no working end-to-end port based on the decompilation exists yet. The repository declares AGPL-3.0, while disc images, extracted assets and assembly, and the downloaded compilers keep separate rights. CONTRIBUTING allows coding-agent assistance only for changes contributors can justify and operate manually and requires commits and pull requests without autonomous tooling.
About this entry
The description was reviewed against primary sources.
Primary sources
- README.md GitHub · Xeeynamo/sotn-decomp · Revision eddaf22
- Makefile GitHub · Xeeynamo/sotn-decomp · Revision eddaf22
- LICENSE GitHub · Xeeynamo/sotn-decomp · Revision eddaf22
- CONTRIBUTING.md GitHub · Xeeynamo/sotn-decomp · Revision eddaf22
- .gitmodules GitHub · Xeeynamo/sotn-decomp · Revision eddaf22
- Dockerfile GitHub · Xeeynamo/sotn-decomp · Revision eddaf22
- disks/README GitHub · Xeeynamo/sotn-decomp · Revision eddaf22
- tools/requirements-debian.txt GitHub · Xeeynamo/sotn-decomp · Revision eddaf22
- tools/sotn-assets/build.go GitHub · Xeeynamo/sotn-decomp · Revision eddaf22
- tools/sotn-assets/check.go GitHub · Xeeynamo/sotn-decomp · Revision eddaf22
- config/check.us.sha GitHub · Xeeynamo/sotn-decomp · Revision eddaf22
- config/check.hd.sha GitHub · Xeeynamo/sotn-decomp · Revision eddaf22
- config/check.pspeu.sha GitHub · Xeeynamo/sotn-decomp · Revision eddaf22
- config/check.saturn.sha GitHub · Xeeynamo/sotn-decomp · Revision eddaf22
- https://github.com/Xeeynamo/sotn-decomp/wiki/Build/720bcf3b1212d130b28bb6ccbeda2b887ea96457
- https://github.com/Xeeynamo/sotn-decomp/wiki/PC-Port/ebe1b37979d1a1966abb68d388b753e4407cfd3c
More in Games
- DX-Ball: an REA-guided function-level reconstruction with Codex · Case study
- DX-Ball: reconstruct sound panning · Case study
- Final Fantasy VII: a matching PlayStation decompilation · Case study
- GoldenEye 007: matching Nintendo 64 decompilation for three releases · Case study
- Gran Turismo 4: an agent-assisted PS2 engine matching decompilation · Case study
- Halo 2: an agent-assisted matching decompilation of an LTCG Xbox build · Case study