home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 4 / AUCD4.iso / acorn / documents / appnotes / 261-275 / 273c.arc / Text
Encoding:
Text File  |  1995-06-19  |  32.1 KB  |  723 lines

  1. -----------------------------------------------------------------------------
  2. 28th April 1995
  3. -----------------------------------------------------------------------------
  4. Support Group Application Note
  5. Number: 273
  6. Issue: 0.4 **DRAFT**
  7. Author: DW
  8. -----------------------------------------------------------------------------
  9. CD ROM Drives and their Handling under RISC OS Explained
  10. -----------------------------------------------------------------------------
  11. Notes: 
  12. This Application Note details the interfacing of, and protocols underlying, 
  13. CD ROM drives 
  14. -----------------------------------------------------------------------------
  15. Applicable Hardware: 
  16. All Acorn computers running RISC OS 3.1 or greater
  17.  
  18. Related Application Notes: 
  19. 266: Developing CD ROM products for Acorn machines
  20. 269: File transfer between Acorn and foreign platforms
  21.  
  22.  
  23. -----------------------------------------------------------------------------
  24. Copyright (C) 1995 Acorn Computers Limited 
  25.  
  26. Every effort has been made to ensure that the information in this leaflet is 
  27. true and correct at the time of printing. However, the products described in
  28. this leaflet are subject to continuous development and improvements and
  29. Acorn Computers Limited reserves the right to change its specifications at
  30. any time. Acorn Computers Limited cannot accept liability for any loss or
  31. damage arising from the use of any information or particulars in this
  32. leaflet. ACORN, ECONET and ARCHIMEDES are trademarks of Acorn Computers
  33. Limited.
  34. -----------------------------------------------------------------------------
  35. Support Group
  36. Acorn Computers Limited
  37. Acorn House
  38. Vision Park
  39. Histon
  40. Cambridge
  41. CB4 4AE                                                  
  42. -----------------------------------------------------------------------------
  43.  
  44. Table of Contents
  45.  
  46.         Introduction                                    
  47.  
  48.         Interfacing CD ROM Drives                               
  49.  
  50.         Features of CD ROM Drives                                      
  51.  
  52.         CD ROM Formatting Standards ("Coloured Books")                   
  53.  
  54.         CD ROM Data Storage Standards                                    
  55.  
  56.         CDFS and CD ROM Drivers                                          
  57.  
  58.         Accessing Data on CD ROMs Produced for Non-Acorn Platforms      
  59.  
  60.         Troubleshooting                                                 
  61.  
  62.  
  63.         Appendix A: Useful Contacts                                  
  64.         Appendix B: PhotoCD Mastering Bureaux                                       
  65.         Appendix C: References                          
  66.  
  67.  
  68.  
  69. Introduction
  70. ------------
  71. Considering the amount of data which has to be stored in today's Multimedia
  72. applications (especially those incorporating moving video clips) it is often
  73. impractical to distribute the software as a set of floppy discs. For this
  74. reason, CD ROM is becoming an increasingly popular distribution medium. Even
  75. with the high storage capacity (typically 600 MB) of this medium, however,
  76. it is often necessary to feed the raw data through a compression system in
  77. order to fit it all on the disc.
  78.  
  79. This application note aims to explain the terminology, interfacing, and
  80. current capabilities of CD ROM drives and their respective data standards,
  81. along with details of their software interfacing to RISC OS. Further data on
  82. other multimedia capturing and rendering devices, and associated data
  83. compression standards, is available in other supporting Application Notes.
  84.  
  85. Interfacing CD ROM drives
  86. -------------------------
  87. Currently, there are four ways of connecting a CD ROM drive to an Acorn
  88. computer. These are:
  89.  
  90. SCSI: Currently the most popular method. SCSI (Small Computer Systems
  91. Interface) is an industry-standard peripheral bus, which can move data
  92. around in parallel 8-bit chunks. More recently, SCSI 2 has begun to emerge
  93. as a standard on high-end systems, giving an effective near-doubling of data
  94. transfer speed. The SCSI bus standard allows up to 7 peripheral devices to
  95. be connected to the same bus; if you plan to have more than  one CD ROM
  96. drive on a given machine, SCSI is the recommended option. The fastest SCSI
  97. cards available for Acorn machines can transfer data at a sustained 3.5 MB
  98. s-1 or so. Acorn SCSI interfaces can be fitted to the Archimedes 300 and 400
  99. series, the  R140, A5000 and the Risc PC; the Archimedes 540 and R260 were
  100. supplied with a SCSI card as standard. The Acorn card supports ANSI X3.131
  101. 1986 and CCS X3T9.2/85-52 Revision 4B of the SCSI standards; check with your
  102. drive supplier for compatibility.
  103.  
  104. IDE: The emerging standard for hard drive interfaces in desktop computers,
  105. with the exception of specialised workstations (which mostly use SCSI 2). A
  106. number of CD ROM drives equipped with IDE interfaces have been released onto
  107. the market, and it is one of these devices which is fitted in the Risc PC
  108. 600 CD. As IDE only supports a maximum of two peripheral devices on its data
  109. bus, it is only possible to have one IDE CD ROM drive if you already have an
  110. IDE hard disc. Bus data transfer speeds are on a par with SCSI 1. Suitable
  111. IDE interfaces are fitted as standard to the A4000, A5000 and Risc PC.
  112. Although the A3020 also has a suitable interface, cable length limitations
  113. imposed by the IDE timing specifications mean that a secondary interface
  114. must be used, as the physical size of the A3020 case requires that the drive
  115. be housed externally.
  116.  
  117. Parallel: On Acorn machines equipped with a bidirectional parallel port
  118. (these machines being the A3010, A3020, A4000, A5000 and Risc PC), it is
  119. possible to interface a CD ROM drive to this port, and use a modified set of
  120. drivers to access the drive. The hardware interface between the drive and
  121. the computer usually has a "straight-through" parallel connector on it in
  122. addition to the CD ROM drive connector, so that a printer may be attached to
  123. the computer at the same time. The speed by which signal state can be
  124. changed on these lines is sufficiently high that data can be transferred at
  125. speed roughly equivalent to a SCSI 1 interface.
  126.  
  127. Proprietary: Some third party vendors have developed proprietary interfaces
  128. for connecting CD ROM drives; the relevant third party should be contacted
  129. directly for the latest details regarding data transfer  speeds and the
  130. number of drives which can be connected via such an interface.
  131.  
  132.  
  133.  
  134. Features of CD ROM Drives
  135. -------------------------
  136. Speed
  137. In all cases of data transfer between peripheral and computer, there is
  138. always a "bottleneck," where one part of the system places a fundamental
  139. limit on the rate of data transfer. In the case of hard drives, the
  140. bottleneck is often the bus interface; this certainly became the case with
  141. fast, cached SCSI drives, hence the advent of SCSI 2. In the case of CD ROM
  142. drives, however, the physical mechanism of the CD ROM drive is the limiting
  143. factor.
  144.  
  145. The first CD ROM drives were capable of a data access rate of 150K s-1; when
  146. compared with the bandwidth sustainable by the SCSI bus, for example, this
  147. is very slow. Successors to these drives were classed as "double speed," and
  148. implemented such techniques as read-ahead cacheing, increased disc rotation
  149. speed and multiple read heads to achieve 300K s-1 transfer. Subsequent
  150. refinements have resulted in "quad speed" drives, capable of 600K s-1; these
  151. are currently the state of the art, but still have a transfer rate well
  152. below the bus bandwidth of SCSI or IDE.
  153.  
  154. Sessioning
  155. A CD ROM drive may be described as either "single session" or
  156. "multi-session." This distinguishes the capability of a drive's control
  157. logic to access multiple catalogues for different parts of the disc, as they
  158. were laid down at the time of mastering. As CD is a "write-once" medium, it
  159. is not possible to produce a file catalogue, write the files and catalogue
  160. to the disc, and then go back to the disc and add some more files without
  161. adding a complete new catalogue after the end of the previously written data
  162. to cater for the data being appended; in this circumstance, a "single
  163. session" drive would only be able to read the data defined in the first
  164. catalogue. Most modern drives are multi-session, but it is always wise to
  165. check with the supplier.
  166.  
  167. Audio Output
  168. Most CD ROM drives are capable of outputting audio information extracted
  169. from Red Book Mode 0 (q.v.) CDs; this output is usually presented either at
  170. a mini-jack on the CD ROM drive suitable for driving a pair of 35 Ohm (input
  171. impedance) headphones, or (in the case of a drive fitted with an audio mixer
  172. board) on a header plug to feed into the unfiltered external audio output on
  173. the computer, or both. In the case of the Risc PC, the header plug can be
  174. fitted onto link LK14; this will also allow audio to be produced via the
  175. internal speaker.
  176.  
  177. The quality of sound output from Red Book CDs by the CD ROM drive is
  178. determined solely by the Digital to Analogue Converters (DACs) built into
  179. it. In the case of White Book (q.v.) CD ROMs the audio is converted by the
  180. DAC unit on the appropriate expansion card fitted to the computer, and in
  181. the case of CD ROMs containing Replay movies or other application-based
  182. samples, the audio is converted by the on-board sound system. In all base
  183. configurations, the on-board sound system is built around an 8 bit
  184. logarithmic DAC, which gives sound output quality, after filtering, roughly
  185. equivalent to a 12 bit linear system. The Risc PC, however, may easily be
  186. upgraded to a true 16 bit linear audio system, giving CD quality
  187. reproduction. Audio upgrades for earlier machines are available via third
  188. parties.
  189.  
  190.  
  191. CD ROM formatting standards ("Coloured Books")
  192. ----------------------------------------------
  193. Red Book
  194. This is the formatting standard which covers "ordinary" audio CDs, and is
  195. defined by Philips and Sony. Dedicated audio data is recorded as CD-DA
  196. (Compact Disc Digital Audio) in PCM (Pulse Code Modulated) format. Red Book
  197. is the standard upon which all subsequent CD ROM standards are ultimately
  198. based.
  199.  
  200. Red Book divides the disc into one or more audio tracks; each track normally
  201. comprises a single "track" in the musical sense. These tracks are further
  202. divided into sectors (also known as frames); each sector contains sufficient
  203. data to supply 1/75 second of music, which at the standard CD digitising
  204. rate of 44.1 kHz, works out as 2352 bytes.
  205.  
  206. In addition to the 2352 bytes of audio data, Red Book provides two levels of
  207. error detection code (EDC) and error correction code (ECC) for each sector;
  208. if part of a sector cannot be read for some reason, the ECC can be used to
  209. reverse-engineer the data. Further to EDC and ECC, 98 control bytes are
  210. added to each sector; these bytes contain such information as timing data to
  211. enable an audio CD player to display the track playing time.
  212.  
  213. All CD ROM drives which are compatible with Acorn machines are capable of
  214. playing Red Book audio via their own DACs, although most drives cannot allow
  215. the computer to "read" CD-DA directly. Acorn's CD ROM Filing System (CDFS)
  216. has facility to direct a drive to play a Red Book CD; either the appropriate
  217. CD ROM drive icon can be clicked on when the disc is loaded to start it
  218. playing from the beginning of the first track, or appropriate *commands may
  219. be passed to cause the drive to play a given section of audio (see the CDFS
  220. section below)
  221.  
  222. Yellow Book
  223. This is the first set of standard definitions which detail the use of CDs to
  224. store computer data. Yellow Book is based on Red Book, and indeed Yellow
  225. Book Mode 0 supplies the same functionality as Red Book.
  226.  
  227. The Yellow Book standard defines three data modes; CDFS is capable of
  228. handling all three, although not all CD ROM drives are capable of handling
  229. them all. A CD containing tracks consisting of more than one mode is termed
  230. a "mixed-mode CD."
  231.  
  232. Mode 0: This mode is used to store CD-DA in PCM format. Most drives cannot
  233. "read" this data digitally and pass it to a computer, only play it.
  234.  
  235. Mode 1: This mode is used to store data, and is the normal mode which data
  236. is stored in. The Red Book 2352 byte data area is split as follows:
  237.  
  238. 12 bytes of synchronisation
  239. 4 bytes of header information
  240. 2048 bytes of user data
  241. 4 bytes of EDC
  242. 8 bytes of blanks
  243. 276 bytes of ECC 
  244.  
  245. Mode 1 has an additional layer of ECC, which is included to provide the
  246. increased reliability required to store computer data. This mode has an
  247. uncorrectable error rate of 1 x 10-12 (ie one bit in every 200 CD ROMs). As
  248. drives are capable of re-reading the data and correcting the information,
  249. the data is hardly ever totally unreadable.
  250.  
  251. Mode 2: This is another data mode, designed particularly for storage of
  252. video picture data and compressed audio data. Mode 2 is used where the
  253. primary concern is density of data storage; by sacrificing most of the error
  254. correction capability, a Mode 2 disc can store 14% more user data than a
  255. Mode 1 disc. A 2352 byte sector is subdivided into: 
  256.  
  257. 12 bytes of synchronisation
  258. 4 bytes of header information
  259. 2336 bytes of user data
  260.  
  261. The extended error correction codes are missing from this mode so the error
  262. recovery is not as good; the uncorrectable error rate is 1 x 10-9. This mode
  263. is not used as often as Mode 1.
  264.  
  265. In all these modes, data is referenced by its position on the disc in units
  266. of minutes, seconds and frames; a frame is a Philips-defined time unit
  267. equivalent to 1/75 s.
  268.  
  269. Mixed Mode discs
  270. As Red Book and Yellow Book use the same underlying sector size, it is
  271. possible to produce "mixed mode" discs containing both computer data and CD
  272. audio. The most common layout for a mixed mode disc is to have the first
  273. track as Yellow Book Mode 1 data, and the remaining tracks as Red Book PCM
  274. audio. The two most common methods used in Mixed Mode applications are:
  275.  
  276. a) To initially load the program into the computer and run it, and then
  277. allow the computer to have continuous access to the audio tracks. The
  278. limitation with this scheme is that sufficient free RAM must be available
  279. for the computer to load all of the application executable and its
  280. associated data.
  281.  
  282. b) To alternately read in portions of executable code and audio data. This
  283. relieves the memory constraint above, but entails more track seeking for the
  284. CD ROM drive and hence slower operation.
  285.  
  286. CD ROM /XA (PhotoCD)
  287. This is a further extension of Yellow Book Mode 2. CD ROM /XA is distinct
  288. from Yellow Book Mode 2 in that it is specified as suitable for computer
  289. data, video data and compressed audio data. To do this, CD ROM /XA defines a
  290. new track format; an 8 byte subheader is included in the 2352 byte sector,
  291. so the sector takes the layout:
  292.  
  293. 12 bytes of synchronisaton
  294. 4 bytes of header information
  295. 8 bytes of subheader information
  296. 2048 bytes of user data
  297. 4 byted of EDC
  298. 276 bytes of ECC
  299.  
  300. CD ROM /XA is also known as Mode 2 Form 1;  a slightly modified form of this
  301. (to allow discs to be read by Philips CD-i machines) is is the standard
  302. layout used in the Kodak PhotoCD system, hence CD ROM /XA is readable by
  303. Acorn CDFS 2.21. A further iteration of CD ROM /XA, Mode 2 Form 2, also
  304. exists; like Yellow Book Mode 2, this omits the ECC, and hence is rarely
  305. used. 
  306.  
  307. When compared to Mixed Mode discs, it is very important to note that a Mixed
  308. Mode disc is unable to access both computer data and audio simultaneously;
  309. data of different types must be on separate tracks. CD ROM /XA allows
  310. heterogeneous data types to be interleaved within the same track, hence
  311. allowing simultaneous access to executable code and audio; this is the
  312. principal advantage of this format.
  313.  
  314. Green Book
  315. This is a proprietary standard used by Philips for encoding computer data,
  316. compressed audio and moving video (MPEG) CD ROMs for use with their own CD-i
  317. system. Currently, Acorn systems cannot access Green Book CD ROMs.
  318.  
  319. White Book
  320. This is the new "Open Standard" for storage of digitised video. White Book
  321. discs use ISO 9660 (q.v.) filenames; the main thrust of the White Book
  322. standard is to produce an explicit file hierarchy and filename set,
  323. compliant with ISO 9660, into which all video data can be fitted.
  324.  
  325. Moving video data distributed using the White Book standard can be accessed
  326. by CDFS; however, the movies can currently only be played at a suitable
  327. frame rate using the Movie Magic card (available from Computer Concepts) and
  328. a modified version of Acorn Replay. This modified version of Replay,
  329. supplied only with the card, does not incorporate movie-decoding capability
  330. within itself, but acts as the user interface to pass the movie data direct
  331. to the C-Cube CL450 MPEG decoder chip on the Movie Magic card.
  332.  
  333. CD ROM data storage standards
  334. -----------------------------        
  335. High Sierra
  336. This is the earliest standard format utilised by CD ROM for storing computer
  337. data in a hierarchical file structure. It has generally been superseded by
  338. ISO 9660, which itself evolved from an enhanced High Sierra standard. In
  339. addition to ISO 9660, CDFS is able to read most High Sierra CD ROMs.
  340.  
  341. ISO9660
  342. This has become a de-facto standard as a logical format for information
  343. storage and retrieval. The standard defines a hierarchical filing structure
  344. for both files and directories. In order for all CD ROM supporting computers
  345. to be able to map the names of the files on the CD ROM to their own filing
  346. systems, file and directory names on ISO 9660 discs are restricted to:
  347.  
  348. Capital letters "A-Z"
  349. Digits "0-9"
  350. Underscore "_"
  351.  
  352. ISO 9660 Level 1 interchange format also restricts the naming system to:
  353.  
  354. Filenames: Maximum of 8 characters
  355. Filename extensions: Maximum of 3 characters
  356. Directory names: Maximum of 8 characters (no name extensions permitted)
  357.  
  358. To cater for RISC OS applications, which always exist in a directory
  359. beginning with a pling "!", CDs destined specifically for Acorn platforms
  360. are mastered with the initial pling replaced by an underscore. When
  361. accessing the directory structure of such a CD ROM, CDFS looks for any
  362. directories with names beginning with an underscore, and maps this
  363. underscore to a pling "on the fly" and before presenting the filer display
  364. to the user. Investigating such a CD ROM on another platform will therefore
  365. result in application directories being displayed with an initial
  366. underscore, and not a pling.
  367.  
  368. PhotoCD (Image Pac)
  369. PhotoCDs are recorded in CD ROM /XA Mode 2 Form 1 format. Most of the disc
  370. is taken up by files containing picture data stored in Photo YCC, which is a
  371. Kodak-devised colour encoding metric. Each discrete image is stored 5 (or,
  372. exceptionally, 6) times on the disc at different resolutions; the copies of
  373. each image, once they have been fed through a visually-lossless Kodak
  374. compression system, form an Image Pac. The Acorn PhotoCD viewer application
  375. (!PhotoView) opens the Index on a PhotoCD, which contains the smallest image
  376. from each Image Pac, in order to build a contact sheet; when a picture is
  377. selected, the appropriate resolution of YCC image is selected from the Image
  378. Pac and rendered. Each Image Pac contains scans at the following
  379. resolutions:
  380.  
  381. Base / 16 (thumbnail resolution)       128 x 192
  382. Base / 4                               256 x 384
  383. Base (TV resolution)                   512 x 768
  384. BaseX4 (HDTV)                         1024 x 1536
  385. BaseX16 (photographic)                2048 x 3072
  386. BaseX64 (photographic)                4096 x 6144 (Pro Master PhotoCD only)
  387.  
  388. PhotoCDs can be produced from ordinary 35mm slides or photographic
  389. negatives; in addition to mastering facilities provided by some high-street
  390. photographic processors, Kodak has set up a number of image transfer bureaux
  391. dedicated to producing PhotoCDs in quantity for the commercial market; these
  392. are listed in Appendix B.
  393.  
  394. Others
  395. As detailed above, High Sierra, ISO 9660 and PhotoCD CD ROMs based on Yellow
  396. Book or CD ROM /XA can currently be accessed by Acorn machines, and CD ROM
  397. drives fitted to Acorn machines can play audio CDs which conform to the Red
  398. Book standard.
  399.  
  400. Other formats also exist; Apple have a proprietary format (essentially,
  401. Yellow Book Mode 1 with their own HFS filing system on top instead of ISO
  402. 9660) which is used to produce CD ROMs for their hardware, and high-end
  403. dedicated workstations use further specialised formats such as RockRidge.
  404. There are also discussions to extend the ISO 9660 standard to cope with
  405. higher-capacity CD ROM discs which are under development.
  406.  
  407. Currently Apple-formatted and RockRidge CDs cannot be accessed using Acorn
  408. hardware, and the extended ISO 9660 format has yet to be finalised. More
  409. detail on ISO 9660 Levels 2 and 3, and the extended standard once it becomes
  410. available, may be obtained from the British Standards Institute; see
  411. Appendix C for further details.
  412.  
  413. CDFS and CD ROM Drivers
  414. -----------------------
  415. Supported Drives
  416. Most CD ROM drives support a common subset of fundamental commands for
  417. standard low-level operations. However, for more complex functions,
  418. particularly when accessing discs formatted to standards other than Red Book
  419. Mode 0, command sets differ between drives; this necessitates that each CD
  420. ROM drive have a driver module written for it to interface correctly to
  421. CDFS.        
  422.  
  423. The difference in command sets is most graphically illustrated
  424. by the fact that only some drives are capable of handling PhotoCD.
  425.  
  426. Drivers are currently available from Acorn for the following SCSI CD ROM drives:
  427.  
  428. Sony           CDU6111, CDU6211, CDU541, CDU561
  429. Philips        CM131, CM231
  430. Toshiba        XM2200A, 3301 
  431. Hitachi        CDR1650S, CDR1750S
  432. Chinon         CDS-431
  433.  
  434. In addition, there is a modified version of the Sony driver, available via
  435. Acorn dealers, which will interface to the Apple CD-300.
  436.  
  437. PhotoCD support is included with this modified Sony driver (the Apple drive
  438. is PhotoCD capable), and with the Sony driver (the CDU561 is PhotoCD
  439. capable). 
  440.  
  441. The IDE drive available for the Risc PC is a Panasonic CR 562B unit. This is
  442. a dual-speed PhotoCD capable drive, and is supplied with its own driver to
  443. enable CDFS to access the IDE interface.
  444.  
  445. Other software drivers, and CD ROM drives, are available from third parties;
  446. please refer to Appendix A for more details.
  447.  
  448. CDFS appears to the user as an ADFS-like filing system, and supports many of
  449. the standard FileCore-compliant commands. In addition, CDFS has a number of
  450. commands unique to itself: details of these follow:
  451.  
  452. *CDDevices displays all the CD devices connected, their product name,
  453. capacity, SCSI ID (displayed as device, Logical Unit Number, and card) and
  454. firmware revision.
  455.  
  456. *CDFS selects the CD-ROM filing system as the current filing system.
  457.  
  458. *Configure CDROMBuffers sets the configured amount of memory reserved for
  459. CD-ROM buffering (maximum 512K). Syntax: *Configure CDROMBuffers <size>K
  460.  
  461. *Configure CDROMDrives sets the configured number of CD-ROM drives
  462. recognised at power on. Syntax:*Configure CDROMDrives n
  463.  
  464. *Eject activates the eject mechanism (where possible) in the CD ROM drive;
  465. this will eject any disc caddy present in the drive if it is a caddy type,
  466. or open the loading tray on a non-caddy drive. Syntax: *Eject [drive]
  467.  
  468. *Lock prevents a CD being ejected from the drive, effectively disabling
  469. *Eject. Syntax: *Lock [drive]
  470.  
  471. *PlayList lists the tracks - whether audio or data - on the disc in the
  472. given CD-ROM drive, together with (on Red Book CDs) their start time and the
  473. total CD time. Syntax:*PlayList [drive]
  474.  
  475. *PlayMSF plays a piece of audio from the disc in the given CD-ROM drive. The
  476. start and stop times are specified in minutes, seconds and frames from the
  477. start of the disc. Syntax:*PlayMSF mins:secs:frames mins:secs:frames [drive]
  478.  
  479. *Stop stops playing the disc in the given CD-ROM drive. Syntax:*Stop [drive]
  480.  
  481. *Unlock reverses the effect of *Lock, re-enabling the functionality of
  482. *Eject. Syntax: *Unlock [drive]
  483.  
  484.  
  485.  
  486. To configure the number of CD-ROM drives, type:
  487.  
  488. *Configure CDROMDrives n
  489.  
  490. where n is the number of drives (from 0 to 28).
  491.  
  492. You will need to configure the size of the CD-ROM buffers, especially if you
  493. expect to be using a variety of CDs. Type:
  494.  
  495. *Configure CDROMBuffers [size]K
  496.  
  497. where size represents the size of the buffers in K, a number in the range
  498. 0-512. 64K or 128K is a good starting buffer size.
  499.  
  500. Important: Incorrectly setting the number of drives causes the boot up
  501. procedure to take longer.
  502.  
  503. Some Information on Driver Modules 
  504. ----------------------------------
  505. Owing to the differences in command syntax and availability between the
  506. different supported CD ROM drives, CDFS does not communicate with a drive
  507. directly; it translates user-level calls into a series of SWI calls which
  508. are passed to an abstraction layer. This layer is in turn implemented by the
  509. driver module, which is responsible for interfacing to the firmware on the
  510. drive. As an example of what goes on at the abstraction layer level, the
  511. SWIs provided by the Toshiba driver are:
  512.  
  513. cd_checkdrive
  514. cd_control
  515. cd_converttolba (logical block addressing)
  516. cd_converttomsf (Minutes, Seconds and Frames)
  517. cd_discused
  518. cd_driveready
  519. cd_drivestatus
  520. cd_inquiry
  521. cd_lasterror
  522. cd_opendrawer
  523. cd_prefetch
  524. cd_readdata
  525. cd_reset
  526. cd_seekto
  527. cd_stopdisc
  528. cd_version
  529. cd_identify
  530. cd_register
  531. cd_unregister
  532.  
  533. Clearly, the task of writing a CD Driver module is not a trivial one; the
  534. command set above, for example, does not cover the PhotoCD extensions.
  535. Registered Developers wishing to develop CD ROM drivers should, at the
  536. outset, contact Acorn Developer Support.
  537.  
  538. Multiple Drives on Different Interfaces 
  539. --------------------------------------- 
  540. It is possible to have multiple CD ROM drives connected using different
  541. interfaces; althouh as a rule it is not possible to have multiple SCSI
  542. interfaces in a given machine accessing CD ROM drives, it is perfectly
  543. acceptable to have both a chain of SCSI CD ROM drives and (for example) a CD
  544. ROM drive connected to an IDE interface (where fitted). What actually
  545. happens at boot-up is that the driver software, comprising a version of CDFS
  546. and copies of the relevant driver modules, for each interface loads in a
  547. sequence. The ordering of the sequence is determined by whether the code is
  548. on a podule ROM (in which case it loads first), or whether it is in the
  549. normal boot sequence, in which case it loads in the order specified. As is
  550. normal with relocatable modules, loading of multiple instantiations of a
  551. module causes successive overwrites, such that the version of the module
  552. which remains loaded once the boot sequence is complete is the last copy of
  553. the module to be explicitly loaded. 
  554.  
  555. Once loaded, the specific device driver modules remain loaded throughout the
  556. boot sequence, unless subsequently overwritten. When CDFS (version 2.20 or
  557. later) executes, it polls the loaded modules to check for the presence of a
  558. preamble sequence unique to a CD ROM driver module; if this is present in a
  559. given module, that module is invited to register with CDFS. Thus the
  560. last-loaded version of CDFS can recognise and interface with all the
  561. device-specific modules containing the preamble which were made available
  562. during a boot sequence, and hence drive any suitably connected CD ROM drive
  563. regardless of the physical interface. It is worth noting, however, that some
  564. early third-party driver modules did not have the correct preamble present,
  565. and therefore may produce unexpected results when interfacing to a current
  566. version of CDFS; if an interface which appears to have a suitable driver
  567. module refuses to interface with CDFS, contact the supplier of the driver
  568. module quoting the version number of the driver module in question and the
  569. version of CDFS.
  570.         
  571. Accessing Data on CD ROMs Produced for Non-Acorn Hardware
  572. ---------------------------------------------------------
  573. One of the main benefits of standards such as ISO 9660 and the Coloured
  574. Books is that, provided you have a driver capable of reading these formats
  575. it should be possible to access data intended for use on other platforms. 
  576.  
  577. However, although the raw binary data can be accessed, it is not necessarily
  578. possible to make use of it. The likely possibilities are that files of
  579. common formats, such as plaintext and graphic formats of types translatable
  580. by !ChangeFSI, can be used; also Comma-separated variable (CSV) and
  581. Tab-separated variable (TSV) files can be used in Acorn-native applications
  582. which are specified to be able to read them. In addition, some third-party
  583. programs which perform file compression (eg !SparkFS from David Pilling and
  584. !ArcFS from VTI) can recognise and decompress a number of file archives of
  585. certain standard formats, eg UNIX tar. If you have such a program, it is
  586. worth checking on the formats it understands.
  587.  
  588. Problems arise when custom filetypes or proprietary codecs are used in the
  589. software on the disc; as RISC OS cannot execute the binaries for the
  590. decompressors / translators in the manner of the platform they are intended
  591. for, it is not possible to extract and make use of files encoded in these
  592. ways purely using RISC OS. As some discs use proprietary codecs and others
  593. do not, Your Mileage May Vary; if you plan to extract data from a disc
  594. designed for another platform, check with the supplier of the disc that the
  595. data is in a format you can make use of. Acorn Customer Services Application
  596. Note 269 gives further detail on file transfer and translation.
  597.  
  598.  
  599. Troubleshooting
  600. ---------------
  601. In the case of CD ROM drives, it is fortunate that only a relatively small
  602. number of problems can arise, and none of these are fatal to the data
  603. medium. Perhaps the most common problems are:
  604.  
  605. A SCSI CD ROM drive reports a target error on access. 
  606. There are several reasons for this behaviour, and it is not possible to
  607. determine the root cause without examining the machine in question. Reasons
  608. for this mode of failure are:
  609.  
  610. The SCSI bus is incorrectly terminated. 
  611. Make sure that a pack of terminating resistors is present on both the first
  612. and last devices on the SCSI chain (the SCSI card will itself need to be
  613. terminated if it is in such a position), and nowhere else.
  614.  
  615. Two or more SCSI devices have clashing device numbers.
  616.  This can be diagnosed by issuing a *Devices command, and seeing if any of
  617. the returned descriptions appear at odds with the known types and sizes of
  618. peripherals on the bus. It is recommended practice, when only one or two CD
  619. ROM drives are present on the bus, to start numbering them from Device 6 and
  620. move upwards from there.
  621.  
  622. The installed version of CDFS, or one of its dedicated drivers, is out of
  623. date.
  624.  If a CD ROM drive responds correctly to a *Devices, and if it returns an
  625. apparently correct disc size using *Free when a CD ROM has been inserted, it
  626. is possible that the drivers are out of date. Contact the supplier of the
  627. driver for more details, stating the version numbers of both the driver in
  628. question and CDFS itself.
  629.  
  630. !PhotoView reports an error "CDFS::0.$.PHOTO_CD.OVERVIEW/PCD not found"
  631. !PhotoView is not finding the file containing the index information for the
  632. pictures on the PhotoCD. First check that you have a PhotoCD in your drive.
  633. Corel Professional PhotoCDs do not have an Overview file on the disc;
  634. individual Image Pacs may, however, be accessed using !ChangeFSI. If your
  635. PhotoCD is not a Corel disc and the Overview file cannot be found, consult
  636. your PhotoCD's supplier.
  637.  
  638. CD ROM access appears to be very slow
  639. Remember that CD ROM drives are not high access speed devices! If access is
  640. exceptionally slow, try increasing the buffer size allocated to CDFS. The
  641. "Configure" submenu accessible from the CD ROM icon bar menu facilitates
  642. this.
  643.  
  644. Appendix A: Useful Contacts
  645. ---------------------------
  646. For SCSI, IDE, Parallel and Proprietary CD ROM drives, interfaces, and CDFS
  647. Drivers:
  648.  
  649. Morley Electronics Limited
  650. Morley House
  651. West Chirton Industrial Estate
  652. North Shields
  653. Tyne and Wear
  654. NE29 7TY
  655. Tel: 091 257 6355
  656.  
  657. Alsystems
  658. 47 Winchester Road
  659. Four Marks
  660. Alton
  661. Hampshire
  662. GU34 5HG
  663. Tel: 0420 561111
  664.  
  665. Beebug Ltd
  666. 117 Hatfield Road
  667. St Albans
  668. Herts
  669. Tel: 0727 840303
  670.  
  671. Computer Concepts
  672. Gaddesden Place
  673. Hemel Hempsted
  674. Herts
  675. HP2 6EX
  676. Tel: 0442 63933
  677.  
  678. For MPEG rendering hardware (the Movie Magic card):
  679. Computer Concepts (address above) 
  680.  
  681. For Compression and Decompression software:
  682.  
  683. David Pilling
  684. PO Box 22
  685. Thornton
  686. Cleveleys
  687. Blackpool
  688. FY5 1LR
  689.  
  690. VTI
  691. The Shopwhyke Centre
  692. Shopwhyke Road
  693. Chichester
  694. West Sussex
  695. PO20 6GD 
  696.  
  697. Appendix B: PhotoCD Mastering Bureaux
  698. -------------------------------------
  699. UK commercial transfer services, sponsored by Kodak:
  700.  
  701. Acorn Studios PLC       Tel: 071 837 8667
  702. B & S Visual, Glasgow   Tel: 041 221 8283
  703. Dunn's, Birmingham      Tel: 021 200 3226
  704. Grant's, Dublin Tel: (from UK) 010 353 1 660 4288
  705. Laserbureau, London     Tel; 071 486 9260
  706. Pro-Vision Digital Imaging      Tel: 0532 454848
  707. Quadrant, Worcestershire        Tel: 0527 71648
  708. Tapestry, London        Tel: 071 437 1821
  709. Wace Group, London      Tel: 071 739 0269
  710.  
  711.  
  712. Appendix C: Standards Documents
  713. -------------------------------
  714. For copies of the CD ROM Coloured Book (Red, Yellow and White) standards,
  715. and SCSI standards:
  716.  
  717. BSI Standards
  718. Linford Wood
  719. Milton Keynes
  720. MK14 6LE
  721.  
  722. Tel: 0908 221166
  723.