Jump to content

Talk:Compact Disc subcode

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Sega381 (talk | contribs) at 14:06, 21 May 2013 (reply and explanation). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

I am a bit confused as to whether the subcode is located as part of the sector of the CD, or if it is located elsewhere. The CD-ROM article under the format section states each sector is 2325 bytes long, but this article makes it sound as if the subcode is in a different place altogether other than those 2325 byte sectors. Totally confused. 71.248.139.39 (talk) 23:51, 2 January 2010 (UTC)[reply]

I hope it is clearer now with the changes I have made, though this particular question should be addressed more fully in the CD-ROM article. But the short answer is that a sector is 2,352 bytes long in terms of its useful data, not on the amount of space it actually takes on a CD. The value 2,352 comes from 98 frames in a sector with 24 bytes of useful data inside each frame. But on a CD, each frame has actually 9 more bytes (33 total), 8 for error correction and 1 with subcode information. So a sector actually has 98*24=2,352 bytes of useful data, 98*8=784 bytes for error correction, and 98 bytes of subcode data, for a grand total of 3,234 bytes per sector. This value, 3,234, is not commonly used since typically the CD-ROM drivers handle and hide the error correction and subcode bytes, so the only thing that is obtainable by the user or a program from the driver is the 2,352 bytes of useful data (there are special ways to get the subcode data, though, if required).
If you want to be even more exact, each sector is not stored in 3,234 bytes on a CD, since (as the CD-ROM article explains), each 33 bytes long frame is actually encoded with eight-to-fourteen modulation, which also adds merge bits, as a second layer of error detection. This effectively adds 9 bits to each byte in a frame, making it 33*(8+9)=561 bits long. Since a 27-bit long sync word is further added at the beggining of a frame, 588 bits (73.5 bytes) are actually used to store a 33 byte frame with 24 bytes of user data on a CD. So in reality, a sector uses up 73.5*98=7,203 bytes of actual space on a CD, though again, there are only 2,352 bytes (which have to be decoded) actually store user data. Or only 2,048 (2 KB) in the case of CD-ROMs in mode 1 or XA mode 2 form 1, where part of the 2,352 bytes are user for a third layer of error correction and detection. Sega381 (talk) 14:06, 21 May 2013 (UTC)[reply]