CD-R: The Logical Structure APPLICATIONS OF CD-RECORDABLE DISKS: SECURE AND ULTRA FAST RANDOM ACCESS TO YOUR VAULABLE DATA AS IF IT WAS STORED PERMANENTLY ON YOUR HARD DISK. From the applications point of view, data is to be organized so that it can be easily accessed, either by man or machine. There is a large variety of applications, each of them relies on specific characteristics of the medium. They all have to be covered by the same system. Some of these applications are: - Software Distribution: the compact disc should mimic the target filesystem. The benefit over distribution on tape is the small reproduction cost (stamped disks). - Data archiving: the compact disk should mimic the target filesystem as above, but in addition features "data appendability", i.e. the possibility of appending new data at various points of time, without losing the previous data. This type of applications would use CD-R (Compact-Disc Recordable) discs (XA CD ROM), since the data to be archived has to be written by the system itself. Its benefit over other archiving media is the standard interchange, the easy access (compared to tape), the 650 MByte data capacity, and its extremely long expected disk life. For these applications, a compact disc mounted on a CDROM drive to some computer system should behave as the hard-disk does. The problem here is that there are lots of computer systems, each with there own filesystem structure (MS-DOS, OS/9, Unix, VAX/VMS, and many more). Needless to say these filesystems are not too compatible with each other. Moreover if Compact Disc is to be used as an interchange standard between all these systems then something has to be standardised. CDROM is an extension of audio CD's: data CD's share the same physical structure with audio CD (CD-DA for Digital Audio'). Very soon, CDROM was extended with all kinds real- time data such as CD-DA (Real-time, since you have to process the audio as it is produced: no way to buffer). These real time files can be either accessed via the filesystem as ordinary files, or can be "played", i.e. processed to the real time output device. A standard for these real-time files is set in the CDROM XA (eXtended Architecture) spec. This evolution ended in a new range of applications: Multi-media. CD-i. (Compact-Disc Interactive) is one of these. It is basically a device capable of playing various interleaved real time files. It assumes the program files on the disc to be written following a standard, set in the "Green Book". Other multi-media applications include MPC, with focus on the MS-DOS computer platform.. As CDROM "pretends" to be a interchange standard, the central issue becomes Logical Playability, i.e. the need to process any application on any platform, to the limits of its physical possibilities. Hence, a common Logical Structure is introduced, which enables the interchange from platform to platform to a certain degree. ISO 9660 FILE SYSTEM All computer platforms address the data on the compact disk as a file system. The file system was designed to be common to Unix, VAX/VMS and MS DOS, and their various derivates. As such, it was standardised as ISO 9660. The ISO proposal originated from a conference in the High Sierra Hotel in Nevada. It is also known as the High Sierra Filesystem. To be accessible on the computer system, you need a platform specific redirector : MSCDEX is most famous: it interfaces the CDROM file system to MS-DOS. Note also the device specific Device Driver: two different CDROM players can be attached to the redirector. In a CD-Recorder application, you may want to use a (multi-session) CDROM player and a CD-Recordable device at the same time. ISO 9660 is meant to be compatible with various operating systems. This is done by using the common capabilities of all target systems. Some of the most constraining rules are: - no directory trees of depth > 8 - no long filenames The filename and its extention must be less then 30 characters. However, for use in MS-DOS, this is even more limited to 8 characters for the file name, and 3 characters for the extention - No extensions for directory names. - Uppercase characters only - Finally, no "odd" characters (such as % or @) are allowed. REMEMBER THAT THE AMIGA ISOFILESYSTEM IS A LOOSER VERSION THAN ON OTHER SYSTEMS SO LONG FILENAMES CAN BE USED. In the table, some ISO 9660 invalid files are given, together with the reason why they are invalid. Table 1: Invalid ISO 9660 files(FOR CASE OF MS-DOS ON PC) File Name Why Invalid OK would be MYDATA.EXTENSION Extension longer MYDATA.EXT than 3 chars MYDATA. EXT. EXT Extension longer MYDATA. EXT than 3 chars mydata. ext uppercase only MYDATA. EXT AVERLYLONGFILENAME.DAT name too long > 8 SHORTNAM.DAT ! @ #$%.dat No "Odd " MYDATA. DAT characters. CD-R.DIR (for a directory) No extension CD-R for directories /A/B/C/D/E/F/G/H/I/J/DATA. DAT Directory tree /A/B/C/D/E/F/G/H/ DATA.DAT The ISO 9660 is designed for publishing data on stamped disks. For this application, you may want maximum portability from plafform to plafform, at the price of a careful layout of the data structure. Although small-volume publishing on CD-Recordable is an issue, some CD-Recordable users would like the CDROM filesystem to be more "liberal": CDROM must mimic the host filesystem completely. Clearly this would reduce the possibilities to interchange between platforms (although the platform-specific redirector could fix some problems). Therefore if you use Amiga filenames but still in ISO 9660 format most files and especially diectories wont exist for example if used on a "old" operating system like MSDOS on the PC which basically has not changed structure since the early 1980's. With this in mind, the ECMA 168 "Frankfurt Proposal" filesystem is designed to be used with CD-Recordable, and features more liberal naming (in addition to the possibility to append data.) (see "Appending Data to on ISO Set" p 41). As the Frankfurt Proposal is still in the standardization process, the only way today to mimic the file system, is to make the native filenames with ISO 9660 in mind. ISO SETS On a CDROM disk, there is at least one file system. As with hard disks, there could be more than one partition of the CDROM, each of them containing one and only one file system. There are various ways to partition the CDROM. To avoid multiple (and hence incompatible) implementations of the same feature, these possibilities are limited to a very few special cases and this usuall means a dual MAC HFS files system and ISO FILESYSTEM on the same disk. Partitioning the disks into ISO Sets should always be done by using Sessions. A Session is a Leadin + a Program Area + a Leadout. Although a single ISO set can be extended over more than one session, one particular session can never contain more than one ISO set. An ISO 9660 Set is characterized by the following elements: - a Primary Volume Descriptor (PVD). It can always be found at the 16th sector on the session. It is the hook of the filesystem to the medium. It refers to the Path Table, and to the Root Directory. - The Path Table (PT). It contains the addresses for the Directory Files. As such, it is used to directly access the data files. - The Root Directory (RD). This is a special Directory File, in that no other Directory file refer to it. - The Directory Files (DF). It contains the addresses to its subdirectories and datafiles.As such, it is used to descend through the directory trees. - The datafiles contain the actual data. APPENDING DATA TO AN ISO SET One way to append data to a disk is session by session, as discussed above. However, sessions serve another purpose they are ment to make the disk "Yellow", ie write Leadin and Leadout, thus writing the TOC for this session. This action is referred to as "finalizing". By finalizing, the CD-R disc becomes readable on standard CDROM readers. Following the orange book, finalising takes some time to write out ie the leadout and leadin and can use up about 10+ MB of your CD-R disc so meaning small sessions will waste data storage space. The more sessions the more the total data storage is reduced. The entire discussion in section (ISO SETS) is done from a "yellow" point of view: it focuses on the result, after finalising. The process of putting the data on the disk must be discussed from an "Orange" point of view. Physically, data can be added with various degrees of "granularity". This granularity corresponds with the physical structure defined in the orange book: sectors are enclosed within tracks, tracks are enclose;, within sessions, and sessions are enclosed within the disk. The coarser the granularity, the easier the write process is, but the larger the data buffer needs to be. - Disk by disk: "Disk-at-Once". All data are available on-line, and the entire ISO-structure is prepared. - Session by session: "Session-at-Once". The data for the session to be recorded are available on-line, and its ISO-structure is prepared. - Track by Track: "Track-at-Once". The ISO structure is implicitly present on the disk. At the moment of finalisation, it is completed with the final ISO structures, and the "hook" on sector 16 (the PVD- see ISO SETS on page 43) is written. Until that moment, the data on the disk is not yet standardised, and can only be accessed by the particular publishing application. - Sector by sector: "Incremental Write". The limitations of the above are relieved, but it can't be implemented using the ISO structures, as their references change for each written sector. Incremental Write is implemented by the ECMA 168 "Frankfurt Proposal" file system, and requires a new redirector for yellow- book compatibility after finalisation As shown above, the granularity has also compatibility implications towards yellow book players (i.e. standard CDROM readers)': - Sector by sector disks are presently incompatible, and require a ECMA 168 redirector to be installed on the yellow book player. - it matters wether there are one or many sessions: a single session player will only "see" the first session of a multi session disk. NOTE: According to the yellow book, all tracks must be mode 1. Run in/ Run Out/ Link sectors do not comply with the mode 1 fommat. Hence, pure yellow-book readers will produce an error on these sectors. However, recent cd-rom players will process these sectors without error. - It matters wether there are one or many tracks. If there is more than one track: - You have to watch for mixed-mode sessions - The ISO structures are application dependent. Basic Principles of CD-R media: A blank CD-R disc is divided into various areas and differs from a pre-recorded disc by the additional CDR area, which lies in front of the lead-in area. The disc comprises four different layers. Transparent plastic material (the same as conventional CD's) is used as the substrate. Onto this a special greenish/yelowish tinged translucent layer is applied. The substrate has already been provided with a preformed track spiral into which the data will be written during recording. On top of the green recording layer is a reflective gold layer and a protective layer of plastic material. THE ADDITIONAL CD-R AREA OF A CD-R DISC. The additional CD-R area is divided into two areas: 1) The program Memory Area (PMA) which mainly contains, the track numbers of the titles recorded with respective start and stop points. 2) The Program calibration Area (PCA). Disc space for the CD writer to calibrate the laser energy needed for recording on the disc via a trial recording. BLANK CD-R DISC. Next to the centre hole is an area for the mechanical clamping of the disc in the player. Adjacent to this is the unrecorded area of the blank CD-R disc. PARTIALLY RECORDED CD-R DISC. After the first recording the recording area is divided, giving a CD-R disc a distinct cross-section you should be able to see if you reflect light of it.The "Lead-in", "program area" and "Lead-out" areas are present on every conventional pre-recorded CD. For the partially recorded CD-R disc, the PCA and PMA areas are incorporated in front of the Lead-in. Track numbers with associated absolute start and stop times are stored in the PMA. The possibility exists of making further recordings later (this is when you need to know if you have a CDROM XA COMPATIBLE CD DRIVE TO READ THE 2ND , 3RD ETC SESSIONS). It would be possible to declare the disc as fully recorded. In which case, the definitive table of contents (TOC) is written into the Lead-in. FULLY RECORDED CD-R DISC (ONE SESSION IS EQUIVALENT TO SINGLE SESSION). The fully recorded CD-R disc has 74 minutes playing time, a lead in area with Table of Contents (TOC) and a lead out area. The areas specific to the CD-R recorder , the PCA and PMA are still present but simply not used by conventional CD players. When the lead-in area is provided with the table of contents, the CD recorder uses the information stored here and not the data from the PMA area. Identification of the end of the disc is stored in the Lead-out. The CD player stops playback of a disc on reaching this area. CD-R: The Physical Structure INTRODUCTION: The Compact Disk has become a widely used data-carrier. In its most generic form it is used to hold Audio data on so-called CDDA disks (Compact Disk Digital Audio). This data is encoded onto the disk using a two-layered Error-Detection/Correction scheme (called First Layer Correction or C1 and Second Layer Correction or C2) together with data-scrambling and interleaving. The data-encoding is done according to The Red Book, the World Standard to which ALL Compact Disks MUST comply. "ALL" means here: all CDDA disks AND all Data disks. Beyond this Red Book Format, other CD formats developed for Data disks. These disk-types are used in environments demanding an even higher data reliability. Therefore, a third Error-Detection/Correction is implemented, called Third Layer Correction or C3. Furthermore, a data-structure must be implemented to make easy data-retrieval possible. Data disks are described in several extra Books, each of them covering a specific area of data-application: The Yellow Book:Covers CDROM and CDROM-XA Data Formats. The Green Book: Covers CD-i Data Formats and Operating System. Next to the Red, Yellow and Green Books exists another one namely: The Orange Book. This book describes the format of the Orange Disk that is used in the Write Once systems like the CD-R Recorders(the ones we use). This Orange Disk is NOT a disk among the other Red, Yellow and Green BOOK disks as this disk initially contains no real data (except for some ATIP-code). It doesn't even have grooves or tracks (although it does contain a pre-groove). The reader should see this Orange disk as a "Chameleon" disk that, when recorded onto, becomes Red, Yellow or Green after "Finalisation" ie a special recording operation. All Compact Disks have the same physical structure. They are made of poly-carbonate and have a diameter of 12 cm (8cm have died out). ****************PLEASE NOTE THE FOLLOWING PLEASE**************** The information is placed between two plastic layers. The layer at the read-out side is the thickest. This explains why, contradictorily, the side most sensitive to mechanical mistreatment is the label-side, since it has the information layer directly beneath it and is very thin. **************************************************************** The Disk Types With five sector types different disk types can be generated TYPE A The first is the well-known CD-DA or Audio CD disk it contains tracks with Audio sectors (Type 1) only. This is the disk defined in the Red Book. TYPE B The second CD type is the CD ROM. This disk is defined in the Yellow Book. It breaks down into two subtypes: The CD ROM Mode 1 and the CD ROM Mode 2. The Mode 1 disk has tracks with only Type 2 data sectors. The Mode 2 disk contains only tracks with Type 3 data sectors. NOTE: Normally Mode 2 disks are always XA disks (meaning they have Type 4 or Type 5 sectors). ***************************************************************************** The Mode 2 non-XA disk (with Type 3 sectors) are extremely rare. It can be read by a normal CDROM drive, but requires special custom software to decode and interface with the host computer. This is where in my opinion the so called PhotoCD Multi-session CD ROMS sold to PC users (maybe others) are a con as I don`t believe that they can read what I term as a Multisession Disc ie one with multiple session containing computer data. You need to know if your CD rom is XA compatible as PhotoCD multisession compatibility is no guarantee it is XA comptatible and so it may not read multisession non Photo CD disks.....please check out before you are conned into buying a PhotoCD multisession CD-ROM. ***************************************************************************** TYPE C A disk with a combination of CD-DA tracks and CDROM tracks, is called a Mixed Mode disk. The most common Mixed Mode disk has a CDROM track as the first track and CD-DA on next tracks. Normally, CD-DA players mute the audio output when encountering a CDROM track...some dont. TYPE D Newer multimedia applications require real time simultaneous reproduction of Video and/or audio while reading computer-data. This cannot be done with the Mixed Mode disk since track jumping takes too much time Therefore, a new disk was created The CDROM-XA Mode 2 (see note under TYPE B). The CDROM-XA Mode 2 breaks up into two types: Mode 2 Form 1 and Mode 2 Form 2 The Mode 2 Form 1 has Type 4 sectors and is used for computer data and is the type of data your CD ROM DRIVE has to be capable of reading if you require to read computer data in Multi-sessions. PLEASE CHECK YOUR CD ROM CAN READ THIS DATA AND DONT BUY A CD ROM UNLESS IT CAN NO MATTER IF IT IS CALLED PHOTOCD MULTISESSION !!! The Mode 2 Form 2 has Type 5 sectors and is used for compressed audio/video. These two sector types can be interleaved on one and the same track without breaking the rule that a track can only contain one Mode. This allows for multimedia applications but it does require special interface electronics to separate the different sector types in real time. TYPE E Green Book or CD-i disks are disks which comply with the Green Book Standard that not only defines the disk but also the Operating System. CD-i tracks are built with the same sector type as CDROM-XA Type 4 and Type 5. These both types are interleaved for the same reason as in TYPE D. The only difference, at disk-level, between a CDROM-XA and a CD-i track is that the latter is not listed in the TABLE OF CONTENTS(TOC):....the CD`s CURRENT CONTENTS DIRECTORY. TYPE F. CD-i Ready Type 1 disks are special CD-DA disks. CD-DA disks have a 2 second of audio silence in the pre-gap before the first track. Audio CD players skip this pre-gap. The CD-i Ready Type 1 disk has an extended pre-gap where CD-i information is hidden. An Audio player will normally not notice this CD-i information, but with a CD-i player extra features can be accessed this way. Possible features are the display of lyrics or credits during song-reproduction, the display of album-covers or interviews of the performer in compressed audio (remember, sector Type 5> Unfortunately, older CD players did not mute the pre-gap. If you ever heard CD-i data through loud speakers you will understand the CD-i Ready Type 1 was not useable. TYPE G CD-i Ready Type II: Here use is made of the multi-session capabilities of a CD-i player. The CD-DA tracks are placed in a first session and the CD-i tracks are placed in the next session. The CD-i Ready Type II is in proposal stage only. TYPE H. In order to be able to have a disk playable on CDROM-XA unit and on the CD-i player, the CD-Bridge disk was created. Here the first track is a CD-i track for the CDROM-XA unit and the data starts at another point than for the CD-i player. The difference is made in the disk label which points to the beginning of the computer-data. For the CDROM-XA the label is specified to be located at 00 mins, 02 secs, 16 sectors and byte-offset 1024. For the CD-i the label is to be located at 00 mins, 02 secs, 16 sectors 0 byte offset. TYPE H Example: Photo-CD All data tracks must be Mode 2. CD-DA tracks are allowed after the data tracks. Mode 1 Tracks are NOT allowed. TYPE I CDROM Multi-Session. TYPE J CD Bridge Hybrid. TYPE K One Session fixated Disk (Orange Book). TYPE L Fixated Disk with more Sessions (Yellow or Green Book). TYPE M Final Fixated Disk (Yellow or Green Book). THATS ABOUT IT AND SORRY SOME STUFF IS NOT VERY CLEAR AS THE WHOLE CD WORLD IS LIKE THAT AND BASICALLY A BIT OF A MIX AND MATCH. © COPYRIGHT 1995 GBE