(conforming to ISO9660)
SEGA ENTERPRISES, LTD.
CONFIDENTIAL — PROPERTY OF SEGA — # 66
Ver 2.00 Feb. 24-'92
About this document This is an OCR transcription of the scanned PDF Mega-CD Disc Format Specifications (26 scanned pages; 22 numbered document pages + a 4-page appended "SEGA-CD TECH BULLETIN"). The scan is stamped with a diagonal "REX SABIO" watermark and carries handwritten annotations by a previous owner; those annotations are preserved below and marked as such. The character
Ø(slashed zero) is used throughout the original for the digit zero; it has been transcribed as a normal0in body text, but kept in the sense of the original where the original typography is meaningful.
| Section | Page |
|---|---|
| 1. OVERVIEW OF THE MEGA-CD DISC FORMAT | 1 |
| 2. PHYSICAL FORMAT | 2 |
| 2-1 Partition and Configuration of Disc Areas | 2 |
| 2-2 Configuration of Tracks | 2 |
| 3. LOGICAL FORMAT | 5 |
| 3-1 Sector Structure | 5 |
| 3-2 System Area | 6 |
| 3-3 Booting System | 7 |
| 3-4 File System | 8 |
| 3-5 User File Table | 15 |
| 3-6 Others | 15 |
| Appendix 1. Glossary | 16 |
| Appendix 2. System ID | 18 |
| Appendix 3. Disc ID | 20 |
| Appendix 4. Area for defining Japanese codes | 22 |
(document page 1)
MEGA-CDs can play the following 8 or 12cm CD discs:
- MEGA-CD game disc
- Audio CD disc (CD-DA)
- Karaoke CD disc (CD-G)
- SONY EB formatted CD disc (CD-ROM)
- Discs for personal computers conforming to the "YELLOW BOOK" specifications.
Discs (1) to (3) can be played with the resident programs on the MEGA-CD. To play discs (4) and (5), the special cartridge on the MEGA drive is needed.
MEGA-CD game disc features following:
- The physical format conforms to the specifications defined by Sony and Phillips described in the "RED BOOK" and "YELLOW BOOK".
- The logical format conforms to the MEGA-CD DISC FORMAT specifications (based on ISO9660).
Since the logical format complies with ISO9660, it is possible to create discs which can be used with other personal computers.
The MEGA-CD DISC FORMAT specifications (hereafter MDF) are used to create MEGA-CD game discs. This MDF features following:
- The system can be booted without invoking cartridges, using only the game disc.
- Conforming to the ISO specifications allows ease of use and facilitates third party involvement.
※ Conforming to ISO9660 (See Fig. 3-1)
The contents of logical sector numbers 0 to 15 are not normalized in the ISO9660 specifications. The system designer can use this area for programs to boot up the system or for information of protection. SDF can be used to define this area to allow the system to be booted from a MEGA-CD game disc. Logical sector numbers 16 and above are defined, conforming to ISO9660.
Transcription note: "SDF" appears in the scan; from context this is a typo for "MDF".
(document page 2)
The physical format conforms to the CD specifications of Sony and Phillips which are described in the "RED BOOK" and "YELLOW BOOK." Items specifically defined by SEGA in the specifications together with important related items are described below. Other items can be found in the "RED BOOK" or "YELLOW BOOK."
Beginning at disc center and moving outward, the disc is divided and configured in the sequence:
read-in area, program area, read-out area.
TOC information is written in the read-in area in accordance with the "YELLOW BOOK." TOC data is the absolute frame time when index 01 of TNOs starts. To avoid problems, the start time of the read-out area is limited to the range (10:00:00 to 60:04:00). The program area is divided and configured in the sequence:
CD-ROM area (inner), CD-DA area (outer).
The CD-ROM and CD-DA areas are further divided into inner and outer areas in order that a CD-ROM track of a CD installed in an audio CD player will not be suddenly replayed when CD-DA tracks are being replayed. Hence, the above sequence and track configuration of CD-ROM and CD-DA areas should not be not be changed.
Transcription note: the doubled "not be not be" is present in the original.
The first frame of the program area is set at 00:00:00 (minute-second-frame), and the absolute time is measured from this point. The first two seconds of the program area are used for pause, and the first sector starts at 00:02:00. This sector is called sector #0. The last two seconds of the program area are used for pause, and the last sector is located at 60:01:74 (CD-S 20:01:74). The last frame of the program area is located at 60:03:74 (CD-S 20:03:74), two seconds after the last sector.
Therefore, the storage capacity of data is 60:00:00 (CD-S 20:00:00).
75 × 60 × 60 = 270,000 frame (sectors) (CD-S 90,000)
270,000 × 2KB = 540MB (CD-S 180MB)
The track number of the CD-ROM area is 01.
Track numbers on the CD-DA area can be assigned at any positions in intervals of four seconds or longer (excluding a pause at the beginning of tunes). Note that consecutive numbers should be used. (One track on the CD-DA area must be more than four seconds.)
The track number of the first tune is 02 followed by consecutive numbers up to 99.
(document page 3)
A two second pause (muting) is required before and after the CD-ROM track, before CD-DA tracks and after the last CD-DA track in accordance with the "YELLOW BOOK." This is to suppress (during seeking) final sounds of the previous tune when it is played with an audio player.
At least one tune of data should be stored on the CD-DA area. When no CD-DA data is required, a warning message can be stored such as "This MEGA-CD GAME disc should be replayed with MEGA-CD." This informs the user who may have put the disk in an audio CD player. If one tune of data exists, such a message is not required. This is because the user may want to listen to the music.
Outer portion of disc Inner portion of disc Outer portion of disc
┌──┬────────┬─────────┬──────────────────────┬──┬─────────┬────────┬──┐
│ │ CD-DA │ CD-ROM │ o │ │ CD-ROM │ CD-DA │ │
│ │ AREA │ AREA │ │ │ AREA │ AREA │ │
└──┴────────┴─────────┴──────────────────────┴──┴─────────┴────────┴──┘
↑ ↑ ↑ ↑ ↑ ↑↑ ↑ ↑ ↑
└────┴────────┴───────────┤ └── No record ││ │ │ │
└──── Read-in case ││ │ │ │
┌─────────────────────────────── Program area ┘ │ │ │
├─────────────────────────────── Read-out area ────┴────────┘ │
└─────────────────────────────── No record ───────────────────────┘
The figure is a schematic band diagram; the ASCII rendering above preserves the layout of the original: a symmetric CD-DA / CD-ROM band arrangement with tick marks a) … m) below it, keyed to the list that follows.
| Key | Description |
|---|---|
| a) | 00:00:00 (ATIME: absolute time) |
| b) | A "pause" of 2 seconds |
| c) | 00:02:00 (Logical Sector Number 0) |
| d) | End of user sector |
| e) | Post-gap (≥ 2 seconds) |
| f) | Point of TNO changes |
| g) | Pause (≥ 2 seconds) |
| h) | Start position of the first piece of music on the disc |
| i) | End position of the last piece of music on the disc (≤ 59:59:74) |
| j) | A "pause" of 2~3 seconds |
| k) | The start of read-out track (10:00:00 ≤ … ≤ 60:04:00) |
| l) | Channel P remains zero for 2~3 seconds. |
| m) | P switches between 0 and 1 in a 2 Hz ± 2% rhythm (duty cycle 50 ± 10%) |
| TNO: | Track number |
(document page 4)
Inner portion of disc ←──────── Information area ────────→ Outer portion of disc
Read-in Program area Read-out
┌────────┬──┬──────────────────┬──┬──┬────────┬──┬──┬────────┐
│ 000000 │11│0000000000000000 │11│11│00000000│11│00│ 010101 │ Channel P
└────────┴──┴──────────────────┴──┴──┴────────┴──┴──┴────────┘ Channel Q
TNO 00 ←─────── 01 ───────→ ←─── 02 ───→ ←─ AA ─→
INDEX -- 0 1, 2 .......... 0 1, 2 ..... 01
CD-ROM Mode CD-DA ←──── CD-ROM#1 ────→ ←── CD-DA#1 ─→ ← CD-DA →
←─────── 01 ───────→ - - - - - - - - -
↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
a) b) c) d) e) f) g) h) i) j) k) l) m)
Inner portion of disc ←──────── Information area ────────→ Outer portion of disc
Read-in Program area Read-out
┌────────┬──┬────────┬──┬──┬──────────┬──┬────┬──┬──┬────────┐
│ 000000 │11│ 000000 │11│11│ 00000000 │11│0000│11│00│ 010101 │ Channel P
└────────┴──┴────────┴──┴──┴──────────┴──┴────┴──┴──┴────────┘ Channel Q
TNO 00 ←─── 01 ───→ ←─── 02 ───→ ←─── 03 ───→ ←─ AA ─→
INDEX -- 0 1, 2 .... 0 1, 2 .... 0 1, 2 .... 01
CD-ROM Mode CD-DA ← CD-ROM#1 → ← CD-DA#1 → ← CD-DA#2 → ← CD-DA →
←──── 01 ──→
↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
a) b) c) d) e) f) g) h) f) g) i) j) k) l) m)
(document page 5)
This chapter defines the logical format in the CD-ROM area.
CD-ROM data can be stored in all the sectors from the first sector 00:02:00 to the last sector 60:01:74.
One sector contains one frame or 2048 bytes, and the data area can hold up to 270,000 ($41EB0) sectors (CD-S 90,000). The serial sector numbers are assigned starting with 00:02:00, which means sector numbers #0 to #269,999 ($41EAF) (CD-S 89,999) are used. Sector numbers #0 to #15 are reserved for the system area while #16 to #269,999 are used for the data area.
The data area contains 539.968 Mbytes in total (CD-S 179.968). Sectors #270,000 or below are reserved for the system (CD-S 90,000).
Transcription note: "or below" appears in the scan; the intended sense is evidently "or above".
The structure of each sector is mode 0, mode 1, or mode 2, which are defined in the "YELLOW BOOK." Mode 1 and mode 2 sectors cannot coexist in one track. Therefore, the CD-ROM track TNO=1 is in mode 1.
For mode 1 sectors, the first byte of sector #0 is made address 0 followed by consecutive addresses assigned in byte units.
Since 2048 bytes makes up one sector, the last address is 552,959,999 ($20F57FFF) (CD-S 184,319,999: $0AFC7FFF). For CD-DA frames of mode 2 sectors, the first address starts after these 2048 bytes.
absolute time
00:02:00 00:02:16 60:01:74
┌───────────────────┬──────────────────────────────────┬──────────┐
LSN│ #0~#15 │ #16~#269999 │ │
│ SYSTEM AREA │ DATA AREA │ RESERVED │
MDF│ Boot System │ VD and Files (conforming to ISO9660) │ │
└───────────────────┴──────────────────────────────────┴──────────┘
address
0 32768($8000) 552959999 ($20F57FFF)
LSN: Logical Sector Number
VD: Volume Descriptor
(document page 6)
The system area contains bootstrap information, initial programs, and file system programs. The booting sector is located on sector #0, and the system program sectors are on sectors #1 to #15.
(When the system programs occupy more than 30 Kbytes, system program sectors can be created in areas other than the system sector area. However, sectors that are both above #15 and below those used for VD cannot be used for this purpose.
Transcription note: the opening parenthesis is never closed in the original.
The booting sector contains following:
- The system ID
- Disk ID
- Initial program code
One purpose of the system ID is to identify MEGA-CD game discs. One use of the disc ID is for controlling quality. The initial programs which contain the file system code and other data are always read at the beginning.
Address
$000000 ┌──────────────────────┬──────────────────────────────────────┐
│ System ID │ │
$000100 ├──────────────────────┤ sector #0 Boot sector │
│ DISC ID │ │
$000200 ├──────────────────────┤ │
│ Initial Program Code │ │
$000800 ├──────────────────────┼──────────────────────────────────────┤
│ System Program │ sector #1~15 System Program sector │
$008000 ├──────────────────────┼──────────────────────────────────────┤
│ VD │ │
│ Directory │ DATA AREA │
│ Path Table │ │
│ User File 0 │ │
│ User File 1 │ │
│ : │ │
$20F57FFF└──────────────────────┴──────────────────────────────────────┘
Handwritten annotation in the scan:
$001000is written in the left margin next to the$000800row (i.e. the System Program start address is corrected from$000800to$001000). This matches the correction described in the appended SEGA-CD Tech Bulletin, below.
(document page 7)
Booting programs are stored on the MEGA-CD. The system loads the booting sector, confirms a MEGA-CD disc is installed, and then loads the initial programs. The initial programs are usually stored in the region with byte addresses $200 to $600 in system sector #0. Hence, quick booting results since re-loading is not required.
Initial programs are stored on disc, loaded into memory, and executed. The initial programs display the company's logo while they load the system programs. After the system programs are loaded, system control is taken over by the application software.
System programs are required to use CD-ROM discs which contain file system information or other data. The file system is designed for specific discs so that application software access speed is maximized. Application software may contain start-up, main programs, etc.
CONTROL
┌──────────────┐ ────────────────────────────────→ ┌────────────────┐
│ [ROM] │ LOAD │ [CD-ROM] │
│ BOOT PROGRAM │───────┐ ┌──────────────────→│ INIT PROGRAM │
└──────────────┘ JMP │ │ ┌──────────────→│ SYSTEM PROGRAM │
│ ↓ │ │ │ APPLICATION │
│ ┌──────────────┐│ │ └────────────────┘
│ │ [RAM] ││ │
│ │ INIT PROGRAM │┘ │
│ └──────────────┘ │
│ JMP │ LOAD │
│ ↓ CONTROL
│ ┌────────────────┐ │
└───────→│ [RAM] │──┘
│ SYSTEM PROGRAM │
└────────────────┘
CALL │ LOAD
↓
┌────────────────┐
│ [RAM] │
│ APPLICATION │
└────────────────┘
(document page 8)
The format conforms to the specifications defined in ISO9660.
| Abbr. | Meaning |
|---|---|
| VD | Volume Descriptor |
| LSN | Logical Sector Number |
| BP | Byte Pointer |
| RBP | Relative Byte Pointer |
| TP | Type |
| N | Numerical value |
| NL | Least Significant Byte First |
| NM | Most Significant Byte First |
| NB | Both-type orders |
| ND | Any digit from ZERO to NINE |
| A | A-characters (20-22/25-3F/41-5A/5F) |
| D | D-characters (30-39/41-5A/5F) |
| DS | D-characters, SEPARATOR1, SEPARATOR2 (2E/3B) |
| DE | Directory Entry |
| 00 | Zero fill |
| A1 | A1-characters ; A-characters + Kanji |
| D1 | D1-characters ; D-characters + Kanji |
| D1S | D1-characters, SEPARATOR1, SEPARATOR2 (2E/3B) |
| BP | TP | Field Name | Notes |
|---|---|---|---|
| 1 | N | Volume Descriptor Type | ; VD = 0 |
| 2 – 6 | Standard Identifier | ; 'CD001' | |
| 7 | N | Volume Descriptor Version | ; VD version = 1 |
| 8 – 39 | A | A Boot System Identi… | |
| 40 – 71 | A | A Boot Identifier | |
| 72 – 2048 | Boot System Use | ; not specified |
Transcription note: "A Boot System Identi" is cut off in the original scan; read as "…Identifier".
Boot Record sample:
| Size | Examples | Notes |
|---|---|---|
| 1 | 0 |
; Fixed |
| 5 | 'CD001' |
; Fixed |
| 1 | 01 |
; Fixed |
| 32 | 'SEGA MEGA CD ' |
; Fixed (' ' : $20) |
| 32 | 'Boot identifier (Application) ' |
; User supplied |
| 1977 | boot system code | ; User supplied |
| BP | TP | Field Name | Notes |
|---|---|---|---|
| 1 | N | Volume Descriptor Type | ; VD = 255 (end) |
| 2 – 6 | Standard Identifier | ; 'CD001' | |
| 7 | N | Volume Descriptor Version | ; VD version = 1 |
| 8 – 2048 | (Reserved for future standardization) | ; (00) byte |
(document page 9)
| BP | TP | Field name | Notes |
|---|---|---|---|
| 1 – | N | Volume Descriptor Type | ; VD = 1 (Normal) |
| 2 – 6 | Standard Identifier | ; 'CD001' | |
| 7 | N | Volume Descriptor Version | ; VD version = 1 |
| 8 | 00 | Unused Field | ; (00) byte |
| 9 – 40 | A | System Identifier | ; |
| 41 – 72 | D | Volume Identifier | ; |
| 73 – 80 | 00 | Unused Field | ; (00) byte |
| 81 – 88 | NB | Volume Space Size | ; |
| 89 – 120 | 00 | Unused Field | ; (00) byte |
| 121 – 124 | NB | Volume Set Size | ; |
| 125 – 128 | NB | Volume Sequence Number | ; |
| 129 – 132 | NB | Logical Block Size | ; |
| 133 – 140 | NB | Path Table Size | ; |
| 141 – 144 | NL | Location of Occurrence of Type L Path Table | ; |
| 145 – 148 | NL | Location of Optional Occurrence of Type L Path Table | ; |
| 149 – 152 | NM | Location of Occurrence of Type M Path Table | ; |
| 153 – 156 | NM | Location of Optional Occurrence of Type M Path Table | ; |
| 157 – 190 | DE | Directory Record for Root Directory | ; |
| 191 – 318 | D | Volume Set Identifier | ; |
| 319 – 446 | A | Publisher Identifier | ; |
| 447 – 574 | A | Data Preparer Identifier | ; |
| 575 – 702 | A | Application Identifier | ; |
| 703 – 739 | DS | Copyright File Identifier | ; |
| 740 – 776 | DS | Abstract File Identifier | ; |
| 777 – 813 | DS | Bibliographic File Identifer | ; |
| 814 – 830 | ND | Volume Creation Date and Time | ; |
| 831 – 847 | ND | Volume Modification Date and Time | ; |
| 848 – 864 | ND | Volume Expiration Date and Time | ; |
| 865 – 881 | ND | Volume Effective Date and Time | ; |
| 882 | N | File Structure Version | ; |
| 883 | 00 | (Reserved for future standardization) | ; (00) byte |
| 884 – 1395 | Application Use | ; not specified | |
| 1396 – 2048 | (Reserved for future standardization) | ; (00) byte |
(document page 10)
| Size | Examples | Notes |
|---|---|---|
| 1 | 01 |
; Fixed |
| 5 | 'CD001' |
; Fixed |
| 1 | 01 |
; Fixed |
| 1 | 00 |
; Fixed |
| 32 | 'SEGA MEGA CD ' |
; Fixed (' ' : $20) |
| 32 | 'Volume Identifier ' |
; User supplied |
| 8 | 0000000000000000 |
; Fixed |
| 8 | 1EB00004, 00041EB0 |
; Auto Write ( ≤ 00041EB0 ) |
| 32 | 00, 00, 00, 00, ……………… 00 |
; Fixed |
| 4 | 0100, 0001 |
; Fixed |
| 4 | 0100, 0001 |
; Fixed |
| 4 | 0008, 0800 |
; Fixed |
| 8 | XXXXXXXX, XXXXXXXX |
; Auto write |
| 4 | XXXXXXXX |
; Auto write |
| 4 | 00000000 |
; Fixed |
| 4 | XXXXXXXX |
; Auto write |
| 4 | 00000000 |
; Fixed |
| 34 | ……… |
; Auto write |
| 128 | 'Volume Set Identifier …' |
; User supplied |
| 128 | 'Publisher Identifier …' |
; User supplied |
| 128 | 'Data Preparer Identifier …' |
; User supplied |
| 128 | ' ' |
; Fixed |
| 37 | 'Copyright File Identifier …' |
; User supplied |
| 37 | ' ' |
; User supplied |
| 37 | ' ' |
; User supplied |
| 17 | 00000000 00000000 00000000 00000000 00 |
; Fixed |
| 17 | 00000000 00000000 00000000 00000000 00 |
; Fixed |
| 17 | 00000000 00000000 00000000 00000000 00 |
; Fixed |
| 17 | 00000000 00000000 00000000 00000000 00 |
; Fixed |
| 1 | 01 |
; Fixed |
| 1 | 00 |
; Fixed |
| 512 | 00,00,00,00, ……………… 00 |
; Fixed |
| 653 | 00,00,00,00, ……………… 00 |
; Fixed |
(document page 11)
| BP | TP | Field Name | Notes |
|---|---|---|---|
| 1 | N | Volume Descriptor Type | ; VD = 2 (supplement) |
| 2 – 6 | Standard Identifier | ; 'CD001' | |
| 7 | N | Volume Descriptor Version | ; VD version = 1 |
| 8 | 00 | Volume Flags | ; |
| 9 – 40 | A1 | System Identifier | ; |
| 41 – 72 | D1 | Volume Identifier | ; |
| 73 – 80 | 00 | Unused Field | ; (00) byte |
| 81 – 88 | NB | Volume Space Size | ; |
| 89 – 120 | 00 | Escape Sequences | ; 32 byte |
| 121 – 124 | NB | Volume Set Size | ; |
| 125 – 128 | NB | Volume Sequence Number | ; |
| 129 – 132 | NB | Logical Block Size | ; |
| 133 – 140 | NB | Path Table Size | ; |
| 141 – 144 | NL | Location of Occurrence of Type L Path Table | ; |
| 145 – 148 | NL | Location of Optional Occurrence of Type L Path Table | ; |
| 149 – 152 | NM | Location of Occurrence of Type M Path Table | ; |
| 153 – 156 | NM | Location of Optional Occurrence of Type M Path Table | ; |
| 157 – 190 | DE | Directory Record for Root Directory | ; 34 byte |
| 191 – 318 | D1 | Volume Set Identifier | ; |
| 319 – 446 | A1 | Publisher Identifier | ; |
| 447 – 574 | A1 | Data Preparer Identifier | ; |
| 575 – 702 | A1 | Application Identifier | ; |
| 703 – 739 | D1S | Copyright File Identifier | ; |
| 740 – 776 | D1S | Abstract File Identifier | ; |
| 777 – 813 | D1S | Bibliographic File Identifer | ; |
| 814 – 830 | ND | Volume Creation Date and Time | ; |
| 831 – 847 | ND | Volume Modification Date and Time | ; |
| 848 – 864 | ND | Volume Expiration Date and Time | ; |
| 865 – 881 | ND | Volume Effective Date and Time | ; |
| 882 | N | File Structure Version | ; |
| 883 | 00 | (Reserved for future standardization) | ; (00) byte |
| 884 – 1395 | Application Use | ; not specified | |
| 1396 – 2048 | (Reserved for future standardization) | ; (00) byte |
(document page 12)
| Size | Examples | Notes |
|---|---|---|
| 1 | 02 |
; Fixed |
| 5 | 'CD001' |
; Fixed |
| 1 | 01 |
; Fixed |
| 1 | 00(JIS) or 01(Shift JIS) |
; User supplied |
| 32 | 'SEGA MEGA CD ' |
; Fixed (' ' : $20) |
| 32 | 'Volume name ' |
; User supplied |
| 8 | 0000000000000000 |
; Fixed |
| 8 | 1EB00004, 00041EB0 |
; Auto Write ( ≤ 00041EB0 ) |
| 32 | 00, 00, 00, 00, ……………… 00 |
; User supplied |
| 4 | 0100, 0001 |
; Fixed |
| 4 | 0100, 0001 |
; Fixed |
| 4 | 0008, 0800 |
; Fixed |
| 8 | XXXXXXXX, XXXXXXXX |
; Auto write |
| 4 | XXXXXXXX |
; Auto write |
| 4 | 00000000 |
; Fixed |
| 4 | XXXXXXXX |
; Auto write |
| 4 | 00000000 |
; Fixed |
| 34 | ……… |
; Auto write |
| 128 | 'Volume set identifier …' |
; User supplied |
| 128 | 'Publisher identifier …' |
; User supplied |
| 128 | 'Data preparer identifier …' |
; User supplied |
| 128 | ' ' |
; Fixed |
| 37 | 'Copyright file identifier …' or ' ' |
; User supplied |
| 37 | 'Abstract file identifier …' or ' ' |
; User supplied |
| 37 | 'Bibliographic file identifier …' or ' ' |
; User supplied |
| 17 | 'yyyymmddhhmmssss', XX or 00000000 00000000 00000000 00000000 00 |
; User supplied |
| 17 | 'yyyymmddhhmmssss', XX or 00000000 00000000 00000000 00000000 00 |
; User supplied |
| 17 | 00000000 00000000 00000000 00000000 00 |
; Fixed |
| 17 | 00000000 00000000 00000000 00000000 00 |
; Fixed |
| 1 | 01 |
; Fixed |
| 1 | 00 |
; Fixed |
| 512 | 00,00,00,00, ……………… 00 |
; Reserved |
| 653 | 00,00,00,00, ……………… 00 |
; Fixed |
(document page 13)
Directories are used to manage a specially structured file system. The format defined by ISO9660 is used.
| BP | TP | Field Name | Notes |
|---|---|---|---|
| 1 | N | Length of Directory Record (LEN_DR) | ; |
| 2 | N | Extended Attribute Record Length | ; = 0 |
| 3 – 10 | NB | Location of Extent | ; |
| 11 – 18 | NB | Data Length | ; |
| 19 – 25 | N | Recording Date and Time | ; |
| 26 | File Flags | ; | |
| 27 | N | File Unit Size | ; = 0 |
| 28 | N | Interleave Gap Size | ; = 0 |
| 29 – 32 | NB | Volume Sequence Number | ; = 1 |
| 33 | N | Length of File Identifier (LEN_FI) | ; (MAX 12) |
| 34 – (33+LEN_FI) | D1S | File Identifier | ; |
| (34+LEN_FI) | 00 | Padding Field | ; (00) byte |
| (LEN_DR − LEN_SU + 1) – LEN_DR | System Use | ; LEN_SU bytes = 0 |
NOTE: LEN_SU denotes length of System Use field.
| RBP | TP | Field Name | Notes |
|---|---|---|---|
| 1 | N | Number of years since 1900 | ; |
| 2 | N | Month 1 to 12 | ; |
| 3 | N | Day 1 to 31 | ; |
| 4 | N | Hour 0 to 23 | ; |
| 5 | N | Minute 0 to 59 | ; |
| 6 | N | Second 0 to 59 | ; |
| 7 | N | Offset from Greenwich Mean Time in number of 15 min intervals from −48(West) to +52(East) | ; = 0 |
| Bit | Meaning | Notes |
|---|---|---|
| bit 0 | Existence | ; |
| bit 1 | Directory | ; |
| bit 2 | Associated File | ; |
| bit 3 | Record | ; |
| bit 4 | Protection | ; |
| bit 5 | Reserved | ; |
| bit 6 | Reserved | ; |
| bit 7 | Multi-Extent | ; = 0 |
(document page 14)
The format defined by ISO9660 is used.
| BP | TP | Field Name | Notes |
|---|---|---|---|
| 1 | N | Length of Directory Identifier (LEN_DI) | ; |
| 2 | N | Extended Attribute Record Length | ; = 0 |
| 3 – 6 | N | Location of Extent | ; |
| 7 – 8 | N | Parent Directory Number | ; |
| 9 – (8+LEN_DI) | D1 | Directory Identifier | ; |
| (9+LEN_DI) | 00 | Padding Field | ; (00) byte |
(document page 15)
User files reside on the user sector area. Each file is always consecutively configured. The lower 11-bits of the file's start address are always set to 0 (starting on a sector boundary). The file sizes are written in the directory in bytes. The blank space in the last sector of the file is filled with $FF. The $FF are read and stored in the buffer, but never passed to the application software.
The following restrictions apply to the directory structure to implement fast access and save memory. The restrictions are valid for the version 1.00 file system. Since the file system is fixed on disc, fast access is realized by storing the file path table on memory. This feature is quite different from other systems.
- The same restrictions as for MS-DOS apply for filenames.
- Usually subdirectories are not used. When they are used, the version of the file system should be upgraded.
- The number of files on disc is fixed in the file system. This allows the path table to be kept in a special file on RAM, thus eliminating a useless buffer.
This is not supported by version 1.00.
This is not supported by version 1.00. This function must be implemented by application programs.
The booting sector is #0 in the standard settings. Spare copies of the booting sector can be stored in #1 to #15. However, this must be done in such a way that the system program sectors are consecutive.
The line speed of MEGA-CD game discs is fixed at 1.25m/sec to improve the accuracy of track jump access and increase the seeking speed.
(document pages 16–17)
CD-DA Compact Disc Digital Audio. CD-DA area
CD-DA Area Digital Audio data is written on this CD-DA Area. Since the data is written conforming to "RED BOOK," the CD-DA Area can be played with a audio CD player.
CD-G (CD-Graphics) Karaoke CD disc
CD-ROM Area Data like programs, graphics, sound, etc. are written in this area. Since the data is written conforming to the logical format, the data can be load easily.
CD-S (CD Single) 8cm CD disc
DISC Physical disc. It is used to distinguish from the floppy disk. So-called CD media.
ISO9660 The international standard that is used for the logical format of CD-ROM.
MEGA-CD CD-ROM drive for MEGA-drive. MEGA-CD is used to supply game programs or the like via CD-ROM disc.
P CODE The data in P channel of the Subcode. P code conforms to "RED BOOK" and indicates the pause status.
Q CODE The data in Q channel of the Subcode. Q code conforms to "RED BOOK" and used for absolute time, relative time, song number, etc.
RED BOOK, YELLOW BOOK The specification about the physical format of CD-DA and CD-ROM.
MEGA-CD DISC FORMAT Logical format for MEGA-CD conforming to ISO9660.
TOC Table of contents
SUB-CODE Sub-code is the data written in a gap between the CD data. 1 sector has 96 bytes. Each bit corresponds to P-W channel.
SECTOR One sector is made up of one frame or 2048 bytes (2336 bytes for mode 2). This is the standard unit to read CD-ROM data.
ABSOLUTE TIME Absolute time applies the address on DISC. Data is written continuously in unit of minutes, seconds and frame. Program area is accessed according to the absolute time.
TRACK Track is the recording area for a song defined in the CD-DA. The length is changable. 1 to 99 (decimal system) track can be used to write. Track No. 0 is used to write the TOC information of read in area.
VOLUME Volume means all the data written in a DISC.
VOLUME SET Volume set means all the data written in DISCS if the series of data is written in more than one DISC.
(document page 18)
System ID area serves to identify a SEGA disc and gives boot up information SEGA. (Also see Fig. A-2)
Disc identifier to identify MEGA-CD discs. This is used to distinguish the MEGA-CD disc from other CD-ROM discs and audio CD discs. The booting programs check the installed disc.
Identifier "SEGADISCSYSTEM" means a SEGA system disc, and Identifier "SEGADATADISC" means a data disc.
This is MEGA-CD Disc Format formatted and contains the booting program. The file system can be used.
This is MEGA-CD Disc Format formatted and contains no booting program. The file system can be used.
Disc names in ASCII code.
The version number is indicated here in 4-digit BCD notation. $00 to $99 are used in the pre-released version (write-once disc) while $100 is used in the first released version.
The medium type is indicated. The CD-ROM is read-only. (Bit0=1, other bits are set to 0.)
Name and version for identifying the system programs.
│ bit31,30 │ 29 ←──────→ 11 │ 10 ←────────────→ 0 │
● IP address │ 0 │ 0 │ $200 │
● SP address │ 0 │ Sector #2 │ Lower 11-bits: 0 │
| Field | Value |
|---|---|
| ● IP load size | Load size : (Usually $600) |
| ● SP load size | Load size : (Usually $7800) |
| ● IP entry address | Program start offset address |
| ● SP entry address | Program start offset address |
| ● IP work RAM size | Required work RAM size in bytes |
| ● SP work RAM size | Required work RAM size in bytes |
Handwritten annotation in the scan:
$7200is written beside the SP load size line, correcting "Usually$7800". The appended Tech Bulletin (below) confirms$7800is wrong and should be$7200.
※ IP : Initial program ※ SP : System program
(document page 19)
$04 $08 $0C
$000 ┌──────────────────────────────────────────────────────────┐
│ DISC attribute │
$010 ├──────────────────────────────────┬───┬────────┬──────────┤
│ Volume name │ 0 │ Volume │ Volume │
$020 ├──────────────────────────────────┼───┤ System │ Type │
│ System name │ 0 │ System │ 0 │
$030 ├───────────┬──────────────┬───────┴───┤ VER. │ │
│ IP address│ size of IP │ entry address of IP│ size of │
│ │ load │ │ IP work │
$040 ├───────────┼──────────────┼────────────────────┤ RAM │
│ SP address│ size of SP │ entry address of SP│ size of │
│ │ load │ │ SP work │
$050 ├───────────┴──────────────┴────────────────────┤ RAM │
│ system reservation area │ 176 BYTE │
$0FF └───────────────────────────────────────────────┴──────────┘
The figure in the original is a byte-map table; the layout above reproduces the original's row boundaries ($000, $010, $020, $030, $040, $050, $0FF) and column boundaries ($04, $08, $0C). "176 BYTE" labels the size of the system reservation area.
(document page 20)
DISC ID serves to manage the quality of discs as products and to test products. The contents are managed by SEGA. (Also see Fig. A-3).
| Platform | String |
|---|---|
| For the MEGA DRIVE | 'SEGA MEGA DRIVE' |
| For the GENESIS | 'SEGA GENESIS' |
Input '(C)' and four characters for company name or company code here.
| Developer | Format |
|---|---|
| Intercompany or outside developer | (C) SEGA |
| Third party developer | (C) T-XX (Company code) |
GM (Game), AI (Educational) — Example: 'GM T-12345 -00'
Product codes are pre-designated for each game. Version numbers increase with every change that is made following the initial release of a game.
● The control information identifies the type(s) of I/O device(s) used to support game-play. The control information codes (ASCII) are as follows:
| Device | Code |
|---|---|
| Master System Joystick | O |
| MEGA Drive (Genesis) Joystick | J |
| Keyboard | K |
| Serial I/O (RS232C) | R |
| Printer | P |
| Tablet | T |
| Trackball | B |
| Paddle controller | V |
| Analog joystick | A |
| Mouse | M |
'MO', 'Company code', 'xx,y', 'zz'
| Field | Meaning |
|---|---|
| xx | Game No. |
| y | Version No. |
| zz | Modem info |
| zz | Region | Note |
|---|---|---|
| 10 | Only Japan | With Mike |
| 30 | Only Overseas | With Mike |
| 50 | Japan & Overseas | With Mike |
(document page 21)
| Region | Code |
|---|---|
| Japan | J |
| USA | U |
| Europe | E |
Prohibited to use.
100H ┌──────────────────────────────────────────────┬───────────────┐
│ Hardware designation │ │
110H ├──────────────────────────────────────────────┴───────────────┤
│ Company code, Date │
120H ├──────────────────────────────────────────────────────────────┤
│ Domestic game title │
150H ├──────────────────────────────────────────────────────────────┤
│ Overseas game title │
180H ├──────────────────────────────────────┬───────────────────────┤
│ Disc type, Product No., Version │ Space │
190H ├──────────────────────────────────────┴───────────────────────┤
│ I/O info │
1A0H ├──────────────────────────────────────────────────────────────┤
│ Space │
1B0H ├──────────────────────────────────────┬───────────────────────┤
│ Space │ Modem info │
1C0H ├──────────────────┬───────────────────┴───────────────────────┤
│ Modem info │ Space │
1D0H ├──────────────────┴───────────────────────────────────────────┤
│ Space │
1F0H ├──────────────────────────────────────────────────────────────┤
│ Regional compatibility │
1FFH └──────────────────────────────────────────────────────────────┘
(document page 22)
The shift codes in Figure A-4 are used for kanji character codes.
(1st byte) (2nd byte)
00 20 21 40 60 7E 80 A0 C0 E0 FF
00 ┌────┬─┬──────────────────┬─┬────────────────────────────┐
│ ↓ Kanji space = 2020 │
21 │ ┌─┐ │
│ └─┘ │
│ ┌────────────────┐ │
40 │ │ 2121 │ │
│ │ │ │
5E │ │ │ │
5F │ │ JIS code │ │
60 │ │ │ │
│ │ │ │
7E │ │ 7E7E │ │
80 │ └────────────────┘ │ 80
│ Space code │ 81
│ = 8140 → ┌──────────┐ ┌───────────────────────┐ │
│ │ 8140 │ │ 8180 │ │
A0 │ │ 9F7E │ │ 9FFC │ │ 9F
│ └──────────┘ └───────────────────────┘ │
C0 │ ↑ │
│ Shift JIS code │
│ ↓ │
E0 │ ┌──────────┐ ┌───────────────────────┐ │ E0
│ │ E040 │ │ E080 │ │
│ │ FC7E │ │ FCFC │ │ FC
FF └────────────┴──────────┴───┴───────────────────────┴────┘ FF
40 7E 80 FC FF
7E
→ control code (without DEL)
| Area | Ranges |
|---|---|
| 1 byte code area | 20-7E, A0-E0 |
| 2 byte code area | 2020, 2121-7E7E8140-9F7E, 8180-9FFCE040-FC7E, E080-FCFC |
(scan pages 25–26; not part of the numbered specification. Handwritten "Rex Sabio" appears at the top of the first page.)
SEGA-CD TECH BULLETIN
| To: | Sega-CD Developers |
| From: | S. Bayless |
| Date: | 6/16/92 |
| CC: | J. Huether, T. Reuterdahl |
| Subject: | The U.S. BIOS |
Although you haven't seen it yet, SOJ is currently revising the BIOS for the U.S. market. While most of the changes are cosmetic, there are a couple that aren't.
The block of code that puts up the Sega logo, prints a copyright message and plays the little "Segaaa" sound bite has been changed significantly. This has two effects. First, you'll be getting an assembly language file with a bunch of DC.B's in it which you'll need to put at the beginning of your IP before the new ROM will accept it. Second, you'll need to change the values stored in the ID Block of your boot sector.
Because the security code has gotten quite a bit bigger, you'll almost certainly have to change your System ID to handle an IP larger than $600 bytes. The "normal" System ID shown on pages 18 and 19 of the Mega-CD Disk Format Manual shows the IP and SP addresses like this:
;Disk Address,Load Size,Entry Offset,Work RAM
DC.L $00000200,$00000600,$00000000,$00000000 ;IP
DC.L $00000800,$00007800,$00000000,$00000000 ;SPNote that IP starts at $200, which is just past the ID Blocks, and SP starts at $800 which is the beginning of Sector 1. (Remember, each sector is $800 bytes long.) Incidentally, the $7800 in the manual is wrong. It should be $7200, since it's intended equal the number of bytes remaining between the end of IP and the end of sector 15.
With the new security code, IP spills over into Sector 2 and the new System Area structure (see page 6 of the Mega-CD Disk Format Manual) looks like this:
$000000 System ID Sector #0 Boot Sector
$000100 Disc ID
$000200 IP Code
────────────────────────────────────────────────────
$001000 SP Code Sector #1~#15 SP Sector
$008000 VD Data Area
Directory
Path Table
User File 0
User File 1
:
The original BIOS seems to have been hard wired for an IP that stayed within sector 0, so you have to kind of lie to it when IP gets bigger than that. According to SOJ, the value in the IP Start field should point to the beginning of the first byte in IP after the first $600 bytes. This would mean that you'd always use $800 (since anything smaller would fit in sector 0 and you wouldn't have to mess with any of this in the first place). It also implies that IP can't extend beyond the end of sector 1, but I haven't confirmed that yet.
The value in the IP Load Size field should be equal to the size of IP − $600. In my first attempt with this, I just padded IP out to the end of sector 1, so the length I used was $800, which translates to "load the whole sector".
Finally, you'll need to change the SP Start field to reflect the fact that it now begins in the next sector. The value here should be $1000, i.e. the beginning of sector 2. You may also want to change the SP Load Size field to reflect its smaller maximum size, assuming you pad the thing out like some people do.
So, the new "normal" System ID would contain entries that looked something like this:
;Disk Address,Load Size,Entry Offset,Work RAM
DC.L $00000800,$00000800,$00000000,$00000000 ;IP
DC.L $00001000,$00007000,$00000000,$00000000 ;SPSource: Mega-CD_Disc_Format_Specifications.pdf (SegaRetro, revision 20190509114738), 26 pages, image-only scan. Transcribed by OCR + manual verification.