CDVD: CHD cue support for audio CDs
This PR allows PCSX2 to use the cue data in CHDs. (Allowing audio CHDs to work)
It seems to work with the OSDSYS CD player It also seems to work with dance factory
I would like people to test their audio discs as CHDs. Look for improper track starting points (they are probably accumulative so the last track would be the best track to see), and also that audio sounds correct.
Please turn down your volume when testing at first. Audio issues can be very,very loud.
The weirder the disc the better. If you find a non-working disc please provide the cue file, that will help me debug :)
Okay, this PR is ready for testing. Feel free to test CHD games as well.
Great work! 🤗Is this also related to #4880 as I have a few bin/cue games?
My BIOS doesn't provide the option to play my copy of Tomb Raider as an audio CD
chdman info output
Input file: D:\Emulators\Roms\PS1\SLES_000.24.CP.Tomb Raider.chd
File Version: 5
Logical size: 637,341,696 bytes
Hunk Size: 19,584 bytes
Total Hunks: 32,544
Unit Size: 2,448 bytes
Total Units: 260,352
Compression: cdlz (CD LZMA), cdzl (CD Deflate), cdfl (CD FLAC)
CHD size: 311,817,951 bytes
Ratio: 48.9%
SHA1: 0d451578ebd4a3e79132590e6aff425379dd35e4
Data SHA1: 15f98c05529da33ff65a06518c27790862e17751
Metadata: Tag='CHT2' Index=0 Length=93 bytes
TRACK:1 TYPE:MODE2_RAW SUBTYPE:NONE FRAMES:124758 PREGAP:0 P
Metadata: Tag='CHT2' Index=1 Length=90 bytes
TRACK:2 TYPE:AUDIO SUBTYPE:NONE FRAMES:14593 PREGAP:150 PGTY
Metadata: Tag='CHT2' Index=2 Length=90 bytes
TRACK:3 TYPE:AUDIO SUBTYPE:NONE FRAMES:4798 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=3 Length=90 bytes
TRACK:4 TYPE:AUDIO SUBTYPE:NONE FRAMES:9264 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=4 Length=90 bytes
TRACK:5 TYPE:AUDIO SUBTYPE:NONE FRAMES:9011 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=5 Length=90 bytes
TRACK:6 TYPE:AUDIO SUBTYPE:NONE FRAMES:5774 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=6 Length=90 bytes
TRACK:7 TYPE:AUDIO SUBTYPE:NONE FRAMES:4191 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=7 Length=90 bytes
TRACK:8 TYPE:AUDIO SUBTYPE:NONE FRAMES:5119 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=8 Length=90 bytes
TRACK:9 TYPE:AUDIO SUBTYPE:NONE FRAMES:3006 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=9 Length=91 bytes
TRACK:10 TYPE:AUDIO SUBTYPE:NONE FRAMES:5946 PREGAP:150 PGTY
Metadata: Tag='CHT2' Index=10 Length=90 bytes
TRACK:11 TYPE:AUDIO SUBTYPE:NONE FRAMES:637 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=11 Length=91 bytes
TRACK:12 TYPE:AUDIO SUBTYPE:NONE FRAMES:1124 PREGAP:150 PGTY
Metadata: Tag='CHT2' Index=12 Length=90 bytes
TRACK:13 TYPE:AUDIO SUBTYPE:NONE FRAMES:528 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=13 Length=90 bytes
TRACK:14 TYPE:AUDIO SUBTYPE:NONE FRAMES:905 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=14 Length=90 bytes
TRACK:15 TYPE:AUDIO SUBTYPE:NONE FRAMES:828 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=15 Length=91 bytes
TRACK:16 TYPE:AUDIO SUBTYPE:NONE FRAMES:2913 PREGAP:150 PGTY
Metadata: Tag='CHT2' Index=16 Length=91 bytes
TRACK:17 TYPE:AUDIO SUBTYPE:NONE FRAMES:3214 PREGAP:150 PGTY
Metadata: Tag='CHT2' Index=17 Length=91 bytes
TRACK:18 TYPE:AUDIO SUBTYPE:NONE FRAMES:1899 PREGAP:150 PGTY
Metadata: Tag='CHT2' Index=18 Length=91 bytes
TRACK:19 TYPE:AUDIO SUBTYPE:NONE FRAMES:6645 PREGAP:150 PGTY
Metadata: Tag='CHT2' Index=19 Length=91 bytes
TRACK:20 TYPE:AUDIO SUBTYPE:NONE FRAMES:4067 PREGAP:150 PGTY
Metadata: Tag='CHT2' Index=20 Length=91 bytes
TRACK:21 TYPE:AUDIO SUBTYPE:NONE FRAMES:3092 PREGAP:150 PGTY
Metadata: Tag='CHT2' Index=21 Length=91 bytes
TRACK:22 TYPE:AUDIO SUBTYPE:NONE FRAMES:4763 PREGAP:150 PGTY
Metadata: Tag='CHT2' Index=22 Length=91 bytes
TRACK:23 TYPE:AUDIO SUBTYPE:NONE FRAMES:4319 PREGAP:150 PGTY
Metadata: Tag='CHT2' Index=23 Length=91 bytes
TRACK:24 TYPE:AUDIO SUBTYPE:NONE FRAMES:1153 PREGAP:150 PGTY
Metadata: Tag='CHT2' Index=24 Length=91 bytes
TRACK:25 TYPE:AUDIO SUBTYPE:NONE FRAMES:2763 PREGAP:150 PGTY
Metadata: Tag='CHT2' Index=25 Length=90 bytes
TRACK:26 TYPE:AUDIO SUBTYPE:NONE FRAMES:526 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=26 Length=90 bytes
TRACK:27 TYPE:AUDIO SUBTYPE:NONE FRAMES:526 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=27 Length=90 bytes
TRACK:28 TYPE:AUDIO SUBTYPE:NONE FRAMES:525 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=28 Length=90 bytes
TRACK:29 TYPE:AUDIO SUBTYPE:NONE FRAMES:526 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=29 Length=90 bytes
TRACK:30 TYPE:AUDIO SUBTYPE:NONE FRAMES:598 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=30 Length=90 bytes
TRACK:31 TYPE:AUDIO SUBTYPE:NONE FRAMES:526 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=31 Length=90 bytes
TRACK:32 TYPE:AUDIO SUBTYPE:NONE FRAMES:713 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=32 Length=90 bytes
TRACK:33 TYPE:AUDIO SUBTYPE:NONE FRAMES:717 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=33 Length=90 bytes
TRACK:34 TYPE:AUDIO SUBTYPE:NONE FRAMES:572 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=34 Length=90 bytes
TRACK:35 TYPE:AUDIO SUBTYPE:NONE FRAMES:539 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=35 Length=91 bytes
TRACK:36 TYPE:AUDIO SUBTYPE:NONE FRAMES:1271 PREGAP:150 PGTY
Metadata: Tag='CHT2' Index=36 Length=90 bytes
TRACK:37 TYPE:AUDIO SUBTYPE:NONE FRAMES:526 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=37 Length=90 bytes
TRACK:38 TYPE:AUDIO SUBTYPE:NONE FRAMES:526 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=38 Length=91 bytes
TRACK:39 TYPE:AUDIO SUBTYPE:NONE FRAMES:1206 PREGAP:150 PGTY
Metadata: Tag='CHT2' Index=39 Length=90 bytes
TRACK:40 TYPE:AUDIO SUBTYPE:NONE FRAMES:790 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=40 Length=90 bytes
TRACK:41 TYPE:AUDIO SUBTYPE:NONE FRAMES:526 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=41 Length=90 bytes
TRACK:42 TYPE:AUDIO SUBTYPE:NONE FRAMES:525 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=42 Length=90 bytes
TRACK:43 TYPE:AUDIO SUBTYPE:NONE FRAMES:688 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=43 Length=90 bytes
TRACK:44 TYPE:AUDIO SUBTYPE:NONE FRAMES:624 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=44 Length=90 bytes
TRACK:45 TYPE:AUDIO SUBTYPE:NONE FRAMES:741 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=45 Length=90 bytes
TRACK:46 TYPE:AUDIO SUBTYPE:NONE FRAMES:526 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=46 Length=90 bytes
TRACK:47 TYPE:AUDIO SUBTYPE:NONE FRAMES:526 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=47 Length=90 bytes
TRACK:48 TYPE:AUDIO SUBTYPE:NONE FRAMES:526 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=48 Length=91 bytes
TRACK:49 TYPE:AUDIO SUBTYPE:NONE FRAMES:1196 PREGAP:150 PGTY
Metadata: Tag='CHT2' Index=49 Length=90 bytes
TRACK:50 TYPE:AUDIO SUBTYPE:NONE FRAMES:525 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=50 Length=90 bytes
TRACK:51 TYPE:AUDIO SUBTYPE:NONE FRAMES:525 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=51 Length=90 bytes
TRACK:52 TYPE:AUDIO SUBTYPE:NONE FRAMES:526 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=52 Length=90 bytes
TRACK:53 TYPE:AUDIO SUBTYPE:NONE FRAMES:695 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=53 Length=90 bytes
TRACK:54 TYPE:AUDIO SUBTYPE:NONE FRAMES:526 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=54 Length=90 bytes
TRACK:55 TYPE:AUDIO SUBTYPE:NONE FRAMES:729 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=55 Length=90 bytes
TRACK:56 TYPE:AUDIO SUBTYPE:NONE FRAMES:526 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=56 Length=92 bytes
TRACK:57 TYPE:AUDIO SUBTYPE:NONE FRAMES:14925 PREGAP:150 PGT
Edit: also see emulog.txt
Great work! 🤗Is this also related to #4880 as I have a few bin/cue games?
Not at this moment, however converting your bin/cue files to CHD will allow Dance Factory (the game mentioned in the issue) to work.