Glossary

A companion to the disc and image format notes. It assumes only basic knowledge of how optical discs work. Terms are grouped by topic, and each section builds on the ones before it. If an entry mentions another acronym, that acronym is defined in the same section or an earlier one.

Quick lookup #

Term Expansion Section
ADR Address (Q-channel mode) 5
ATIP Absolute Time In Pregroove 10
BCA Burst Cutting Area 7
BCD Binary-Coded Decimal 9
BIN / CUE CDRWIN raw image / cue sheet 1
C1 / C2 CIRC decoder stages 10
CCD / IMG / SUB CloneCD descriptor / image / subchannel files 1
CD Compact Disc 2
CD-DA Compact Disc Digital Audio 2
CD-i Compact Disc Interactive 2
CD-R / CD-RW CD Recordable / CD ReWritable 2
CD-ROM Compact Disc Read-Only Memory 2
CD-ROM XA CD-ROM eXtended Architecture 2
CD-TEXT Text data stored on audio CDs 5
CIRC Cross-Interleaved Reed–Solomon Code 10
CLV Constant Linear Velocity 8
CRC Cyclic Redundancy Check 5
DAO / SAO / TAO Disc- / Session- / Track-At-Once 10
DL / SL Dual Layer / Single Layer 7
DMI Disc Manufacturing Information 7
DPM Data Position Measurement 8
DVD Digital Versatile Disc 2
DVD-R / DVD-ROM DVD Recordable / DVD Read-Only Memory 2
EAN-13 European Article Number, 13 digits 5
ECC Error Correction Code 6
ECM Error Code Modeler 10
EDC Error Detection Code 6
EFM / EFMPlus Eight-to-Fourteen Modulation / its DVD successor 10
HTOA Hidden Track One Audio 10
ISO Plain user-data image; also the ISO 9660 file system 1
ISRC International Standard Recording Code 5
LBA Logical Block Address 3
MCN Media Catalog Number 5
MDX / MDS v2 DAEMON Tools' encrypted descriptor format 1
MDF / MDS Media data / Media descriptor files 1
MMC Multi-Media Commands 7
MSF Minutes : Seconds : Frames 3
NRZI Non-Return-to-Zero, Inverted 10
OTP / PTP Opposite / Parallel Track Path 7
PCA / PMA Power Calibration Area / Program Memory Area 10
PFI Physical Format Information 7
PI / PO Parity Inner / Parity Outer (DVD) 10
PLBA (see entry; used as "LBA counted from 00:02:00") 3
PMIN / PSEC / PFRAME Point minutes / seconds / frames 5
PSN Physical Sector Number 3
RS / RS-PC Reed-Solomon / Reed-Solomon Product Code 6
SCSI Small Computer System Interface 7
TNO Track Number 5
TOC Table Of Contents 4
UDF Universal Disk Format 10
UTF-16LE 16-bit Unicode Transformation Format, little-endian 9

0. The physical picture #

You only need a handful of ideas to follow everything below.

  • Spiral track. An optical disc stores data in one long spiral, like a record groove, running from the inner edge to the outer edge (or the reverse on some layers).
  • Pits and lands. On a factory-pressed disc, the data is a pattern of tiny bumps (pits) and flat stretches (lands) stamped into the plastic. A laser shines on the spiral, and the reflected light changes where the pattern changes. The drive decodes that pattern into bits.
  • Pressed versus recordable. On a recordable disc (CD-R, DVD-R) there is no stamped pattern. Instead, a laser burns marks into a dye layer that mimic the pits. Rewritable discs (CD-RW) use a material that can switch between two states. A pressed disc is called embossed.
  • Layers. A DVD can have two separate data layers. The laser refocuses to read whichever one it wants.
  • Sector. The smallest unit the drive can read as one piece. Everything on a disc is organized into sectors, which are numbered in order along the spiral.
  • Rotation speed. The disc does not spin at a fixed speed. See CLV in section 8.

1. File and format names #

Alcohol 120% : The disc-imaging program that created the .mds/.mdf format. The name is a product name, not an acronym.

MDF : The sector-data file (see MDS/MDF). It holds the raw contents of the disc, sector after sector. Often read as "Media Data File", but the format does not define the expansion.

MDS : The descriptor file. It holds the layout of the disc (sessions, tracks, sizes, offsets) rather than the data itself. The file begins with the text MEDIA DESCRIPTOR. The two files go together: the MDS describes how to read the MDF. DAEMON Tools later reused the MEDIA DESCRIPTOR signature for an encrypted, compressed "version 2" descriptor (MDS v2 / MDX).

ISO : A file holding only the 2048-byte user data of each sector of one data track (or of a DVD), with no header. Named after the ISO 9660 file system usually found inside. See ISO.

BIN / CUE : A raw sector file (.bin) plus a text cue sheet (.cue) describing its tracks, created for the CDRWIN burning program. See BIN/CUE.

IMG / CCD / SUB : CloneCD's three files: raw 2352-byte sectors (.img), an INI-style text TOC (.ccd), and 96 bytes of linear subchannel per sector (.sub). See IMG/CCD/SUB.


2. Disc types and standards #

CD (Compact Disc) : The original 1980s optical disc: 12 cm across, holding roughly 650-700 MB (about 74-80 minutes of audio). Everything about CDs is counted in 75 sectors per second.

CD-DA (Compact Disc Digital Audio) : The ordinary audio CD. Each sector holds 2352 bytes of raw audio (about 1/75 second of stereo sound). There is no error correction beyond what the disc format itself provides, so every byte of the sector is audio.

CD-ROM (Compact Disc Read-Only Memory) : A CD used for computer data. Because data needs better error protection than audio, a CD-ROM sector spends part of its 2352 bytes on extra checking codes. The usable data per sector is 2048 bytes in the most common layout (Mode 1, see section 6).

CD-ROM XA (eXtended Architecture) : An extension of CD-ROM that allows data and audio/video to be interleaved on the same track. It defines the Mode 2 sector layouts (Form 1 and Form 2, section 6).

CD-i (Compact Disc Interactive) : A Philips multimedia format, with its own disc and sector conventions. It appears in these notes only as one possible value of the disc-type field in the lead-in information.

CD-R (CD Recordable) / CD-RW (CD ReWritable) : Writable versions of the CD. CD-R can be written once; CD-RW can be erased and rewritten. Both use a laser to alter a layer in the disc, instead of having pits stamped in.

DVD : A later disc with the same physical size as a CD but much denser: 4.7 GB per layer. The letters are usually read as "Digital Versatile Disc" (originally "Digital Video Disc"); the DVD industry body has said they do not officially stand for anything.

DVD-ROM / DVD-R : Read-only (pressed) and write-once recordable DVDs. Game and software discs are DVD-ROM.

Red / Yellow / Green / Orange Books : Nicknames for the CD specification documents, which were bound in different colors. Red Book is CD-DA, Yellow Book is CD-ROM (and XA), Green Book is CD-i, and Orange Book is the recordable CDs (CD-R/RW). DVD specifications are lettered instead (Book A for DVD-ROM, and so on).


3. Addressing: how sectors are numbered #

Sector : See section 0. On a CD a sector is stored as 2352 bytes. On a DVD, a sector's user data is 2048 bytes (with extra overhead around it that image files do not keep).

Frame : In CD addressing, one frame means one sector. There are 75 frames per second. (The word is also used for a lower-level unit inside the disc's signal encoding; that is not the meaning used in the MDS format.)

MSF (Minutes : Seconds : Frames) : The traditional CD address, written as mm:ss:ff. Since there are 75 frames per second, mm:ss:ff = (mm × 60 + ss) × 75 + ff sectors. For example, 12:07:45 is 54,570 sectors.

LBA (Logical Block Address) : A plain sector number, counted from 0. This is how software normally addresses a disc. For CDs, LBA 0 is defined to be at MSF 00:02:00, so LBA = MSF in sectors − 150. The 150 sectors (2 seconds) before it are the first track's pregap (section 4), which are numbered -150 to -1.

PLBA : The field in the MDS data block that gives each track's start sector. The format's documentation does not spell the letters out (presumably "physical LBA"). In practice it is an LBA with 0 at 00:02:00, so it points at where the track's index 1 begins.

PSN (Physical Sector Number) : The sector number written on the DVD itself, in each sector's header. On a DVD the data area starts at PSN 0x30000, so LBA 0 corresponds to PSN 0x30000. On a second layer, PSN works differently (see OTP in section 7).


4. How a disc is laid out #

Lead-in : A region at the inner edge, before the data. On a CD it holds the table of contents. On a DVD it holds the disc's control information (section 7). It is not part of the user data.

Program area : The part of the disc between lead-in and lead-out that holds the actual contents (tracks).

Lead-out : A marker region at the end of the data. The lead-out start is also the end of the last track.

TOC (Table Of Contents) : The list of tracks and their start times, stored in the lead-in of a CD. The drive reads it to know where everything is. The MDS stores a copy of this information.

Session : A group of tracks that were written together, with their own lead-in and lead-out. Most discs have just one. Discs that were added to later (multisession) have more.

Track : A contiguous section of the program area with one content type: either audio or data. A mixed-mode CD has both, normally with the data track first (for example, a game with its music as audio tracks).

Pregap : A gap at the start of a track, before the track's real content. The standard pregap is 2 seconds (150 sectors). The first track's pregap is 150 sectors, and so is the one on an audio track that follows a data track.

Index : A numbered subdivision inside a track. Index 0 is the pregap; index 1 is the main content of the track. Indexes 2 and above exist in the standard but are rarely used. The MDS only stores the length of indexes 0 and 1.

Point : In the TOC, each entry has a "point" value saying what the entry describes. Values 01-63 mean track numbers; A0, A1 and A2 are special: A0 gives the first track number (and the disc type), A1 gives the last track number, and A2 gives the lead-out position.


5. Subchannels and the Q channel #

A CD sector carries, alongside the main data, a second stream of small control information called subchannel data. It is a set of 8 parallel one-bit streams, labeled P, Q, R, S, T, U, V and W. Together they add 96 bytes per sector, which is the "+96" in the 0x990 sector size (2352 + 96 = 2448).

P subchannel : A simple marker, historically used to flag the start of tracks.

Q subchannel : The important one. It repeats position information: which track and index the laser is on, and where. In the lead-in, it carries the TOC. Most of the fields listed below live in the Q channel. The MDS data block copies these fields.

R–W subchannels : Used for extras such as CD-TEXT and CD graphics. The format notes treat them only as raw bytes.

ADR (Address) : A 4-bit field in the Q channel saying what kind of information this Q-channel entry holds. Value 1 means "position information" (the usual case); 2 means a catalog number (MCN), and 3 means a recording code (ISRC). Note: on the disc, Control is the high nibble and ADR the low nibble of the first Q byte. MMC's READ TOC response, and therefore the MDS (which copies it), put ADR in the high nibble instead. See Subchannels.

Control : A 4-bit field of flags. Bit value 4 marks a data track (as opposed to audio); the other bits mark things like pre-emphasis and copy permission. Data tracks show control 4, audio tracks control 0.

TNO (Track Number) : The Q-channel field holding the current track. In the lead-in it is 0, because the lead-in is not part of any track.

POINT, PMIN, PSEC, PFRAME : In lead-in entries, POINT says what the entry describes (see "Point" in section 4). PMIN, PSEC and PFRAME are the minute, second and frame values that go with it, and what they mean depends on POINT. For a track, they give its start time.

CRC (Cyclic Redundancy Check) : A short check value computed from the data. If any bit changes, the CRC almost certainly no longer matches, so errors are detected. The Q channel ends with a CRC.

MCN (Media Catalog Number) and EAN-13 : The MCN is the barcode number of the whole disc. It is formatted as an EAN-13 (European Article Number, 13 digits), the same kind of barcode printed on retail products.

ISRC (International Standard Recording Code) : A 12-character code that identifies one specific recording (track), as opposed to the whole disc.

CD-TEXT : Track and album titles stored in the lead-in using the R–W subchannels, so a player can show them.

The MDS has no fields for MCN, ISRC or CD-TEXT. MCN and ISRC survive only inside stored subchannel data. CD-TEXT lives in the lead-in, which is not stored, so it is probably lost. CUE and CCD store all three explicitly. See Subchannels for the full Q channel layout.


6. Inside a CD sector #

A raw CD-ROM sector is 2352 bytes. In the common Mode 1 layout:

12 bytes   sync pattern (a fixed marker)
 4 bytes   header (sector address in MSF, plus the mode)
2048 bytes user data
 4 bytes   EDC
 8 bytes   zero
276 bytes  ECC

Mode 1 / Mode 2 : Two sector layouts for data CDs. Mode 1 is the one above, with full error protection. Mode 2 skips that protection to carry more payload, and is used by CD-ROM XA.

Form 1 / Form 2 : The two kinds of Mode 2 sector in CD-ROM XA. Form 1 has error protection and carries 2048 bytes of data. Form 2 has no correction code and carries 2324 bytes of data.

EDC (Error Detection Code) : A 4-byte CRC over the sector, used to detect (not fix) a corrupt sector.

ECC (Error Correction Code) : Extra bytes calculated from the data so that damage can be repaired as well as detected. A CD-ROM Mode 1 sector spends 276 bytes on this.

RS (Reed-Solomon) / RS-PC (Reed-Solomon Product Code) : The mathematical scheme behind most optical-disc error correction. A product code arranges data in a grid and protects both rows and columns, so it can correct bursts of errors such as a scratch.


7. DVD-specific terms #

PFI (Physical Format Information) : A small record describing the disc's physical properties: its type, size, number of layers, density, and where the data starts and ends. It is stored in the lead-in. The MDS keeps it in its disc-structure area, next to the DMI and the copyright information.

DMI (Disc Manufacturing Information) : A 2048-byte lead-in record whose contents are up to the manufacturer. It is often all zero on pressed discs.

Disc structures : The DVD's metadata records (PFI and others). A drive reports them using the READ DISC STRUCTURE command (see below).

MMC (Multi-Media Commands) and SCSI (Small Computer System Interface) : SCSI is a standard command language for talking to storage devices. MMC is the section of it that defines commands for CD/DVD drives, such as READ DISC STRUCTURE. USB and SATA drives use the same commands.

BCA (Burst Cutting Area) : A ring of barcode-like stripes burned into a disc near the hub after it is made, usually to carry a small amount of per-disc data. Only some discs have one. The MDS header has fields for it, but no sample used them.

SL / DL (Single Layer / Dual Layer) : A DVD with one data layer, or two. Dual layer roughly doubles the capacity.

Layer 0 / layer 1 : The first and second data layers. Layer 0 is the one nearest the side the laser enters from.

Layer break : The point where layer 0 ends and layer 1 begins. On a dual-layer disc the sector numbering continues across it, so you can describe the break by the sector number where layer 1 starts.

PTP (Parallel Track Path) / OTP (Opposite Track Path) : Two ways of arranging the spiral on a dual-layer disc. In PTP both layers are read from the inside outward. In OTP, layer 0 is read inside-out, and then layer 1 is read outside-in. That lets the laser move from the end of layer 0 to the start of layer 1 without a long trip back across the disc. On an OTP disc, layer 1's physical sector numbers are the bitwise complement of the mirrored layer 0 positions.

Embossed : See section 0: the data is stamped into the plastic, as on any factory-pressed disc. It appears as a layer-type value in the PFI.

ECC block : On a DVD, error correction works on groups of 16 sectors at a time. That group is called an ECC block. This is why the two layers of a disc often differ in size by exactly 16 sectors.


8. DPM and the terms around it #

DPM (Data Position Measurement) : A measurement of where each part of the disc's data sits in terms of rotation. Even two discs with identical contents differ slightly in this respect, because of the physical manufacturing process. Some copy-protection schemes read this to tell a genuine pressed disc from a copy. Alcohol stores a measured table so its emulation can reproduce it.

CLV (Constant Linear Velocity) : The way CDs and many DVDs are read: the disc spins faster near the center and slower near the edge, so the data always passes under the laser at the same speed. As a result, the same number of sectors takes up more rotation at the inner edge than at the outer. This is why the DPM entries grow by smaller and smaller steps toward the outside of a disc.

Resolution (in the DPM block) : How many sectors apart the measurements are. It is 50 for CD and 256 for DVD in our samples.

Copy protection : Techniques that make a disc harder to duplicate. Examples commonly associated with DPM checks include SafeDisc, SecuROM and StarForce (product names, not acronyms). Whether any given disc relies on DPM cannot be told from the MDS alone.


9. Number formats used in the notes #

Hexadecimal, h suffix and 0x prefix : Base-16 numbers. 800h and 0x800 both mean 2048. Hex is used because byte values and sector sizes line up neatly in it.

Little-endian : A way of storing a multi-byte number with its least significant byte first. e0 c1 14 00 read as a 32-bit little-endian number is 0x0014C1E0. All multi-byte values in the MDS are stored this way.

Signed integer : A number that can be negative. The session start of -150 is stored as FFFFFF6Ah, which is how a 32-bit signed number represents it.

BCD (Binary-Coded Decimal) : A scheme where each decimal digit takes 4 bits, so the number 12 is stored as 0x12. The CD's own Q channel uses BCD. The MDS does not: it stores 12 as the plain binary value 0x0C.

UTF-16LE : A text encoding using 16 bits per character, little-endian. The filename string in some MDS files uses it, so *.mdf takes 12 bytes (with its terminator) instead of 6.

Dword : A 32-bit (4-byte) value.


10. Encoding, recording and file-system terms #

These terms are used on the encoding, EDC/ECC, sessions and ISO pages.

NRZI (Non-Return-to-Zero, Inverted) : The rule that a pit edge is a channel bit 1 and every channel-bit period without an edge is a 0. Information is carried by the lengths of pits and lands, not by pits versus lands.

EFM (Eight-to-Fourteen Modulation) : The CD's channel code. Each byte becomes a 14-bit pattern, followed by 3 merging bits, so that every pit and land is 3 to 11 channel bits long. EFMPlus is DVD's version: 8 bits to 16, with no merging bits.

CIRC (Cross-Interleaved Reed–Solomon Code) : The CD's first error-correction layer, applied to every frame of every disc. It uses two Reed–Solomon codes, C1 (32,28) and C2 (28,24), with interleaving between them. Drives decode it internally. C2 errors are bytes CIRC could not fix.

L-EC / RSPC : The sector-level error correction of Mode 1 and Mode 2 Form 1 sectors: 172 bytes of P parity and 104 bytes of Q parity, checked by the 4-byte EDC. See EDC/ECC.

PI / PO (Parity Inner / Parity Outer) : The row and column codes of DVD's Reed–Solomon product code, applied over 16-sector ECC blocks.

Scrambling : XORing data sector bytes 12–2351 with a fixed pseudo-random sequence before recording, to avoid problematic patterns. Drives undo it on reading. CloneCD can store scrambled data (DataTracksScrambled=1).

Subheader : The 8 bytes after the header of a Mode 2 XA sector (file, channel, submode, coding info, each written twice). Submode bit 5 selects Form 1 or Form 2.

Raw / cooked : A raw sector is all 2352 bytes. A cooked sector is only the user data (usually 2048 bytes), after the drive has applied error correction.

ATIP (Absolute Time In Pregroove) : Position and disc information encoded in the wobble of a blank CD-R/RW's pregroove. It includes the lead-in start time, which identifies the manufacturer.

PCA / PMA (Power Calibration Area / Program Memory Area) : Areas of a recordable CD inside the lead-in radius. The PCA is used for laser power tests; the PMA holds a provisional TOC until the session is closed.

DAO / SAO / TAO (Disc- / Session- / Track-At-Once) : Ways of writing a recordable CD: all at once, one session at a time, or one track at a time. TAO leaves link blocks (unreadable run-out/run-in sectors) and extra gaps between tracks.

HTOA (Hidden Track One Audio) : Audio hidden in track 1's pregap (index 0) before the track's official start. MDS and CCD cannot store it; CUE can.

Read offset : A drive-specific shift (in audio samples) between where audio data really starts and where the drive says it starts, caused by how it re-aligns CIRC-decoded data. Accurate rippers correct for it.

ECM (Error Code Modeler) : A pre-compression tool that removes EDC/ECC from raw CD images wherever it can be regenerated.

ISO 9660 / Joliet / Rock Ridge / El Torito : The standard CD-ROM file system (with its descriptors starting at sector 16 and the signature CD001) and its extensions for Unicode names, POSIX attributes and booting.

UDF (Universal Disk Format) : The file system of DVDs and Blu-ray discs. It is recognised by BEA01 / NSR02 / NSR03 / TEA01 descriptors at sector 16, and an anchor at sector 256.