I seem to have things working, but I am seeing some unexpected results that I can't quite figure out and I wondered if someone with more extensive CD experience would have an idea.
For testing purposes I am using the disc The Very Best of Sheryl Crow, track two. Track two extends from LBA 20,550 to 42,494, corresponding to M:S.F of 04:36.00 to 09:28.44.
I am reading the Q data into a struct that mirrors the 16 bytes returned by CD READ. When I scan the Q subchannel for track two I'm seeing some strange values. Here is my debugging output for Mode-1 Q, filtered to show only ADR=0001b. MSF values in parentheses are relative and absolute, respectively.
CODE
index: 1 (00:00.00, 04:36.00), sector: 20550
index: 5 (00:28.67, 05:04.67), sector: 22717
index: 1 (00:28.68, 05:04.68), sector: 22718
Zero is not zero!, sector: 28617
index: 41 (02:52.15, 07:28.15), sector: 33465
index: 1 (02:52.16, 07:28.16), sector: 33466
Zero is not zero!, sector: 37404
trackNumber: 2, tno: 3, sector: 42440
<repeats>
trackNumber: 2, tno: 3, sector: 42494
index: 5 (00:28.67, 05:04.67), sector: 22717
index: 1 (00:28.68, 05:04.68), sector: 22718
Zero is not zero!, sector: 28617
index: 41 (02:52.15, 07:28.15), sector: 33465
index: 1 (02:52.16, 07:28.16), sector: 33466
Zero is not zero!, sector: 37404
trackNumber: 2, tno: 3, sector: 42440
<repeats>
trackNumber: 2, tno: 3, sector: 42494
So it seems that the pregap is being detected correctly, from block 42,440 to 42,494 (55 frames). EAC reports the Track3 pregap as 0:00:00.55, which matches.
What is not obvious to me is what an index of 5 and an index of 41 are doing in there, and why the 8 bits of zero are not showing up as 0 for two of the sectors. I was under the impression that index points had to be numerically sequential within a track.
