PSDX, short for PSX-SDX, is a PlayStation Save Data Editor that allows you to read and edit the content of game save data files. The main goal of the project is to build save data files that contain any game state (e.g. unlocked levels and defeated bosses, number of lives obtained, and so on) you would like to play.
If you have ever played Crash Bandicoot 2, the image below will give you an idea of what you can do with PSDX:
The project is in an early stage of development and has two main limitations:
- It is implemented as a C# library without user interface, so a basic knowledge of the C# programming language is required to use the project.
- Only one specific game is currently supported: the European version of Crash Bandicoot 2 (SCES-00967).
A user interface and support for more games are planned, but they will not come anytime soon. If you would like to contribute to the project, any help is welcome.
No DLL for the library is currently provided, so it is necessary to build the source code from scratch.
To do this, you first need to download this repository or clone it with Git: git clone https://github.com/giuse94/PSDX.git
.
If you opted for the download, unzip the folder (extract its content) in a folder of your choice.
Since this is a .NET 7 library, you need to download and install the .NET 7 SDK.
You can create any C# project type, but a console application is the easiest way to test things out.
Once you have created your project, reference PSDX by adding the following lines in your .csproj
file (replace "path\to\PSDX.csproj" with the actual path of the file):
<ItemGroup>
<ProjectReference Include="path\to\PSDX.csproj" />
</ItemGroup>
You could also build the library and add its DLL to your project, but it would be pointless since you have access to the source code.
Now you need a Crash Bandicoot 2 save data file in the Single Save Data (.mcs) format. The easiest way to obtain such a file is to use an emulator, like DuckStation. This file will be referred to as "cb2.mcs" in the next section.
Now you are ready to edit the save data file using PSDX. The snippet below shows the typical usage of the library:
using PSDX;
// Open the save data file and pass it to PSDX.
using var fs = new FileStream("cb2.mcs", FileMode.Open);
var cb2 = new CrashBandicoot2SaveData(fs);
// Edit the file.
cb2.SetLives(100);
cb2.SetAkuAkuMasks(2);
// Save the changes to another file.
using var fs2 = new FileStream("cb2edited.mcs", FileMode.Create);
cb2.GetStream().CopyTo(fs2);
Beware that most functions throw exceptions if their arguments are wrong, so if you don't trust the input, use try-catch
blocks wisely.
Run the program to create your custom game save data file.
Load the file created in the previous section in the emulator and play the game the way you like.
This project would not have been possible without the help of:
- DuckStation, the emulator that I used to test the game.
- The tonyhax repository where I found the checksum algorithm for Crash Bandicoot 2.
- This wiki that contains information about the format of the PlayStation memory card.