I am taking advantage of the patch.bin file that Ratchet: Deadlocked uses. I've known how to use the patch file for a while now, and i decided to take my knowledge and learning farthur. I am using the patch.bin file to hook into the kernel of te PS2, then it copies the needed Deadlocked-Chaos codes into EE memory and runs via a second hook.
Why not just use a cheat device? This is more fun. And this way I can just share a save file with an edited patch.bin file for others to play right away.
- Current code in
Codes/main.c
is Infinite Health/Moon Jump. It works in Single Player only.
- Obtain a copy of the mod. Whether you compile it or get a shared save, you're choice.
- Once the file/save is in the correct spot, start the game.
- Once loaded, Go to "Mulitplayer". The mod will automatically load.
- Once on the multiplayer menu, Press Circle to Enable/Disable the mod.
- Once Enabled, Exit by pressing triangle and then choose single player and choose a new save (or a current save...?).
- Enjoy the mod!
Clone Repo:
git clone https://github.com/Metroynome/deadlocked-patch-loader.git
cd deadlocked-patch-loader
Get PS2SDK via docker:
docker pull ps2dev/ps2dev:v1.2.0
docker run -it --rm -v "$PWD\:/src" ps2dev/ps2dev:v1.2.0
cd src
./docker-init.sh
Make it:
make clean && make
When building, it also creates a codes.pnach
cheat file in Codes/
. This is so you can test the mod with PCSX2, without the need of loading into the Multiplayer Menu.
- Compile
Codes/
directory This holds all the Chaos-Mod codes/timers- Compile
codes.bin
andcodes.elf
(stripped .elf) - Convert
codes.elf
tocodes.s
- copy
codes.s
to/../Kernel
- Compile
- Compile
Kernel/
directory This is where the code can hook into the kernel via thepatch.bin
- Compile
kernel.bin
andkernel.elf
with an addedcodes.s
added to theEE_OBJ
line. - copy
kernel.bin
to/../bin
- Compile
- Compile
bin/
directory This is where the newpatch.bin
file is created.- Copy
patch-template.bin
fromtemplate/
tobin/
aspatch.bin
- Write
kernel.bin
file intopatch.bin
at offset0x100
, or256
bytes
- Copy
Module | Kernel Address | EE Address |
---|---|---|
Kernel Engine | 0x80047010 |
N/A |
Exception Display | 0x80079000 |
0x000C8000 |
Codes.bin | 0x80050000 |
0x000F0000 |