PlayStation Disc Burner (PSDB)

PS2 PSDB: Patch (ESR, Master Disc, PSX80MP, LibCrypt, etc.) + Burn PS2 and PS1 Discs v1.0.5 (10/31/2025

alexfree

Developer
https://github.com/alex-free/playstation-disc-burner
https://alex-free.github.io/psdb

I just want to throw a .7z or whatever common sense input file into a program and have the disc burned with X patch applied (or no patch) and have it burned correctly at my desired burn speed, so I made PSDB (in the same vain as https://github.com/alex-free/dreamcast-cdi-burner).

It creates a new patched output file (for DVD ISOs) or folder (for CD BIN/CUE) named in an identifiable way in the same directory the input file is in (unless your input was a BIN or CUE file, that will cause it to make the output directory one directory above. where the original rip directory is). It's little things like this that make PSDB very useful. More info is on the github and website.

From Readme:

This is an open source tool kit that allows you to burn PS2 and PS1 backup discs on Linux, with the option of patching the disc image in various ways:
  • ESR patch PS2 games, and burn them to DVD-R.
  • Master Disc patch PS2 games, and burn them to CD-R or DVD-R.
  • LibCrypt patch PS1 games, and burn them to a CD-R.
  • PSX 80 Minute patch PS1 or PS2 games, and burn them to a CD-R.
  • Support for compressed files. If PSDB finds a file ending in .iso, .ISO, .cue, .CUE, .BIN, or .bin in a compressed archive format that p7zip supports it will automatically be extracted and configured for all features.
  • Burn PS2 and PS1 games to CD-R or DVD-R as-is (no patching). PDB correctly burns EDC/ECC protected PS1 games by default.
  • Save the desired burn speed to a configuration file, which can be set with a PSDB option.

TODO:
* Windows port
* FreeDVDBoot + ESR (self-boot)
* Add TOCPerfect patch
* Ability to set CD burn speed and DVD burn speed independently.
??
 
Last edited:
If Your goal is making ultimate PlayStation burner, then I have few more cool features ideas: ^^
  • support for *.vcd (normal PSX *.bin but instead *.cue, TOC dump glued on beginning of image, like in PSARs in *.pbp)
  • *.zso (LZ4), *.cso (Deflate, LZO, LZ4) and *.chd (LZMA+FLAC)
  • PTP>>OTP patch (thing what doing Toxic's Dual Layer patcher for DVD9)
  • correcting ECC on the fly (for PSX games which has been patched eg. translations)
 
Last edited:
If Your goal is making ultimate PlayStation burner, then I have few more cool features ideas: ^^
  • support for *.vcd (normal PSX *.bin but instead *.cue, TOC dump glued on beginning of image, like in PSARs in *.pbp)
  • *.zso (LZ4), *.cso (Deflate, LZO, LZ4) and *.chd (LZMA+FLAC)
  • PTP>>OTP patch (thing what doing Toxic's Dual Layer patcher for DVD9)
  • correcting ECC on the fly (for PSX games which has been patched eg. translations)

For handling ECC of those translations, I can implement https://github.com/alex-free/edcre to correct the data starting at the volume descriptor (sector 16) instead of sector 0 and keep cdrdao configured to not regenerate EDC/ECC data on burn. This won't trip EDC/ECC protection in the few Japanese PS1 games that use it (which looks at sectors before the volume descriptor) but will update EDC/ECC in any translation data modified in the disc image.

I think the best way to handle VCD would be to convert it to BIN/CUE internally on detection (for patching/burning handling) but output a VCD (converted it back when patching is done). Is there any exsisting converter to BIN/CUE from VCD and then back (preferably open source to recompile on Linux), or is that something to implement myself? Doesn't seem to complicated from your description. The other file types would be harder if no converter is available.

Is there any information on how the Toxic DL patcher works? I did want to include that in v1.0 but I never found any source code to the patcher or other info about how it works.

FreeDVDBoot+ESR combination doesn't seem to bad to make a patcher for thanks to the FreeDVDBoot writeup. I know there are some patchers that already do this available, but I don't think they are open source either.

It's impossible to combine FreeDVDBoot+Master Disc in the same way, yes? I assume since the DVD is identified as DVD-Video to the console for the exploit, there's no way to have one disc exploit FreeDVDBoot and then load as a master disc (using an intemediete loader essentially calling wLaunchELF's 'PS2Disc' boot option)?
 
VCD can be created by PS2VCD but it is winapi closed src unfortunately. However, it is binary the same TOC structure as on real CD (1MiB or 2MiB, I don't remember now) + binary the same 2336/2352 image glued right after. Am I right? @krHACKen

Toxic program was always closed src. OTP/PTP security came first with Gran Turismo 4 and used later with Xenosagas and Rogue Galaxy, maybe with GoW2 too but I dunno.

Why not? They not conflicting and unhacked MechaCons on retails should ignore debug stuff. But if fake DVD-Video be detected, then disc will be recognized as DVD-Video, so even with master disc hybrid, it will be pass through for ESR/DVD-Player only. Am I right? ;) @El_isra
 
VCD can be created by PS2VCD but it is winapi closed src unfortunately. However, it is binary the same TOC structure as on real CD (1MiB or 2MiB, I don't remember now) + binary the same 2336/2352 image glued right after. Am I right? @krHACKen

Toxic program was always closed src. OTP/PTP security came first with Gran Turismo 4 and used later with Xenosagas and Rogue Galaxy, maybe with GoW2 too but I dunno.

Why not? They not conflicting and unhacked MechaCons on retails should ignore debug stuff. But if fake DVD-Video be detected, then disc will be recognized as DVD-Video, so even with master disc hybrid, it will be pass through for ESR/DVD-Player only. Am I right? ;) @El_isra

Yes that is the problem I see with a master disc freedvdboot hybrid.

Something very interesting, I had to dust off windows because the toxic dl patcher surprisingly doesn't work in wine. Good news is a PPF patch is only ~26KB, so that is a solution there. I could just make a program that contains all the ppf patches in unsigned char arrays and does boot file detection on the input disc image, then applying the patch to the small number of DVD-DL games. Attached is a PPF patch (no fancy description text or undo data, just a proof of concept) for Gran Turismo 4 USA. It is much smaller then I thought it would be. I also hex diff'd the original and patched files, trying to figure out what the patch is doing to reverse it (attached as out.txt, left=original byte right=new patched byte).

I also saw some interesting strings while having GT4 open in the hex editor, referencing master discs containing 1 layer of data each seperatly (so they didn't need to burn a DL disc each time, they could burn layer 0 to one disc and layer 1 to another, I actually am not sure if the sony tools could do it any other way.

Screenshot from 2024-07-12 11-08-55.png
 

Attachments

Last edited:
Could the above code be somehow re-activated in the final game @Berion @krHACKen ? Looks like I was right, developers would create a layer 0 and a layer 1 disc image with sony tools (which couldn't make a single combined dual layer image) and DVD-R DL didn't exist until mid-2004, well into the development of just Gran Turismo 4. See https://www.obscuregamers.com/threa...aster-cd-r-or-dvd-r-image.772/post-15982.html . The strings are right there still in the executable, and we can make a master disc easily! Two DVD-Rs, yes, but not every burner can even burn DL and of course the OTP patch neccesity. This is quite exciting to me.
 
I don't know. ^^ What I know is main resource is split into two parts GTVOL1 and GTVOL2 (second on second layer, not written in TOC so "invisible").

My thinking is (if this code isn't really disabled)

1) Seperate the ISO into 2 layers via imgburn, which I believe supports this idea with the right options. If not, use the CD to DVD related info floating about to re-create the disc image in 2 layers using sony tools and knowledge of the final build's file's LBA's.

2) With 2 different ISO images. master disc patch them. See what happens when only the first layer disc is inseted (layer 0). I know there is a layer break just about immedielty, very convient, when the disc boots it seems to try to load data from the second layer pretty early. As in we don't need to wait till something specific happens to find out what we are doing is working. That in itself seems to be a debug leftover...

3) It should ask for the next disc via at least serial debug if the code is activated via presence of master disc data... then just maybe re-creating the dev env for this game is enough to get our desired behavior... The only issue I see with this if the remainig code is only applicable to a dev unit that is based on emulating a DVD-ROM DL with PC-based tools to do so. Even then, I see some other exploit vectors if I can somehow piece together what the sony tools are 'providing' as hardware....
 
v1.0.1 (7/25/2024)



Changes:
  • Added an option to select a specific burner to use. This is saved to a configuration file used on startup. The Linux default is /dev/sr0, but if you have multiple burners this could be /dev/sr1, /dev/sr2, etc..
  • Added automatic installation of build dependencies for APT Linux systems (Pop!OS, Ubuntu, Debian, etc.) in the build script.
  • Added support for building for Linux i686 (x86 32 bit Pentium or better) to the build script.
  • Updated burn functions to check for if the user is already root before executing either the cdrdao or cdrecord executable with sudo.
  • Added my EDCRE. EDC/ECC is now corrected if it is found invalid in any sectors after the system volume descriptor, where game data lives. Sectors before the system volume descriptor are left untouched as invalid EDC/ECC in those sectors are used in EDC protected PS1 games.
 
v1.0.3 (8/7/2024)

Changes:
  • Added ability to set a burn speed for CD and DVDs independently. You can have one speed set for CDs, and another for DVDs.
  • Updated EDCRE to version 1.0.8.
  • Added ability to set burn speed with command line arguments (-cds <cd burn speed> or -dvds <dvd burn speed>) without having to give a valid input file first.
  • Added ability to set the burner with command line arguments (-b <burner>) without having to give a valid input file first.
  • Fixed setting burner in the DVD ISO options menu.
 
alexfree updated PlayStation Disc Burner (PSDB) with a new update entry:

@alexfree , I saw that @Berion was talking about .VCD patching for PS1 pops games.
In case this is useful, here's the C source code for the "pops2cue" tool: https://github.com/bucanero/pops2cue/blob/main/pops2cue.c

It's pretty simple and will generate a .cue/.bin from a popstarter .VCD file. Since it's standard C code, I bet it can be chained with your current code to do vcd -> cue/bin -> patch image.

I hope it helps, cheers
 
alexfree updated PlayStation Disc Burner (PSDB) with a new update entry:

PlayStation Disc Burner v1.0.5

Changes:
* Now can burn VCD files!

* RAW burning toggle now enabled for all CD related burn/patch options.

* EDC/ECC now corrected starting at the volume descriptor sector for all CD burning options in RAW writing mode.

* Added support for [PSX Undither](https://github.com/alex-free/psx-undither) patching and burning.

* Displays output directory of patched file when done.

* Improved build script.

* Improved readme.

* Now licensed under the 3-BSD license.

Read the rest of this update entry...
 
Back
Top