Difference between revisions of "BRSAR (File Format)"
AlmostTWD98 (talk | contribs) m (Fixed errors.) |
|||
Line 7: | Line 7: | ||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
!Offset !! Type !! Description | !Offset !! Type !! Description | ||
|- | |- | ||
Line 46: | Line 46: | ||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 67: | Line 67: | ||
==== SYMB File Name Table ==== | ==== SYMB File Name Table ==== | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 78: | Line 77: | ||
==== SYMB Mask Table ==== | ==== SYMB Mask Table ==== | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 95: | Line 93: | ||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 121: | Line 119: | ||
|- | |- | ||
| 0x2C || UInt32 || Offset to the group table. | | 0x2C || UInt32 || Offset to the group table. | ||
− | |- | + | |- |
| 0x30 || UInt32 || {{Unknown|'''Unknown.''' Always 0x01000000.}} | | 0x30 || UInt32 || {{Unknown|'''Unknown.''' Always 0x01000000.}} | ||
|- | |- | ||
| 0x34 || UInt32 || Offset to the Sound Count table. | | 0x34 || UInt32 || Offset to the Sound Count table. | ||
− | |- | + | |- |
| 0x38 || colspan=2 {{Unknown|End of header}} | | 0x38 || colspan=2 {{Unknown|End of header}} | ||
− | |- | + | |- |
|} | |} | ||
==== Sound Data Table ==== | ==== Sound Data Table ==== | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 144: | Line 141: | ||
==== Sound Data Entry ==== | ==== Sound Data Entry ==== | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 205: | Line 201: | ||
==== Sound Data Subsection 2 ==== | ==== Sound Data Subsection 2 ==== | ||
− | |||
===== RSEQ ===== | ===== RSEQ ===== | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 226: | Line 220: | ||
===== RWSD ===== | ===== RWSD ===== | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 243: | Line 236: | ||
===== RSTM ===== | ===== RSTM ===== | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 258: | Line 250: | ||
==== Sound Data Subsection 3 ==== | ==== Sound Data Subsection 3 ==== | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 273: | Line 264: | ||
=== Soundbank Table === | === Soundbank Table === | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 286: | Line 276: | ||
=== Soundbank Entry === | === Soundbank Entry === | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 299: | Line 288: | ||
=== Player Info Table === | === Player Info Table === | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 318: | Line 306: | ||
=== Player Info Entry === | === Player Info Entry === | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 331: | Line 318: | ||
=== Collection Table === | === Collection Table === | ||
− | + | This section controls the BRSAR indexes shown in [[BrawlBox]]. | |
− | This section controls the BRSAR indexes shown in BrawlBox. | ||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 353: | Line 339: | ||
=== Collection Entry === | === Collection Entry === | ||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 377: | Line 363: | ||
==== Collection Position Table ==== | ==== Collection Position Table ==== | ||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 399: | Line 385: | ||
==== Collection Position Entry ==== | ==== Collection Position Entry ==== | ||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 409: | Line 395: | ||
=== Group Table === | === Group Table === | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 428: | Line 413: | ||
=== Group Data Entry === | === Group Data Entry === | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 465: | Line 449: | ||
==== Subsection 2 Entry ==== | ==== Subsection 2 Entry ==== | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
| 0x00 || UInt32 || Group index | | 0x00 || UInt32 || Group index | ||
− | |- | + | |- |
| 0x04 || UInt32 || Offset to the file, relative to the value at 0x14 of the main entry. | | 0x04 || UInt32 || Offset to the file, relative to the value at 0x14 of the main entry. | ||
|- | |- | ||
Line 477: | Line 460: | ||
|- | |- | ||
| 0x0C || UInt32 || Offset to the audio data, relative to the value at 0x1C of the main entry. | | 0x0C || UInt32 || Offset to the audio data, relative to the value at 0x1C of the main entry. | ||
− | |- | + | |- |
| 0x10 || UInt32 || Size of the audio data. | | 0x10 || UInt32 || Size of the audio data. | ||
|- | |- | ||
Line 484: | Line 467: | ||
=== Sound Count Table === | === Sound Count Table === | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 505: | Line 487: | ||
=== FILE === | === FILE === | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | |- | + | |- |
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
Line 517: | Line 498: | ||
|- | |- | ||
| 0x0C || – || File data | | 0x0C || – || File data | ||
− | |- | + | |- |
|} | |} | ||
Revision as of 22:31, 23 November 2021
The BRSAR (Binary Revolution Sound ARchive) format is used to store sound effects and some music. It is used in Mario Kart Wii, Super Smash Bros. Brawl, The Legend of Zelda: Skyward Sword and other games. An index list of the known values of the revo_kart.brsar file used in Mario Kart Wii can be found here.
File Header
The file begins with a header of size 0x40 bytes.
Offset | Type | Description |
---|---|---|
0x00 | String | File magic. RSAR in ASCII. |
0x04 | UInt16 | Byte order mark (BOM): The value is always 0xFEFF. If value 0xFFFE is read, then the false endian is used. Mario Kart Wii uses nearly always big endian (bytes 0xFE,0xFF). |
0x06 | UInt16 | Version of the file format. "revo_kart.brsar" uses 01 04. "HomeButtonSe.brsar" (used for the Home Menu) uses 01 01. |
0x08 | UInt32 | Length of the file. |
0x0C | UInt16 | Length of the header (always 0x40). |
0x0E | UInt16 | Number of sections. |
0x10 | UInt32 | Offset to the SYMB section. |
0x14 | UInt32 | Size of the SYMB section. |
0x18 | UInt32 | Offset to the INFO section. |
0x1C | UInt32 | Size of the INFO section. |
0x20 | UInt32 | Offset to the FILE section. |
0x24 | UInt32 | Size of the FILE section. |
0x28 | Byte[24] | Padding. |
0x40 | End of header |
Sections
Unless otherwise noted, offsets in each section are relative to the start of the section block, plus 0x8.
SYMB
The SYMB section consists of an FST-like data structure. It contains 3 header-less subsections.
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. SYMB in ASCII. |
0x04 | UInt32 | Size of the SYMB section. |
0x08 | UInt32 | Offset to file name table. |
0x0C | UInt32 | Mask table offset 1 |
0x10 | UInt32 | Mask table offset 2 |
0x14 | UInt32 | Mask table offset 3 |
0x18 | UInt32 | Mask table offset 4 |
0x1C | End of header |
SYMB File Name Table
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Number of entries (N) |
0x04 | UInt32[N] | Offset to file name |
SYMB Mask Table
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Unknown. Type of mask? |
0x04 | UInt32 | Number of entries |
SYMB Mask Entry
Information about this is unknown at this time.
INFO
The INFO section contain parameters about the sounds in a BRSAR.
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. INFO in ASCII. |
0x04 | UInt32 | Size of the INFO section. |
0x08 | UInt32 | Unknown. Always 0x01000000. |
0x0C | UInt32 | Offset to the sound data table. |
0x10 | UInt32 | Unknown. Always 0x01000000. |
0x14 | UInt32 | Offset to the soundbank table. |
0x18 | UInt32 | Unknown. Always 0x01000000. |
0x1C | UInt32 | Offset to the player info table. |
0x20 | UInt32 | Unknown. Always 0x01000000. |
0x24 | UInt32 | Offset to the collection table. |
0x28 | UInt32 | Unknown. Always 0x01000000. |
0x2C | UInt32 | Offset to the group table. |
0x30 | UInt32 | Unknown. Always 0x01000000. |
0x34 | UInt32 | Offset to the Sound Count table. |
0x38 | End of header |
Sound Data Table
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Number of entries (N) |
N * 8 + 0x04 | UInt32 | Unknown. Always 0x01000000. |
N * 8 + 0x08 | UInt32 | Offset to entry |
Sound Data Entry
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | File name index |
0x04 | UInt32 | File collection index |
0x08 | UInt32 | PlayerID |
0x0C | UInt32 | Unknown. Always 0x01000000. |
0x10 | UInt32 | Offset to third subsection. |
0x14 | Byte | Volume |
0x15 | Byte | PlayerPriority |
0x16 | Byte | SoundType:
|
0x17 | Byte | RemoteFilter |
0x18 | Byte | Unknown. |
0x19 | Byte | Section Control Type.
The value that you set this to determines what section's settings the entry will use:
|
0x1C | UInt32 | Offset to second subsection |
0x20 | UInt32 | UserParam1 |
0x24 | UInt32 | UserParam2 |
0x28 | Byte | PanMode:
|
0x29 | Byte | PanCurve:
|
0x2A | Byte | ActorPlayerID |
0x2B | Byte | Unknown. Padding? |
Sound Data Subsection 2
RSEQ
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | SeqLabelEntry |
0x04 | UInt32 | Soundbank index |
0x08 | Byte[3] | Unknown. |
0x0B | Byte | RSEQAllocTrack |
0x0C | Byte | SeqChannelPriority |
0x0D | Byte[7] | Unknown. Padding? |
RWSD
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | SoundDataNode |
0x04 | Byte[3] | Unknown. |
0x07 | Byte | RWSDAllocTrack |
0x08 | Byte | ChanelPriority |
0x09 | Byte[7] | Unknown. Padding? |
RSTM
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Start Position |
0x04 | UInt16 | AllocChannelCount |
0x06 | UInt16 | RSTMAllocTrack |
0x08 | UInt32 | Unknown. |
Sound Data Subsection 3
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Sound3DParam flags |
0x04 | Byte | DecayCurve |
0x05 | Byte | DecayRatio |
0x06 | Byte[6] | Unknown. |
Soundbank Table
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Number of entries (N) |
N * 8 + 0x04 | UInt32 | Unknown. Always 0x01000000. |
N * 8 + 0x08 | UInt32 | Offset to the entry |
Soundbank Entry
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | File name index |
0x04 | UInt32 | File collection index |
0x08 | UInt32 | Bank index |
Player Info Table
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Number of entries. |
0x04 | UInt32 | Unknown. Always 0x01000000. |
0x08 | UInt32 | Offset to the first entry. |
0x04 | UInt32 | Unknown. Always 0x01000000. |
0x08 | UInt32 | Offset to the second entry. |
... |
Player Info Entry
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | File name index |
0x04 | Byte | Playable Sound Count |
0x05 | Byte[11] | Unknown. Padding? |
Collection Table
This section controls the BRSAR indexes shown in BrawlBox.
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Number of entries. |
0x04 | UInt32 | Unknown. Always 0x01000000. |
0x08 | UInt32 | Offset to the first entry. |
0x04 | UInt32 | Unknown. Always 0x01000000. |
0x08 | UInt32 | Offset to the second entry. |
... |
Collection Entry
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Length of the RBNK, RSEQ, or RWAV file except the audio data. Length of the entire file for external files. |
0x04 | UInt32 | Length of the audio data. Null for RSEQ or external files. |
0x08 | Int32 | Entry number (always -1) |
0x0C | Byte | Enable next offset |
0x0D | Byte[3] | Padding |
0x10 | UInt32 | Offset to the external file name in the case of external files. Usually follows this structure if present. |
0x14 | Byte | Enable next offset |
0x15 | Byte[3] | Padding |
0x18 | UInt32 | Collection position table offset. Usually follows this structure if present. |
Collection Position Table
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Number of entries. |
0x04 | Byte | Enable next offset |
0x05 | Byte[3] | Padding |
0x08 | UInt32 | Offset to the first entry. |
0x0C | Byte | Enable next offset |
0x0D | Byte[3] | Padding |
0x10 | UInt32 | Offset to the second entry. |
... |
Collection Position Entry
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Group index |
0x04 | UInt32 | Index within group |
Group Table
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Number of entries. |
0x04 | UInt32 | Unknown. Always 0x01000000. |
0x08 | UInt32 | Offset to the first entry. |
0x04 | UInt32 | Unknown. Always 0x01000000. |
0x08 | UInt32 | Offset to the second entry. |
... |
Group Data Entry
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | File name index |
0x04 | UInt32 | Unknown. Always 0xFFFFFFF |
0x08 | Byte[8] | Unknown. Padding? |
0x10 | UInt32 | Offset to the RSEQ, RBNK, or RWSD file. |
0x14 | UInt32 | Size of the RSEQ, RBNK, or RWSD file. |
0x18 | UInt32 | Offset to the RWAR or DSP file. |
0x1C | UInt32 | Size of the RWAR or DSP file. |
0x20 | UInt32 | Unknown. Always 0x01000000. |
0x24 | UInt32 | Offset to the second subsection. Usually follows this value anyway. |
0x28 | UInt32 | Number of entries in the subsection. All data after this is absent if this is 0x00. |
0x2C | UInt32 | Unknown. Always 0x01000000. |
0x30 | UInt32 | Offset to the first entry |
0x34 | UInt32 | Unknown. Always 0x01000000. |
0x38 | UInt32 | Offset to the second entry. |
... |
Subsection 2 Entry
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Group index |
0x04 | UInt32 | Offset to the file, relative to the value at 0x14 of the main entry. |
0x08 | UInt32 | Size of the file. |
0x0C | UInt32 | Offset to the audio data, relative to the value at 0x1C of the main entry. |
0x10 | UInt32 | Size of the audio data. |
0x14 | UInt32 | Unknown. Padding? |
Sound Count Table
Offset | Type | Description |
---|---|---|
0x00 | UInt16 | SeqSoundCount |
0x02 | UInt16 | SeqTrackCount |
0x04 | UInt16 | StrmSoundCount |
0x04 | UInt16 | StrmTrackCount |
0x06 | UInt16 | WaveSoundCount |
0x08 | UInt16 | WaveTrackCount |
0x0A | Byte[20] | Unknown. Padding? |
FILE
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. FILE in ASCII. |
0x04 | UInt32 | Size of the FILE section. |
0x08 | Byte[24] | Padding |
0x0C | – | File data |
Tools
The following tools can handle BRSAR files:
- BrawlBox, by Kryal and BlackJax96
- BRSAR Extractor, by Atlas