captainys / TOWNSEMU

FM Towns Emulator "Tsugaru"
BSD 3-Clause "New" or "Revised" License
247 stars 18 forks source link

current cue disc parsing library doesn't have mutli-bin support. - maybe switch to to libcue to enable multi-bin support.? #20

Closed wiggy2k closed 3 years ago

wiggy2k commented 3 years ago

as title.

i have had problems launching titles in multi-bin/cue file format. Given that there is a big push from Redump members (including 100's of FMT discs entries to the DB from myself and 100s more yet to come) it would be good if if the frontend could support bin/cue (have yet to see anything for FMT preservation that requires anything from the subchannels so CCD is a bit of a misnomer in this case)

captainys commented 3 years ago

Thank you for your input. I can try adding support for multi-binary CUE format. But, in my experience, multi-binary CUE format is inconsistent in handling PREGAP. CUE file itself does not have a concrete standard, and different disc-imaging tools create slightly different CUE file, but multi-binary makes it substantially worse. Especially, probably due to the mishandling of PREGAP, very often the total length of multiple binaries does not match the size of the binary from the single-binary format. Often 300KB longer than actual. 300KB is for 2 seconds as most of the PREGAPs are 2-second long. I have never seen different disc-imaging tool create binary files of different length if you make it in a single-binary CUE format. I can make it better if I am able to tell where I need to skip 300KB from the CUE file, but not the case. In such a longer multi-binary CUE, PREGAP randomly exists or doesn’t exist. My best suggestion is keep it single-binary. That said, I should be able to make some of the programs runnable from a multi-bin CUE format. Tsugaru has absolutely zero external dependencies, and I want to keep it this way. Too many projects collapsed after taking too many external dependencies. (Libraries under externals directory are all from my other repositories.) So, I wouldn’t take libcue. Sorry. It would be a great help if you know of an official CUE-file format. I have found various contradicting format descriptions. I had to read CUE files to develop my own interpretation.

captainys commented 3 years ago

I have made a release that includes a support for multi-binary CUE format. However, unless the multi-binary dump is made correctly, those titles that looks at TOC to check the presence of the original disc will not work. In my experience, a disc-imaging software rarely made a correct image whenever I chose the multi-binary option. One thing you can check if the multi-binary image is correct or not is to compare the total binary size with the single-binary image. Multi-binary image is typically larger, in which case the image is most likely doomed. CD-ROM is not made multi-binary. CD-ROM is just soup of sectors. Even between data track and audio track, there is nothing clearly divide tracks. Only TOC gives the meaning. From the controller point of view, you can totally ignore TOC and send a single command to start playing in the middle of track 2 all the way to the middle of track 3. The CD drive doesn’t care about the track boundary. So, again my best suggestion is to keep it a single-binary CUE.

fuzz6001 commented 3 years ago

@captainys シングルbinとマルチbinは相互に可逆変換(というか、ただの分割/結合ですが)出来るはずで、それが一致しないというのは吸い出し方法、もしくは、吸い出しツールに問題があると思います。 私もマルチbin対応を秘かに望んでいたので、今回の対応はありがたいです。