PROGRAMMER'S GUIDECD builder script grammar
BackForward
CD Builder Script Grammar Manual

2. Script overview


2.1 Disk structure and script

A CD-ROM has a physical structure consisting of discs, sessions, and tracks. Furthermore, the tracks are divided into two types (MODE1 / MODE2) data tracks and CDDA tracks due to the difference in sector structure.
The Sega Saturn disc standard defines the first track as the MODE1 track for compatibility. Logical structures such as volume descriptors and directory records are recorded on this first track (volume descriptor track).
The interleaved file is recorded on the MODE2 track after the second track.

Figure 2.1 shows the correspondence between the disk structure and the script.

Figure 2.1 Correspondence between disk structure and script

Physical Structure Logical Structure Script ─┬─┬─────┐── Disc │ │ │ ┌──────────┐ Session │ │ │ │ Volume Descriptor │ Track MODE1 │ │ │ └──────────┘ Volume │ │ │ ┌──────────┐ Directory │ │ MODE1 │ │ Directory record │ Directory │ │ Truck │ └──────────┘ ・ │ │ │ ・ │ │ │ ┌──────────┐ File │ │ │ │ File ├ ┐ File │ │ │ └┬─────────┘│ ・ │ │ │ └──────────┘ ・ │ ├─────┤── Track MODE2 │ │ MODE2 │ ┌──────────┐ Extent De │ │ Track │ │ Interleave File ├┐ File Interleave │ │ │ └ ┬ ─────────┘│ ・ │ ├─────┤┐└──────────┘ ・ │N │ ・ │ │ ┌──────────┐ Mpeg Multiplex │ │ ・ │ │ │ MPEG stream ├┐ MpegStream │ │ ・ │ │ └┬─────────┘│ ・ │ │ ・ │ └ └ ──────────┘ ・ │ │ ・ │ │ ├─────┤ Track CDDA │ │ CDDA │ │ │ truck │ │ ├─────┤ Track CDDA │ │ CDDA │ ・ │ │ Truck │ ・ ├─┼─────┤ ・ Central League ・ ・ │ │ ・ │ │ NS ·  │ │ ・ │ │ Hmm ·  ─ ┴ ┴ ─ ─ ┘

* Currently, multi-session is not supported.

2.2 Script description example

An example of script description is shown below.

(1) MODE1 track + CDDA track

  Disc SAMPLE1.DSK
  Session CDROM   
  LeadIn MODE1
  EndLeadIn   
  ;               
  SystemArea IP.BIN                           
  ;                                               
      Track MODE1; 1st track Volume ISO9660 SAMPLE1.PVD; Volume definition (Note)
              PrimaryVolume 0: 2: 16             
                  SystemIdentifier "SAMPLE1"   
              EndPrimaryVolume                    
          EndVolume; File definition File FILE1.DAT; 1                        
              FileSource FILE1.DAT; File Source Definition EndFileSource
          EndFile
  ;::
  ;::
  ;::
          PostGap 75
      EndTrack
  ;
      Track CDDA; 2nd track Pause 150; Pause 2 seconds FileSource SOUND.DAT                    
          EndFileSource                           
      EndTrack                                    
  ;                                               
  LeadOut CDDA                                
      Empty 300                               
  EndLeadOut                                  
  EndSession                                      
  EndDisc                                         

note)
For the volume descriptor of the Sega Saturn disk, refer to Appendix B of the "DISC Format Standard Specification ".

(2) MODE1 track + MODE2 track + CDDA track

  Disc SAMPLE2.DSK
  Session SEMIXA
  LeadIn MODE1
  EndLeadIn
  ;
  SystemArea IP.BIN
  ;
      Track MODE1; 1st track Volume ISO9660 SAMPLE2.PVD            
              PrimaryVolume 0: 2: 16           
                  SystemIdentifier "SAMPLE2" 
              EndPrimaryVolume                  
          End Volume                             
          File FILE1.DAT; 1                      
              FileSource FILE1.DAT              
              EndFileSource                     
          EndFile                               
  ;::                                   
  ;::                                   
          PostGap 75                            
      EndTrack                                  
  ;                                             
      Track MODE2; 2nd track PreGap 150
          Extent; 3 files interleaved FileInterleave 1 2; 1 sector placed and 2 gaps File INTFILE1.DAT; 1             
                      FileSource INTFILE1.DAT     
                      EndFileSource               
                  EndFile                         
              EndFileInterleave                   
              FileInterleave 1 2; 1 sector placed and 2 gaps File INTFILE2.DAT; 1             
                      FileSource INTFILE2.DAT     
                      EndFileSource               
                  EndFile                         
              EndFileInterleave                   
              FileInterleave 1 2; 1 sector placed and 2 gaps File INTFILE3.DAT; 1             
                      FileSource INTFILE3.DAT     
                      EndFileSource               
                  EndFile                         
              EndFileInterleave                   
          EndExtent                               
          PostGap 75
      EndTrack                                    
  ;                                               
      Track CDDA; 3rd Track Pause 150                               
          FileSource SOUND.DAT                    
          EndFileSource                           
      EndTrack                                    
  ;                                               
  LeadOut CDDA                                    
      Empty 300                                   
  EndLeadOut                                      
  EndSession                                      
  EndDisc


BackForward
PROGRAMMER'S GUIDECD builder script grammar
Copyright SEGA ENTERPRISES, LTD ,. 1997