Date: Thu, 9 Jan 97 21:52 CST From: uhclem@nemesis.lonestar.org (Frank Durda IV) To: freebsd-bugs@freebsd.org Cc: jmg@nike.efn.org, joerg_wunsch@uriah.heep.sax.de, uhclem@nemesis.lonestar.org Subject: Re: bin/2303 & kern/2423 CDs and BCD numbers - its 99 DECIMAL not HEX Message-ID: <m0viY1P-000us7C@nemesis.lonestar.org>
next in thread | raw e-mail | index | archive | help
[0]ahhhh.... it turns out that the chinion reports packed BCD numbers... I [0]thought it was funny that two cd's both with 99 tracks would report 153... [0]but if you convert 153 to hex you get 0x99... i.e. 99 tracks... hmm.. [0]looks like I'll finally go and see if I can get a fireware upgrade for my [0]two chinon drives... Except that the Red Book (all praise Philips and Sony) says quite clearly: (quoting from page 42, section 4.1) TNO: Track number expressed in 2 digits BCD (8-4-2-1 code) 00 : Lead-in track The end of the lead-in track is at the starting diameter of the program area (see DISC SPECIFICATION 9.1). 01-00 : Track numbers. A track can be preceded by a pause with the same track number. The track numbering has to start with the value 01 and has to increment by one. In case a program is stored on several discs, the number may be continued. AA : Lead-out track. The lead-out track starts at the end of the last music track on a disc, without a preceding pause encoding. TNO in an illustration is shown to be a one byte field. Similarly Index values go between 01 and 99 in BCD format. The value 00 is used for pause control. Now, there are plenty of makes of CD-ROM drives that return info to the host in BCD, and this is because most of the fields on the actual disk are in BCD. This means less work for the drive. The Matsushita proprietary interface drives are good examples of drives that do this. However, BCD or not, any disc with more than 99 DECIMAL tracks is encoded incorrectly, will malfunction in many different drives, and technically the company that pressed the disc is in violation of their CD manufacturing license to Philips. (Supposedly there is a reward for reporting license violators...) Clearly what happened is that some write-once mastering software vendor has misread the spec (or didn't have a copy) and assumed that because 0xAA was the lead-out code, that the track number must allow all hex combinations up to 0xAA. BZZT! WRONG! The CD pressing company probably just cloned the write-once master they were sent without verifying format correctness. I also checked the Orange Book Part-II (CD-WO) and it also says 99 DECIMAL tracks is the maximum and it says it in several places. You might stick the offending disc in a normal audio player (don't let it actually play the disc) and see what it thinks the number of tracks is. Therefore, I see no reason to support more than 99 tracks since this one disc is clearly out of spec, and adding support to part of the system is probably going to break just about every other proprietary CD-ROM driver and CD-audio applications when an invalid disc is tried with them. How many drivers and/or programs have fixed arrays with 99 entries or other limitations tied to what is supposed to be a universal constant in the world of CDs? In my opinion, we should consider carefully the impact of any proposed patches in this area. This could break a lot of stuff just to make one incorrectly-mastered disc work. Frank Durda IV <uhclem@nemesis.lonestar.org>|"The Knights who say "LETNi" or uhclem%nemesis@rwsystr.nkn.net | demand... A SEGMENT REGISTER!!!" |"A what?" or ...letni!rwsys!nemesis!uhclem |"LETNi! LETNi! LETNi!" - 1983
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0viY1P-000us7C>