home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / DA2WAV14.ZIP / CDDA.DOC < prev    next >
Encoding:
Text File  |  1995-12-03  |  56.6 KB  |  1,166 lines

  1.  
  2.  
  3. CDDA Version 1.4 (build 12c) - This is the nineth release of CDDA.
  4.  
  5. **** NOTE ****
  6. Release 1.0h was the last free release of CDDA.
  7.  
  8. Since then I have made some drastic changes to the program to 
  9. include XA and most importantly CDi.  It is because of the fact
  10. that Phillips in their infinite wisdom want to "license" their
  11. CDi technology, that I must now turn CDDA into shareware.  I am
  12. not happy about having to shell out several hundred dollars to 
  13. get ahold of their "GREEN" and "WHITE" books.  The new registration
  14. fee is small, and I don't intend to screw the user with paying a 
  15. more than $100US fee before knowing if it may or may not work for them.
  16.  
  17. I know I've said it before, but this could be the last release of CDDA.
  18. I have so little time to work on it now, that it is taking months just
  19. to get a small bug fix released.  As far as I can tell, it seems to 
  20. work fairly well on most machines now, and there is not a lot I can
  21. add in the way of new features.  Unless there is a life threatening
  22. bug found, I can't expect to have the time to put into this program 
  23. for a while.  The amount of email I get now is getting to be a problem.
  24. If you want help make sure you send me all the info about it, if you
  25. expect me to respond quickly.  I don't give high priority to messages
  26. like - "Please help.  I can't get your program to work."  If you 
  27. don't tell me a LOT more than this, don't expect much in the way of help.
  28.  
  29. CDDA - What is it?
  30. ------------------
  31.  
  32. CDDA is a DOS PC based utility that allows the user to extract digitally
  33. perfect copies of samples from audio CDs.  It also allows the user
  34. to extract MPEG streams from CDi Digital Video CDs, and VideoCDs, and 
  35. XA frames from CD-XA CDs.
  36.  
  37. Some History
  38. ------------
  39.  
  40. In February 1993, I needed to get some audio samples into digital
  41. form on my PC.  Toshiba had just released the 3401 CDROM drive
  42. which allowed reading of DA frames across the SCSI bus.  Because
  43. there were no programs available to do this, I had to write my
  44. own.  I used it to get the samples, and then left it alone because
  45. I had no idea anyone else wanted to do this.  Some months later
  46. CDGRAB came out, but they wanted much too much money for their
  47. program, so I cleaned up the program and released it as CDDA09A.ZIP.
  48.  
  49. Note:
  50. Some time later I heard from a very irate person who told me I
  51. couldn't use the name CDDAxxx.zip because he was already using
  52. the name.  I've looked everywhere, used ARCHIE, and asked people
  53. who seem to know every program on the net, and no one has seen
  54. this guy's program.  However, in the interest of keeping peace on
  55. the net, I have changed the distribution file name to DA2WAV1G.ZIP.
  56. The program itself will still be called CDDA.
  57. NB: I finally found this elusive CDDA.  It turns out to be a CD 
  58. Duplicate Analyzer to search for duplicate files on two different
  59. CDROMs.
  60.  
  61. The first release fully supported the Toshiba 3401 CD-ROM drive.  I have
  62. since added a whole bunch more including MSCDEX only. I have given 
  63. prerelease versions of my program to people who have to some degree 
  64. had success with other drives.  I have no guarantees that this program 
  65. will work with your drive.
  66.  
  67. Since the release of 1.0a I have heard from people who were having
  68. trouble with the NEC 74-1/84-1 drives.  So, I went out and borrowed
  69. one for a few days.  To my surprise the 84-1 didn't work.  The next
  70. thing I did was get the data sheets for the drive sent to me from
  71. the NEC faxback.  There is no mention of being able to read DA frames
  72. on that data sheet.  Next, I reread the NEC programming manual.  It
  73. says about the 74-1/84-1 drives "Read CD-DA is under consideration of
  74. content in the SCSI support commnds".  This suggests that it may
  75. or may not be supported.  Next I called NEC tech support.  They told
  76. me that "reading digital audio through the SCSI port is NOT supported
  77. on the 74-1/84-1 drives.  It is supported on the 3x and 4x drives."
  78. So, for the time being, I will leave in the code to support the 74-1/84-1
  79. drives.  If I don't hear from someone who gets it to work in the
  80. next while, I will remove the support and mention it in this file. I have
  81. also heard from someone who has a NEC 211 drive.  I have no idea what
  82. this drive is other than it is a 2X drive.  This person has had good
  83. success running CDDA.  I have also heard from someone with NEC 210 who
  84. has not had success.  If anyone knows more about programming for NEC
  85. drives please let me know.  To add to the NEC confusion, NEC tech
  86. support is still telling people that the 74-1 and 84-1 drives CAN
  87. read DA frames.  This is just not true.  If NEC can't get their own
  88. tech support staff trained, can you imagine the quality of their drives?
  89.  
  90. I wanted to be sure that I had full support for all the NEC drives,
  91. so I called tech support again.  This time I had to wait on hold for
  92. over an hour to talk to a tech droid tell me that he didn't know the
  93. answer, but would call me back later in the day with an answer.  That
  94. was six+ months ago and I haven't heard from him.  Next, I tried the email
  95. tech support for NEC.  I got an email back saying that they would look
  96. into it and get back to me right away.  I have sent follow up emails, and
  97. again I haven't heard from them in over six months.  I am not going to
  98. try any more NEC support. Period.  If they can't get their act together
  99. to support their users/developers, then everyone should buy drives
  100. from another vendor.  With all the trouble over the OEM'd 3x drive,
  101. I would think that no one would ever buy a NEC drive again.  BTW, has
  102. anyone heard of a NEC drive since the final version of the 74/84 that
  103. actually works correctly?  I know I haven't, and that includes all the 
  104. new 4x and IDE drives.  I you know otherwise let me know.  In the mean
  105. time I might suggest another vendor.
  106.  
  107. There has been a lot of talk about the Mitsumi drives and whether 
  108. they will work with CDDA and like programs.  The bottom line is this:
  109. I talked to an engineer in the CDROM group at Mitsumi, and he told
  110. me that none of their drives will read DA frames, and that none
  111. of their drives ever will.  It appears that Mitsumi is concerned about
  112. the copyright issues of CDDA.  I know we have all heard rumours about
  113. people getting the drives to work, but I trust the word of the head
  114. s/w designer for CDROM drives over a fourth hand rumour.  If your
  115. drive has a part number like FX001D or FX400, then you have a Mitsumi
  116. drive and you won't get DA from your drive.
  117.  
  118. The reason I have left the Mitsumi in the program is that the Mitsumi drives 
  119. WILL read XA/CDi frames.  For that reason, you can extract your MPEG 
  120. movies, but you can't extract DA.
  121.  
  122. Different ROM revisions cause the drives to do things differently.  One
  123. version may work just fine and others might not.  It is very tough for
  124. me to help with drives that don't work, when I don't have one of
  125. those drives to work with.  If your drive revision is on the bad list,
  126. I don't know what to tell you.  Perhaps you can make a really big
  127. stink with the manufacturer and have them upgrade your rom.
  128. Here is a list of known good and bad rom revisions.  I will add to this
  129. list as I receive reports from the field.  Hint: that means if you get
  130. this program working, please, please, please send me dumps of the
  131. output, so I can update these docs.  You will notice no changes to 
  132. this list since the last version of CDDA.  This is because I haven't
  133. received any dumps from people that have the program working.
  134.  
  135. good                  bad
  136. ----                  ---
  137. Sony 561 rev 1.9a     Sony 561 rev 1.7x
  138. Sony 561 rev 1.8p     Sony 561 rev 1.8f
  139. Sony 8012 rev 3.1e    Sony 55s 1.0q
  140. Toshiba rev 0283      Toshiba rev 2732
  141.                       Toshiba rev 3593
  142. NEC 211 rev 1.0       NEC 84-1 rev 1.0
  143.                       NEC 210
  144. (note: I'm giving up on this list because so few people report back
  145. with decent descriptions about what works and what doesn't.  Don't
  146. expect any new additions to this list.)
  147.  
  148. What drives support DA?
  149. -----------------------
  150.  
  151. I have heard from many different people who say such-and-such drive
  152. will read DA frames.  The following is a list of which drives which
  153. I understand have the ability to read DA frames, and that I have
  154. included support in CDDA: (thanks to bwilliam@iat.holonet.net 
  155. for starting this list).  Note: My including suport for a drive
  156. does not mean that it is guaranteed to work on your machine.  It
  157. means that I have either heard from someone who has managed to 
  158. get it to work or I have the programming manual for the drive and
  159. have included the code to support it.  Certainly don't go out and
  160. buy a specific drive on this list just because I said CDDA might
  161. work.  Be sure to try the drive before you buy.
  162.  
  163. Apple 300, 300i, 300e (Sony CDU-8003, CDU-8003A, CDU-8012)
  164. Apple CD300+
  165. Chinon CDS-535
  166. COMPAQ CR503/CDU561
  167. DEC RRD42
  168. Goldstar GCDR-540 IDE
  169. HP 4020
  170. NEC CDR 200, 300, 400, 500, 600, 900 series
  171. NEC CDR 84-1/74-1 (rumoured with special firmware) (NEC told me that
  172.                    it didn't exist)
  173. Panasonic CR-562B/563B/572/574/581
  174. Pinnacle RCD1000/5030
  175. Pioneer 124/624
  176. Plextor 4Plex/6Plex
  177. Sanyo C3G IDE
  178. Sony CDU-561, CDU-31A, CDU-33A, CDU-55S, CDU-55E, 76E/76S
  179. Toshiba XM3301 (Silicon Graphics)
  180. Toshiba XM3401, XM4101, (XM3501 with 0925 and later firmware), 3601, 5302
  181. Hitachi
  182. Matshita (Panasonic) 503
  183. Yamaha CDR100/102
  184. Kodak PCD225,6x/Philips CDD522/Plasmon RF4100/JVC XRW2001
  185.  
  186. The code to support the Pinnacle RCD1000 is included in CDDA.  However,
  187. as of this writing, there is a problem with the drive itself that prevents
  188. CDDA from running.  I have heard from tech support that they will 
  189. have a ROM revision real soon now that will fix the problem.  If you 
  190. have one of these drives I suggest that you call Pinnacle and scream
  191. at them for the fix.
  192.  
  193. There are a whole slew of new drives coming out with the ATAPI.  A
  194. lot of rumours are floating around as to whether they will work or
  195. not.  Toshiba especially is coming out with a new drive every other
  196. week it seems. Until I can get more detailed results, I will not enter 
  197. them in the supported drive list.
  198.  
  199. You may want to run CDROMINF.EXE and have a look at the output.  If
  200. there no mention of being able to read RAW frames, and/or the
  201. RAW READ SIZE is not 2352, there is no chance that CDDA will work
  202. using the MSCDEX interface.  Also, if it reports that your drive
  203. supports reading RAW, that DOES NOT mean that CDDA will work.  It
  204. all depends upon the person who wrote the driver for your drive.  If
  205. he/she passes DA frames to MSCDEX, you're laughing.  Otherwise,
  206. you're out of luck.
  207.  
  208. If you have an ATAPI drive then you might also want to run another
  209. program of mine called ATAINF.  It will display a lot of information
  210. about your drive and will tell you if it can read digital audio.  The
  211. file is available from simtel in msdos/cdrom/atainf09.zip
  212.  
  213. There are rumors that the Mitsumi LU055 drive will work using the
  214. MSCDEX interface, but I have yet to hear specifically what version
  215. drive, and what version driver works.  NO OTHER Mitsumi drives are 
  216. supported.  It is not my fault, it is Mitsumi's fault.  Complain 
  217. to them not me.
  218.  
  219. If you know or think you know of other drives, let me know and I will
  220. do some investigating.
  221.  
  222. What is this new CDi support?
  223. -----------------------------
  224.  
  225. Phillips has developed a standard for storing about an hour of video and
  226. audio on a standard CD.  The data is really a long MPEG I stream.  CDDA
  227. will allow you to extract either the raw MPEG stream, or just the
  228. video stream.  You can then play back the movies with any of the 
  229. standard MPEG file players.  Have a look at the included file CDIFAQ.TXT.
  230. This gives a very basic run down of what CDi is all about.
  231.  
  232. Phillips has two disc standards: WHITE book and GREEN book.  Green
  233. book was the first standard, but was really only any use if you
  234. were using a real CDi player.  It has a proprietary file system
  235. and most CDROM players won't accept the discs.  Phillips finally 
  236. smartened up and decided that they wanted to expand their market
  237. so they came up with the White book standard.  The only difference
  238. is that these new discs come with the file system built around
  239. ISO 9660.  This way most every CDROM drive in the world will allow
  240. you to look at the directory structure.  To get at the movie data
  241. you still need a drive that supports CDi.  Fortunately, as far as
  242. my program is concerned, if your drive supports XA and you have a
  243. White book disc, then you are probably ok.
  244.  
  245. When you have a White book CD installed, CDDA detects this and will
  246. attempt to display a list of MPEG streams contained on the disc.
  247. They should be displayed as file names from the CD in the form 
  248. of /MPEGAV/AVSEQ*.DAT.  It should also give you an idea of the starting
  249. block of the stream if you want to use the /LBA option.
  250.  
  251. Have a look at the included file CDCOMPAT.TXT.  It is a list from Sigma
  252. Designs (the people who make the RealMagic MPEG card) as to what
  253. CD-ROM drives work with CDi movies and what don't.  Have a look at this
  254. list before yelling at me because your drive doesn't work.
  255.  
  256. How do I use this program?
  257. --------------------------
  258.  
  259. This is a command line utility which allows the user to specify the start
  260. and end points of the data transfer and the output type.  The start and
  261. end points may be entered in one of three modes,: LBA, MSF and T (track).
  262. Make sure that you don't use more than one of these modes in the
  263. command line because it really confuses the parser in CDDA.
  264. Logical Block Address mode is the number of the frame from the start of
  265. the disc. Minute, Second, Frame mode specifies the time from the start
  266. of the disc in actual time.  Track mode allows you to dump an entire track
  267. (or song) to disk.  The LBA and MSF are related by the following formula:
  268.     LBA = Minutes * 60 * 75 + Seconds * 75 + Frames - 150
  269. The lead in track is usually 150 because there are usually 2 empty
  270. seconds at the start of a CD, but it can also be any number +- 75 frames
  271. from 150.  A commmon number other than 150 is often 182 or 183.
  272. The Toshiba, NEC and MSCDEX programming manuals define the LBA equation
  273. to be as above with -150 at the end.  The Sony manual is very vague,
  274. and it could be interpreted as either -150 or as -(lead in track).
  275. Since two of the three manuals say clearly -150, I have chosen
  276. -150 for the Sony as well.  I managed to do a fair bit of testing on
  277. a Sony 561 drive, and it appears that the -150 figure is correct.
  278. If anyone has more precise information on the Sony please pass it along.
  279.  
  280. The /ADAPTER option allows you to manually set the number of SCSI  
  281. Adapter that has the CDROM drive you want to use.  This is useful i
  282. if my software incorrectly guesses which adapter your drive is using,
  283. or if you have more than one adapter in your system.
  284.  
  285. The /ID option allows you to manually set the SCSI ID of the CDROM
  286. drive you want to use.  This is useful if my software incorrectly
  287. guesses your drive's ID, or if you have more than one CDROM drive
  288. in your system.
  289.  
  290. The /LUN option allows you to manually set the SCSI LUN of the CDROM
  291. drive you want to use.  This is useful if my software incorrectly
  292. guesses your drive's LUN, or if you have a multi-CD drive in your system
  293. like the 6 Pack from Pioneer.
  294.  
  295. The /MSC option allows you to manually set the MSCDEX drive letter of
  296. the CDROM drive you want to use.  This is useful if my software incorrectly
  297. guesses your drive's ID, or if you have more than one CDROM drive
  298. in your system.  This option does not force the software into
  299. the /M option.
  300.  
  301. The /M option forces the software to use only MSCDEX commands.  This
  302. may or may not work with your drive.  If you don't have a SCSI CDROM
  303. drive with ASPI drivers, this is your only hope.  This option would
  304. be used with the Panasonic CR-562/563, Sony CDU-31A/33A drives.
  305.  
  306. The /ATAPI option is to bypass the device driver and MSCDEX for
  307. the DA specific portion of CDDA.  This new code is very preliminary
  308. and will probably hang your ATAPI drive once and a while.  I wrote
  309. this code to show that a drive can or cannot read DA, regardless of
  310. what the driver says.  If you find that using the /M option does
  311. not work with your ATAPI drive, try using the /ATAPI.  If it runs,
  312. even for a few frames, then your drive is not the problem when using
  313. /M, it is your device driver.  It is at this point that you need to 
  314. start screaming to your vendor about crappy software.  If /ATAPI
  315. doesn't work, and you have looked at the output of ATAINF which
  316. says your drive doesn't support DA, then you are really out of luck.
  317. ATAPI is followed by two parameters the IO address of the controller
  318. card, and the device number. eg. /ATAPI 170:1  The IO address can
  319. be one of the following 1f0 170 1e8 168, and the device can be either
  320. 0 (master) or 1 (slave).  You need to remember to use the /M option
  321. in addition to the /ATAPI option otherwise CDDA assumes that you
  322. are using a SCSI drive.
  323.  
  324. The /NJC option forces the software to not do any jitter correction
  325. to the data read from the CD.  This means that the program will run
  326. faster, but that the files created cannot be guaranteed to be 100%
  327. perfect copies. 
  328.  
  329. The /P option starts the CDROM drive playing the selected range of
  330. audio out either the headphone jack on the front or out the line level
  331. jack on the back.
  332.  
  333. The /BLOCK option allows you to set the number of blocks to be read
  334. from the CD at a time.  Before version 1.4a this was fixed at 10.  You
  335. can set it as high as 56 (assuming no overlap) to increase the 
  336. performance of CDDA by as much as 40%.  This magic number of 56 is
  337. the same as 128K of memory which appears for many systems to be a 
  338. magic number for the maximum number of frames you can read at a time.
  339. Associated with this option is the /OVERLAP option which allows you
  340. to specify the number of blocks overlap at the start and end of 
  341. each read from the disc to be used in the jitter correction.  Before
  342. version 1.4a the overlap was fixed at 3.  Many of the newer drives
  343. can run with an overlap of 1 to give higher performance, and many of
  344. the old drives often need an overlap of 3 or higher.  If you are getting
  345. jitter values which are always less than 275 then you should be able to
  346. use a jitter value of 1 or 2.  If you are getting too large jitter
  347. errors, then you can try making the overlap larger than 3 to see if
  348. that fixes the problem.  Remember that the memory buffer for reading 
  349. frames is 56 blocks long.  The formula for /BLOCK and /OVERLAP is
  350.  (overlap*2)+block <= 56.  You may have to play with the /BLOCK values
  351. to find ones that work optimally on your machine.
  352. When you are using CDi or XA modes the maximum value for /BLOCK has
  353. been fixed to 26, and the /OVERLAP values are always 0.  Since there
  354. is no need for jitter correction with CDi and XA the extended block
  355. size for DA is not necessary.  The magic number of 26 also applies to
  356. Windows 95.  If you use anything more than that it tends to crash.
  357. Play with values larger than 26 under Win95 at your own risk.
  358.  
  359. The /CDIVIDEO and /CDIRAW options are to be used when you have a CDi
  360. movie disc.  /CDIVIDEO allows you to extract just the video portion
  361. of the MPEG stream.  /CDIRAW allows you to extract the entire
  362. MPEG audio/video stream.  If you use a program like VMPEG, or have
  363. a RealMagic card, then you will be able to play the movies from 
  364. hard disk instead of from the CD.
  365.  
  366. One thing to remember when using the CDi options:  CDDA must hunt through
  367. the disc to find the start of the stream.  A good way to figure out
  368. where the streams start is to look at the dump from CDROMINF.  If you
  369. have a White book disc, then the streams start at the same point
  370. as the tracks 2 and up.  Track 1 is for the file system and support
  371. files, and tracks 2 and up are for the MPEG.  If you have a Green 
  372. book disc, then you will have to choose a start point which is
  373. early enough in the disc to find the stream start.  Often the streams
  374. start around LBA 3400.  There may be more than one stream on a 
  375. Green book disc.
  376.  
  377. If you are using a White book disc, your best bet is to use the /T
  378. option, if you have enough disc space.
  379.  
  380. When you want to play the MPEG files that you have extracted, your
  381. best be is to use a program like VMPEG.  The latest version now also
  382. plays the audio.  Remember that you are going to need a lot of computing
  383. muscle to do the MPEG decoding.  Have a look at the following news post
  384. about CDi.
  385.  
  386. From: davido@aimla.com (David Oseas)
  387. Newsgroups: comp.multimedia
  388. Subject: Re: Wanted:CD-i mpeg files viewer without mpeg card
  389. Date: 11 May 1995 17:38:08 GMT
  390. Organization: Philips Media
  391. Lines: 23
  392. Distribution: world
  393. Message-ID: <3oti21$f6f@silver.aimla.com>
  394. References: <3od40u$pqj@ufrima.imag.fr>
  395. Reply-To: davido@aimla.com
  396. NNTP-Posting-Host: gneiss.aimla.com
  397.  
  398. In article pqj@ufrima.imag.fr, ageay@turing.imag.fr (Alexandre GEAY) writes:
  399. >i want to play sound from CD-i mpeg files with the video!
  400. >
  401.  
  402. I want the Cray-X/MP you're planning on running it on!
  403.  
  404. Seriously, I don't know of any computer system that is capable of
  405. demultiplexing the bitstream off disc & decoding the video and
  406. audio in sync (i.e. real time) using a software-only solution.
  407.  
  408. Your best bet is a hardware decoder.  Prices are dropping fast.
  409. I've seen boards with a MSRP of $179.
  410.  
  411. Alternatively, get a CD-i player with a DigitalVideo cartridge--
  412. then you'll be able to play all CD-i discs, including the ones
  413. we're showing at E3 this week.  ;-)
  414.  
  415. ---
  416. David Oseas, (davido@aimla.com)                [CD-i, MPEG & Amiga guru] 
  417. Sr. Software Engineer, InSight Entertainment Group
  418. Philips Media, Los Angeles, CA                  Tel: (310) 444-6150
  419.   [OPINIONS ARE MY OWN & DO NOT NECESSARILY REFLECT PHILIPS POLICIES]
  420.  
  421.  
  422. One last thing about CDi.  You may see messages during the dump
  423. about unknown subheaders.  This is fairly normal.  If you do get these
  424. messages, dump them to disk and send them to me.  I will include 
  425. checking in a later version of the program.  There is a very long list
  426. of subheaders, and I have only added the ones I have seen in the 3 CDi
  427. discs I have.
  428.  
  429. For the options /S /E /F which expect a following parameter, remember that
  430. there needs to be a space between the letter and the parameter.  ie if you
  431. enter /S01:10:10, it would come up as an error, but if you entered
  432. /S 01:10:10, it would be correct.  For the MSF mode, there need to
  433. be 2 digits for each of minutes, seconds and frames or it will come up as
  434. an error.  When entering the filename with the /F, don't include an
  435. extension, as the software automagically adds the extension for you.
  436.  
  437. At there are several file formats supported. WAVE (.WAV) and Binary (.CDA)
  438. are the types for DA, .XA for XA, and MPG for raw CDi and MPV for 
  439. MPEG video. There is also the option to dump the data in HEX format out 
  440. to the STDOUT device.
  441.  
  442. The binary format has the audio samples stored in the order Left LSB, 
  443. Left MSB, Right LSB, Right MSB.  The samples are 16 bit 44.1 KHz stereo.
  444.  
  445. I am not expecting to add options to output files in 8-bit or 22.05 KHz.
  446. This is not as simple as just throwing away samples, as this causes
  447. aliasing in the output files.  Correcting this is way beyond the
  448. scope of this program.
  449.  
  450. I am not planning to add many more formats because there
  451. are plenty of other programs out there that will do the conversions much
  452. better than I can.  Besides, the whole purpose of this program was to
  453. get the raw data out to the hard disk, not duplicate SOX.
  454.  
  455. On every CD there is a bit which defines if copying a particular track is
  456. permitted or prohibited.  CDDA checks this bit and will not continue
  457. with the dump to disk.  I have included an override option /O which forces
  458. the user to explicitly specify and to knowingly copy a copy prohibited
  459. song.  Have look at the file ROYALTY.TXT included in this distribution,
  460. which was honourably pinched from the program CDGRAB.  It is a list
  461. of most country's contacts for paying royalties.  I have heard from
  462. a couple of people who have actually tried to pay the royalites.  They
  463. have had nothing but trouble.  My understanding is that the producer
  464. has the final say on royalties, and that you must deal with him/her 
  465. as well.
  466.  
  467. One thing to remember is that audio/video fills up the hard disk fast.  It
  468. takes between 9 and 10 megabytes per minute.  Because of this I
  469. put in a check to make sure that you will have enough space to put the
  470. requested samples.  As well there is the /U option which will give you
  471. an estimate of how much disk space will be used without actually dumping
  472. the data to disk.
  473.  
  474. Examples
  475. --------
  476.  
  477. CDDA /MSF /S 10:14:36 /E 13:55:11 /F outfile /W
  478. will dump using MSF mode from 10:14:36 to 13:55:11 to a WAV file
  479.  
  480. CDDA /LBA /S 106232 /E 109443 /F outfile /B
  481. will dump using MSF mode from 106232 to 109443 to a Binary file
  482.  
  483. CDDA /T 2 /F outfile /W /O
  484. will dump the entire track 2 to a WAV file with the override mode on
  485.  
  486. CDDA /T 2 /U
  487. will display the estimated disk space for all of track 2
  488.  
  489. CDDA /T 2 /H
  490. will dump the entire track 2 in HEX to STDOUT
  491.  
  492. CDDA /T 2 /M /F outfile /W /O
  493. will dump the entire track 2 using MSCDEX interface only
  494.  
  495. CDDA /T 2 /F outfile /W /O /NJC
  496. will dump the entire track 2 using no jitter correction
  497.  
  498. CDDA /T 2 /MSC G /ID 4 /F outfile /W /O
  499. will dump the entire track 2 from MSCDEX drive G, SCSI ID 4 CDROM drive
  500.  
  501. CDDA /T 2 /CDIVIDEO /F outfile /O
  502. will dump the entire track 2 in MPEG video to outfile.MPV
  503.  
  504. CDDA /T 2 /CDIRAW /F outfile /O
  505. will dump the entire track 2 in MPEG raw audio/video to outfile.MPG
  506.  
  507. CDDA /LBA /S 2345 /E 3456 /XA /F outfile /O
  508. will dump track 2345-3456 in to outfile.XA
  509.  
  510. CDDA /T 1 /F outfile /O /M /W /ATAPI 170:0
  511. will dump track 1 to outfile.WAV using mscdex and atapi only modes
  512.  
  513.  
  514. What is this jitter business?
  515. -----------------------------
  516.  
  517. The following is a post made over a year and a half ago which discusses
  518. the technical reason for a CDROM drives difficulty in accurately
  519. positioning itself on an audio CD.
  520.  
  521.  
  522. --------------------------------------------------------------------------
  523. Newsgroups: alt.cd-rom,aus.cdrom
  524. From: adrie@ica.philips.nl (Adrie Koolen)
  525. Subject: Re: Reading Audio CDs - Why is it so complicated?
  526. Keywords: cd, cd-rom, cdrom, audio, sampling, naivety
  527. Organization: Philips Consumer Electronics, Eindhoven, The Netherlands
  528. Date: Fri, 19 Feb 1993 08:23:53 GMT
  529. Lines: 63
  530.  
  531. In article <C2nqFC.5Ew@smsc.sony.com> dce@smsc.sony.com (David Elliott) writes:
  532. >In article <1993Feb17.213223.24058@isa.de>, schwarz@isa.de (Diemo Schwarz) writes:
  533. >|> What I don't understand is: 
  534. >|> Why should it be so difficult to extract pure audio data from a CD?
  535. >
  536. >It isn't.  The problem is that the SCSI controllers in most CD-ROM
  537. >drives simply don't support it.
  538. >
  539. >|> The medium is structured by tracks and indices, isn't it?
  540. >
  541. >Yes.
  542.  
  543. Note that the `tracks' on a CD aren't layed out like tracks on a hard disk.
  544. The track and index are just numbers that are stored with each sector on
  545. the CD (in the Q-subchannel packet). The start address of a track is stored
  546. in the Table Of Contents on the CD, indices are not. Indices are normally
  547. not used, except index 0 for the 2 seconds pause at the start of each
  548. track.
  549.  
  550. The REAL structure of the CD medium is a large continuous spiral, starting
  551. at the center of the CD (at 46mm diameter). Finding a specific sector is
  552. not as trivial as it is on a hard disk. You'll have to employ a kind of
  553. binary search algorithm. Finding the start position of a specific index
  554. is even more difficult as you don't even know where it starts.
  555.  
  556. >|> And every CD player somehow manages to ship the data from the disc to
  557. >|> the D/A converter, doesn't it?
  558.  
  559. But at the DAC, they don't know which sector the sample came from or what
  560. the relative position the sample takes in a sector.
  561.  
  562. >|> So, what's the difference between reading data CDs and music CDs?
  563. >
  564. >The format of the data, to put it simply.
  565.  
  566. Well, most decoders used in audio CD players, output a stream of samples
  567. and sub-channel data, mostly used for their time code. As the decoder has
  568. to adjust the spindle speed, it uses a FIFO to store the data. If the
  569. FIFO fills up, the spindle motor is slowed down, if it gets empty, the
  570. motor is sped up. The sub-channel data normally doesn't pass through the
  571. FIFO, but goes directly to a microcontroller. That way, the microcontroller
  572. can't be sure that it knows the exact address of the data, coming out of
  573. the FIFO.
  574.  
  575. To circumvent this problem, the address of a sector is also stored in the
  576. data itself, together with a 12 bytes sync pattern. This way, one can
  577. determine the starting of a sector and its address just by looking at the
  578. data coming out of the FIFO.
  579.  
  580. Here's the real problem: audio sectors don't have this sync pattern, nor
  581. the address of the sector, in the data area of a sector. Most CDROM drives
  582. use chips that are coming from audio players. The first CDROM drives were
  583. just modified audio CD players.
  584.  
  585. To read audio sectors on a CDROM drive, you'll need a special decoder or
  586. you'll need to connect a standard decoder with some custom hardware to
  587. generate pulses to indicate the start of a sector and to synchronize the
  588. sub-channel packets with the real 2352 bytes of data.
  589.  
  590. I hope that this explains it a bit.
  591.  
  592. Adrie Koolen (adrie@ica.philips.nl)
  593. Philips Consumer Electronics, Eindhoven, the Netherlands
  594. --------------------------------------------------------------------------
  595.  
  596.  
  597. Because of this, most every CDROM drive that can read DA frames cannot
  598. accurately return to the exact same location on the disc every time.
  599. It will usually return within a few samples either way.  It took
  600. a lot of time and thought to write the code to correct for the
  601. "jitter" efficiently.  My first try brought the transfer rate
  602. to a crawl.  I have been refining the process to the point that
  603. it barely has any computing overhead, but still I have to read most
  604. every frame twice.  I am still working on getting this to work
  605. faster.  Some people have reported an 8x slowdown from 0.9a to
  606. 1.0a.  I have no explaination for that large a difference.  
  607. It is nowhere near that large on my machine, as I see only about 3x.
  608. I do agree that it is still much too slow. I have made a number of
  609. improvements in 1.0e and 1.0g that help with this slow down including making
  610. the receive buffer as large as possible (64K) when using real mode drivers
  611. like ASPI and MSCDEX.  I have also added the /NJC option for those who
  612. cannot wait for their files to be created, or for those whose drives
  613. are generating "Jitter greater than 5 frames" errors.  This error
  614. means that the software has become lost on the CD because the drive
  615. was unable to return to within 5 frames of its last postion.
  616.  
  617.  
  618.  
  619. What kind of help is there?
  620. ---------------------------
  621.  
  622. There is very limited help from the command line for CDDA.  You can get
  623. the "USAGE" by just typing CDDA.e.g.:
  624.  
  625. C:>CDDA
  626.  
  627. Usage: CDDA /(mode)  [/O] /S <start> /E <end> /F filename
  628.            [/ID <cd-rom scsi id>][/MSC <mscdex drive letter>].
  629. modes are LBA, MSF, T, U, H, NJC, M, XA, CDIRAW, CDIVIDEO
  630. /MSF - times in minute, second, frame format (MM:SS:FF)
  631. /LBA - times in Logical Block Address format (xxxxxx)
  632. /T   - send whole track to file
  633. /S   - Start time
  634. /E   - End time
  635. /P   - play the selected range
  636. /U   - estimated disk usage required for data
  637. /H   - hex dump of sectors to stdout
  638. /B   - write to file in Binary format
  639. /W   - write to file in WAV format
  640. /O   - override copy protection bit
  641. /M   - override ASPI interface and use MSCDEX
  642. /NJC - do not perform jitter correction
  643. /MSC - override MSCDEX find first CD-ROM
  644. /ID  - override ASPI find first CD-ROM
  645. /LUN - override ASPI find first CD-ROM
  646. /ADAPTER - override ASPI find first CD-ROM
  647. /BLOCK - override the number of blocks to read at a time
  648. /OVERLAP - override the overlap of blocks read for jitter correction
  649. /ATAPI - force drive to bypass device driver
  650. /XA  - read raw CD-XA frames
  651. /CDIVIDEO  - read plain MPEG video from a CDi disc
  652. /CDIRAW    - read raw MPEG video/audio from a CDi disc
  653. Binary mode extension CDA will automagically added to the filename
  654. Wave format extension WAV will automagically added to the filename
  655. CDi raw format extension MPG will automagically added to the filename
  656. CDi video format extension MPV will automagically added to the filename
  657. XA format extension XA will automagically added to the filename
  658. e.g. CDDA /MSF /S 10:14:36 /E 13:55:11 /F outfile /W
  659. e.g. CDDA /LBA /S 106232 /E 109443 /F outfile /B
  660. e.g. CDDA /T 2 /F outfile /W /O
  661.  
  662.  
  663. Copying and Registration (does he mean this costs $$$?)
  664. -------------------------------------------------------
  665.  
  666. I am allowing full freedom to copy this program.
  667. It IS a fully functional version.
  668. It is NOT Crippleware!
  669. There is NOT a pro version available for an unreasonable sum of money.
  670. As I said at the start of this file, I am now forced to start asking
  671. for a small amount of money for this program.  If you use it, then
  672. you need to register it. 
  673.  
  674. If you don't agree with the new shareware policy, then you can:
  675. a) use the program anyway and violate the copyright
  676. b) go back and use version 1.0h which will remain freeware
  677. c) don't use the program at all
  678.  
  679. I would rather keep this program Freeware, but when it starts costing
  680. me money to develop new features, then I have to draw the line.
  681.  
  682. The registration fee for using CDDA is now $15 US.  I believe that
  683. this is a fair amount given the amount that the program does.  As
  684. well, if you don't need the new features and bug fixes, then
  685. use the old version.
  686.  
  687. I won't be asking for a fee every time a new version comes out.  This
  688. fee will give you a lifetime (as long as I bug fix and add features) 
  689. of free updates via the Internet.  I will also notify registered users 
  690. of any new versions for a year.
  691.  
  692. My mail address is:
  693.  
  694.       Jim McLaughlin
  695.       449 Viewmount Dr.
  696.       Nepean, Ontario
  697.       Canada
  698.       K2E 7P1
  699.  
  700. If you have any questions, my email address is jmclaugh@bnr.ca, but RTFM
  701. before you start sending me then questions.
  702.  
  703. I would also like to try and keep all the files together and unchanged
  704. in the archive, so if you are passing this around don't change the files.
  705. In this distribution the files contained are:
  706.  
  707. CDDA.EXE - the program itself
  708. CDDA.DOC - this document file
  709. ROYALTY.TXT - the list of people to whom you should pay royalties
  710. CDROMINF.EXE - the MSCDEX exerciser program
  711. CDROMINF.DOC - the text file describing CDROMINF
  712. MSCTEST.EXE - the test program for MSCDEX only access reading DA
  713. TOSHTEST.EXE - the test program for TOSHIBA drives reading DA
  714. TOSH_RST.EXE - the program to reset TOSHIBA drives after fatal errors
  715. TOSHREPR.EXE - the program to restore the sectors/track on a damaged HD
  716. NECTEST.EXE - the test program for NEC drives reading DA
  717. SONYTEST.EXE - the test program for SONY drives reading DA
  718. CHINTEST.EXE - the test program for CHINON drives reading DA
  719. SCSIPING.EXE - the program which uses ASPI to search for SCSI drives
  720. CDCOMPAT.TXT - a list from Sigma Designs of drives which support CDi
  721. CDIFAQ.TXT - the short CDi FAQ
  722. CDIMOVIE.TXT - the most up to date movie list from Philips
  723. SYWTBACD.TXT - so you want to buy a CDROM?  my commentary on all the vendors
  724. VIDEOCD.TXT - the VCD FAQ from Philips
  725. XADRIVE.TXT - the list from Kodak of drives which support CD-XA
  726.  
  727.  
  728. If you are one of those Shareware houses, I don't want to see this program
  729. available for $6.99 plus shipping and handling.  I don't like seeing
  730. the average Joe getting burned for a 10 cent disk, 1 cent label and 2 cents
  731. worth of labour to make the disk, especially when he can get 600+ Meg
  732. of really good stuff from something like the Simtel CD for $25 (thanks to
  733. Robert Bruce for starting the cheap archive business).
  734.  
  735.  
  736. How to get hold of me for help.
  737. -------------------------------
  738. If you want to mail me about problems or to tell me I'm going to rot in
  739. HE double hockey sticks for helping to copy music, put your message in
  740. a file and copy it to the NUL device. :>
  741.  
  742. If you want to make suggestions or want to send compliments you can contact
  743. me at the address below.
  744.  
  745. If you encounter trouble with the program CDDA, try and run the included
  746. test program most suited to your drive.  There are four test programs:
  747. one for each of the Toshiba, Sony and NEC type drives, and one which
  748. is a MSCDEX only version.  These programs are scaled down versions of
  749. CDDA and use the command line to specify the drive letter and ID.
  750. The programs TOSHTEST, SONYTEST and NEC test take a single command
  751. line argument.  It is -n, where n is the SCSI id of the drive.
  752. eg. c:>toshtest -3
  753. This will run TOSHTEST on the SCSI drive id 3.  Beware that selecting
  754. the wrong scsi id number for these test programs might (it has
  755. happened before) screw up your hard disk if 1) the hard disk is
  756. SCSI, 2) the id you use is the one for your hard disk, and 3) your
  757. hard disk supports permanently changing the sectors per track via
  758. software.
  759.  
  760. To fix this problem, use the program called TOSH_RST.  It is used to reset
  761. a Toshiba drive after CDDA has stopped with a fatal error.  It uses
  762. the same command line argument as the TOSHTEST program.
  763.  
  764. There is also the program SCSIPING.  It searchs for are reports all devices
  765. connected to the SCSI controller.  It uses the ASPI interface.
  766.  
  767.  
  768. If you would like assistance in solving problems, please include all
  769. dumps from all the related programs.  You should be able to
  770. run the programs like this and get the dumps in a text file:
  771. CDDA /T 2 /W /O /F testfile >dumpfile.txt
  772.  
  773. I have real difficulty in tracking down problems without these
  774. dumps.  In the past the majority of people asking for help just send
  775. along a short note telling me my program doesn't work, and what
  776. they remember the error messages saying.  This just doesn't cut it.
  777. I have to have the dumps to help.
  778.  
  779. The bottom line - RTFM before writing me.  Also read the alt.cd-rom
  780. FAQ.  many of your questions can be answered by reading.
  781. EMAIL: jmclaugh@bnr.ca
  782.  
  783. Things on my wish list of new functions
  784. ---------------------------------------
  785.  
  786. I want to add support for other CDROM drives that can read DA sectors
  787. over the SCSI, but I don't have access to these drives.  If someone could
  788. supply me with the programming information, I could try and do up a new
  789. version of CDDA, if I ever get some spare time.
  790.  
  791. Questions I have received since the release of 0.9a and 1.0a
  792. ------------------------------------------------------------
  793.  
  794. Why is the program so slow?
  795. This program is so slow because of any one or more of the following:
  796. 1. My poor programming skills.
  797. 2. Many of the CDROM drives only read DA frames in 1X mode even though
  798.    they may transfer data at 2X or 3X or faster.
  799. 3. The amount of computing to do jitter correction.
  800. 4. Reordering the bytes from the CD to the WAV file.
  801. 5. Having to read 16 frames for every 10 actually written to disk to
  802.    allow for up to three frames of jitter.  This has been improved
  803.    with the use of /block and /overlap
  804. 6. When there is more than three frames of jitter, I slightly shift
  805.    the aim of the search and reread the problem frames.
  806. 7. My Toshiba seems to have a magic number of 10 frames, that if I
  807.    read more than that at a time it takes 2-3 times longer than
  808.    reading in bunches of 10 or less.  I don't understand it.  Since I
  809.    have to read ahead 3 frames and behind 3 frames every time I read
  810.    a block from the drive to correct for jitter, I can't very well
  811.    keep my reads under 11 frames.  Other drives may have similar
  812.    thresholds.
  813. 8. If you are using MSCDEX only, make sure that the /m:xx option on the
  814.    MSCDEX line of your autoexec.bat is set to at least 20.  Any less
  815.    than this, and CDDA will end up reading in 2 possibly discontinous
  816.    chunks.  This will add greatly to the time to read data.
  817. 9. Many drives are happy reading contiguous frames from the disc.  If you
  818.    ask it to move it's start point to a frame that it has just read, it
  819.    may take a very long time to get itself all lined up to start reading
  820.    again.  A good example of this is the Philips CDR drive that reads
  821.    with /NJC at 2x speed but takes 6 times longer than the range selected
  822.    if it keeps having to resychronize itself.
  823.  
  824. What is ASPI?
  825. ASPI stands for Advanced SCSI Programming Interface.  It was developed
  826. by Adaptec, and has been adopted by many SCSI card manufacturers as
  827. a standard SCSI programming interface.  If you want more information
  828. on ASPI call Adaptec (408) 945-8600.
  829.  
  830. When I use /T, the start and ends of the track are a couple of
  831. seconds away from where I think they should be.  Why is this?
  832. In version 0.9a, there was a deep rooted bug which caused this.  I
  833. have fixed it (I hope), and this should no longer be a problem.
  834.  
  835. When I play back my samples, why are there pops and clicks?
  836. These pops and clicks can come from two places:
  837. 1. version 0.9a did NOT handle the jitter problem, it is handled now.
  838. 2. your sound card can't handle 16-bit 44.1 KHz samples.  Try using SOX
  839.    or a similar program to change the sample to 22.05 or 11.025 KHz
  840.    samples and try again.
  841. 3. Many CDs have been mastered from digital sources.  In this case the
  842.    source may have been synthesized digitally which gives absolutely
  843.    perfect sounds which are very repetitive and exactly the same.  When
  844.    this happens, it may possibly confuse the jitter correction routines.
  845.    There is not a lot I can do about it at the moment, and there is less
  846.    that any of the other programs like mine can do.
  847.  
  848. The program stops with the error xxx.  What is wrong?
  849. The 0.9a release had very limited error reporting.  I thought that
  850. if it worked on my machine it work on everybody's.  This version
  851. has much more error reporting.  As I understand it, CDDA will
  852. not necessarily work correctly if SMARTDRV is installed.  This has
  853. been the source of a lot of trouble.  As well some people have been
  854. having trouble using CDDA in a DOS window in Windows.  I think
  855. there may be a problem when being used with a DPMI manager installed.
  856. So, the bottom line is DON'T run CDDA under Windows.
  857.  
  858. When will you release an OS/2 version?
  859. I have no interest in writing a version for OS/2. Period.  However,
  860. if you are running Warp, then you already have VASPI, and CDDA should
  861. run just fine.  If you are using an earlier version, then
  862. there is a program from Adaptec called VASPI, which will allow
  863. you to run CDDA in a DOS window.  I got the following email with
  864. the how-to for OS/2 from Stefan Eichner (Stefan-Eichner@k2.maus.de):
  865.  
  866. > 1. Your CONFIG.SYS has to include the follow lines:
  867. > [...]
  868. > BASEDEV=TMV1SCSI.ADD
  869. > BASEDEV=OS2ASPI.DMD
  870. > REM DEVICE=C:\OS2\OS2CDROM.DMD /Q
  871. > E=C:\OS2\MDOS\VASPI.SYS
  872. > [...]
  873. > !If no OS2CDROM.DMD is loaded you can't read Data-CDs!
  874. >
  875. > 2. Add to the autoexec.bat the start-comand for MSCDEX2.EXE
  876. > (e.g. C:\MSCDEX2.EXE /D:MSCD001 /L:H /m:10 /v)
  877. >
  878. > 3. Change the settings of the DOS-Session on the WPS:
  879. > DOS_DEVICE=C:\TSLRCDR.SYS /d:mscd001 /p:3
  880. >
  881. > Now CDDA works great!!!
  882. VASPIBET.ZIP is available from ftp.cdrom.com
  883.  
  884. When will you release a Windows version?
  885. I have no interest in writing a Windows version.  I don't have the time,
  886. and I don't think Windows is a particularly good OS (if you can call
  887. it an OS).  I have had a couple of offers to help, but I have been
  888. too busy with the rest of my life to work on it.  Don't hold your
  889. breath.  The word from the beta testers is that CDDA runs just fine
  890. in a DOS window under Windows 95.
  891.  
  892. When will you release a UNIX version?
  893. Never.  Although I run LINUX on my machine, I have no interest in
  894. rewriting CDDA.  There is a program called CD-DA for Linux, which
  895. should work with the Toshiba drives.  It is available from Sunsite.
  896.  
  897. When will you be writing a version for my CDROM drive?
  898. Getting the programming information from CDROM drive manufacturers is
  899. like pulling teeth.  I've been hunting for this stuff for over two
  900. years, and have only managed to get the programming manuals for
  901. Toshiba, Chinon and Sony.  If you have a drive and it does support DA frames,
  902. I need the programming manual.  I also need about 5 or 6 extra hours
  903. in each day.
  904.  
  905. I have a Toshiba drive.  Why doesn't your program work?
  906. It appears that different ROM revisions cause the drives to work
  907. differently.  For instance, my Toshiba 3401 is revision 0283.  I have
  908. heard from people who have ROMs older and newer that can't use
  909. my program.  I have also heard that Toshiba has changed the programming
  910. interface on newer drives, but it is not reflected in their SCSI
  911. programming manual.  I just don't know what is wrong.
  912.  
  913. Why doesn't your program work with my ASPI driver?
  914. Several vendors supply ASPI drivers for their SCSI cards.  However,
  915. all drivers are not created equal.  I have heard from people who
  916. have had trouble with just about every SCSI card on the planet.  I
  917. only have Adaptec's EZSCSI to do my testing.  I'll try and do my
  918. best on case by case basis, but I really don't have any spare time.
  919. I also hear from a number of people who have trouble using the Adaptec
  920. 1520/22 controllers.  It appears that the delay in doing polled IO from
  921. this card screws up my view of how the controller and drive interact.
  922. Don't expect any fixes soon.
  923.  
  924. CDROMINF works on my machine, so why doesn't CDDA?
  925. CDROMINF only uses MSCDEX calls, and CDDA also uses ASPI calls.  It
  926. is these ASPI calls that do the meat of the program.  If ASPI isn't
  927. on your machine, or doesn't work correctly, then CDDA will never work.
  928. Your only other choice is to try the /M option and use only
  929. MSCDEX commands.  This is unlikely to help any SCSI drive owners.
  930. Before writing me and asking for your drive to be supported, do a
  931. little legwork first.  Call the manufacturer and ask for the programming
  932. information.  Second, run all the test programs included with this
  933. release.  These programs don't check for the drive type before trying
  934. to read DA frames.  If any of these pass, let me know and I can
  935. add your drive based on the programming information of an existing
  936. drive.  It has happened before, so it might happen again.
  937.  
  938.  
  939. Why are there tons of zeros at the beginning and end of my track?
  940. Most every audio track has some silence at the beginning and
  941. end.  This silence is actually digital silence which is all
  942. zeros for the samples.
  943.  
  944. Can I use CDDA to read from DAT drives?
  945. As far as I know there are only a couple of DAT drives out there
  946. that allow reading of digital audio through SCSI.  In theory, I could
  947. add that feature to CDDA, but since I don't have one of those drive,
  948. and I don't have the programming manuals either, I seems very unlikely
  949. that this will ever happen.  It also seems that these drive vendors
  950. have taken out support for reading DA.  Their story is that people
  951. were putting cheap quality audio tapes in the drives and screwing
  952. up the drives.  So they took out the feature.  My guess is that they
  953. were getting pressure from the record companies.  If you really
  954. need to do this then get yourself a Silicon Graphics machine.  They
  955. make sure that this feature is available in their package.  Don't 
  956. forget to mortgage your house to pay for it.
  957.  
  958. Sometimes CDDA doesn't work when I first put in a CD. Why?
  959. I don't know.  Some people have reported that CDDA works better after
  960. a new CD is put in the drive if you use some other utility to play and
  961. then stop the CD.  This seems to force some sanity into some drivers.
  962.  
  963. Can you change CDDA to read the song titles from my audio CD?
  964. There are no song titles recorded on an audio CD.  The following
  965. is a post which explains this better than I can.
  966.  
  967.  
  968. ----------------------------------------------------------------------------
  969. From: dplatt@ntg.com (Dave Platt)
  970. Newsgroups: alt.cd-rom
  971. Subject: Re: Ascii Track data on Audio CDs
  972. Keywords: Audio CD Ascii Track
  973. Date: 23 Feb 93 19:16:03 GMT
  974. Organization: New Technologies Group, Inc.  Palo Alto CA
  975. Lines: 41
  976.  
  977. >A friend told me that encoded on Audio CDs are the track titles, CD title,
  978. >credits and even a bitmap image of the cover art.  Can anyone confirm or 
  979. >deny this?  If it is true, how does a programmer get to this information?
  980.  
  981. In general, this is _not_ true.
  982.  
  983. The disc table-of-contents has information about the total disc length,
  984. number of tracks, and the starting time of each track.  It has no room
  985. for human-readable text and there is no provision in the standards for
  986. such, as far as I've ever been able to find out.
  987.  
  988. The audio tracks have "subcode" information associated with each frame
  989. (75 frames per second).  The P subcode bit is used for primitive
  990. track-signalling flags, and is rarely interpreted by modern CD players.
  991. The Q subcode contains some useful information: control (type,
  992. preemphasis, and copy-protect fields), address information, index
  993. numbers, and sometimes the disc catalog/barcode number or the ISRC code
  994. (serial number, country, year, owner ID) of the recording.  Still, no
  995. room for text or artwork.
  996.  
  997. The R,S,T,U,V,W bits in the subcode can be used in a variety of ways.
  998. The most popular de facto standard is for CD+G graphics.  These provide
  999. a sort of slow-scan video (288x192 pixels, max of 4096 colors using an
  1000. encoded color lookup table).  The CD+G graphics can include almost
  1001. anything... lyrics, still photos from concert footage, and copies of the
  1002. cover artwork are all quite possible and have been done.
  1003.  
  1004. Only a relatively small percentage of audio CDs have CD+G graphics.
  1005.  
  1006. Some CD players have a "subcode out" jack which can be fed to an
  1007. external decoder.
  1008.  
  1009. Some CD-ROM drives allow the subcode data to be read over the SCSI (or
  1010. other) communication bus while the drive is playing audio CDs through
  1011. its built-in DACs.  Some [fewer] drives allow both the audio data and
  1012. the subcode to be retrieved over the bus and manipulated by the host
  1013. computer.  Details vary;  see your drive reference manual.
  1014. -- 
  1015. Dave Platt                                                VOICE: (415) 813-8917
  1016.               Domain: dplatt@ntg.com      UUCP: ...netcomsv!ntg!dplatt
  1017.  USNAIL: New Technologies Group Inc. 2470 Embarcardero Way, Palo Alto CA 94303
  1018.  
  1019. ----------------------------------------------------------------------------
  1020. Changes in version 1.4a from version 1.3a
  1021. - made several changes to help the "quiet music" problem when there are
  1022.   stretches of very quiet music, the digital master often is cleaned
  1023.   up and digital silence is put in its place, or when a digital organ
  1024.   is used as the only instrument the repeating digitally perfect notes
  1025.   can confuse CDDA
  1026. - added support for the DEC RDD42, the COMPAQ CR503/CDU561, the Kodak
  1027.   6X writer, HP 4020 writer, Pinnacle 5030, Yamaha 102, Panasonic 572/574/581
  1028. - introduced the /block and /overlap commands to allow for customizing
  1029.   the recording on difficult machines - also has the side effect of
  1030.   cutting the record times by 40%
  1031. - fixed a typo in the Plasmon drive name
  1032. - added the /ATAPI command to try and bypass the device driver and MSCDEX
  1033.   on IDE drives
  1034. - fixed a bug that caused incorrect disk free values when the drive letter
  1035.   was specified as a captial instead of lower case
  1036. - added some more robust code to retry disc reads on some of the less
  1037.   fatal errors
  1038. - rewrote the drive search routines in conjunction with adding the /ADAPTER
  1039.   command
  1040. - fixed a bug which only appears when you use a CD+ CD instead of the
  1041.   older style discs
  1042.  
  1043. Changes in version 1.3a from version 1.2a
  1044. - fixed a couple of bugs in the new Philips code
  1045. - made several changes to the jitter correction routines to speed them,
  1046.   as well CDDA has a better chance of working now with drives with
  1047.   bad jitter problems
  1048. - fixed a typo in calculating the end of disc
  1049. - now compiled in 386 code mode instead of the old 8086 code mode
  1050.  
  1051. Changes in version 1.2a from version 1.1a
  1052. - fixed another memory allocation bug which cause the program to hang
  1053.   for no apparent reason on some machines
  1054. - added support for Pioneer, Kodak, Philips, Pinnacle, Plasmon, Yamaha
  1055.   Ricoh and JVC drives
  1056. - added doc files on movie lists, CDi compatible drives and XA compatible
  1057.   drives
  1058. - added the /P option to allow playing out the head phone jack the select
  1059.   range of audio instead of saving to disk
  1060. - added the /LUN option to override the LUN=0 default - useful when
  1061.   using the 6Pack from Pioneer
  1062. - included my commentary on the purchasing of CDROM drives - is not very
  1063.   complimentary to most vendors
  1064.  
  1065.  
  1066. Changes in version 1.1a from version 1.0h
  1067. - a minor bug in the count of bytes written to disk has been fixed.
  1068. - support for CDi discs - both white and green book
  1069. - support for XA discs
  1070. - no longer freeware
  1071. - official word from Mitsumi says that they have not and will not
  1072.   ever support reading DA frames with their drives.
  1073.  
  1074.  
  1075. Changes in version 1.0h from version 1.0g
  1076. - bug in displaying the sense data has been fixed.
  1077. - a major bug that caused the program to hang at random has been fixed.
  1078. - Mitsumi 4x, Sony 55E, Sony 8012 drive types added
  1079. - Plextor (Texel drives 3028 and 5028 have been removed.  I included
  1080.   them based on a rumour I heard.  I have since received the programming
  1081.   manual for these drives, and they do not support reading DA frames.
  1082.  
  1083.  
  1084. Changes in version 1.0g from version 1.0e
  1085. (version 1.0f was not formally released)
  1086. - ISRC code display added
  1087. - option NJC added
  1088. - Hitachi, Teac, Matshita drive types added
  1089. - bug in MSCTEST concerning empty buffers fixed
  1090.  
  1091.  
  1092. Changes in version 1.0e from version 1.0a
  1093. (versions 1.0b to 1.0d were not formally released)
  1094. - UPC code display added for NEC drives
  1095. - Toshiba mode select to return the drive to normal operation after
  1096.   reading DA frames had a conflict with EZSCSI drivers - this has
  1097.   been fixed
  1098. - length of WAV file did not always match length contained in header -
  1099.   this has been fixed
  1100. - added support for the Chinon CDS-535 drive (since I don't have one
  1101.   of these drives, this is untested)
  1102. - added support for the Plextor 3028/5028 drives (since I don't have one
  1103.   of these drives, this is untested)
  1104. - there was a bug which on some machines would allocate memory wrong
  1105.   when using the /M option, and would fill the file with zeros - this
  1106.   has been fixed
  1107. - program TOSH_RST was added for users of the Toshiba drives who
  1108.   have CDDA exit with a major error.  It resets the drive back to
  1109.   normal operation
  1110. - there was a bug on some machines that would allow the user to run
  1111.   CDDA fine, but the respective test program would fail.  It appeared
  1112.   mostly on the SONYTEST and NECTEST programs - this has been fixed
  1113. - during running with NEC drives extra debug messages were printed -
  1114.   this has been fixed
  1115. - the jitter correction routine has been rewritten - CDDA now runs
  1116.   about twice as fast as 1.0a did on my machine
  1117. - a problem with one version of the Sony rom has a peculiar failure
  1118.   which may be corrected by a rewrite of the sector search routine
  1119. - a problem with copy permitted discs sometimes required /O in order
  1120.   to dump to disk
  1121. - when the last track of a disc or the last LBA or the last MSF was
  1122.   selected to be dumped, some drives actually only allow reading
  1123.   of the second to last frame, and not the last frame.  since there
  1124.   is virtually no sound on the last frame of the disc, I have forced
  1125.   the program to stop at the next to last frame
  1126.  
  1127. Known bugs:
  1128. - the Pinnacle and Philips CDR drives seem to have a problem with
  1129.   the CDi discs.  I am working on the problem, so contact me if you
  1130.   have one of these drives and I'll give you an update.
  1131. - someone has reported the program failing on a very large drive
  1132.   with very large amounts of disk space available.  The specific
  1133.   example was a 250M drive with 235M free.  It would appear that
  1134.   there is a bug in the Borland dfree routines.  I will be looking
  1135.   into the problem, except for the fact that my drive is only
  1136.   100M, so I can't duplicate it.
  1137. - a couple of people have reported that the WAV files created are
  1138.   not compatible.  I can't say much except that in one case the
  1139.   file size written in the WAV header was incorrect, and I don't know
  1140.   why.  I have however found that really large WAV files (>10M) often
  1141.   confuse some players.  I have seen a file work correctly on a couple
  1142.   of players, and not on others.  My guess is that some players out
  1143.   there are not interpreting WAV files correctly, or are not expecting
  1144.   very large files.
  1145. - one person reported that running the test programs on their machine
  1146.   and specifying a hard drive instead of a CD-ROM drive causes the
  1147.   number of bytes per sector to be changed permanently on the drive
  1148.   I don't know if this was just a fluke, but be careful.  I have 
  1149.   included the program TOSHREPR.EXE.  This program will reset the 
  1150.   sectors per track to 512 when you accidentally run TOSHTEST on a hard
  1151.   drive instead of the CDROM drive.  This problem appears to manifest
  1152.   itself on hard drives manufactured by DEC.  If you use these drives
  1153.   be careful when running TOSHTEST.
  1154. - one person reported that having more than one CDROM drive means
  1155.   trouble for the /T mode.  I'm looking into it, but don't have an
  1156.   answer yet.
  1157.  
  1158. Wish list: (which may or may not get implemented)
  1159. - have start and end times include offset from beginning of track
  1160. - more CD-ROM drives supported
  1161. - add a /I mode which will do an image of the entire disc to a file
  1162. - add more support for intrepting hard error messages
  1163. - add a /DUMP mode which will dump all screen output to a file as
  1164.   well for those who can't use the >
  1165.  
  1166.