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: Added cdvdTrack, cdvdTrackIndex, assigned subQ from hardware reads #11800

Merged
merged 2 commits into from
Sep 21, 2024

Conversation

weirdbeardgame
Copy link
Contributor

@weirdbeardgame weirdbeardgame commented Sep 11, 2024

Description of Changes

Added cdvdTrack, cdvdTrackIndex, changed sub Q mode field to ADR

Rationale behind Changes

  • Prep work for track-based formats like CHD, BIN / CUE. Using cdvdTrack as a common type for all track reading formats including CDVD Disc reader.

  • Other than that, moar accuracy

Suggested Testing Steps

Already tested, PR makes no significant changes to CD-based games outside of more correct SubQ reads and fixes Track layout in array. This fixes Dance Factory by pushing tracks into, 0 indexed array instead of 1 indexed

pcsx2/CDVD/Windows/IOCtlSrc.cpp Outdated Show resolved Hide resolved
pcsx2/CDVD/Windows/IOCtlSrc.cpp Outdated Show resolved Hide resolved
pcsx2/CDVD/Linux/IOCtlSrc.cpp Outdated Show resolved Hide resolved
pcsx2/CDVD/Windows/IOCtlSrc.cpp Show resolved Hide resolved
pcsx2/CDVD/Darwin/IOCtlSrc.cpp Outdated Show resolved Hide resolved
pcsx2/CDVD/CDVDdiscReader.cpp Show resolved Hide resolved
pcsx2/CDVD/CDVDdiscReader.cpp Outdated Show resolved Hide resolved
pcsx2/CDVD/CDVDdiscReader.cpp Outdated Show resolved Hide resolved
@weirdbeardgame weirdbeardgame force-pushed the tracks branch 2 times, most recently from 6cd4ce3 to 1a4a255 Compare September 11, 2024 13:42
pcsx2/CDVD/CDVDdiscReader.cpp Outdated Show resolved Hide resolved
pcsx2/CDVD/CDVDdiscReader.cpp Outdated Show resolved Hide resolved
pcsx2/CDVD/CDVDdiscReader.cpp Outdated Show resolved Hide resolved
@weirdbeardgame
Copy link
Contributor Author

Just pushed the commit that fixed Dance Factory.

pcsx2/CDVD/Windows/IOCtlSrc.cpp Outdated Show resolved Hide resolved
pcsx2/CDVD/Windows/IOCtlSrc.cpp Outdated Show resolved Hide resolved
pcsx2/CDVD/CDVDcommon.h Outdated Show resolved Hide resolved
used IOCtl SubQ reads to get proper control register
Added Checks for Control fields.
@F0bes
Copy link
Member

F0bes commented Sep 16, 2024

I'm awaiting the arrival of my DVD drive and I'll be hardware testing this.

@TheLastRar
Copy link
Contributor

TheLastRar commented Sep 16, 2024

The second commit needs to be prefixed (presumably with CDVD: like the first commit)

@weirdbeardgame
Copy link
Contributor Author

done

@F0bes
Copy link
Member

F0bes commented Sep 18, 2024

Certainly an improvement to master.
There seems to be some other info missing from bytes 4 5 and 6 for each track (diff the results). I don't know if that could be in the scope of this PR?

EDIT: Here is the ELF I used, it's just zipped.
dvdmark.zip

PS2 Results
Number of tracks: 14
Track 1: 150 (type:1)
        00:02:00
        (01 00 01 02 30 36 00 00 02 00)
Track 2: 20442 (type:1)
        04:32:42
        (01 00 02 02 30 39 00 04 32 42)
Track 3: 40275 (type:1)
        08:57:00
        (01 00 03 02 30 42 00 08 57 00)
Track 4: 57852 (type:1)
        12:51:27
        (01 00 04 02 30 45 00 12 51 27)
Track 5: 71240 (type:1)
        15:49:65
        (01 00 05 02 30 48 00 15 49 65)
Track 6: 99225 (type:1)
        22:03:00
        (01 00 06 02 30 51 00 22 03 00)
Track 7: 121637 (type:1)
        27:01:62
        (01 00 07 02 30 54 00 27 01 62)
Track 8: 146492 (type:1)
        32:33:17
        (01 00 08 02 30 57 00 32 33 17)
Track 9: 172095 (type:1)
        38:14:45
        (01 00 09 02 30 60 00 38 14 45)
Track 10: 179315 (type:1)
        39:50:65
        (01 00 10 02 30 63 00 39 50 65)
Track 11: 194510 (type:1)
        43:13:35
        (01 00 11 02 30 66 00 43 13 35)
Track 12: 216522 (type:1)
        48:06:72
        (01 00 12 02 30 67 00 48 06 72)
Track 13: 247447 (type:1)
        54:59:22
        (01 00 13 02 30 21 00 54 59 22)
Track 14: 265215 (type:1)
        58:56:15
        (01 00 14 02 30 24 00 58 56 15)
PS2 (PR) Results
Number of tracks: 14
Track 1: 0 (type:0)
        00:00:00
        (00 00 00 00 00 00 00 00 00 00)
Track 2: 20442 (type:1)
        04:32:42
        (01 00 01 00 00 00 00 04 32 42)
Track 3: 40275 (type:1)
        08:57:00
        (01 00 02 00 00 00 00 08 57 00)
Track 4: 57852 (type:1)
        12:51:27
        (01 00 03 00 00 00 00 12 51 27)
Track 5: 71240 (type:1)
        15:49:65
        (01 00 04 00 00 00 00 15 49 65)
Track 6: 99225 (type:1)
        22:03:00
        (01 00 05 00 00 00 00 22 03 00)
Track 7: 121637 (type:1)
        27:01:62
        (01 00 06 00 00 00 00 27 01 62)
Track 8: 146492 (type:1)
        32:33:17
        (01 00 07 00 00 00 00 32 33 17)
Track 9: 172095 (type:1)
        38:14:45
        (01 00 08 00 00 00 00 38 14 45)
Track 10: 179315 (type:1)
        39:50:65
        (01 00 09 00 00 00 00 39 50 65)
Track 11: 194510 (type:1)
        43:13:35
        (01 00 10 00 00 00 00 43 13 35)
Track 12: 216522 (type:1)
        48:06:72
        (01 00 11 00 00 00 00 48 06 72)
Track 13: 247447 (type:1)
        54:59:22
        (01 00 12 00 00 00 00 54 59 22)
Track 14: 265215 (type:1)
        58:56:15
        (01 00 13 00 00 00 00 58 56 15)
PCSX2 (MASTER) Results

Number of tracks: 14
Track 1: 0 (type:0)
        00:00:00
        (00 00 00 00 00 00 00 00 00 00)
Track 2: 150 (type:1)
        00:02:00
        (01 00 01 00 00 00 00 00 02 00)
Track 3: 20442 (type:1)
        04:32:42
        (01 00 02 00 00 00 00 04 32 42)
Track 4: 40275 (type:1)
        08:57:00
        (01 00 03 00 00 00 00 08 57 00)
Track 5: 57852 (type:1)
        12:51:27
        (01 00 04 00 00 00 00 12 51 27)
Track 6: 71240 (type:1)
        15:49:65
        (01 00 05 00 00 00 00 15 49 65)
Track 7: 99225 (type:1)
        22:03:00
        (01 00 06 00 00 00 00 22 03 00)
Track 8: 121637 (type:1)
        27:01:62
        (01 00 07 00 00 00 00 27 01 62)
Track 9: 146492 (type:1)
        32:33:17
        (01 00 08 00 00 00 00 32 33 17)
Track 10: 172095 (type:1)
        38:14:45
        (01 00 09 00 00 00 00 38 14 45)
Track 11: 179315 (type:1)
        39:50:65
        (01 00 10 00 00 00 00 39 50 65)
Track 12: 194510 (type:1)
        43:13:35
        (01 00 11 00 00 00 00 43 13 35)
Track 13: 216522 (type:1)
        48:06:72
        (01 00 12 00 00 00 00 48 06 72)
Track 14: 247447 (type:1)
        54:59:22
        (01 00 13 00 00 00 00 54 59 22)
cdparanoia
Table of contents (audio tracks only):
track        length               begin        copy pre ch
===========================================================
  1.    20292 [04:30.42]        0 [00:00.00]    no   no  2
  2.    19833 [04:24.33]    20292 [04:30.42]    no   no  2
  3.    17577 [03:54.27]    40125 [08:55.00]    no   no  2
  4.    13388 [02:58.38]    57702 [12:49.27]    no   no  2
  5.    27985 [06:13.10]    71090 [15:47.65]    no   no  2
  6.    22412 [04:58.62]    99075 [22:01.00]    no   no  2
  7.    24855 [05:31.30]   121487 [26:59.62]    no   no  2
  8.    25603 [05:41.28]   146342 [32:31.17]    no   no  2
  9.     7220 [01:36.20]   171945 [38:12.45]    no   no  2
 10.    15195 [03:22.45]   179165 [39:48.65]    no   no  2
 11.    22012 [04:53.37]   194360 [43:11.35]    no   no  2
 12.    30925 [06:52.25]   216372 [48:04.72]    no   no  2
 13.    17768 [03:56.68]   247297 [54:57.22]    no   no  2
 14.    28055 [06:14.05]   265065 [58:54.15]    no   no  2
TOTAL  293120 [65:08.20]    (audio only)

Copy link
Member

@F0bes F0bes left a comment

Choose a reason for hiding this comment

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

As I said in my comment this brings master closer to a real console.
I tested both Linux and Windows and they produce an identical result.
It was also smoke tested by some people.

@F0bes F0bes merged commit 9520140 into PCSX2:master Sep 21, 2024
12 checks passed
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