Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDVD: CHD cue support for audio CDs #12037

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

CDVD: CHD cue support for audio CDs #12037

wants to merge 3 commits into from

Conversation

F0bes
Copy link
Member

@F0bes F0bes commented Nov 26, 2024

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 :)

@F0bes F0bes marked this pull request as ready for review November 28, 2024 20:21
@F0bes
Copy link
Member Author

F0bes commented Nov 28, 2024

Okay, this PR is ready for testing. Feel free to test CHD games as well.

@@ -271,7 +293,7 @@ bool InputIsoFile::tryIsoType(u32 size, u32 offset, u32 blockofs)
// Returns true if the image is valid/known/supported, or false if not (type == ISOTYPE_ILLEGAL).
bool InputIsoFile::Detect(bool readType)
{
m_type = ISOTYPE_ILLEGAL;
m_type = ISOTYPE_ILLEGAL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot the space here.

return {};
}


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra line.

@lostgamer-ops13
Copy link

Great work! 🤗Is this also related to #4880 as I have a few bin/cue games?

@TheLastRar
Copy link
Contributor

TheLastRar commented Nov 30, 2024

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

@F0bes
Copy link
Member Author

F0bes commented Nov 30, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants