CDRDAO Fork Which Can Burn PSX Games Containing EDC-Based Anti-Piracy Detection Correctly

alexfree

Well-Known Member
OP
Member
Joined
Nov 17, 2021
Messages
180
Trophies
0
Website
alex-free.github.io
XP
1,144
Country
United States
https://alex-free.github.io/cdrdao

CDRDAO is a portable open source CD ripping and burning program. My fork of CDRDAO described on this page fixes a fatal bug which prevented some PSX disc images which contain an additional (EDC-based) anti-piracy measure from being burned correctly by CDRDAO.

Burning With The Generic-MMC Driver​

For almost all PSX CD images (which do not contain an additional EDC-based anti-piracy measure), you have always been able to use one of the following commands below to burn a correct PSX CD-R disc with the official CDRDAO:

cdrdao write --speed 1 --driver generic-mmc --eject yourgamerip.cue

If using the above command results in a CD-R which has audio tracks containing loud static noise instead of the exepected, correct CD audio playback you need to byteswap the CD audio tracks while burning (by providing the --swap argument), with this alternative command below:

cdrdao write --speed 1 --driver generic-mmc --swap --eject yourgamerip.cue

The --swap argument is only required for some CD images that you want to burn, but not all.

You must first cd into the directory of the CD image rip before you run cdrdao, so that the .cue file of the rip is in the current directory

The generic-mmc driver (like almost every other CD burning program by default as well) corrects any incorrect EDC data it finds inside the CD image used while burning. This is actually a feature, and usually what you want. Unless you run into i.e. a PSX game which abuses this fact to provide an additional anti-piracy copy protection measure.

Introducing EDC-based additional anti-piracy copy protection found in some later PSX games. If you burn a CD image of a game which contains this EDC-based additional anti-piracy copy protection with the generic-mmc driver, CDRDAO (just like most other CD burning programs by default) will actually ‘correct’ incorrect EDC data it finds (which has been intentionally placed in various sector(s) of the original CD-ROM from which the CD image was originally ripped from). This changes what data the game itself reads from a specific part of the disc during a specific time/check function. If the game’s code itself doesn’t read the expected ‘incorrect’ EDC data, it knows that this disc is a copy and will lock up.

The good news is, there is a way around this. Some CD burning programs provide an option to not ‘update/correct’ EDC data as the CD image is burned to a CD-R. CDRDAO provides the generic-mmc-raw driver, which does offer this functionality. The problem is, since seemingly the inception of the generic-mmc-raw driver, the --swap argument does not work in combination with the generic-mmc-raw driver specifically due to a bug. This prevents you from burning a CD-R which both doesn’t update any EDC data, and has the correct byteorder for the CD audio tracks. CD images that do not require the --swap argument work as expected when burned by the generic-mmc-raw driver, but it is currently impossible to correctly burn CD images that do require the --swap argument with the generic-mmc-raw driver in the official CDRDAO.

I have finally tracked down this previously unknown bug, and provided a fix that I am trying to get into the official CDRDAO. For now, I have created my own fork which provides the bug fix enabling the --swap argument with the generic-mmc-raw driver correctly.

Burning With The Generic-MMC-Raw Driver​

So for almost any PSX game CD image (including those which contain additional EDC-based copy protection), you can use one of the below CDRDAO commands to correctly burn them:

cdrdao write --speed 1 --driver generic-mmc-raw --eject yourgamerip.cue

If using the above command results in a CD-R which has audio tracks containing loud static noise instead of the exepected, correct CD audio playback you need to byteswap the CD audio tracks while burning (by providing the --swap argument), with this alternative command below:

cdrdao write --speed 1 --driver generic-mmc-raw --swap --eject yourgamerip.cue

The --swap argument is only required for some CD images that you want to burn, but not all.
 

SylverReZ

Dat one with the Rez
Member
GBAtemp Patron
Joined
Sep 13, 2022
Messages
7,127
Trophies
3
Location
The Wired
Website
m4x1mumrez87.neocities.org
XP
21,861
Country
United Kingdom
Congratulations, alexfree on the release. Now it can finally be possible to burn games with EDC copy-protection measures the same way as to games with LibCrypt that couldn't be done many years ago up until now.
 
  • Like
Reactions: KleinesSinchen

KleinesSinchen

GBAtemp's Backup Reminder + Fearless Testing Sina
Member
GBAtemp Patron
Joined
Mar 28, 2018
Messages
4,429
Trophies
2
XP
14,871
Country
Germany
@alexfree You are unstoppable providing tools and information for the PS1!
I'd better not tell you what I thought at first when skimming over the thread title.
smilie_girl_331.gif
 

alexfree

Well-Known Member
OP
Member
Joined
Nov 17, 2021
Messages
180
Trophies
0
Website
alex-free.github.io
XP
1,144
Country
United States
alexfree, I have a question; are you going to add EDC patches in Tonyhax International?
No, simply because:
1) I'd have to figure out how the actual check works in the game code, and that might not be a 'standardized' thing anyways.
2) I have to ensure that the tonyhax international loader stays small in size for the current way it is setup in ram at the last usable 24KB. The loader also needs to be small so that it doesn't take up too much space on a memory card.

Official Tonyhax also has this policy. If you need to burn a game rip in a specific way for it to work, that is the correct fix from our standpoint.

The size of the loader also is why at least in Tonyhax International, the Anti-Piracy bypass system (dealing with modchip/swap trick checks, not EDC-checks) only bypasses checks that fail on stock consoles, not the checks that fail on chipped consoles.
 
  • Like
Reactions: SylverReZ

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: The mutated Axolotl was awesome