Japanese
PROGRAMMER'S GUIDESupplementary explanation of CD builder script grammar
Back | ■
CD builder script grammar supplementary explanation


5. Script writing example

An example of how to determine the disk configuration using a script is shown below. The exact notation method for output file names, etc. used for parameters is defined in the already published manual. For example, if it is an output file name, it simply means writing the output file name.

<> opt indicates that it can be omitted, { | } indicates an option, and the following indicates a comment.


●Sample script for CD-ROM (MODE1+CD-DA) disk
Disc             OutputFileName
Session          CDROM        <OutputFileName>opt
LeadIn           MODE1
EndLeadIn
;
<SystemArea MSDOSFileName>opt
;
Track         MODE1
    Volume    ISO9660        OutputFileName
    PrimaryVolume    0:2:16
              <PVD definition line>opt                           ;‥‥‥(1)
    EndPrimaryVolume
    <SupplementaryVolume    RelativeTime>opt
              <SVD definition line>opt                           ;‥‥‥(2)
    <EndSupplementaryVolume>opt
    <BootRecord             RelativeTime>opt
              <boot record definition line>opt                 ;‥‥‥(3)
    <EndBootRecord>opt
    EndVolume
;
    File      ISO9660FileName    <OutputFileName>opt
              <file definition line>opt                    ;‥‥‥(4)
    FileSource               InputFileName
              <file source definition line>opt                 ;‥‥‥(5)
    EndFileSource
    EndFile
    ;
    ;        File 〜 EndFile
    ;
    PostGap   75
EndTrack
;
Track         CDDA
    Pause     150
    FileSource               InputFileName
              <file source definition line>opt                ;‥‥‥(5)
    EndFileSource
EndTrack
;
;    Track 〜 EndTrack
;
;
LeadOut        CDDA
Empty          300
EndLeadOut
EndSession
EndDisc


-Sample script for CD-ROM XA (MODE1+MODE2+CD-DA) disc
Disc            OutputFileName
Session         SEMIXA          <OutputFileName>opt
LeadIn          MODE1
EndLeadIn
;
<SystemArea    MSDOSFileName>opt
;
Track          MODE1
    Volume    ISO9660          OutputFileName
    PrimaryVolume              0:2:16
              <PVD definition line>opt                ;‥‥‥(1)
    EndPrimaryVolume
    <SupplementaryVolume    RelativeTime>opt
              <SVD definition line>opt                ;‥‥‥(2)
    <EndSupplementaryVolume>opt
    <BootRecord              RelativeTime>opt
              <boot record definition line>opt             ;‥‥‥(3)
    <EndBootRecord>opt
    EndVolume
;
    FileISO9660FileName    <OutputFileName>opt
              <file definition line>opt                ;‥‥‥(4)
    File    Source              InputFileName
              <file source definition line>opt             ;‥‥‥(5)
    EndFileSource
    EndFile
    ;
    ;          File 〜 EndFile
    ;
    PostGap          75
EndTrack
;
Track          MODE2
    PreGap          150
    File            ISO9660FileName    <OutputFileName>opt
;Example of channel interleaving using SectorRate rows
    SectorRate          <Positive integer>opt          ;Required when defining MPEG
    MpegMultiplex             <OutputFileName>opt
          <RealTime>opt                    ;When specifying DATA in MpegStream line
          MpegStream          SourceFileName          { AUDIO | VIDEO | DATA}
          BitRate             BitRate               <sequence number>opt
          <DataType          { FORM1 | FORM2 }>opt          ;In the MpegStream line
          <MpegFlush>opt                                            When specifying DATA
          EndMpegStream
          MpegStream          SourceFileName          { AUDIO | VIDEO | DATA}
              :
          EndMpegStream
    EndMpegMultiplex
    EndFile

    File              ISO9660FileName    <OutputFileName>opt
;Example of channel interleaving using UnitSize and GapSize lines
    Channel                    ChannelNumber
          FileSource           InputFileName
          UnitSize             UnitSize
          GapSize              GapSize
          :
          EndFileSource
    EndChannel
    Channel                    ChannelNumber
          FileSource           InputFileName
          UnitSize             UnitSize
          GapSize              GapSize
          :
          EndFileSource
    EndChannel
    EndFile
    Extent          <RelativeTime>opt
          FileInterleave    UnitSize          GapSize
          File              ISO9660FileName       <OutputFileName>opt
          FileSource              InputFileName
          EndFileSource
          EndFile
          EndFileInterleave
          FileInterleave    UnitSize          GapSize
          File              ISO9660FileName       <OutputFileName>opt
          FileSource              InputFileName
          EndFileSource
          EndFile
          EndFileInterleave
    EndExtent
    Directory          DirectoryName
    <directory attribute definition>opt
          Directory    DirectoryName
          File              ISO9660FileName        <OutputFileName>opt
          FileSource              InputFileName
          EndFileSource
          EndFile
          EndDirectory
    EndDirectory
PostGap          75
EndTrack
;
Track          CDDA
    Pause    150
    FileSource          InputFileName
              <file source definition line>opt              ;‥‥‥(5)
    EndFileSource
EndTrack
;
;    Track 〜 EndTrack
;
LeadOut        CDDA
Empty          300
EndLeadOut
EndSession
EndDisc


(1).PVD definition line

<SystemIdentifier                    A identifier>opt
<VolumeIdentifier                    D identifier>opt
<LogicalBlockSize                    Number of blocks>opt
<OptionalLPath>opt
<OptionalMPath>opt
<VolumeSetIdentifier                 D identifier>opt
<PublisherIdentifier                 A identifier>opt
<DataPreparerIdentifier              A identifier>opt
<ApplicationIdentifier               A identifier>opt
<CopyrightFileIdentifier             D+ identifier>opt
<AbstractFileIdentifier              D+ identifier>opt
<BibliographicFileIdentifier         D+ identifier>opt
<VolumeCreationDate                  date>opt
<VolumeModificationDate              date>opt
<VolumeExpirationDate                date>opt
<VolumeEffectiveDate                 date>opt
<ApplicationUse                      MS-DOS file name>opt


(2).SVD definition line

<SystemIdentifier                    A identifier>opt
<VolumeIdentifier                    D identifier>opt
<LogicalBlockSize                    Number of blocks>opt
<EscapeSequences                     Kanji code>opt
<OptionalLPath>opt
<OptionalMPath>opt
<VolumeSetIdentifier                 D identifier>opt
<PublisherIdentifier                 A identifier>opt
<DataPreparerIdentifier              A identifier>opt
<ApplicationIdentifier               A identifier>opt
<CopyrightFileIdentifier             D+ identifier>opt
<AbstractFileIdentifier              D+ identifier>opt
<BibliographicFileIdentifier         D+ identifier>opt
<VolumeCreationDate                  date>opt
<VolumeModificationDate              date>opt
<VolumeExpirationDate                date>opt
<VolumeEffectiveDate                 date>opt
<ApplicationUse                      MS-DOS file name>opt


(3).Boot record definition line

<BootSystemIdentifier                A identifier>opt
<BootIdentifier                      A identifier>opt


(4).File definition line

<BeginTimeS              RelativeTime>opt
<EndTimeS                RelativeTime>opt
<Attributes              { HIDDEN | NOHIDDEN }{ RECORD | NOTRECORD }>opt
<RecordingDate           date>opt
<MinLength               { number of bytes | Number of sectors } >opt
<Trigger                 RelativeTime>opt
<Eors                    RelativeTime>opt
<Pack>opt
<SectorRate              { Positive production value } >opt
<FileNo                  file number>opt      ;1 〜 255
<BeginTimeE              { RelativeTime | + } >opt
<EndTimeE                { RelativeTime | - } >opt
<SameName                directory name file name>opt
<SysOwnerID              number string>opt
<SysReadAttributes       { OWNER | NOTOWNER }{ GROUP | NOTGROUP }
                         { WORLD | NOTWORLD }>opt
<SysExecuteAttributes    { OWNER | NOTOWNER }{ GROUP | NOTGROUP }
                         { WORLD | NOTWORLD }>opt


(5).File source definition line

<SubHeader>opt
<Offset input position   input length>opt
<BitRate                 bit rate  <sequence number>opt >opt
<UnitSize                unit size>opt
<GapSize                 gap size>opt
<RealTime>opt
<BeginTimeF              { RelativeTime | + } >opt
<EndTimeF                { RelativeTime | - } >opt
<DataType                { FORM1 | FORM2 }>opt
<AutoEOR>opt
<CodingInformation       Coding information>opt
<SourceType              {  MONO_A | MONO_B | MONO_C | STEREO_A | STEREO_B |
                                       STEREO_C | CDDA | AUDIO | ISO11172 | MPEG_VIDEO |
                                       VIDEO | DATA  } >opt
                                               ;Valid only when MODE2 is specified in the Track line
<SubSource               file name>opt
<SubEmpty                Number of blocks>opt


Back | ■
PROGRAMMER'S GUIDESupplementary explanation of CD builder script grammar
Copyright SEGA ENTERPRISES, LTD. 1997