Electronic Arts SCxl

From MultimediaWiki
Jump to navigation Jump to search

SCxl is an audio stream format used in various games published by companies under the Electronic Arts umbrella.

Chunk Types

See Electronic Arts Formats for file format description.

SCHl or SHEN

Header. Contains special Patch record, describes all vital audio parameters.

PATl patch

Used in very old files.

  • PATl block
 offset type   description
     0  byte   Tag, "PATl"

TODO

  • TMpl block
 offset type   description
     0  byte   Tag, "TMpl"
     4  byte   Version, 0
     5  byte   Sample width (bits)
     6  byte   Channels
     7  byte   ?
     8  byte   ?
     9  byte   ?
     A  int16  Frequency
     C  int32  ?
    10  int32  ?
    14  int32  ?
    18  int32  ?

PT patch

 offset type   description
     0  byte   Tag, should be 'PT'
     2  int16  Platform identifier
                0x00  PC
                0x03  Macintosh
                0x05  Playstation 2
                0x06  Game Cube
                0x07  Xbox
                0x09  Xenon (Xbox 360)
                0x0A  PSP
     4  ...    Patch substream
Default Audio Format
  • 16 bits
  • Mono
  • 22050 kHz
  • XA compression

GSTR patch

 offset type   description
     0  byte   Tag, should be 'GSTR'
     4  int32  Unknown, presumably version or platform id
     8  ...    Patch substream
Default Audio Format
  • 16 bits
  • Mono
  • 48000 kHz
  • XA compression


Patch substream

Patch substream consist of a series of small chunks, tagged with unique byte identifiers. General substream format is:

Tag[, Length, Data][, ...]
  • Tag is an unique identifier of the data. Several tags doesn't contain any data, thus, has no Length and Data fields.
  • Length is a single byte, unless it's value is 0xFF. In this case, extra 4-bytes value of the actual length follows, stored in big-endian order.
  • Data is a big-endian number of Length bytes total, meaning is specific to particular Tag.

Note, that patch substream may not include various tags/values or even be completely empty at all. In this case default audio parameters is used (listed above).

Known patch tags

  • 0x00 - Unknown
  • 0x05 - Unknown
  • 0x0B - Unknown
  • 0x13 - Unknown
  • 0x1B - Frame rate
  • 0x80 - Compression version.
         0x01   EA XA ADPCM R1
         0x02   EA XA ADPCM R2
         0x03   EA XA ADPCM R3
  • 0x82 - Number of channels.
  • 0x83 - Compression type.
         0x00   PCM Signed Interleaved Data
         0x07   EA XA ADPCM
         0x09   Unknown
  • 0x84 - Sample rate (Hertz).
  • 0x85 - Total count of samples in the stream.
  • 0x86 - Loop offset
  • 0x87 - Loop length
  • 0x88 - Data offset (relevant only to Electronic Arts Bank Format)
  • 0x8A - End of the format description substream. No data.
  • 0x8C - Unknown
  • 0x92 - Bytes per sample
  • 0x9C - Unknown
  • 0x9D - Unknown
  • 0xA0 - Compression type.
         0x00*  PCM Signed 16-bit Interleaved (LE)
         0x01*  PCM Signed 16-bit Interleaved (BE)
         0x02*  PCM Signed 8-bit Interleaved
         0x04   MicroTalk 10:1
         0x05*  VAG ADPCM
         0x07*  PCM Signed 16-bit Planar (BE)
         0x08   PCM Signed 16-bit Planar (LE)
         0x09   PCM Signed 8-bit Planar
         0x0A   EA XA ADPCM
         0x0B*  PCM Unsigned 8-bit Interleaved
         0x0C*  CD XA
         0x0E*  MPEG Layer 1
         0x0F   MPEG Layer 2
         0x10   MPEG Layer 3
         0x12*  Game Cube ADPCM
         0x13*  PCM Signed 24-bit Interleaved (LE)
         0x14*  XBOX ADPCM
         0x15*  PCM Signed 24-bit Interleaved (BE)
         0x16   MicroTalk 5:1
         0x17   EALayer3
* Denotes codec supported by Electronic Arts Sound eXchange, but has not yet been observed in a computer game.
  • 0xFC, 0xFD - Begin the format description portion of substream. No data.
  • 0xFE - Begin of the envelope portion of substeam. No Data.
  • 0xFF - End of substream. No data.

SCCl or SCEN

Holds single 4-byte value, indicates total number of SCDl or SDEN chunks in the stream.

SCDl or SDEN

Data. Actual audio data in format, specified by SCHl or SHEN chunk.

SCLl

Loop.

SCEl or SEEN

End. Indicates end of the stream. Contains no data.