Difference between revisions of "BRASD (File Format)"
m (→File Header) |
|||
Line 13: | Line 13: | ||
| 0x04 || UInt16 || {{BOM}} | | 0x04 || UInt16 || {{BOM}} | ||
|- | |- | ||
− | | 0x06 || UInt16 || '''Version number''' of the file format. | + | | 0x06 || UInt16 || '''Version number''' of the file format. Always 01 00. |
|- | |- | ||
| 0x08 || UInt32 || Length of the file in bytes. | | 0x08 || UInt32 || Length of the file in bytes. | ||
|- | |- | ||
− | | 0x0C || UInt16 || Offset to first section. | + | | 0x0C || UInt16 || Offset to the first section. |
|- | |- | ||
| 0x0E || UInt16 || '''Number of sections'''. Always 00 01. | | 0x0E || UInt16 || '''Number of sections'''. Always 00 01. | ||
|- | |- | ||
− | | 0x10 || UInt32 || Offset to '''[[#DATA|DATA section]]'''. Always 0x20. | + | | 0x10 || UInt32 || Offset to the '''[[#DATA|DATA section]]'''. Always 0x20. |
|- | |- | ||
− | | 0x14 || UInt32 || Length of '''[[#DATA|DATA section]]'''. | + | | 0x14 || UInt32 || Length of the '''[[#DATA|DATA section]]'''. |
|- | |- | ||
| 0x18 || colspan=2 {{Unknown|End of this file header}} | | 0x18 || colspan=2 {{Unknown|End of this file header}} | ||
Line 38: | Line 38: | ||
|- | |- | ||
| 0x04 || UInt32 || Length of this section. | | 0x04 || UInt32 || Length of this section. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
== Event Header == | == Event Header == | ||
− | After the '''DATA''' header comes the header | + | After the '''DATA''' header comes the event header. |
{| class="wikitable" | {| class="wikitable" | ||
Line 53: | Line 47: | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || UInt32 || | + | | 0x00 || UInt32 || Number of frames in corresponding animation. |
+ | |- | ||
+ | | 0x04 || UInt32 || {{Unknown-left|'''Unknown'''. Always 01 00 00 00.}} | ||
|- | |- | ||
− | | | + | | 0x18 || UInt32 || {{Unknown-left|'''Unknown'''. Always 00 00 00 0C.}} |
|- | |- | ||
− | | | + | | 0x0C || UInt32 || Number of [[#Event|Event]]s. |
|- | |- | ||
− | | | + | | 0x10 || colspan=2 {{Unknown|Start of first event}} |
|} | |} | ||
Line 70: | Line 66: | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || | + | | 0x00 || UInt32 || Start frame. |
|- | |- | ||
− | | 0x04 || | + | | 0x04 || Int32 || '''End frame'''. If no end frame is used, this is set to -1. |
|- | |- | ||
− | | | + | | 0x08 || Byte || '''Type''' and '''Playback Interval'''. The first bit is Type (0 = Range, 1 = Trigger). The second bit is Playback Interval (0 = true, 1 = false). |
|- | |- | ||
− | | | + | | 0x09 || Byte || Padding? |
|- | |- | ||
− | | | + | | 0x0A || Byte || {{Unknown-left|'''Unknown'''.}} |
|- | |- | ||
− | | | + | | 0x0B || Byte || Padding? |
|- | |- | ||
− | | 0x0C || UInt32 || ''' | + | | 0x0C || UInt32 || {{Unknown-left|'''Unknown'''.}} |
|- | |- | ||
− | | 0x10 || UInt32 || | + | | 0x10 || UInt32 || '''Offset''' to start of the event structure 2 used in this event. Relative to the end of the [[#DATA|DATA header]]. |
|} | |} | ||
Line 94: | Line 90: | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || | + | | 0x00 || UInt32 || {{Unknown-left|'''Unknown'''.}} |
|- | |- | ||
− | | 0x04 || | + | | 0x04 || UInt32 || {{Unknown-left|'''Unknown'''. Always 0xFFFFFFFF.}} |
|- | |- | ||
− | | | + | | 0x08 || Byte || {{Unknown-left|'''Unknown'''.}} |
|- | |- | ||
− | | | + | | 0x09 || Byte || {{Unknown-left|'''Unknown'''.}} |
|- | |- | ||
− | | | + | | 0x0A || Byte || {{Unknown-left|'''Unknown'''.}} |
|- | |- | ||
− | | | + | | 0x0B || Byte || {{Unknown-left|'''Unknown'''.}} |
|- | |- | ||
− | | 0x0C || | + | | 0x0C || UInt32 || {{Unknown-left|'''Unknown'''.}} |
|- | |- | ||
− | | | + | | 0x10 || Byte || Sound volume. |
|- | |- | ||
− | | | + | | 0x11 || Byte[3] || Padding? |
|- | |- | ||
− | | 0x14 || | + | | 0x14 || Float || Pitch. |
|- | |- | ||
− | | 0x18 || | + | | 0x18 || Byte[4] || Padding? |
|- | |- | ||
− | | 0x1C || | + | | 0x1C || UInt32 || {{Unknown-left|'''User Parameter'''. Unknown meaning.}} |
|- | |- | ||
− | | | + | | 0x20 || StringNT || '''Sound Name'''. This string is a null-termined ASCII string that refers to a [[BRSAR]] sound. |
|} | |} | ||
Revision as of 13:46, 25 February 2017
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 layout 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 | Offset to the first section. |
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. |
Event Header
After the DATA header comes the event header.
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Number of frames in corresponding animation. |
0x04 | UInt32 | Unknown. Always 01 00 00 00. |
0x18 | UInt32 | Unknown. Always 00 00 00 0C. |
0x0C | UInt32 | Number of Events. |
0x10 | Start of first event |
Event
An event is split up into two structures. The first event structure contains information about the frames and the second event structure contains information about the sound. In a file all the event structure 1 comes first, and after that, all the event structure 2. It is the event that controls the info about the animation sound and stores a reference to a BRSAR sound effect.
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Start frame. |
0x04 | Int32 | End frame. If no end frame is used, this is set to -1. |
0x08 | Byte | Type and Playback Interval. The first bit is Type (0 = Range, 1 = Trigger). The second bit is Playback Interval (0 = true, 1 = false). |
0x09 | Byte | Padding? |
0x0A | Byte | Unknown. |
0x0B | Byte | Padding? |
0x0C | UInt32 | Unknown. |
0x10 | UInt32 | Offset to start of the event structure 2 used in this event. Relative to the end of the DATA header. |
Event structure 2 is more unknown. It has a string reference stored to a BRSAR sound effect and some sound settings.
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Unknown. |
0x04 | UInt32 | Unknown. Always 0xFFFFFFFF. |
0x08 | Byte | Unknown. |
0x09 | Byte | Unknown. |
0x0A | Byte | Unknown. |
0x0B | Byte | Unknown. |
0x0C | UInt32 | Unknown. |
0x10 | Byte | Sound volume. |
0x11 | Byte[3] | Padding? |
0x14 | Float | Pitch. |
0x18 | Byte[4] | Padding? |
0x1C | UInt32 | User Parameter. Unknown meaning. |
0x20 | StringNT | Sound Name. This string is a null-termined ASCII string that refers to a BRSAR sound. |
Tools
The following tools can handle BRASD files:
- BRASD Editor, by Wexos