An 8SVX file is an IFF file. IFF, Electronic Arts’ Interchange File Format of 1985, is a run of chunks, each an ID, a size and data. All numbers in the file are big-endian, the byte order of the Amiga’s Motorola 68000 processor.
Chunk
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | ID | ckID | four ASCII characters that name the chunk |
| 4 | 4 | s32 | ckSize | the number of data bytes that follow, not counting this header or the pad byte |
| 8 | ckSize | bytes | ckData | the chunk’s data |
| … | 0 or 1 | byte | pad | a zero byte after data of odd length, so the next chunk starts on an even offset |
A reader treats ckSize as the end of the chunk, even when the chunk is
shorter or longer than it expects. It skips chunks it does not recognise by
ckSize, rounded up to an even number.
Chunk IDs
An ID is four characters from space (0x20) to tilde
(0x7E). It may end in spaces but may not start with them, and no control
characters are allowed. IDs are compared as exact 32-bit values, so case matters. A
form type, such as 8SVX, may not contain lower-case letters or
punctuation.
| Reserved ID | Meaning |
|---|---|
FORM | a form: a typed group of chunks |
LIST | a list of forms, which can share properties |
CAT | a concatenation of forms |
PROP | shared properties, inside a LIST |
| four spaces | filler |
LIS1–LIS9, FOR1–FOR9, CAT1–CAT9 | reserved for later versions of the group chunks |
The FORM chunk
A file is usually a single FORM chunk. Its data starts with the form type
and continues with the local chunks. Unlike every other chunk, the form type counts
towards ckSize, so the size of the form is the file length minus 8.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | ID | ckID | FORM |
| 4 | 4 | s32 | ckSize | the size of everything after this field |
| 8 | 4 | ID | formType | 8SVX |
| 12 | … | chunks | local chunks | the chunks below, in the order described |
A FORM may also contain nested FORM, LIST and
CAT chunks. A LIST can hold PROP 8SVX chunks,
which give properties shared by the forms in the list, so a bank of sounds need not
repeat them. PROP chunks may not appear directly inside a
FORM.
Order of chunks
The 1985 specification defines these chunks and these rules:
| Chunk | Required | Position | Page |
|---|---|---|---|
VHDR | yes | before BODY | Voice header |
NAME, (c) , AUTH | no | before BODY, in any order | Other chunks |
ANNO | no | anywhere, more than once | Other chunks |
ATAK, RLSE | no | anywhere | Other chunks |
BODY | yes | after the properties above | Sample data |
A repeated property chunk is redundant, and only the last one counts. The later
stereo and looping chunks are registered additions:
CHAN, PAN , SEQN and FADE; see
Other chunks. Their
registrants list the order as CHAN, SEQN, FADE
and then BODY.
Example
The first 12 bytes of a file whose form holds 8,036 bytes after this size field:
| Offset | Bytes | Meaning |
|---|---|---|
| 0 | 46 4F 52 4D | FORM |
| 4 | 00 00 1F 64 | size 8,036 |
| 8 | 38 53 56 58 | 8SVX |