Decompilation of Castlevania: Symphony of the Night (PSX+Saturn)
Go to file
H.M. Burger 03ae469187
Some checks are pending
Format code / format (push) Waiting to run
Build C code / extract-assets (push) Waiting to run
Build C code / build-linux (push) Blocked by required conditions
Build C code / build-macos (push) Blocked by required conditions
Build C code / build-windows (push) Blocked by required conditions
Build C code / build-linux-lle (push) Blocked by required conditions
Build Saturn version / build-and-test-saturn (push) Waiting to run
Build Saturn version / function-finder-saturn (push) Waiting to run
Build Debug Module tool / build (push) Waiting to run
Build PSX and PSP version / build-and-test (pspeu, hd) (push) Waiting to run
Build PSX and PSP version / build-and-test (pspeu, pspeu) (push) Waiting to run
Build PSX and PSP version / build-and-test (us, us) (push) Waiting to run
Build PSX and PSP version / generate-progress-report (pspeu, hd) (push) Blocked by required conditions
Build PSX and PSP version / generate-progress-report (pspeu, pspeu) (push) Blocked by required conditions
Build PSX and PSP version / generate-progress-report (us, us) (push) Blocked by required conditions
Build PSX and PSP version / generate-duplicates-report (us, us) (push) Blocked by required conditions
Build PSX and PSP version / generate-duplicates-report-psp (pspeu, pspeu) (push) Blocked by required conditions
Adding ghost to buildlist (#1764)
Adding ghost to build list

In order to get the build to work, I needed to mark all of the shared
functions between tt_000 and tt_001 as static as it was causing linking
issues. Because of this, I needed to combine the two C files for tt_000.
Probably want to look at splitting those up into servant specific and
shared, but for now, I just wanted to get this working.

The issue was msvc didn't like that we were declaring a static function
that was not being implemented because part of the shared functions were
being implemented in another file. There may be something we can do with
function declarations to clean that up if/when we split it again, but I
don't know enough about C static functions to figure it out.
2024-10-08 10:56:45 -07:00
.github/workflows Remove mv? 2024-10-02 22:07:51 -07:00
.vscode Custom debugging module (#108) 2023-08-10 18:55:24 +01:00
bin Use allegrex assembler for PSP (#1424) 2024-07-22 15:36:28 -04:00
cmake Texture render support (#934) 2024-01-01 23:31:56 +00:00
config Adding ghost to buildlist (#1764) 2024-10-08 10:56:45 -07:00
disks Change how game assets are managed 2023-02-21 23:25:31 +00:00
docs Use built-in abs function (#1151) 2024-05-19 19:16:56 +01:00
include Adding ghost to buildlist (#1764) 2024-10-08 10:56:45 -07:00
src Adding ghost to buildlist (#1764) 2024-10-08 10:56:45 -07:00
tools Asset cutscene two stages (#1738) 2024-10-06 13:10:06 +01:00
.clang-format Update clang-format as self-contained binary (#1257) 2024-06-04 21:07:50 +01:00
.gitignore Asset cutscene two stages (#1738) 2024-10-06 13:10:06 +01:00
.gitmodules Update splat to 0.24.4 (#1112) 2024-06-12 18:50:32 +01:00
CMakeLists.txt Adding ghost to buildlist (#1764) 2024-10-08 10:56:45 -07:00
CNAME Create CNAME 2022-10-18 23:52:54 +01:00
CONTRIBUTING.md Update CONTRIBUTING.md (#721) 2023-10-31 20:34:50 +00:00
diff_settings.py MAR duplicates (#1618) 2024-09-16 18:19:29 +01:00
Dockerfile Add bsdmainutils to requirements (#1667) 2024-09-24 16:54:32 -07:00
go.work New asset manager (#1343) 2024-07-02 21:38:36 +01:00
go.work.sum Weapon assets and statically linked (#1470) 2024-08-09 00:57:26 +01:00
LICENSE Add AGPL license (#1565) 2024-09-06 16:14:55 -04:00
Makefile NZ0 import all data (#1760) 2024-10-07 17:22:43 +01:00
Makefile.psp.mk Use allegrex assembler for PSP (#1424) 2024-07-22 15:36:28 -04:00
Makefile.psx.mk Asset cutscene two stages (#1738) 2024-10-06 13:10:06 +01:00
Makefile.saturn.mk Rewrite Saturn make rules (#660) 2023-10-03 21:42:08 +01:00
README.md Add NO0 (Marble Gallery) overlay (#1691) 2024-09-30 00:53:54 +01:00
weapon0.ld Enhance Makefile for WEAPON0.BIN (#466) 2023-08-14 02:03:54 +01:00
weapon1.ld Enhance Makefile for WEAPON0.BIN (#466) 2023-08-14 02:03:54 +01:00

Castlevania: Symphony of the Night Decompilation

A work-in-progress decompilation of Castlevania Symphony of the Night for Sony PlayStation 1, Sony PlayStation Portable and Sega Saturn. It aims to recreate the source code from the existing binaries using static and/or dynamic analysis. The code compiles byte-for-byte to the same binaries of the game, effectively being a matching decompilation.

It currently supports the following versions of the game:

  • us the reference build with the serial number SLUS-00067
  • hd an unreleased PS1 Japanese build found in Castlevania: Dracula X Chronicles game data
  • pspeu European build from Castlevania: Dracula X Chronicles
  • saturn the port created by an external development team

This repo does not include any assets or assembly code necessary for compiling the binaries. A prior copy of the game is required to extract the required assets.

Bins decomp progress

File name Code coverage Decomp functions Description
SLUS_000.67 code coverage SLUS_000.67 decompiled functions Shared libraries
DRA.BIN code coverage DRA.BIN decompiled functions Game engine
BIN/RIC.BIN code coverage RIC.BIN decompiled functions Playable Richter
BIN/WEAPON0.BIN code coverage WEAPON0.BIN decompiled functions Equippables
ST/CEN/CEN.BIN code coverage CEN.BIN decompiled functions Center
ST/DRE/DRE.BIN code coverage DRE.BIN decompiled functions Nightmare
ST/MAD/MAD.BIN code coverage MAD.BIN decompiled functions Debug Room
ST/NO0/NO0.BIN code coverage NO0.BIN decompiled functions Marble Gallery
ST/NO3/NO3.BIN code coverage NO3.BIN decompiled functions Entrance (first visit)
ST/NP3/NP3.BIN code coverage NP3.BIN decompiled functions Entrance
ST/NZ0/NZ0.BIN code coverage NZ0.BIN decompiled functions Alchemy Laboratory
ST/SEL/SEL.BIN code coverage SEL.BIN decompiled functions Title screen
ST/ST0/ST0.BIN code coverage ST0.BIN decompiled functions Final Stage: Bloodlines
ST/WRP/WRP.BIN code coverage WRP.BIN decompiled functions Warp Room
ST/RWRP/RWRP.BIN code coverage RWRP.BIN decompiled functions Warp Room (reverse)
BOSS/MAR/MAR.BIN code coverage MAR.BIN decompiled functions Maria cutscene
BOSS/RBO3/RBO3.BIN code coverage RBO3.BIN decompiled functions Meduza boss
SERVANT/TT_000.BIN code coverage TT_000.BIN decompiled functions Bat Familiar
SERVANT/TT_001.BIN code coverage TT_001.BIN decompiled functions Ghost Familiar

Code coverage means how many bytes of code have been successfully converted from assembly into C code, while decomp function is how many functions have been successfully decompiled.

Decompiling a game is a mastodontic task. If you have some basic programming skills, please join us in this journey. Any contribution will be very appreciated!

Join to our Discord server

Special thanks

This project is possible thanks to the hard work of tools provided by the Decompilation community:

  • mips2c from @matt-kempster to decompile MIPS assembly into C. This has proven to be more accurate than Hexrays IDA and Ghidra.
  • splat from @ethteck to disassemble code and extract data with a symbol map. This tool provides the fundamentals of the SOTN decomp.
  • asm-differ from @simonlindholm to know how the decompiled code compares to the original binary.
  • decomp-permuter from @simonlindholm to pick different versions of the same code that better matches the original binary.
  • maspsx by @mkst to replicate the customized assembler used in the official PSX SDK.
  • decomp.me by @ethteck, @nanaian and @mkst to provide a collaborative decompilation site to share and contribute to work-in-progress decompiled functions.
  • frogress by @ethteck to store and retrieve progression data.
  • esa-new by @mkst as an inspiration on how to set-up a PS1 decompilation project.
  • oot as an inspiration of what it is possible to achieve with a complete decompiled video game.