Japanese
PROGRAMMER'S GUIDECD Builder Script Grammar
BackForward
CD Builder Script Grammar Manual

2. Script overview


2.1 Disk structure and scripts

A CD-ROM has a physical structure consisting of discs, sessions, and tracks. Tracks are further divided into two types (MODE1/MODE2): data tracks and CDDA tracks, based on differences in sector structure.
For compatibility, the Sega Saturn Disc standard stipulates that the first track is the MODE1 track. Logical structures such as volume descriptors and directory records are recorded on this first track (volume descriptor track).
Interleaved files are recorded on the MODE2 track starting from the second track.

Figure 2.1 shows the correspondence between disk structure and script.

Figure 2.1 Correspondence between disk structure and script

Physical Logical Script structure structure ─┬─┬─────┐── Disc │ │ │ ┌─────────────────┐ Session │ │ │ │Volume descriptor│ Track MODE1 │ │ │ └─────────────────┘ Volume │ │ │ ┌─────────────────┐ Directory │ │MODE1│ │Directory record │ Directory │ │Track│ └─────────────────┘ ・ │ │ │ ・ │ │ │ ┌─────────────────┐ File │S│ │ │File ├┐ File │ │ │ └┬────────────────┘│ ・ │E│ │ └─────────────────┘ ・ │ ├─────┤── Track MODE2 │S│MODE2│ ┌─────────────────┐ Extent D│ │Track│ │Interleave file ├┐ FileInterleave │S│ │ └┬────────────────┘│ ・ I│ ├─────┤┐ └─────────────────┘ ・ │I│ . ││┌─────────────────┐ MpegMultiplex S│ │ . │││MPEG Stream ├┐ MpegStream │O│ . ││└┬────────────────┘│ ・ C│ │ . │└ └─────────────────┘ ・ │N│ . │ │ ├─────┤ Track CDDA │ │CDDA │ │ │Track│ │ ├─────┤ Track CDDA │ │CDDA │ ・ │ │Track│ ・ ├─┼─────┤ ・ S . ・ │E│ . │ S . │S│ . │ I . │O│ . │ N . ─┴ ┴ ─ ─ ┘

* Currently does not support multi-session.

2.2 Script writing 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                ; Defining a file source
              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 information on Sega Saturn Disc volume descriptors, please refer to Appendix B of the " DISC Format Standard Specifications ".

(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                  
          EndVolume                             
          File FILE1.DAT;1                      
              FileSource FILE1.DAT              
              EndFileSource                     
          EndFile                               
  ;         :                                   
  ;         :                                   
          PostGap 75                            
      EndTrack                                  
  ;                                             
      Track MODE2                             ; 2nd track
          PreGap 150
          Extent                              ; Interleave 3 files
              FileInterleave 1 2              ; Place 1 sector and 2 gaps
                  File INTFILE1.DAT;1             
                      FileSource INTFILE1.DAT     
                      EndFileSource               
                  EndFile                         
              EndFileInterleave                   
              FileInterleave 1 2              ; Place 1 sector and 2 gaps
                  File INTFILE2.DAT;1             
                      FileSource INTFILE2.DAT     
                      EndFileSource               
                  EndFile                         
              EndFileInterleave                   
              FileInterleave 1 2              ; Place 1 sector 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