Giter Club home page Giter Club logo

sotn-decomp's Introduction

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/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)
SERVANT/TT_000.BIN code coverage TT_000.BIN decompiled functions Bat 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.

Useful links

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.

sotn-decomp's People

Contributors

ayushrakesh avatar bhargavshirin avatar bismurphy avatar cram0 avatar derpprincess avatar dezgeg avatar frog404 avatar hohle avatar joshlory avatar kpanicc avatar mishrasamiksha avatar mkst avatar mottzilla avatar notexactlysiev avatar piratesephiroth avatar rainchus avatar rossimo avatar ser-pounce avatar sestrenexsis avatar shresthasurav avatar smb123w64gb avatar sonicdcer avatar sozud avatar synamaxmusic avatar taliczealot avatar xeeynamo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sotn-decomp's Issues

Bat Familiar: Remove the legacy .ext.generic

What

In the past we used a structure for our Entity system that held all the unknown values. Later on we found the last 0x40 bytes are a reserved memory area for each entity to store their custom values. After a few proposals #187, #188, #195 we decided to come with a pattern where all this reserved areas for each entity will fall into their respective unique struct found in include/entity.h with ET_ as a prefix. This approach was never retroactively applied to the already decompiled entities, which are now using the structure ET_Generic and used as .ext.generic. This is legacy and it is creating unnecessary coupling to a dying structure.

This is an opportunity to learn how the Bat familar works in Symphony of the Night. You will have the freedom of documenting what an entity does and take ownership of each entity function.

Acceptance criteria

For the overlay TT_000 and all the files under src/servant/tt_000, remove any reference to .ext.generic and use dedicated structures for the entity. No union or weird casts should to be used with the new structures.

`main.exe` fails checksum after compilation

OS: Ubuntu 22.04.3 via WSL2

sha1sum --check config/check.us.sha
build/us/main.exe: FAILED
...
sha1sum: WARNING: 1 computed checksum did NOT match
make: *** [Makefile:146: check] Error 1

Bisected to 437856d

SEL func_801BAB70

What

func_801BAB70 is a small function that has not yet been decompiled. It belongs to the stage SEL.

This is a good function for those who wants to start contributing to the project and have little programming skills. Please follow Build and Decompilation to know how to start with decompiling functions.

Acceptance criteria

The function func_801BAB70 must all be written in C, running make all must return OK and a Pull Request must follow. The issue will be marked as Complete if the Pull Request will be accepted and merged.

Debug map: Remove the legacy .ext.generic

What

In the past we used a structure for our Entity system that held all the unknown values. Later on we found the last 0x40 bytes are a reserved memory area for each entity to store their custom values. After a few proposals #187, #188, #195 we decided to come with a pattern where all this reserved areas for each entity will fall into their respective unique struct found in include/entity.h with ET_ as a prefix. This approach was never retroactively applied to the already decompiled entities, which are now using the structure ET_Generic and used as .ext.generic. This is legacy and it is creating unnecessary coupling to a dying structure.

This is an opportunity to learn how the debug map work in Symphony of the Night. You will have the freedom of documenting what an entity does and take ownership of each entity function.

Acceptance criteria

For the overlay MAD and all the files under src/st/mad, remove any reference to .ext.generic and use dedicated structures for the entity. No union or weird casts should to be used with the new structures.

DRA: Remove the legacy .ext.generic

What

In the past we used a structure for our Entity system that held all the unknown values. Later on we found the last 0x40 bytes are a reserved memory area for each entity to store their custom values. After a few proposals #187, #188, #195 we decided to come with a pattern where all this reserved areas for each entity will fall into their respective unique struct found in include/entity.h with ET_ as a prefix. This approach was never retroactively applied to the already decompiled entities, which are now using the structure ET_Generic and used as .ext.generic. This is legacy and it is creating unnecessary coupling to a dying structure.

This is an opportunity to learn how entities work in Symphony of the Night. You will have the freedom of documenting what an entity does and take ownership of each entity function.

Acceptance criteria

For the overlay DRA and all the files under src/dra/, remove any reference to .ext.generic and use dedicated structures for the entity. No union or weird casts should to be used with the new structures.

Nightmare map and Succubus: Remove the legacy .ext.generic

What

In the past we used a structure for our Entity system that held all the unknown values. Later on we found the last 0x40 bytes are a reserved memory area for each entity to store their custom values. After a few proposals #187, #188, #195 we decided to come with a pattern where all this reserved areas for each entity will fall into their respective unique struct found in include/entity.h with ET_ as a prefix. This approach was never retroactively applied to the already decompiled entities, which are now using the structure ET_Generic and used as .ext.generic. This is legacy and it is creating unnecessary coupling to a dying structure.

This is an opportunity to learn how the Nightmare map and the boss Succubus work in Symphony of the Night. You will have the freedom of documenting what an entity does and take ownership of each entity function.

Acceptance criteria

For the overlay DRE and all the files under src/st/dre, remove any reference to .ext.generic and use dedicated structures for the entity. No union or weird casts should to be used with the new structures.

Castle centre: Remove the legacy .ext.generic

What

In the past we used a structure for our Entity system that held all the unknown values. Later on we found the last 0x40 bytes are a reserved memory area for each entity to store their custom values. After a few proposals #187, #188, #195 we decided to come with a pattern where all this reserved areas for each entity will fall into their respective unique struct found in include/entity.h with ET_ as a prefix. This approach was never retroactively applied to the already decompiled entities, which are now using the structure ET_Generic and used as .ext.generic. This is legacy and it is creating unnecessary coupling to a dying structure.

This is an opportunity to learn how entities work in Symphony of the Night. You will have the freedom of documenting what an entity does and take ownership of each entity function.

Acceptance criteria

For the overlay CEN and all the files under src/st/cen, remove any reference to .ext.generic and use dedicated structures for the entity. No union or weird casts should to be used with the new structures.

RIC: Remove the legacy .ext.generic

What

In the past we used a structure for our Entity system that held all the unknown values. Later on we found the last 0x40 bytes are a reserved memory area for each entity to store their custom values. After a few proposals #187, #188, #195 we decided to come with a pattern where all this reserved areas for each entity will fall into their respective unique struct found in include/entity.h with ET_ as a prefix. This approach was never retroactively applied to the already decompiled entities, which are now using the structure ET_Generic and used as .ext.generic. This is legacy and it is creating unnecessary coupling to a dying structure.

This is an opportunity to learn how entities work in Symphony of the Night. You will have the freedom of documenting what an entity does and take ownership of each entity function.

Acceptance criteria

For the overlay RIC and all the files under src/ric/, remove any reference to .ext.generic and use dedicated structures for the entity. No union or weird casts should to be used with the new structures.

Make 4.4 does not work when building in parallel

What

The latest minor version bump of GNU Make does not work well with this project due to some documented breaking changes. The problem only occurs when building happens in parallel (e.g. make -j build. The problem is GCC wants to compile C files and output them to directories that do not yet exist.

This good first issue will help you to familiarise with our build chain.

Technical details

In the Makefile there are targets that are responsible for creating the output directories:

tt_%_dirs:
	$(foreach dir,$(ASM_DIR)/servant/tt_$* $(ASM_DIR)/servant/tt_$*/data $(SRC_DIR)/servant/tt_$* $(ASSETS_DIR)/servant/tt_$*,$(shell mkdir -p $(BUILD_DIR)/$(dir)))
st%_dirs:
	$(foreach dir,$(ASM_DIR)/st/$* $(ASM_DIR)/st/$*/data $(SRC_DIR)/st/$* $(ASSETS_DIR)/st/$*,$(shell mkdir -p $(BUILD_DIR)/$(dir)))
%_dirs:
	$(foreach dir,$(ASM_DIR)/$* $(ASM_DIR)/$*/data $(SRC_DIR)/$* $(ASSETS_DIR)/$*,$(shell mkdir -p $(BUILD_DIR)/$(dir)))

When an overlay is built, these targets are called. For example doing make cen calls the target cen: stcen_dirs $(BUILD_DIR)/CEN.BIN to first create the directories and then the output binary. This behaviour was working on Make 4.3 and below as dependent targets were always processed in order.

Potential solution

Before GCC is called, mkdir -p $(dir $@) can be called to ensure the directory exists. This is already done in Makefile.saturn.mk. Once this part is done, the various targets %_dirs can be deleted.

On Arch Linux I personally made a back-up of make 4.3-5.1 to easily downgrade and test things around.

What is affected

What is NOT affected

Acceptance criteria

Any of the affected operating systems, or Debian/Ubuntu with make 4.4 installed, needs to be able to run make -j build successfully and consistently.

Warp room: Remove the legacy .ext.generic

What

In the past we used a structure for our Entity system that held all the unknown values. Later on we found the last 0x40 bytes are a reserved memory area for each entity to store their custom values. After a few proposals #187, #188, #195 we decided to come with a pattern where all this reserved areas for each entity will fall into their respective unique struct found in include/entity.h with ET_ as a prefix. This approach was never retroactively applied to the already decompiled entities, which are now using the structure ET_Generic and used as .ext.generic. This is legacy and it is creating unnecessary coupling to a dying structure.

This is an opportunity to learn how the Warp Room works in Symphony of the Night. You will have the freedom of documenting what an entity does and take ownership of each entity function.

Acceptance criteria

For the overlay WRP and all the files under src/st/wrp, remove any reference to .ext.generic and use dedicated structures for the entity. No union or weird casts should to be used with the new structures.

ST0 func_801B0414

What

func_801B0414 is a small function that has not yet been decompiled. It belongs to the stage ST0.

This is a good function for those who wants to start contributing to the project and have little programming skills. Please follow Build and Decompilation to know how to start with decompiling functions.

Acceptance criteria

The function func_801B0414 must all be written in C, running make all must return OK and a Pull Request must follow. The issue will be marked as Complete if the Pull Request will be accepted and merged.

Prologue stage and Dracula: Remove the legacy .ext.generic

What

In the past we used a structure for our Entity system that held all the unknown values. Later on we found the last 0x40 bytes are a reserved memory area for each entity to store their custom values. After a few proposals #187, #188, #195 we decided to come with a pattern where all this reserved areas for each entity will fall into their respective unique struct found in include/entity.h with ET_ as a prefix. This approach was never retroactively applied to the already decompiled entities, which are now using the structure ET_Generic and used as .ext.generic. This is legacy and it is creating unnecessary coupling to a dying structure.

This is an opportunity to learn how the Prologue stage and Dracula work in Symphony of the Night. You will have the freedom of documenting what an entity does and take ownership of each entity function.

Acceptance criteria

For the overlay ST0 and all the files under src/st/st0, remove any reference to .ext.generic and use dedicated structures for the entity. No union or weird casts should to be used with the new structures.

NP3 func_801D0B40

What

func_801D0B40 is a small function that has not yet been decompiled. It belongs to the stage NP3.

This is a good function for those who wants to start contributing to the project and have little programming skills. Please follow Build and Decompilation to know how to start with decompiling functions.

Acceptance criteria

The function func_801D0B40 must all be written in C, running make all must return OK and a Pull Request must follow. The issue will be marked as Complete if the Pull Request will be accepted and merged.

Castle Entrance (NP3): Remove the legacy .ext.generic

What

In the past we used a structure for our Entity system that held all the unknown values. Later on we found the last 0x40 bytes are a reserved memory area for each entity to store their custom values. After a few proposals #187, #188, #195 we decided to come with a pattern where all this reserved areas for each entity will fall into their respective unique struct found in include/entity.h with ET_ as a prefix. This approach was never retroactively applied to the already decompiled entities, which are now using the structure ET_Generic and used as .ext.generic. This is legacy and it is creating unnecessary coupling to a dying structure.

This is an opportunity to learn how the Castle Entrance map work in Symphony of the Night. You will have the freedom of documenting what an entity does and take ownership of each entity function. This is very similar to #746 as they both share a large amount of code.

Acceptance criteria

For the overlay NP3 and all the files under src/st/np3, remove any reference to .ext.generic and use dedicated structures for the entity. No union or weird casts should to be used with the new structures.

[DOCS] Add a CONTRIBUTING.md file to the repository

Feature request

Problem or desire

The repository looks incomplete because of the missing CONTRIBUTING.md file to specify the rules and regulations to follow while contributing to the repository, I want to add that file to the repo.

Proposal

Add the CONTRIBUTING file to the repository with guidelines.

Kindly assign me this issue.

Marble Gallery and boss: Remove the legacy .ext.generic

What

In the past we used a structure for our Entity system that held all the unknown values. Later on we found the last 0x40 bytes are a reserved memory area for each entity to store their custom values. After a few proposals #187, #188, #195 we decided to come with a pattern where all this reserved areas for each entity will fall into their respective unique struct found in include/entity.h with ET_ as a prefix. This approach was never retroactively applied to the already decompiled entities, which are now using the structure ET_Generic and used as .ext.generic. This is legacy and it is creating unnecessary coupling to a dying structure.

This is an opportunity to learn how the Marble Gallery map and how Gaibon&Slogra bosses work in Symphony of the Night. You will have the freedom of documenting what an entity does and take ownership of each entity function.

Acceptance criteria

For the overlay NZ0 and all the files under src/st/nz0, remove any reference to .ext.generic and use dedicated structures for the entity. No union or weird casts should to be used with the new structures.

Castle Entrance (NO3): Remove the legacy .ext.generic

What

In the past we used a structure for our Entity system that held all the unknown values. Later on we found the last 0x40 bytes are a reserved memory area for each entity to store their custom values. After a few proposals #187, #188, #195 we decided to come with a pattern where all this reserved areas for each entity will fall into their respective unique struct found in include/entity.h with ET_ as a prefix. This approach was never retroactively applied to the already decompiled entities, which are now using the structure ET_Generic and used as .ext.generic. This is legacy and it is creating unnecessary coupling to a dying structure.

This is an opportunity to learn how the Castle Entrance map, the introductory sequence and the dialogue with Death work in Symphony of the Night. You will have the freedom of documenting what an entity does and take ownership of each entity function.

Acceptance criteria

For the overlay NO3 and all the files under src/st/no3, remove any reference to .ext.generic and use dedicated structures for the entity. No union or weird casts should to be used with the new structures.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.