Difference between revisions of "BRASD (File Format)"
Jump to navigation
Jump to search
m |
KrummersBOT (talk | contribs) (Renamed user) |
||
(5 intermediate revisions by one other user not shown) | |||
Line 38: | Line 38: | ||
|- | |- | ||
| 0x04 || UInt32 || Length of this section. | | 0x04 || UInt32 || Length of this section. | ||
+ | |- | ||
+ | | 0x08 || UInt32 || Number of frames in corresponding animation. | ||
+ | |- | ||
+ | | 0x0C || [[#Data Reference|DataRef]] || Reference to '''[[#Event Table|Event Table]]'''.<br>(Offset relative to 0x08 of [[#DATA|DATA header]]). | ||
+ | |- | ||
+ | | 0x14 || colspan=2 {{Unknown|End of this file structure}} | ||
|} | |} | ||
− | == Event | + | === Event Table === |
− | |||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || UInt32 || Number of | + | | 0x00 || UInt32 || '''N''' = Number of events. |
|- | |- | ||
− | | 0x04 || | + | | 0x04 || [[#Frame Info|Frame Info]]['''N'''] || Array of events. |
− | |||
− | |||
− | | | ||
− | | | ||
− | |||
− | |||
|} | |} | ||
− | === | + | === Frame Info === |
− | + | The '''Frame Info''' structure contains information about the frames and the second event structure contains information about the sound. | |
{| class="wikitable" | {| class="wikitable" | ||
− | |||
|- | |- | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || | + | | 0x00 || Int32 || Start frame. |
+ | |- | ||
+ | | 0x04 || Int32 || End frame. | ||
+ | |- | ||
+ | | 0x08 || Byte || Frame flags. | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Value !! Description | ||
|- | |- | ||
− | | | + | | 0x00 || '''Type'''. 0 = Range, 1 = Trigger. |
|- | |- | ||
− | | | + | | 0x01 || 1 = End frame is infinitely large. |
|- | |- | ||
− | | | + | | 0x02 || 1 = Start frame is infinitely large negative number. |
+ | |} | ||
|- | |- | ||
− | | | + | | 0x09 || Byte || Loop offset. |
|- | |- | ||
− | | | + | | 0x0A || Byte || Loop interval. |
|- | |- | ||
− | | | + | | 0x0B || Byte || {{Unknown-left|Reserved.}} |
|- | |- | ||
− | | | + | | 0x0C || [[#Data Reference|DataRef]] || Reference to '''[[#Sound Event|Sound Event]]'''.<br>(Offset relative to 0x08 of '''[[#DATA|DATA header]]'''). |
|} | |} | ||
− | Event structure | + | === Sound Event === |
+ | The '''Sound Event''' structure controls the info about the animation sound and stores a reference to a [[BRSAR]] sound effect. | ||
{| class="wikitable" | {| class="wikitable" | ||
− | |||
|- | |- | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || UInt32 || {{Unknown-left|''' | + | | 0x00 || UInt32 || {{Unknown-left|'''Option flag'''. Unknown meaning.}} |
|- | |- | ||
− | | 0x04 || UInt32 | | + | | 0x04 || UInt32 || '''Sound ID'''. Always 0xFFFFFFFF. |
|- | |- | ||
− | | 0x08 || | + | | 0x08 || [[#Data Reference|DataRef]] || Reference to null-termined ASCII string that refers to a [[BRSAR]] sound.<br>(Offset relative to start of this structure). |
|- | |- | ||
− | | | + | | 0x10 || Byte || Sound volume. |
|- | |- | ||
− | | | + | | 0x11 || Byte[3] || {{Unknown-left|Reserved.}} |
|- | |- | ||
− | | | + | | 0x14 || Float || Pitch. |
|- | |- | ||
− | | | + | | 0x18 || UInt32 || {{Unknown-left|Reserved.}} |
|- | |- | ||
− | | | + | | 0x1C || UInt32 || {{Unknown-left|'''User Parameter'''. Unknown meaning.}} |
+ | |} | ||
+ | |||
+ | === 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. Always 0x00. |
|- | |- | ||
− | | | + | | 0x02 || UInt16 || {{Unknown-left|Reserved.}} |
|- | |- | ||
− | | | + | | 0x04 || UInt32 || Value. |
|} | |} | ||
Line 120: | Line 130: | ||
The following tools can handle BRASD files: | The following tools can handle BRASD files: | ||
* [[Wexos's Toolbox]], by [[Wexos]] | * [[Wexos's Toolbox]], by [[Wexos]] | ||
+ | * [[RANWr]], by [[Gabriela_]] | ||
[[Category:File Format/Wii]] | [[Category:File Format/Wii]] |
Latest revision as of 19:37, 11 May 2023
A BRASD file (Binary Revolution Animation Sound Data) contains information related to how certain objects produce sound based on their CHR0 animation. In Mario Kart Wii, they always appear in a ./brasd/ subdirectory from a course.
File Format
File Header
This is the structure for the BRASD header.
Offset | Type | Description |
---|---|---|
0x00 | String | File magic. Always RASD 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 number of the file format. Always 01 00. |
0x08 | UInt32 | Length of the file in bytes. |
0x0C | UInt16 | Header size. Always 0x20. |
0x0E | UInt16 | Number of sections. Always 00 01. |
0x10 | UInt32 | Offset to the DATA section. Always 0x20. |
0x14 | UInt32 | Length of the DATA section. |
0x18 | End of this file header |
DATA
The DATA section starts with a section header.
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. Always DATA in ASCII. |
0x04 | UInt32 | Length of this section. |
0x08 | UInt32 | Number of frames in corresponding animation. |
0x0C | DataRef | Reference to Event Table. (Offset relative to 0x08 of DATA header). |
0x14 | End of this file structure |
Event Table
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | N = Number of events. |
0x04 | Frame Info[N] | Array of events. |
Frame Info
The Frame Info structure contains information about the frames and the second event structure contains information about the sound.
Offset | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
0x00 | Int32 | Start frame. | ||||||||
0x04 | Int32 | End frame. | ||||||||
0x08 | Byte | Frame flags.
| ||||||||
0x09 | Byte | Loop offset. | ||||||||
0x0A | Byte | Loop interval. | ||||||||
0x0B | Byte | Reserved. | ||||||||
0x0C | DataRef | Reference to Sound Event. (Offset relative to 0x08 of DATA header). |
Sound Event
The Sound Event structure controls the info about the animation sound and stores a reference to a BRSAR sound effect.
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Option flag. Unknown meaning. |
0x04 | UInt32 | Sound ID. Always 0xFFFFFFFF. |
0x08 | DataRef | Reference to null-termined ASCII string that refers to a BRSAR sound. (Offset relative to start of this structure). |
0x10 | Byte | Sound volume. |
0x11 | Byte[3] | Reserved. |
0x14 | Float | Pitch. |
0x18 | UInt32 | Reserved. |
0x1C | UInt32 | User Parameter. Unknown meaning. |
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. Always 0x00. |
0x02 | UInt16 | Reserved. |
0x04 | UInt32 | Value. |
Tools
The following tools can handle BRASD files:
- Wexos's Toolbox, by Wexos
- RANWr, by Gabriela_