11.3 CD Recording Methods

There are several ways to write data to a CD-R or CD-RW disc. Not all CD writers support all of these methods, but any method that a drive does support can be used to write to either a CD-R or CD-RW disc in that drive:

Disc-at-Once (DAO)

Disc-at-Once (DAO) recording writes the entire CD in one pass. The entire write must be completed without interruption. Once the write completes, no further data can be written to that disc. DAO recording can be used to write a single track (typical when creating a data disc) or multiple tracks (typical when creating an audio disc).

Track-at-Once (TAO)

Track-at-Once (TAO) recording allows writing in multiple passes, as many as 99 tracks on a disc. Each track must be at least 300 blocks long, which translates to 600 KB for a typical data CD. TAO recording consumes 150 blocks in overhead for run-in, run-out, pregap, and linking. Also, because the LASER must be stopped and restarted for each track, there is at least one empty run-out block following each track and one empty run-in block preceding each new track. If the drive and burning software handle TAO recording properly, there will ordinarily be only one pair of run-out/run-in blocks between tracks. These blocks will be empty and therefore silent and ordinarily unnoticeable.

Some combinations of drives and software handle TAO imperfectly, placing garbage data in the run-out/run-in interstices that results in audible pops on audio CDs. Also, some drive/software combinations enforce a fixed-length pause between audio tracks, introducing a 2-second pause between tracks even if that pause was not present on the source.

Session-at-Once (SAO)

Session-at-Once (SAO) is a hybrid recording method that combines the advantages of DAO and TAO recording, allowing multiple sessions (as with TAO), but with DAO-like control over the interstitial track gaps.

Packet writing

Packet writing is an alternative to DAO, TAO, or SAO recording that provides much finer granularity in session size. Packet writing supports multiple writes per track, requiring only seven overhead blocks per write?four for run-in, two for run-out, and one for linking. Because an entire packet can fit in the writer's buffer, and because packets can be written independently, using packet writing effectively eliminates buffer underrun errors, which is one major reason for its popularity. Each packet is written independently, and can therefore be thought of as a very small session. But because each packet is written independently, there is a short break between packets, just as a small break exists between sessions on a multisession disc.

Packet writing is inherently slower than premastering because of the overhead required to create and manipulate the packets. A given group of files that requires five minutes to copy from hard disk to a CD-RW disc using premastering software may require twice that long to copy using packet-writing software. Because packet-writing software is normally used to provide DLA for drag-and-drop file manipulation, this speed differential is usually not an issue. However, if you need to copy large amounts of data, be aware that you will incur a significant performance penalty if you do so using packet-writing rather than premastering software.

Packet writing may use fixed-length packets or variable-length packets, each of which has some advantages.

Fixed-length packets

All packets written to any particular track are the same size (although packet size may differ between tracks). When using fixed-length packets, the CD writer waits until it has received enough data to fill a packet, assembles that packet, and writes it to disc. Buffer underruns are never an issue with fixed-length packets because packet size is always much smaller than the capacity of the CD writer's buffer. With fixed-length packets, the interpacket gap occurs at predictable locations, which makes discs written with fixed-length packets more likely to be readable by older CD-ROM drives, many of which are confused by the unpredictable locations of interpacket gaps on discs written with variable-length packets. Finally, a disc written with fixed-length packets allows file-by-file erase, whereas one written with variable-length packets can be erased only by reformatting it. Most current packet-writing software uses fixed-length packets.

Variable-length packets

The size of the packet varies according to the data stream. Small files may be written as a single packet, which reduces the number of write operations and increases both data storage efficiency and performance. Depending on the maximum packet length, any given packet may exceed the size of the CD writer's buffer, which again raises the specter of buffer underruns (although BURN-Proof and similar technologies used on recent CD writers eliminate the danger of buffer underruns). Discs written with variable-length packets are often unreadable on standard CD-ROM drives, and in CD writers that do not support variable-length packets (which includes quite a few older drives). Few current packet-writing software packages support variable-length packets, due to the inability of a disc written with variable-length packets to have individual files erased.

Any drive you buy should support all four of these modes. Sometimes DAO recording is the only usable method. For example, duplicating some CDs (particularly copy-protected games and so on) requires DAO. Also, DAO may be required to premaster a disc that will subsequently be pressed by a commercial duplicator because commercial pressing plants may recognize TAO gaps as errors, although that is less common today. TAO is useful when you are assembling a CD from various sources. Most (but not all) modern CD writers support both DAO and TAO mode. SAO is seldom absolutely required, but can be useful for special purposes, such as writing CD-Extra discs. Relatively few CD writers (notably Plextor models) support SAO. Packet writing is necessary if you want to use the drive as a logical volume within Windows. All CD-(M)RW drives and most (but not all) modern CD-R drives support packet writing. Not all, however, support both fixed- and variable-length packets.

In our experience, CD-R/RW packet writing as a technology is not quite ready for prime time because of the nagging compatibility issues that continue to plague it, including the following:

Writing software incompatibilities

Packet-writing software, such as Roxio DirectCD, functions by creating a virtual disc volume and assigning that drive letter to the CD-RW disc. For example, if your CD-(M)RW drive is D:, packet-writing software may assign the virtual volume E: to the CD-RW disc. When you drag and drop files between your hard disk and the CD-RW disc, you do so using E: rather than D:. In our experience, these virtual volumes often conflict on systems that use other software that creates virtual volumes, such as some tape drive software. Also, even when installed on a system without such other software, packet-writing software is often plagued by other incompatibilities, particularly on Windows 2000 and Windows XP systems.

Firmware problems

How well a drive supports packet writing is largely determined by the quality of its firmware, so just because a drive's specs claim that it supports packet writing doesn't necessarily mean that it does so well, or even adequately. We have found that the best drives for packet writing are those made by Plextor, which is no surprise. Plextor always does things right, and refuses to ship drives until it has all the issues worked out. That's probably why, for example, Plextor did not ship a DVD-ROM drive (let alone a DVD-recordable drive) until May 2002, more than three years after other manufacturers started shipping such drives in volume.

Note that a simple firmware upgrade is insufficient to add packet-writing capability to a drive that does not support packet writing. Packet writing requires specific hardware that is not present on some CD-R drives, particularly older models.

The readability of packet-written discs in standard drives also varies. Older CD-ROM drives, particularly those that use read-ahead optimization, often generate read errors caused by the inter-packet gaps. Also, packet-writing software differs in how it closes discs. Some software closes the disc to UDF format, which means that disc can be read by a CD-ROM drive only if that drive is MultiRead-compatible and the system has UDF drivers installed. Other packet-writing software, notably Adaptec DirectCD 3.0, closes the disc to ISO-9660 format by putting what amounts to an ISO-9660 wrapper around the UDF contents. But DirectCD uses ISO-9660 Level 3 extents, which means the resulting disc may be impossible to read in systems running something other than Windows NT 4, Windows 98/SE/Me, or Windows 2000/XP.

Although packet-writing software such as DirectCD and InCD has become associated in many people's minds with CD-RW media and premastering software such as Nero and EasyCD with CD-R media, there's really no such correlation. It's possible to premaster to a CD-RW disc, just as it's possible to use packet writing on a CD-R disc. We hate to risk any of our original audio CDs in our work area?they're likely to be sat upon or worse?so we frequently dupe an original audio CD to a CD-RW disc and play the copy. Similarly, we frequently keep a CD-R disc in a writer on a system with packet-writing software installed. That makes it trivially easy to back up by dragging and dropping our current working files onto the CD-R disc, which has the advantage relative to a CD-RW disc of being permanent.

So if you've gotten the idea that CD-R equals premastering and CD-RW equals packet writing, readjust your thinking. There are many advantages to using CD-RW discs for things generally thought of as being jobs for CD-R, just as there are many advantages to using CD-R discs for things usually considered to be CD-RW applications. The only difference between CD-R and CD-RW is that the latter is erasable. Period.

An emerging packet-writing technology called Mount Rainier (or Mt. Rainier; not even the sponsors have decided which form to use) addresses all of the problems common to earlier packet-writing methods. The Mount Rainier specification (http://www.mt-rainier.org) originated from a consortium founded by Compaq, Microsoft, Philips, and Sony, and now enjoys broad industry support. Mount Rainier drives, also called CD-MRW drives, are second-generation CD-RW drives that have hardware capabilities not present in older CD-RW drives.

A PC running a Mount Rainier-aware operating system natively recognizes a Mount Rainier drive and assigns it a drive letter at boot time, just as it would for a floppy drive or hard drive. The Mount Rainier drive appears as just another drive to the operating system and applications. You can create, copy, move, and delete files on the Mount Rainier drive just as you would on a floppy drive or hard drive. In effect, Mount Rainier replaces packet-writing applications such as Roxio DirectCD and Nero InCD by adding their functionality to the operating system itself. Mount Rainier has five key elements:

Hardware-based physical defect management

Existing packet-writing technologies use the software-based defect management provided by UDF 1.50, which requires a separate software layer running between the operating system and the CD writer hardware. CD-MRW drives manage physical media defects in hardware, which means the operating system can treat a CD-MRW drive as it would any other drive?send data to it and allow the drive itself to be responsible for writing the data without errors. For increased reliability, Mount Rainier specifies two media defect tables, a main defect table in the lead-in area and a second copy in the lead-out area. During formatting, the drive identifies bad blocks and writes their addresses to both defect tables. Bad blocks are logically remapped to known-good blocks near the lead-out area, so data that would otherwise have been written to a bad block is instead written to a replacement block. In addition to being faster and more reliable, hardware-based defect management has the considerable advantage of isolating the operating system and applications from the underlying data integrity mechanism, which simplifies matters by presenting a standardized high-level interface to software that writes data to the CD-MRW drive.

2 KB logical write-addressing

Current CD-RW standards use a 64 KB block size, which is inefficient when storing small files and is a poor match for the 2 KB or 4 KB addressing used by hard disk drives and other standard storage devices. In particular, this mismatch in block sizes introduces filesystem inefficiencies and caching issues when transferring data between standard CD-RW drives and hard drives. Mount Rainier eliminates this performance bottleneck by adopting a 2 KB block size to allow efficient, transparent bidirectional transfers and caching between CD-MRW drives and hard drives.

Background formatting and fast eject

Standard CD-RW packet-writing applications can write only to a disc that has already been formatted. Unlike standard packet writing, in which formatting is a software function that must be complete before data can be written to the disc, Mount Rainier drives format discs transparently in the background as a function of the drive hardware, and can write data to a partially formatted disc. When you insert an unformatted disc in a Mt. Rainier drive, you can begin writing data to that disc within seconds after it spins up. The drive continues formatting the disc in the background until the process completes. If you eject a disc before formatting is complete, the data written to that disc is readable. When you reinsert the disc, the drive simply continues formatting from the point it stopped formatting. Because formatting is a low-priority background operation, the drive responds quickly to user read and write requests even while a disc is being formatted.

The Mount Rainier specification also incorporates a requirement for fast eject. With legacy CD writers, ejecting a disc may take several seconds to half a minute or more, depending on what the drive happens to be doing when you tell it to eject the disc. Mount Rainier drives eject discs very quickly, like a CD-ROM drive, because they give priority to write operations and do not require finalizing or other time-consuming operations before ejecting a disc.

Command set implementation

Older CD writers use hybrid command sets, sometimes including portions of the MMC-1 and MMC-2 command sets mixed with proprietary commands. That's why CD-burning software always lists supported drive models and may not work correctly or at all with a drive that is not on the supported list. To support a particular CD writer, the burning software must be coded to take all of the quirks of that model into account. Mount Rainier eliminates this hodgepodge of incompatible, incomplete, and proprietary command sets by mandating that all Mount Rainier drives be fully compliant with the MMC-2 command set. Because the command set is standardized and mandated, the operating system can assume that any Mount Rainier drive includes at least the minimum required feature set and will respond predictably to commands.

Compatibility and standards compliance

Backward compatibility and standards compliance are an important part of the Mount Rainier specification. Although only an MRW drive can write an MRW-formatted disc, any optical drive that can read CD-RW media can read an MRW-formatted disc. If the operating system has Mount Rainier support, nothing additional is needed for reading MRW discs in any optical drive, or for writing and reading MRW discs in a Mount Rainier drive. If the operating system does not have Mount Rainier support, MRW drives require a helper application to read or write MRW discs, and standard drives need a helper application to read MRW discs.

Right now, there are no operating systems with Mount Rainier support, although that support is promised for Windows XP, Mac OS, and Linux.