CD-i FAQ 2020 | Back to Index
Section 3. CD-i Techniques
3.1 What are CD-i's basic specs?
A CD-i player is based on a 68000 CPU running at least at 15 MHz, it is equipped with at least 1 MB of RAM, a single speed CD-drive, dedicated audio and video decoding chips, at least 8 KB of non-volatile storage memory and a dedicated operating system called CD-RTOS. The system should be operable with some form of pointing device that is able to control an on-screen pointer. The minimal specifications to which every CD-i player should comply are laid down in the Green Book, which is covered in full detail in section 1 of this FAQ. A CD-i player can have extended hardware (such as more RAM or more non-volatile storage space), as long as the minimum requirements of the Green Book are met.
3.2 What CPU does CD-i use?
A CD-i player is equipped with a Motorola 68000-like processor, similar to the ones used in the original Apple Macintosh, Atari ST and Commodore Amiga. All Philips CD-i players used a Philips-built 68070, which differs from the 68000 in that it had some port controlling features build in. The processor runs at 15 MHz. According to the Green Book, the 68000-CPU should at least have a 16 bit external data path, and a 32 bit internal data path, very similar to Intel's 80386SX processor. The CD-i standard allows for a faster CPU, but since CD-i's performance is almost entirely based on the realtime retrieval of audio and video data from the disc, the performance will not be raised that much when a faster CPU is used. This is why CPUs in all CD-i players built to date are based on the minimal Green Book requirements.
3.3 What OS does CD-i use?
The operating system used in a CD-i player is called CD-RTOS, which stands for Compact Disc Real-Time Operating System. It is stored in a ROM of at least 512 KB, along with other player-specific software such as the player's startup shell.
CD-RTOS is based on version 2.4 of Microware's OS-9/68K operating system. OS-9 is very similar to Unix, and supports full multitasking and multi-user operation. The original OS-9 was built in the early 80s as a realtime operating system to be used in industrial and embedded applications where real time functionality is a key criterion, such as in robotics, automobile production and set-top boxes. It was slightly adapted to CD-i, for example by including the correct device descriptors for the CD drive, and drivers for CD-i's specific audio and video decoding ICs. Since OS-9 is a modular operating system with a very small kernel of only about 25 KB, only the parts used by a specific CD-i player have to be present in ROM. For example, a CD-i player with a floppy disk drive contains additional driver modules, whereas most consumer players do not need them.
Although OS-9 was mostly used for industrial applications, another fairly high profile use in the consumer space was the availability of OS-9 for the Tandy TRS-80 Color Computer in the 1980s. In the 1990s, Microware developed a reference design for TV set-top boxes called DAVID (Digital Audio Video Integrated Device), which was not only based on OS-9, but also incorporated many of CD-i's audio/visual functionalities.
Microware was sold to and owned by Radisys from 2001 to 2013, after which the OS-9 part was spun off into a separate company again called Microware LP. This company still supports OS-9, and resources can be found on their web site.
3.4 What's a real-time system?
A real-time computer system is a system in which the timing of events plays a critical role in the operation. For example, in the robotics area, where OS-9 is also extensively used, it is of great importance that different tasks occur at the exact specified moment. In CD-i, real-time behaviour is also important, since audio and video data that is read from the disc needs to be decoded by the appropriate processors and then sent to the appropriate outputs, without the need for the generic CPU to be loaded with these tasks. At the same time, the system should take care of user input.
3.5 What's sector interleaving?
One of the clever design criteria of CD-i was that the system should be able to retrieve audio and video information in realtime from the disc and send this information directly to the appropriate decoder ICs, without putting a heavy load on the overall system performance. Because of this, a CD-i player does not need much RAM or processing power, since all audio and video decoding is performed in realtime without storing large amounts in RAM for later decoding.
To enable the simultaneous retrieval of both audio and video information, data is interleaved on the CD-i disc. This means that each sector contains a piece of either audio or video information, and that those sectors can be put in consequence next to each other.
Figure 3.1 - Example of interleaving audio and video sectors
Since a CD-i disc is read at a constant speed, the designer needs to be aware of the load of a certain choice of quality for audio or video in the disc's datastream. When a lower audio quality is used (refer to 3.12 for more information about audio coding), fewer sectors will be occupied than for a higher quality. For example, when level A stereo sound is used, only half of the remaining sectors can be used for other information like video.
It's also possible to read for example only the sectors belonging to one audio channel at a time, and then move back to the beginning of the disc and read the sectors of another audio channel. Since the lowest audio quality only uses one in every sixteen sectors, and a CD-i disc lasts for 74 minutes, the total time for audio can be (16 x 74 min = ) over 19 hours.
Because of this realtime reading of sectors, every CD-i player reads data at the same speed, sometimes referred to as normal speed or single speed. It would be unnecessary to make a CD-i player with a higher speed CD-drive, since data is to be read in realtime according to the specifications (thus single speed) and audio, video and animation would be out of sync when being read at a higher speed. The designers of the CD-i system put more attention to the development of encoding techniques that enable for high quality audio and video within the single data speed and hence resulting in a longer playing time, instead of utilising a high speed drive and as such reducing the playing time.
3.6 What's CD-i's sector format? What about mode 1 and 2, form 1 and 2?
For CD-ROM, the Yellow Book defines the mode 1 sector format. This format allows for 2048 bytes of user data in every sector, with an accompanying 280 bytes of error correction information in each sector. When data is read at 75 sectors per second (the normal CD speed), this results in a data rate of of 150 KB per second.
For CD-i it was not always necessary to have error correction in each sector. For example, audio and video need a much lower degree of correction than data or program code. Instead, the 280 bytes used for error correction in mode 1 could be added to the 2048 of user bytes, resulting in 2324 bytes of user data per sector. This larger sector size then results in an improved datarate of about 170 KB per second. The new sector format was called mode 2. Within mode 2, two forms were defined: form 1 does incorporate the original error correction and is used for data and program code, and form 2 which lacks the error correction and is to be used for audio, video and other media information.
Mode 2 added an additional subheader to the header of mode 1, which holds information about the type of data that is contained in a sector (audio, video, data, etc.), the way it is coded (for example which audio level is used), and an indication of the used sector form. This subheader is interpreted by the CD-i system for each sector, which is then processed by the appropriate decoders. Both forms of mode 2 sectors can be interleaved, so that program data and audio and video can be read instantaneously from the disc.
Figure 3.2 - CD-ROM and CD-i sector layout
Because of the mixage of both form 1 and form 2 sectors, it is impossible to tell the capacity of a CD-i disc. When all sectors are form 1, the disc will hold 648 MB. When all sectors are form 2, the capacity is 744 MB. CD-i's disc capacity will hence be between 648 and 744 MB.
Although a CD-i disc consists of only mode 2 sectors, a CD-i system must be able to read mode 1 sectors on CD-ROM discs, and of course the audio sectors that are defined for CD-Audio in the Red Book.
3.7 What's CD-i's disc structure?
Like in all official CD-standards, a CD-i disc is divided into tracks. A CD-i disc contains at least one CD-i track, and may optionally contain additional CD-Audio tracks that may also be played on a standard CD-Audio player. The CD-i track must be the first track on the disc, with the optional CD-Audio tracks thereafter. An exception to this rule is defined in the 'CD-i Ready' format, which is covered in more detail in the Disc types section.
The first 166 sectors of the CD-i track are message sectors, followed by the Disc Label. Hereafter come an additional 2250 message sectors. Message sectors contain a spoken message in CD-Audio format, which informs users who put the disc in a regular CD-Audio player about the possible damage to equipment or speakers when the disc is not taken out immediately. Usually, a modern CD-Audio player will recognize the CD-i track as a data track and will not play it, so you won't hear the message. It's only included for compatibility with older CD-Audio players. The Disc Label contains some specified fields which offer a lot of information about the disc, such as the title, creator, expiration date, but also the name of the CD-i application file that needs to be run at startup. Most of those fields are not used by most CD-i players, but it allows for example for CD-i players which show the name of a disc on the FTD-display or in the player shell. Furthermore, the Disc Label contains the File Structure Volume Descriptor, which is loaded into RAM at startup. This allows the system to find a certain file on a CD-i disc in only one stroke. After these message sectors and Disc Label, the actual CD-i data starts.
3.8 What filesystem does CD-i use? Is it based on ISO-9660?
A CD-i disc uses the OS-9 filesystem, which is not compatible with ISO-9660. It allows for additional information about the files to be stored. This information is very Unix-like, and contains data about execution or read permissions. The filenames can be up to 28 characters in length. The system also provides for an unlimited depth of subdirectories to be used on the disc. Files can contain upper and lower case characters, but files may not exist with existing names in upper and lower case (for example: when a file 'multimedia' is present, the file 'Multimedia' may not exist).
Since CD-i uses a dedicated filesystem, it is not possible to see the filenames on a disc using a regular computer with a CD-ROM drive and a generic modern operating system. A CD-i filesystem driver was written for Windows 95/98, that allows you to access a CD-i disc in the same way as a CD-ROM. More information about this driver can be found in section 9 of this FAQ: CD-i on other platforms.This software was however never ported to more modern NT-based versions of Windows (such as Windows XP/Vista/7/8/10), nor to other platforms.
Although a CD-i disc is not based on ISO-9660, the Green Book defines that a CD-i player must be able to read ISO-9660 discs, for example data from a CD-ROM disc. It is also possible to include a CD-i application on a standard ISO-9660 CD-ROM disc to enable playback on a CD-i player. This is defined in the CD-i Bridge format, as explained in further detail in section 5 of this FAQ: Disc types. The CD-i Bridge format was for example used for Video-CD and Photo-CD.
3.9 How much RAM does CD-i incorporate?
The Green Book defines that a CD-i player should at least have 1 MB of Random Access Memory. This memory is divided into two memory banks of 512 KB each. Each of these banks can store one video image of CD-i's two video planes (see How does CD-i video work?) Depending on the video encoding type, a picture takes up about 100 KB, leaving the remaining memory for application programs, data, sound samples, and all other kinds of information.
All consumer CD-i players contain 1 MB of RAM by default, but when a Digital Video cartridge is installed, additional memory is added. Besides the 512 KB of decoding RAM, the cartridge also offers a full 1 MB of extra memory. When no Digital Video is displayed, the decoding RAM can also be used for general purposes. This makes up for a total of 2.5 MB RAM in a CD-i player equipped with a Digital Video cartridge, allowing content developers to use more RAM for more complex programs, additional audio samples, or faster transition of pictures that are stored in RAM and need not to be loaded from the disc again.
The additional 1 MB of RAM in the Digital Video cartridge is not defined in the Green Book, nor in the Digital Video extension of the Green Book, but since it is a standard part of every Digital Video equipped CD-i player (from Philips and other manufacturers), a content developer that designs an application for a Digital Video equipped CD-i player can be fairly sure that this extra memory is available.
3.10 What's the CSD?
Every CD-i player has a piece of non-volatile storage memory (NV-RAM) that is at least 8 KB in size. The contents of this memory are kept when the player is turned off. Although this doesn't seem much, it allows for powerful storage options, such as games scores, test results, names, preferred language settings, etc. The NV-RAM is also used by the system to store the CSD in an ASCII file called 'csd'.
When a CD-i player is turned on, the CD-RTOS kernel is initialized. One of the startup routines includes the creation of the CSD, which stands for Configuration Status Descriptor. The CSD contains information about a certain CD-i system, such as the amount of NV-RAM available, which kind of pointing device is connected, the version of CD-RTOS used, but also whether a floppy disk drive is available, if a printer is connected, etc. All of these variables are stored per device type on one line of the CSD, which are defined in the Green Book. Each of these device type settings are called DSDs, which stands for Device Status Descriptor (and not Direct Stream Digital as for Super Audio-CD!). Each time the player is turned on or reset (which happens when you eject a disc or exit from a program), the CSD is recompiled. Any newly attached devices will therefore only be recognized and initialized after a reset.
The CSD can be read by an application program to gather information about a certain CD-i player. For example to load a PAL or NTSC optimized version of the program, to offer storage capabilities when a floppy disk drive is available, to know the seek times of the CD drive, or to know the size of the NV-RAM to show the correct usage percentages when displaying the used space of a certain file.
Note that even though the CSD is stored in NV-RAM, the file 'csd' is not shown in the 'Memory' screen of the player shell. Since this file is critical to the system's operation, it may not be deleted by the user.
3.11 What kind of CD-drive is used in a CD-i player?
A CD-i player contains a CD-drive that operates using a normal (red) laser, and runs at normal or single speed, to allow for the correct timing when retrieving realtime data. Speeding up this drive speed would result in the requirement of extra buffer RAM to store audio and video, which would make the CD-i player much more complex. Furthermore, without extra buffering, playing time of realtime data would be decreased when a disc would be played at a higher speed.
CD-i discs are normal CDs, based on the physical definitions as laid down in the Red Book for CD-Audio. It is not a special kind of high-density CD, such a GD-ROM from the Sega Dreamcast, nor does it use a differently colored reflection layer like Sony Playstation 1.
The CD-drive in a CD-i player is physically able to read all normal CD-types, but not high density formats like DVD or Blu-ray Disc.
3.12 How does CD-i audio work?
A Base Case CD-i player should be able to decode standard PCM audio as specified for CD-Audio, as well as a dedicated audio coding scheme called ADPCM, or Adaptive Delta Pulse Code Modulation. The difference with PCM is that audio is not stored in individual samples, but that only the difference (delta) from the previous sample is recorded. This allows for a significant decrease in the used storage space on the disc, and hence in the datastream being read from the disc. When normal PCM CD-Audio would be used (which occupies all successive sectors), this would not leave room for video or animations to be read without interrupting the audio playback. It also means that it is impossible to skip to a specific section in an ADPCM file to start decoding from there, as the previous data is needed to reconstruct the sample.
CD-i provides for 3 levels of ADPCM audio, all of which can be used either in mono or stereo:
So, when ADPCM level C is used, only 1 out of every 16 sectors needs to be used for audio, leaving all other sectors for other data such as video or animation. It's also possible to record different audio channels interleaved within the data stream, allowing for the seamless switching between for example various languages. The disc may also be read from the beginning while decoding a different audio channel, allowing for increased audio playing times, as indicated in the table.
A CD-i player equipped with a Digital Video cartridge is also able to decode MPEG-1 layer I and II audio. MPEG is far more efficient in coding audio, resulting in even further decreased storage needs while providing a highly increased audio quality when compared to ADPCM. This is because of the fact that MPEG audio is based on PASC (Precision Adaptive Subband Coding, the coding technique originally developed for Digital Compact Cassette or DCC), which uses psycho-acoustic encoding according to the characteristics of the human ear to only store those audio signals that are audible, and leaving others out. CD-i offers a very flexible way of using MPEG audio (for example at various bit rates and quality levels). CD-i cannot decode MPEG-1 level III, or MP3 files. A content developer needs to be aware of the fact that MPEG decoding is not supported in a Base Case player, and can only be used on players equipped with a Digital Video cartridge.
3.12.1 Does CD-i support Dolby Surround, Dolby Digital or MPEG Multichannel?
Dolby Surround (not to be confused with Dolby Digital) is an encoding technique that allows for the storage of center and rear audio channels in addition to the normal left and right stereo signal. Since Dolby Surround is an analogue matrix technology, every stereo audio carrier that provides for a high frequency audio reproduction can use Dolby Surround encoding. In CD-i, Dolby Surround can only be used for MPEG audio, since ADPCM does not offer the dynamic range that is necessary for the encoding of the additional channels. Most movies use Dolby Surround, as do several games such as Seventh Guest. Please be aware of the fact that Dolby Surround is an analogue matrixing technique, which does not add extra discrete audio channels, contrary to Dolby Digital.
Dolby Digital and MPEG Multichannel are audio encoding techniques that allow for discrete surround channels to be encoded individually. Usually, this includes two front signals, two back signals, a center signal and a low-frequency subwoofer signal. Dolby Digital is widely used in DVD-Video, Blu-ray Disc and online video platforms. CD-i does not support Dolby Digital nor MPEG Multichannel.
3.12.2 Can CD-i play back MP3 files?
No. The MPEG audio decoder in the Digital Video cartridge is only capable of decoding MPEG layer I (used for example in the former Digital Compact Cassette - DCC) and layer II (used for example in Video-CD and digital video broadcasting). It is not capable of decoding layer III, the one used in the popular MP3 files. CD-i's normal CPU (an 68000 at 15 MHz) is not capable of doing this in software.
3.13 How does CD-i video work?
The video image produced by a CD-i player consists of four 'planes', which are shown on top of each other. The first plane is used by a cursor, it size is limited to 16x16 pixels in one color. The second and third planes are shown beneath the cursor, and are used for full screen images. The fourth plane finally, is used for a single-colored background or for MPEG full motion video (or hypothetically to display video from an external source if the player would support that). The image of each of both middle planes is placed in one of the two memory banks (see How much RAM does CD-i incorporate?).
Parts of an image on one of the middle two planes can be transparent, so that the underlying plane becomes visible. This can for example be used to show subtitles or menubars on an image. Both planes can also be used to dissolve from one image to the other, using an unlimited variations of wipes, including cross fades.
There are various encoding techniques for video that can be used in CD-i:
DYUV or Delta YUV is used for the encoding of high quality photographs and other natural images. It is a lossy compression scheme that is based on the fact that the human eye is more sensible for differences in brightness than for differences in color. Therefore, it stores one color for a set of pixels, and a brightness value for each individual pixel. The result is an image of slightly more than 100 KB, leaving enough space in memory for other information. Due to the complexity of a DYUV image it must be encoded at the production stage and stored on the disc in advance, a DYUV image can not be created nor modified in the player. DYUV is the most common format for photorealistic images in CD-i titles because of its high quality and efficient storage.
RGB 555 is a professional image format which allows for 5 bits per R, G and B value, resulting in a picture with a maximum of over 32,000 colors. Since RGB 555 uses both planes to display the image, it can not be used in combination with other graphics. An RGB 555 image is roughly 200 KB in size. The image can be altered by the player at runtime. RGB 555 is rarelyr used in regular CD-i titles because of its inefficiency and limitations in usage.
CLUT, or Color Look-Up Table, is a way of encoding simple graphics. The colors that should be used in a certain picture are stored in a CLUT-table, which reduces the size of the image dramatically because color values refer to the appropriate CLUT-entry instead of indicating for example a 24-bit color value. In CD-i, a CLUT image can have an 8 bit (256 color), 7 bit (128 color), 4 bit (16 color) or 3 bit (8 color) color table. The latter two can be used in double resolution (see What is the screen resolution of a CD-i player?).
RLE or Run Length Encoding is a variation of CLUT. Besides storing the CLUT-color table in an image, it further reduces the image size by storing certain 'run lengths' of repeating horizontal pixels with the same color. The results are usually pictures between 10 and 30 KB in size. This makes RLE ideal for animations. Most of the animations you see on Base Case CD-i titles are RLE.
QHY or Quantized High Y is an encoding technique that is in essence not a part of the Base Case, but it is described in the Green Book and supported by all CD-i players. Its encoding technique is made up of the combination of DYUV and RLE, resulting in a very sharp high quality natural image, that is displayed in CD-i's high resolution mode (see What is the screen resolution of a CD-i player?). A QHY image is usually about 130 KB in size. Since it consists of a DYUV component, it cannot be modified by the player. QHY is for example used to display the images of a Photo-CD in high resolution on a CD-i player.
Besides these Base Case video encoding options, a player equipped with a Digital Video cartridge can also display MPEG motion video, and normal and high resolution MPEG still images. The encoding techniques for MPEG are far more advanced than the ones defined for Base Case CD-i, but images in these formats cannot be viewed on players without a Digital Video cartridge.
3.13.1 What is the screen resolution of a CD-i player?
CD-i can display both main planes in either normal, double or high resolution, which are 384x280, 768x280 and 768x560 respectively. Some encoding techniques are limited to a single resolution, for example a DYUV image is always standard resolution. It is possible for the images on each of the planes to be displayed at once, even if they are in different resolutions. For example double resolution CLUT4 menu bar can be overlayed on a standard resolution DYUV image.
CD-i's highest resolution (768x560), used for QHY images and MPEG still images, is the highest resolution that can be made visible on a standard definition TV.
3.13.2 Does CD-i make a difference between PAL and NTSC?
A CD-i consumer player is usually suitable for a dedicated TV standard, such as PAL or NTSC. Some professional players have a switch at the back panel to select the appropriate TV standard. A CD-i disc is TV-standard independent: any CD-i disc can be played on any CD-i player anywhere in the world. But due to the characteristics of both TV systems, special care has to be taken into account when designing a CD-i title.
An NTSC-display usually displays slightly less lines, with slightly less pixels on each line. Usually the NTSC display is 720x480, compared to 768x560 for PAL. When a full resolution image is displayed on an NTSC-display, the most outersized pixels will drop out of the picture. When an NTSC picture is displayed on a PAL screen, very small black bars are shown at the bottom and top of the screen (these bars are really small and should not be compared to the black bars of a letterboxed movie). For this, the 'safety area' is defined, the size of an image that is expected to be correctly displayed on all TV-sets. This safety area is 640x420, no 'critical' information such as menu buttons should be displayed outside this area.The same limitations with respect to the safety area apply today to DVD-Video titles that are to be distributed world-wide.
CD-i does not have region coding (as is common on DVD-Video and Blu-ray Disc). Note that some game consoles refer to the different regions as PAL and NTSC, whereas in practice this mostly means deliberate regional coding to control the sale and distribution of particular titles in various regions of the world. In CD-i, PAL and NTSC only refer to the TV-standards, they do not imply region coding.
3.13.3 Does CD-i support wide screen (16:9) TV sets?
Yes, any CD-i title can be viewed on a wide screen TV set using either one of the options offered by the TV itself. No special resolutions adapted to the 16:9 aspect ratio are defined for CD-i, however a picture can be 'squeezed' within a normal 4:3 image that can be 'de-squeezed' at runtime by the TV-set (“anamorphic encoding”).
Please be aware of the fact that, in contrast to any DVD-Video player, a CD-i player has no built in facility to correct the display of a widescreen image on a normal 4:3 display by filling the screen with black bars at the top and bottom. When a widescreen title is also to be used on a 4:3 display, the content should also be stored in this aspect ratio on the disc.
Some consumer CD-i players (like the Philips CDI-220/60 and up) provide for a 16:9 switch in the player shell. This switch records the setting in the CSD (See What is the CSD?), which allows for applications to look for the connected TV format. When such a player is set in 16:9 mode, the player's startup shell is displayed in wide screen, but when a CD-i is started, the screen is switched to 4:3 mode. An application that interprets the aspect ratio setting in the CSD may then turn the screen back to 16:9 and load 16:9 optimized content. This CSD entry is an extension that is not specified by the Green Book, and there are only a few applications that supported it.
3.13.4 How does CD-i Full Motion Video work?
When the term FMV, or Full Motion Video is used, it often refers to the playback of MPEG-1 encodedDigital Video. Although a Base Case CD-i player is capable of various full screen animation options and partial screen motion video, it can be extended with a Digital Video cartridge to extend this to full screen, full motion video. In some players, this Digital Video cartridge is already built-in. Digital Video is considered a must-have extension to CD-i, and is described as an option in chapter 9 of the Green Book.
CD-i Digital Video is based on the MPEG-1 standard, which is now extensively used in a wide variety of applications, but it was initially developed mainly for CD-i. This standard allows CD-i to display full screen (384x280) moving video images in either 24, 25 or 30 frames per second. The video is not interlaced, like with MPEG-2 in DVD-Video. Video-quality is roughly comparable to standard VHS. CD-i's standard ADPCM audio features can be used in conjunction with MPEG video, but this is very unlikely since the Digital Video cartridge also provides for some extra audio decoding schemes based on MPEG-1 layer I and II, allowing for very high quality CD-Audio like audio that takes up only a fraction of the storage space and bandwidth of ADPCM.
MPEG-1 video is based on an encoding technique called DCT, Discrete Cosine Transform. The basis for this encoding is the idea that successive pictures in a video usually do not differ that much from each other. Instead of encoding and storing each picture in full, MPEG only stores the differences between images. There are three different types of MPEG images: I or Intra frames that consist of a full image that can be displayed without information from other images - this is used for displaying images when performing a fast forward or reverse, P or Progressive frames that need information from previous images and B or Bi-directional frames that need information from both previous and future images to build a picture. The images that make up the video are not stored in chronological order on the disc: the MPEG decoder takes care of the decoding of the information and putting all images in correct order for display.
Digital Video is displayed on the background plane (see How does CD-i video work?), and can be overlayed with images from the CD-i's Base Case video codecs, such as CLUT or RLE.