dragoonDorise / EmuDeck

Emulator configurator for Steam Deck
GNU General Public License v3.0
2.84k stars 206 forks source link

[Bug Report] PS2 ISO files compressed to CHD using 'createdvd' are unreadable by AetherSX2 and NetherSX2. #1128

Open ianmacd opened 6 months ago

ianmacd commented 6 months ago

Prerequisite Steps

What distro are you running?

SteamOS / Android

Which SteamOS Branch are you using?

Stable

What happened?

Not really a bug as such, but I noticed that the PS2 ISOs I compressed to .chd format by EmuDeck on my SteamDeck are not recognised as valid game files by AetherSX2 and NetherSX2 build 4268. I haven't tried other builds, but would anticipate the same issue, due to the age of the code in these apps.

Whilst this is not a bug in EmuDeck (or even chdman), it is an issue, because AetherSX2 and NetherSX2 cannot simply be updated to work. As you know, one is a defunct closed source project, and the other is a binary patch to the first.

I've verified on Linux that any PS2 ISO compressed to CHD with chdman createcd is unusable by AetherSX2 and NetherSX2, so the workaround is to decompress the CHD files back to ISO, and then recompress them to CHD using chdman createcd. This isn't a terribly satisfying solution, however, because one must then either maintain a separate set of PS2 game files for use with these Android apps, or forgo the compression benefit offered by createdvd.

There's probably no better solution at present, but I wanted to at least make you aware of the issue.

Relevant log output

No response

ghost commented 6 months ago

It's maybe not the best solution, but you could open up chddeck.sh in Emulations/tools/chdconv and update the line on 398 to compressCHD "$f" to bulk convert your ROMs using createcd.

You'd need to open chddeck.sh from this folder by double clicking it since I'm pretty sure the app opens it from the backend folder.

dragoonDorise commented 5 months ago

@rawdatafeel so this is an issue in aether/nether? or should we change the way the compression is made?

dragoonDorise commented 4 months ago

@Godsbane ?

vajra108 commented 2 months ago

Hello, do check if they are compressed using ZStandard with chdman with $chdman info -i file.chd I have just compressed my whole library using default createdvd compression on the latest chdman from mame and none were readable :( I'll paste two examples bellow, the first is done with Zstandard and is not readable:

PS W:\EMULATION UTILS TOOLS\CHD MACHINE> .\chdman.exe info -i '.\Final Fantasy X International.chd'
chdman - MAME Compressed Hunks of Data (CHD) manager 0.267 (mame0267)
Input file:   .\Final Fantasy X International.chd
File Version: 5
Logical size: 4,527,521,792 bytes
Hunk Size:    4,096 bytes
Total Hunks:  1,105,352
Unit Size:    2,048 bytes
Total Units:  2,210,704
Compression:  zstd (Zstandard)
CHD size:     4,166,463,729 bytes
Ratio:        92.0%
SHA1:         7102ec603bc3603da43f21fc801d9250743d94fc
Data SHA1:    6c97681f621716024f9a16f84c0835c06dd4bfd7
Metadata:     Tag='DVD '  Index=0  Length=1 bytes

Now this is an older chd that probably didn't have the createdvd option and is using CD compression, this is readable:

PS W:\EMULATION UTILS TOOLS\CHD MACHINE> .\chdman.exe info -i '.\Tony Hawk''s Underground (USA).chd'
chdman - MAME Compressed Hunks of Data (CHD) manager 0.267 (mame0267)
Input file:   .\Tony Hawk's Underground (USA).chd
File Version: 5
Logical size: 5,570,629,632 bytes
Hunk Size:    19,584 bytes
Total Hunks:  284,448
Unit Size:    2,448 bytes
Total Units:  2,275,584
Compression:  cdlz (CD LZMA), cdzl (CD Deflate), cdfl (CD FLAC)
CHD size:     3,700,036,741 bytes
Ratio:        66.4%
SHA1:         b80a9595b5fec5b1e10ac7c8a959611f5199117f
Data SHA1:    1bf242746280df36876fdefe3adab9307fc2cde9
Metadata:     Tag='CHT2'  Index=0  Length=90 bytes
              TRACK:1 TYPE:MODE1 SUBTYPE:NONE FRAMES:2275584 PREGAP:0 PGTY