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

CD-ROM: Support PREGAP in .cue files #459

Merged
merged 2 commits into from
Sep 26, 2024
Merged

CD-ROM: Support PREGAP in .cue files #459

merged 2 commits into from
Sep 26, 2024

Conversation

PetteriAimonen
Copy link
Collaborator

@PetteriAimonen PetteriAimonen commented Sep 26, 2024

Previously PREGAP specifier in .cue files was ignored.
This pull request adds support for it.

Also includes fix for incorrect image length if sector size is not divisible by 512. Previously for CD files in 2352 sector format the reported data length could be one sector too short.

Tests done:

  • The .cue file provided in Wrong analysis of TOC #422 with readcd -fulltoc and cdrdao read-cd now produces identical results as with real Lite-On CD drive and CD-R burned from the same files.
  • beos-5.0.3-professional-gobe.cue with cdrdao read-cd gives identical .bin and .cue as the input data (this was working already previously, tested against to check for any regressions).

Fixes #422.

… bytes

CD images in bin/cue format can have sector size that is not divisible by 512.
That's why the real file size must be reported and not rounded to sector boundary.
Only use sector-aligned size for RAW mapping.
When CD-ROM image has PREGAP specified, that is included in TOC
timestamps but not actually present in the image file. Adjust
data_start and track_start accordingly.
@aperezbios aperezbios merged commit 356bbe8 into main Sep 26, 2024
2 checks passed
@aperezbios aperezbios deleted the dev_fix_422 branch September 26, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong analysis of TOC
2 participants