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

Wrong analysis of TOC #422

Closed
Kurist2010 opened this issue May 12, 2024 · 5 comments · Fixed by #459
Closed

Wrong analysis of TOC #422

Kurist2010 opened this issue May 12, 2024 · 5 comments · Fixed by #459
Assignees
Labels
bug Something isn't working

Comments

@Kurist2010
Copy link

When you load the bin+cue corresponding to the cue sheet below, the start position and total length of track 2 will be notified with a shift of the pregap (2 seconds). The file size of image.bin is 605908128 bytes.

image.cue

FILE "image.bin" BINARY
  TRACK 01 AUDIO
    INDEX 01 00:00:00
  TRACK 02 MODE1/2352
    PREGAP 00:02:00
    INDEX 01 01:06:19

For CD-ROM drives (this is correct)

Lead out - Red Book 57:18.64 - High Sierra 03EEE4       
Track 01 - Red Book 00:02.00 - High Sierra 000000 - CD/DA
Track 02 - Red Book 01:10.19 - High Sierra 0013FF - DATA

For v2024.04.01 (this is wrong)

Lead out - Red Book 57:16.63 - High Sierra 03EE4D       
Track 01 - Red Book 00:02.00 - High Sierra 000000 - CD/DA
Track 02 - Red Book 01:08.19 - High Sierra 001369 - DATA
@aperezbios aperezbios added the bug Something isn't working label May 12, 2024
@morio
Copy link
Collaborator

morio commented May 13, 2024

@Kurist2010 the current implementation of bin/cue doesn't support pregap. What are you using to grab the the track information? It would be helpful to use to test implementation of pregap support.

@Kurist2010
Copy link
Author

If you use CDP, a free software for MS-DOS of Japan's NEC PC-9801, you can display the TOC relatively easily. It can be obtained from the following, but separate hardware is required to operate it.

See here. This is a Japanese site.

@PetteriAimonen PetteriAimonen self-assigned this Sep 25, 2024
@PetteriAimonen
Copy link
Collaborator

I'm looking into this, so far I have managed to reproduce the issue using a CD-R burned from the .cue.

cdrtools readcd -fulltoc shows for physical CD-ROM drive:

Using dev=4,0,0.
Read  speed:  7056 kB/s (CD  40x, DVD  5x, BD  1x).
Write speed:  7056 kB/s (CD  40x, DVD  5x, BD  1x).
TOC len: 59. First Session: 1 Last Session: 1.
01 10 00 A0 00 00 00 00 01 00 00 
01 14 00 A1 00 00 00 00 02 00 00 
01 14 00 A2 00 00 00 00 39 12 40 
01 10 00 01 00 00 00 00 00 02 00 
01 14 00 02 00 00 00 00 01 0A 13 
00 00 00 00 00 00 00 00 00 00 00 
Lead out 1: 257764

With ZuluSCSI 2024-08-22:

Using dev=0,1,0.
TOC len: 59. First Session: 1 Last Session: 1.
resid: 1
01 10 00 A0 00 00 00 00 01 00 00 
01 14 00 A1 00 00 00 00 02 00 00 
01 14 00 A2 00 00 00 00 39 10 40 
01 10 00 01 00 00 00 00 00 02 00 
01 14 00 02 00 00 00 00 01 08 13 
00 00 00 00 00 00 00 00 00 00 00 
Lead out 1: 257614

with the 0x0A vs. 0x08 corresponding to the error.

The data reading from the drive accordingly starts from byte offset 10178560 instead of 10485760. Data itself appears correct, just in wrong position.

PetteriAimonen added a commit that referenced this issue Sep 26, 2024
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.
@PetteriAimonen
Copy link
Collaborator

@Kurist2010
Copy link
Author

Test builds worked as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants