Difference between revisions of "BRSAR (File Format)"
Jump to navigation
Jump to search
AlmostTWD98 (talk | contribs) m (Fixed errors. Why would you reads errors?) |
(Finish) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | == Overview == | |
− | |||
The '''BRSAR''' ('''B'''inary '''R'''evolution '''S'''ound '''AR'''chive) 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 [[Filesystem/sound/revo_kart.brsar|here]]. | The '''BRSAR''' ('''B'''inary '''R'''evolution '''S'''ound '''AR'''chive) 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 [[Filesystem/sound/revo_kart.brsar|here]]. | ||
Line 34: | Line 33: | ||
| 0x24 || UInt32 || Size of the [[#FILE|FILE]] section. | | 0x24 || UInt32 || Size of the [[#FILE|FILE]] section. | ||
|- | |- | ||
− | | 0x28 | + | | 0x28 || colspan=2 {{Unknown|End of header}} |
− | |||
− | |||
|} | |} | ||
Line 55: | Line 52: | ||
| 0x08 || UInt32 || Offset to file name table. | | 0x08 || UInt32 || Offset to file name table. | ||
|- | |- | ||
− | | 0x0C || UInt32 || | + | | 0x0C || UInt32 || Offset to Sound tree. |
|- | |- | ||
− | | 0x10 || UInt32 || | + | | 0x10 || UInt32 || Offset to Player tree. |
|- | |- | ||
− | | 0x14 || UInt32 || | + | | 0x14 || UInt32 || Offset to Group tree. |
|- | |- | ||
− | | 0x18 || UInt32 || | + | | 0x18 || UInt32 || Offset to Bank tree. |
|- | |- | ||
| 0x1C || colspan=2 {{Unknown|End of header}} | | 0x1C || colspan=2 {{Unknown|End of header}} | ||
Line 76: | Line 73: | ||
|} | |} | ||
− | ==== SYMB | + | ==== SYMB String Table ==== |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || UInt32 || | + | | 0x00 || UInt32 || Root Index. |
|- | |- | ||
− | | 0x04 || UInt32 || Number of entries | + | | 0x04 || UInt32 || Number of entries ('''N''') |
+ | |- | ||
+ | | 0x08 || [[#SYMB String Tree Node|TreeNode]]['''N'''] || Entries. | ||
|} | |} | ||
− | ==== SYMB | + | ==== SYMB String Tree Node ==== |
− | + | {| class="wikitable" | |
+ | |- | ||
+ | ! Offset !! Type !! Description | ||
+ | |- | ||
+ | | 0x00 || UInt16 || Flags (0x01 = Leaf Node) | ||
+ | |- | ||
+ | | 0x02 || UInt16 || {{Unknown-left|'''Bit flag'''. Meaning unknown}} | ||
+ | |- | ||
+ | | 0x04 || UInt32 || Left Index. | ||
+ | |- | ||
+ | | 0x08 || UInt32 || Right Index. | ||
+ | |- | ||
+ | | 0x0c || UInt32 || String Index. | ||
+ | |- | ||
+ | | 0x10 || UInt32 || Index. | ||
+ | |} | ||
=== INFO === | === INFO === | ||
Line 100: | Line 114: | ||
| 0x04 || UInt32 || Size of the INFO section. | | 0x04 || UInt32 || Size of the INFO section. | ||
|- | |- | ||
− | | 0x08 || | + | | 0x08 || [[#Data Reference|DataRef]] || Reference to [[#Sound Data Table|Sound Data Table]] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | 0x10 || [[#Data Reference|DataRef]] || Reference to [[#Soundbank Table|Soundbank Table]] |
|- | |- | ||
− | | | + | | 0x18 || [[#Data Reference|DataRef]] || Reference to [[#Player Info Table|Player Info Table]] |
|- | |- | ||
− | | 0x20 || | + | | 0x20 || [[#Data Reference|DataRef]] || Reference to [[#Collection Table|Collection Table]] |
|- | |- | ||
− | | | + | | 0x28 || [[#Data Reference|DataRef]] || Reference to [[#Group Table|Group Table]] |
|- | |- | ||
− | | | + | | 0x30 || [[#Data Reference|DataRef]] || Reference to [[#Sound Count Table|Sound Count Table]] |
− | |||
− | | | ||
− | |||
− | | | ||
− | |||
− | |||
|- | |- | ||
| 0x38 || colspan=2 {{Unknown|End of header}} | | 0x38 || colspan=2 {{Unknown|End of header}} | ||
Line 133: | Line 135: | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || UInt32 || | + | | 0x00 || UInt32 || '''N''' = Number of entries. |
|- | |- | ||
− | | | + | | 0x04 || [[#Data Reference|DataRef]]['''N'''] || References to [[#Sound Data Entry|Sound Data Entries]]. |
− | |||
− | | '''N''' | ||
|} | |} | ||
Line 151: | Line 151: | ||
| 0x08 || UInt32 || PlayerID | | 0x08 || UInt32 || PlayerID | ||
|- | |- | ||
− | | 0x0C || | + | | 0x0C || [[#Data Reference|DataRef]] || Reference to [[#Sound 3D Parameters|Sound3DParam]] |
− | |||
− | |||
|- | |- | ||
| 0x14 || Byte || Volume | | 0x14 || Byte || Volume | ||
Line 166: | Line 164: | ||
| 0x17 || Byte || RemoteFilter | | 0x17 || Byte || RemoteFilter | ||
|- | |- | ||
− | | 0x18 || | + | | 0x18 || [[#Data Reference|DataRef]] || Reference to sound info.<br>'''Data type''' specifies sound: |
− | + | * 0x1 = [[#RSEQ|SEQ]] | |
− | + | * 0x2 = [[#RSTM|STRM]] | |
− | + | * 0x3 = [[#RWSD|WAVE]] | |
− | * 0x1 = SEQ | ||
− | * 0x2 = STRM | ||
− | * 0x3 = WAVE | ||
− | |||
− | |||
|- | |- | ||
| 0x20 || UInt32 || UserParam1 | | 0x20 || UInt32 || UserParam1 | ||
Line 197: | Line 190: | ||
| 0x2A || Byte || ActorPlayerID | | 0x2A || Byte || ActorPlayerID | ||
|- | |- | ||
− | | 0x2B || Byte || {{Unknown| | + | | 0x2B || Byte || {{Unknown|Reserved.}} |
|} | |} | ||
Line 210: | Line 203: | ||
| 0x04 || UInt32 || Soundbank index | | 0x04 || UInt32 || Soundbank index | ||
|- | |- | ||
− | | 0x08 || Byte | + | | 0x08 || UInt32 || RSEQAllocTrack |
+ | |- | ||
+ | | 0x0C || Byte || SeqChannelPriority | ||
|- | |- | ||
− | | | + | | 0x0D || Byte || Release priority fix flag |
|- | |- | ||
− | | | + | | 0x0E || Byte[2] || {{Unknown-left|Padding}} |
|- | |- | ||
− | | | + | | 0x10 || UInt32 || {{Unknown-left|Reserved}} |
|} | |} | ||
Line 226: | Line 221: | ||
| 0x00 || UInt32 || SoundDataNode | | 0x00 || UInt32 || SoundDataNode | ||
|- | |- | ||
− | | 0x04 || | + | | 0x04 || UInt32 || RWSDAllocTrack |
|- | |- | ||
− | | | + | | 0x08 || Byte || Channel Priority |
|- | |- | ||
− | | | + | | 0x09 || Byte || Release priority fix flag |
+ | |- | ||
+ | | 0x0A || Byte[2] || {{Unknown-left|Padding}} | ||
|- | |- | ||
− | | | + | | 0x0C || UInt32 || {{Unknown-left|Reserved}} |
|} | |} | ||
Line 244: | Line 241: | ||
| 0x04 || UInt16 || AllocChannelCount | | 0x04 || UInt16 || AllocChannelCount | ||
|- | |- | ||
− | | 0x06 || UInt16 || | + | | 0x06 || UInt16 || AllocTrackFlag |
|- | |- | ||
− | | 0x08 || UInt32 || {{Unknown| | + | | 0x08 || UInt32 || {{Unknown-left|Reserved}} |
|} | |} | ||
− | ==== Sound | + | ==== Sound 3D Parameters ==== |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 256: | Line 253: | ||
| 0x00 || UInt32 || Sound3DParam flags | | 0x00 || UInt32 || Sound3DParam flags | ||
|- | |- | ||
− | | 0x04 || Byte || | + | | 0x04 || Byte || Decay Curve (1 = Logarithmic, 2 = Linear) |
|- | |- | ||
− | | 0x05 || Byte || | + | | 0x05 || Byte || Decay Ratio |
|- | |- | ||
− | | 0x06 || Byte | + | | 0x06 || Byte || Doppler Factor |
+ | |- | ||
+ | | 0x07 || Byte || {{Unknown-left|Padding}} | ||
+ | |- | ||
+ | | 0x08 || UInt32 || {{Unknown-left|Reserved}} | ||
|} | |} | ||
Line 268: | Line 269: | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || UInt32 || | + | | 0x00 || UInt32 || '''N''' = Number of entries. |
|- | |- | ||
− | | | + | | 0x04 || [[#Data Reference|DataRef]]['''N'''] || References to [[#Soundbank Entry|Soundbank Entries]]. |
− | |||
− | | '''N''' | ||
|} | |} | ||
Line 292: | Line 291: | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || UInt32 || Number of entries. | + | | 0x00 || UInt32 || '''N''' = Number of entries. |
|- | |- | ||
− | | 0x04 || | + | | 0x04 || [[#Data Reference|DataRef]]['''N'''] || References to [[#Player Info Entry|Player Info Entries]]. |
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | | | ||
− | | | ||
− | |||
|} | |} | ||
Line 314: | Line 305: | ||
| 0x04 || Byte || Playable Sound Count | | 0x04 || Byte || Playable Sound Count | ||
|- | |- | ||
− | | 0x05 || Byte | + | | 0x05 || Byte || {{Unknown-left|Padding}} |
+ | |- | ||
+ | | 0x06 || UInt16 || {{Unknown-left|Padding}} | ||
+ | |- | ||
+ | | 0x08 || UInt32 || Heap Size | ||
+ | |- | ||
+ | | 0x0C || UInt32 || {{Unknown-left|Reserved}} | ||
|} | |} | ||
=== Collection Table === | === Collection Table === | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 324: | Line 320: | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || UInt32 || Number of entries. | + | | 0x00 || UInt32 || '''N''' = Number of entries. |
|- | |- | ||
− | | 0x04 || | + | | 0x04 || [[#Data Reference|DataRef]]['''N'''] || References to [[#Collection Entry|Collection Entries]]. |
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | | | ||
− | | | ||
− | |||
|} | |} | ||
Line 348: | Line 336: | ||
| 0x08 || Int32 || Entry number (always -1) | | 0x08 || Int32 || Entry number (always -1) | ||
|- | |- | ||
− | | 0x0C || | + | | 0x0C || [[#Data Reference|DataRef]] || Reference to external file name. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | 0x14|| [[#Data Reference|DataRef]] || Reference to [[#Collection Position Table|Collection Position Table]]. |
− | |||
− | |||
|} | |} | ||
Line 366: | Line 346: | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || UInt32 || Number of entries. | + | | 0x00 || UInt32 || '''N''' = Number of entries. |
|- | |- | ||
− | | 0x04 || | + | | 0x04 || [[#Data Reference|DataRef]]['''N'''] || References to [[#Collection Position Entry|Collection Position Entries]]. |
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
Line 392: | Line 360: | ||
| 0x04 || UInt32 || Index within group | | 0x04 || UInt32 || Index within group | ||
|} | |} | ||
− | |||
=== Group Table === | === Group Table === | ||
Line 399: | Line 366: | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || UInt32 || Number of entries. | + | | 0x00 || UInt32 || '''N''' = Number of entries. |
|- | |- | ||
− | | 0x04 || | + | | 0x04 || [[#Data Reference|DataRef]]['''N'''] || References to [[#Group Data Entry|Group Data Entries]]. |
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | | | ||
− | | | ||
− | |||
|} | |} | ||
Line 417: | Line 376: | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || UInt32 || File name index | + | | 0x00 || UInt32 || File name index. |
|- | |- | ||
− | | 0x04 || UInt32 || | + | | 0x04 || UInt32 || Entry Number. |
|- | |- | ||
− | | 0x08 || | + | | 0x08 || [[#Data Reference|DataRef]] || Reference to external filepath string. |
|- | |- | ||
| 0x10 || UInt32 || Offset to the RSEQ, RBNK, or RWSD file. | | 0x10 || UInt32 || Offset to the RSEQ, RBNK, or RWSD file. | ||
Line 431: | Line 390: | ||
| 0x1C || UInt32 || Size of the RWAR or DSP file. | | 0x1C || UInt32 || Size of the RWAR or DSP file. | ||
|- | |- | ||
− | | 0x20 || | + | | 0x20 || [[#Data Reference|DataRef]] || Reference to [[#Group Item Reference Table|Group Item Reference Table]]. |
+ | |} | ||
+ | |||
+ | ==== Group Item Reference Table ==== | ||
+ | {| class="wikitable" | ||
|- | |- | ||
− | + | ! Offset !! Type !! Description | |
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | 0x00 || UInt32 || '''N''' = Number of entries. |
|- | |- | ||
− | | | + | | 0x04 || [[#Data Reference|DataRef]]['''N'''] || References to the [[#Group Item Info Entry|Group Item Info Entries]]. |
− | |||
− | |||
− | | | ||
− | |||
|} | |} | ||
− | ==== | + | ==== Group Item Info Entry ==== |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 463: | Line 418: | ||
| 0x10 || UInt32 || Size of the audio data. | | 0x10 || UInt32 || Size of the audio data. | ||
|- | |- | ||
− | | 0x14 || UInt32 || {{Unknown| | + | | 0x14 || UInt32 || {{Unknown-left|Reserved.}} |
|} | |} | ||
Line 477: | Line 432: | ||
| 0x04 || UInt16 || StrmSoundCount | | 0x04 || UInt16 || StrmSoundCount | ||
|- | |- | ||
− | | | + | | 0x06 || UInt16 || StrmTrackCount |
|- | |- | ||
− | | | + | | 0x08 || UInt16 || StrmChannelCount |
|- | |- | ||
− | | | + | | 0x0A || UInt16 || WaveSoundCount |
|- | |- | ||
− | | | + | | 0x0C || UInt16 || WaveTrackCount |
+ | |- | ||
+ | | 0x0E || UInt16 || {{Unknown-left|Padding.}} | ||
+ | |- | ||
+ | | 0x10 || UInt32 || {{Unknown-left|Reserved.}} | ||
|} | |} | ||
Line 499: | Line 458: | ||
| 0x0C || – || File data | | 0x0C || – || File data | ||
|- | |- | ||
+ | |} | ||
+ | |||
+ | === Data Reference === | ||
+ | The '''Data Reference''' structure is used to point to other data types. | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Offset !! Type !! Description | ||
+ | |- | ||
+ | | 0x00 || Byte || '''Reference type'''. (0 = Address, 1 = Offset). | ||
+ | |- | ||
+ | | 0x01 || Byte || Data type. Usually 0x00. | ||
+ | |- | ||
+ | | 0x02 || UInt16 || {{Unknown-left|Reserved.}} | ||
+ | |- | ||
+ | | 0x04 || UInt32 || Value. | ||
|} | |} | ||
== Tools == | == Tools == | ||
The following tools can handle BRSAR files: | The following tools can handle BRSAR files: | ||
− | * [[BrawlBox]], by Kryal and BlackJax96 | + | * [[BrawlBox]], by Kryal and BlackJax96 |
− | * [[BrawlCrate]], by soopercool101 | + | * [[BrawlCrate]], by soopercool101 |
− | * [[BRSAR Extractor]], by [[Atlas]] | + | * [[BRSAR Extractor]], by [[Atlas]] |
== Links == | == Links == | ||
{{BRRES links}} | {{BRRES links}} | ||
[[Category:File Format/Wii]] | [[Category:File Format/Wii]] |
Latest revision as of 11:42, 15 May 2023
Overview
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 | 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 | Offset to Sound tree. |
0x10 | UInt32 | Offset to Player tree. |
0x14 | UInt32 | Offset to Group tree. |
0x18 | UInt32 | Offset to Bank tree. |
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 String Table
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Root Index. |
0x04 | UInt32 | Number of entries (N) |
0x08 | TreeNode[N] | Entries. |
SYMB String Tree Node
Offset | Type | Description |
---|---|---|
0x00 | UInt16 | Flags (0x01 = Leaf Node) |
0x02 | UInt16 | Bit flag. Meaning unknown |
0x04 | UInt32 | Left Index. |
0x08 | UInt32 | Right Index. |
0x0c | UInt32 | String Index. |
0x10 | UInt32 | Index. |
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 | DataRef | Reference to Sound Data Table |
0x10 | DataRef | Reference to Soundbank Table |
0x18 | DataRef | Reference to Player Info Table |
0x20 | DataRef | Reference to Collection Table |
0x28 | DataRef | Reference to Group Table |
0x30 | DataRef | Reference to Sound Count Table |
0x38 | End of header |
Sound Data Table
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | N = Number of entries. |
0x04 | DataRef[N] | References to Sound Data Entries. |
Sound Data Entry
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | File name index |
0x04 | UInt32 | File collection index |
0x08 | UInt32 | PlayerID |
0x0C | DataRef | Reference to Sound3DParam |
0x14 | Byte | Volume |
0x15 | Byte | PlayerPriority |
0x16 | Byte | SoundType:
|
0x17 | Byte | RemoteFilter |
0x18 | DataRef | Reference to sound info. Data type specifies sound: |
0x20 | UInt32 | UserParam1 |
0x24 | UInt32 | UserParam2 |
0x28 | Byte | PanMode:
|
0x29 | Byte | PanCurve:
|
0x2A | Byte | ActorPlayerID |
0x2B | Byte | Reserved. |
Sound Data Subsection 2
RSEQ
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | SeqLabelEntry |
0x04 | UInt32 | Soundbank index |
0x08 | UInt32 | RSEQAllocTrack |
0x0C | Byte | SeqChannelPriority |
0x0D | Byte | Release priority fix flag |
0x0E | Byte[2] | Padding |
0x10 | UInt32 | Reserved |
RWSD
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | SoundDataNode |
0x04 | UInt32 | RWSDAllocTrack |
0x08 | Byte | Channel Priority |
0x09 | Byte | Release priority fix flag |
0x0A | Byte[2] | Padding |
0x0C | UInt32 | Reserved |
RSTM
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Start Position |
0x04 | UInt16 | AllocChannelCount |
0x06 | UInt16 | AllocTrackFlag |
0x08 | UInt32 | Reserved |
Sound 3D Parameters
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Sound3DParam flags |
0x04 | Byte | Decay Curve (1 = Logarithmic, 2 = Linear) |
0x05 | Byte | Decay Ratio |
0x06 | Byte | Doppler Factor |
0x07 | Byte | Padding |
0x08 | UInt32 | Reserved |
Soundbank Table
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | N = Number of entries. |
0x04 | DataRef[N] | References to Soundbank Entries. |
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 | N = Number of entries. |
0x04 | DataRef[N] | References to Player Info Entries. |
Player Info Entry
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | File name index |
0x04 | Byte | Playable Sound Count |
0x05 | Byte | Padding |
0x06 | UInt16 | Padding |
0x08 | UInt32 | Heap Size |
0x0C | UInt32 | Reserved |
Collection Table
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | N = Number of entries. |
0x04 | DataRef[N] | References to Collection Entries. |
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 | DataRef | Reference to external file name. |
0x14 | DataRef | Reference to Collection Position Table. |
Collection Position Table
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | N = Number of entries. |
0x04 | DataRef[N] | References to Collection Position Entries. |
Collection Position Entry
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Group index |
0x04 | UInt32 | Index within group |
Group Table
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | N = Number of entries. |
0x04 | DataRef[N] | References to Group Data Entries. |
Group Data Entry
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | File name index. |
0x04 | UInt32 | Entry Number. |
0x08 | DataRef | Reference to external filepath string. |
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 | DataRef | Reference to Group Item Reference Table. |
Group Item Reference Table
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | N = Number of entries. |
0x04 | DataRef[N] | References to the Group Item Info Entries. |
Group Item Info 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 | Reserved. |
Sound Count Table
Offset | Type | Description |
---|---|---|
0x00 | UInt16 | SeqSoundCount |
0x02 | UInt16 | SeqTrackCount |
0x04 | UInt16 | StrmSoundCount |
0x06 | UInt16 | StrmTrackCount |
0x08 | UInt16 | StrmChannelCount |
0x0A | UInt16 | WaveSoundCount |
0x0C | UInt16 | WaveTrackCount |
0x0E | UInt16 | Padding. |
0x10 | UInt32 | Reserved. |
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 |
Data Reference
The Data Reference structure is used to point to other data types.
Offset | Type | Description |
---|---|---|
0x00 | Byte | Reference type. (0 = Address, 1 = Offset). |
0x01 | Byte | Data type. Usually 0x00. |
0x02 | UInt16 | Reserved. |
0x04 | UInt32 | Value. |
Tools
The following tools can handle BRSAR files:
- BrawlBox, by Kryal and BlackJax96
- BrawlCrate, by soopercool101
- BRSAR Extractor, by Atlas