thingsiplay / tochd

Convert game ISO and archives to CD/DVD CHD for emulation on Linux.
MIT License
78 stars 9 forks source link

-m dvd switch does not activate DVD mode #10

Open cammelspit opened 4 months ago

cammelspit commented 4 months ago

I have tried to recompress my entire psp collection 3 times and the -m dvd switch does not function at all. PPSSPP still warns that the resulting chd files are compressed using CD mode and not dvd mode. Please advise what troubleshooting steps I can take to assist in helping track down this bug.

For clarity, my sets were previously compressed using T7z from a ROM manager many years ago and I am still working from those files. I fed tochd a command like this. 'tochd -m dvd "*.7z"' from withing the directory holding all files. Since my Linux server runs Slackware, which can be a pain to add unsupported apps, I instead used this command from a pure Arch virtual machine that mounted the roms directory via NFS over a virtual network adapter bridged to the host OS for speed.

Tochd has worked a treat with all my other collections I have converted for direct play over the network perfectly, only with PSP being the first that requires the dvd switch from chd man. Even PS2 DVD games seem to not work unless compressed in CD mode so those all work fine.

I am using the version of tochd directly off the AUR installed with yay and I think that just about describes anything unique about my setup I can think of.

Thank you in advance for any help you can provide.

thingsiplay commented 4 months ago

Hi. I think this might be the issue described here: https://github.com/thingsiplay/tochd/issues/6

In short, it's not an issue with tochd, but chdman itself. The -m dvd option actually works as expected from perspective of tochd, but chdman creates dvd files with a hunksize of 4096. But PPSSPP expects a hunksize of 2048. This is a unique problem with this emulator so far, or this file format. I thought future versions of chdman would have the correct value, but seems not to be the case?

I added an option to set the correct hunksize manually, especially for this case here. Maybe I should make a more clear explanation in the README at least... some day. So when converting to PSP DVD format, use option -H or --hunksize:

tochd --hunksize 2048 -m dvd

I hope this will help. The wrong hunksize should theoretically still work on PSP emulator, but its not optimal according to the developers. That's why they added a warning. I use PPSSPP through RetroArch and don't get any warnings. And as you said, oddly enough the dvd option does not work for PS2 games as well. So no idea why that is. These -m dvd or cd options are directly using the cd or dvd commands in chdman itself.

From my knowledge, only PPSSPP wants this in this format.