Repository navigation
On CD, where is the head when a read completes? / CD 读完一个扇区时,光头到底在盘上哪里? #143
Ashley-QwQ
started this conversation in
灵感 Ideas
Replies: 1 comment
|
补两个相关的数,都来自 @WindowsNoEditor 在 #107 的测量,已征得同意:
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
中文版点这里
We measure a CD's spiral from read timing, and there's one number timing can't give us. WindowsNoEditor and arkwise hit the same problem. Our results are spread across #78, #107 and #130, so I've put them together here. We don't know what causes it. If you're looking into this too, or you know how drive firmware and decoders work, I'd love to hear from you.
The problem
We spin the drive at a constant speed and alternate reads of two sectors. The gap between their completion times gives the angle between them on the disc. To do that, we have to assume where the head is when a read finishes.
If that assumption is off by a fixed length of track, the fit still looks fine. You only find out when you burn a picture and the radial lines come out twisted, more near the center, following
c + a/r. We call this length the along-track constant and count it in frames. One CD frame is 588 channel bits, about 0.163 mm of track or 24 user bytes. At 206 frames, the lines twist about 37° between 26.7 and 54.4 mm.Our assumption comes from ECMA-130: the read finishes where the sector's last byte lands after CIRC interleaving,
n_end(LBA) = ((LBA + 1) * 98 + 108)frames. The constant is how much later the real position is.What's been measured
The last two rows use WindowsNoEditor's model, which starts from a slightly different point, so compare them with ours only by size.
One more comparison with the same disc type: moodyos measured a CD-R with the same ATIP as ours (97:26:66) on an ASUS SDRW-08D2S-U. The pitch matches ours at 1.504922 µm, and r0 is 25.27959 mm against our 25.27929 mm. If the discs are physically identical, that 0.30 µm is about 190 frames of difference in this constant between the two drives. A real difference between the two discs would look the same, so this doesn't settle anything yet. The same disc measured in both drives would.
I think most of this comes from reading. In the first two rows, the measuring disc and the pattern disc were written the same way, so a write offset should cancel as long as writing is repeatable. The last row is one disc in another drive, so that difference has to come from reading. That makes the GH70N's 206 frames the odd one out. This is only an argument, and nobody has measured it directly.
If the two discs are written differently, say a random disc from Windows' burner and a pattern from DIS, the difference between the write paths gets added in. Nobody has measured that separately yet.
What we've ruled out
A fixed time delay cancels when we subtract, and the twist we scanned does follow
1/r, so this is a length of track.The command doesn't seem to matter much. READ(12) and READ CD differ by −2.9 ± 2.1 frames on the GH70N, and WindowsNoEditor found that channel choices stay within about ±2 frames on the BU20N.
The read-back offset doesn't work as a correction either. On the BU20N, audio reads back 532 bytes earlier than the written file, and correcting by that put a burned diameter about 1 cm out of line. On the PLDS the offset is −144 bytes, and the gap between those two doesn't match the gap in the constant.
WindowsNoEditor also checked
CddaInterleaveTablein DIS: bytes land +111 frames after their file position, close to our 108 but not the same.What we can't explain
On the GH70N, a read finishes at about
(LBA + 1) * 98 + 314frames, which is 2 sectors plus 118 frames. An AI literature search turned up a 118-frame CIRC delay in the NXP SAF784x manual. That's a different chip with a different starting point, and we haven't checked the source, so it may well be a coincidence. The model's own span from sector start to end of decoding is also 206 frames, which makes the total of 412 exactly double. That may be a coincidence too, since 206 also equals 2 × 98 + 10, and whole-number splits like these can't pick a mechanism.A few frames may not come from decoding at all. If the path of the read spot is offset from the disc's center by
h, that addsh/rto the angle, the same shape as a fixed length of track. An offset of 0.5 mm looks like about 3 frames, which matters for 0 ± 4 and 7 ± 3 but can't explain 206.We also looked up the chips, and it doesn't settle anything yet. An AI search found that Dell's GH70N firmware identifies itself internally as
GH72L, in an LG Renesas format, and that other samples of the BU20N and SN-208FB are recorded with MediaTek MT1959 and MT1895N. None of this has been confirmed on the drives measured here, so a split like Renesas against MediaTek is only a guess. The most useful next test is one data CD read on the GH70N and on another drive that has already been checked.We also don't know why DVD doesn't show this clearly. Ritek F1 DVD-R on the GH70N got within about 0.1° from timing alone, on the first burn.
Questions
Tests you can run without burning a picture
You need a random-data disc and disc-probe. The measurement only reads the disc. The drive has to be CAV, so run
timingfirst.To get another read-side difference, run this on one random CD in two drives and post both
summary.jsonfiles:python -m discprobe geo --media cd --drive E: --speed 1411 --host-delay-ms 35 --ranges 2000-356000To look at the write path, burn random data on two discs of one batch in two ways, say Windows' own burner and ImgBurn, then run the same command on both in one drive. We haven't tried this, and differences between the two discs may hide the effect.
What we're doing next
We'll burn a calibration disc in DIS using the GH70N measurement. The measuring disc was written by IMAPI and this one by DIS (its CD calibration disc may be an audio track), so it should show 206 frames plus the difference between those write paths. I'll update this post when we have it.
Our records are in KNOWLEDGE.md section 12, the CD physical model and our measurements. WindowsNoEditor's are in #78 and #107.
@WindowsNoEditor @arkwise I've quoted your results here, so please correct anything I got wrong.
中文版
我们用读取计时测 CD 的螺旋几何,有一个数计时测不出来。WindowsNoEditor 和 arkwise 也碰到了。大家的结果散在 #78、#107 和 #130 里,我放到一起。原因我们还不知道。如果你也在查,或者懂光驱固件和解码,很想听听你的看法。
问题是什么
我们让光驱匀速转,交替读两个扇区,用两次读完的时间差算它们在盘上的夹角。这一步要先假设:读完的那一刻,光头在盘上哪里。
如果这个假设差了一段固定长度的轨道,拟合看起来还是好好的。要等刻了图才发现径向线是扭的,越靠近圆心扭得越多,形状是
c + a/r。这段长度我们叫沿轨道常数,用帧来数。CD 的一帧是 588 个通道位,约 0.163 mm 轨道,也就是 24 个用户字节。如果是 206 帧,从 26.7 mm 到 54.4 mm 线会扭约 37°。我们的假设来自 ECMA-130:读完的位置,是扇区最后一个字节经 CIRC 交织后落下的地方,
n_end(LBA) = ((LBA + 1) * 98 + 108)帧。沿轨道常数就是实际位置比这里还晚多少。目前测到的
后两行用的是 WindowsNoEditor 的模型,起点和我们略有不同,所以和我们的数只能比大小。
还有一个同款盘的比较:moodyos 用 ASUS SDRW-08D2S-U 测了一张 ATIP 和我们相同(97:26:66)的 CD-R。轨距和我们一样,都是 1.504922 µm,r0 是 25.27959 mm,我们是 25.27929 mm。如果两张盘的物理结构完全相同,这 0.30 µm 相当于两台光驱在这个常数上差约 190 帧。不过两张盘本身不同也会是这个样子,所以现在还定不下来。用两台光驱测同一张盘就能分清。
我觉得差别主要来自读取。前两行里,测量盘和图案盘的写法相同,只要每次写的位置可重复,写入的偏移就应该抵消。最后一行是同一张盘换光驱,差别只能来自读取。这么看,GH70N 的 206 帧是最特别的。不过这只是推理,还没有人直接测过。
如果两张盘写法不同,比如随机盘用 Windows 自带刻录,图案用 DIS 刻,还要再加上两种写法的差。这个差还没有人单独测过。
已经排除的
固定的时间延迟在相减时就抵消了,而扫描量到的扭转确实符合
1/r,所以这是一段轨道长度。读取命令的影响看起来不大。GH70N 上 READ(12) 和 READ CD 差 −2.9 ± 2.1 帧;WindowsNoEditor 在 BU20N 上试了不同的通道选择,差别在约 ±2 帧以内。
读回偏移也不能拿来修正。BU20N 读回的音频比写入文件早 532 字节,按这个修正后,刻出的直径错开了约 1 cm。PLDS 上这个偏移是 −144 字节,两台的差和沿轨道常数的差也对不上。
WindowsNoEditor 还核对了 DIS 的
CddaInterleaveTable:字节比文件位置晚 +111 帧,和我们的 108 帧很接近,但不一样。解释不了的
GH70N 读完的位置约在
(LBA + 1) * 98 + 314帧,等于 2 个扇区加 118 帧。AI 调研查到 NXP SAF784x 手册里 CIRC 数据延迟是 118 帧。那是另一颗芯片,起点也不一样,我们没有核实过原文,很可能只是巧合。模型里从扇区开头到解码结束也正好是 206 帧,加上实测多出的 206 帧总共 412 帧,刚好翻倍,这也可能是巧合,因为 206 同样等于 2 × 98 + 10,这种整数拆分选不出机制。几帧的差别也不一定来自解码。如果读取光点的运动线偏离圆心
h,转角会多出h/r,形状和一段固定的轨道长度相同。偏 0.5 mm 看起来就像约 3 帧,这对 0 ± 4 和 7 ± 3 有影响,但解释不了 206。我们也查了芯片,目前还定不了什么。AI 调研查到 Dell 的 GH70N 固件内部标识是
GH72L,是 LG Renesas 的格式;BU20N、SN-208FB 的其他样本记录的是 MediaTek MT1959、MT1895N。这些都没有在这里测的光驱上确认过,所以“Renesas 对 MediaTek”只是猜测。下一步最有用的是同一张数据 CD 在 GH70N 和另一台已验证的光驱上对照。DVD 上为什么不明显,我们也不知道。GH70N 读 Ritek F1 DVD-R,只靠计时、第一次刻录,径向线只差约 0.1°。
想问问大家
不用刻图也能帮忙
只要一张随机数据盘和 disc-probe,测量只读盘。光驱要是 CAV 才能测,先跑一次
timing。想多一组读取方面的差值,就把同一张随机 CD 放到两台光驱上各跑一次,发两份
summary.json:python -m discprobe geo --media cd --drive E: --speed 1411 --host-delay-ms 35 --ranges 2000-356000想看写法的影响,就用同一批的两张盘,用两种方式写随机数据(比如 Windows 自带刻录和 ImgBurn),再在同一台光驱上各跑一次。这个我们还没试过,两张盘本身的差别也可能把它盖住。
我们接下来做什么
用 GH70N 的测量结果在 DIS 里刻一张标定盘。测量盘是 IMAPI 写的,这张是 DIS 写的(它的 CD 标定盘可能是音轨),所以量到的应该是 206 帧加上两种写法的差。有结果我再更新到这里。
我们的记录在 KNOWLEDGE.md 第 12 节、CD 物理模型和测量数据。WindowsNoEditor 的结果在 #78 和 #107。
@WindowsNoEditor @arkwise 这里引用了你们的结果,有写错的地方麻烦指正。
All reactions