Difference between revisions of "BRWSD (File Format)"

From Custom Mario Kart
Jump to navigation Jump to search
m
(> Lamb, tell me a story. >. There was once a pale man with dark hair, who was very lonely. > Why was it lonely? >. All things must meet this man, so they shunned him. > Did he chase them all? >. He took an axe and split himself in two. Right down the middle > So he would always have a friend? >. So he would always have a friend...)
 
Line 24: Line 24:
 
| 0x14 || UInt32 || Length of '''[[#DATA|DATA section]]'''.
 
| 0x14 || UInt32 || Length of '''[[#DATA|DATA section]]'''.
 
|-
 
|-
| 0x18 || Byte[8] || Padding.
+
| 0x18 || UInt32 || Offset to '''[[#WAVE|WAVE section]]'''.
 
|-
 
|-
| 0x20 || colspan=2 {{unknown|End of this file header}}
+
| 0x1C || UInt32 || Length of '''[[#WAVE|WAVE section]]'''.
 
|}
 
|}
  
Line 40: Line 40:
 
| 0x04 || UInt32 || Length of this section.
 
| 0x04 || UInt32 || Length of this section.
 
|-
 
|-
| 0x08 || colspan=2 {{unknown|End of this header}}
+
| 0x08 || UInt32 || '''N''' = Number of Wave Information Data Entries.
 +
|-
 +
| 0x0C || [[#Data Reference|DataRef]]['''N'''] || References to Wave Information Data Entries.
 
|}
 
|}
  
Line 50: Line 52:
 
! Offset !! Type !! Description
 
! Offset !! Type !! Description
 
|-
 
|-
| 0x00 || UInt32 || Number of Wave Information Data Entries.
+
| 0x00 || [[#Data Reference|DataRef]] || Reference to WSD Information Data Entry.
|-
 
| 0x04 || Byte[4] || {{Unknown-left|'''Unknown'''. Always 0x01000000.}}
 
|-
 
| 0x08 || UInt32 || Offset to the first Wave Information Group ('''O[1]''').
 
|-
 
| 0x0C || Byte[4] || {{Unknown-left|'''Unknown'''. Always 0x01000000.}}
 
|-
 
| 0x10 || UInt32 || Offset to the first Wave Information Group ('''O[2]''').
 
|-
 
| colspan=3 align=center | '''...'''
 
|-
 
| '''O[x]''' + 0x00 || Byte[4] || {{Unknown-left|'''Unknown'''. Always 0x01000000.}}
 
 
|-
 
|-
| '''O[x]''' + 0x04 || UInt32 || Offset to the '''x''' WSD Information Data Entry.
+
| 0x08 || [[#Data Reference|DataRef]] || Reference to Track Table.
 
|-
 
|-
| '''O[x]''' + 0x08 || Byte[4] || {{Unknown-left|'''Unknown'''. Always 0x01000000.}}
+
| 0x10 || [[#Data Reference|DataRef]] || Reference to Note Table.
|-
 
| '''O[x]''' + 0x0C || UInt32 || Offset to the '''x''' Note Event Table.
 
|-
 
| '''O[x]''' + 0x10 || Byte[4] || {{Unknown-left|'''Unknown'''. Always 0x01000000.}}
 
|-
 
| '''O[x]''' + 0x14 || UInt32 || Offset to the '''x''' Note Information Table.
 
 
|}
 
|}
  
Line 94: Line 78:
 
| 0x09 || SByte || MainSend
 
| 0x09 || SByte || MainSend
 
|-
 
|-
| 0x0A || Byte[22] || Padding
+
| 0x0A || Byte[2] || {{Unknown-left|Padding}}
 +
|-
 +
| 0x0C || [[#Data Reference|DataRef]] || {{Unknown-left|Reference to address to Graph Enviroment Table. Always 0.}}
 +
|-
 +
| 0x14 || [[#Data Reference|DataRef]] || {{Unknown-left|Reference to address to Randomizer Table. Always 0.}}
 +
|-
 +
| 0x1C || UInt32 || {{Unknown-left|Reserved.}}
 
|}
 
|}
  
=== Note Event Table ===
+
=== Track Table ===
 
All offsets are relative to the Wave Information Data Table.
 
All offsets are relative to the Wave Information Data Table.
  
Line 104: Line 94:
 
! Offset !! Type !! Description
 
! Offset !! Type !! Description
 
|-
 
|-
| 0x00 || UInt32 || Number of Note Event Group Entry Tables.
+
| 0x00 || UInt32 || '''N''' = Number of Track Infos.
 
|-
 
|-
| 0x04 || Byte[4] || {{Unknown-left|'''Unknown'''. Always 0x01000000.}}
+
| 0x04 || [[#Data Reference|DataRef]]['''N'''] || References to Track Info.
 +
|}
 +
 
 +
==== Track Info ====
 +
{| class="wikitable"
 
|-
 
|-
| 0x08 || UInt32 || Offset to the first Note Event Group Entry Table ('''O[1]''').
+
! Offset !! Type !! Description
 
|-
 
|-
| 0x0C || Byte[4] || {{Unknown-left|'''Unknown'''. Always 0x01000000.}}
+
| 0x00 || [[#Data Reference|DataRef]] || Reference to Note Event Table.
 +
|}
 +
 
 +
==== Note Event Table ====
 +
{| class="wikitable"
 
|-
 
|-
| 0x10 || UInt32 || Offset to the second Note Event Group Entry Table ('''O[2]''').
+
! Offset !! Type !! Description
|-
 
| colspan=3 align=center | '''...'''
 
|-
 
| '''O[x]''' + 0x00 || Byte[4] || {{Unknown-left|'''Unknown'''. Always 0x01000000.}}
 
|-
 
| '''O[x]''' + 0x04 || UInt32 || Offset to the Note Event Group Entry ('''O[x]E''').
 
|-
 
| '''O[x]E''' + 0x00 || UInt32 || Number of Note Event Entries.
 
 
|-
 
|-
| '''O[x]E''' + 0x04 || Byte[4] || {{Unknown-left|'''Unknown'''. Always 0x01000000.}}
+
| 0x00 || UInt32 || '''N''' = Number of Note Events.
 
|-
 
|-
| '''O[x]E''' + 0x08 || UInt32 || Offset to the first Note Event Entry.
+
| 0x04 || [[#Data Reference|DataRef]]['''N'''] || References to Note Events.
|-
 
| '''O[x]E''' + 0x0C || Byte[4] || {{Unknown-left|'''Unknown'''. Always 0x01000000.}}
 
|-
 
| '''O[x]E''' + 0x10 || UInt32 || Offset to the second Note Event Entry.
 
|-
 
| colspan=3 align=center | '''...'''
 
 
|}
 
|}
  
==== Note Event Entry ====
+
==== Note Event ====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 142: Line 126:
 
| 0x04 || Float || Length
 
| 0x04 || Float || Length
 
|-
 
|-
| 0x08 || UInt32 || Decay
+
| 0x08 || UInt32 || Note Index.
 
|-
 
|-
| 0x10 || Byte[4] || Padding
+
| 0x10 || UInt32 || {{Unknown-left|Reserved}}
 
|}
 
|}
  
=== Note Information Table ===
+
=== Note Table ===
 
All offsets are relative to the Wave Information Data Table.
 
All offsets are relative to the Wave Information Data Table.
  
Line 154: Line 138:
 
! Offset !! Type !! Description
 
! Offset !! Type !! Description
 
|-
 
|-
| 0x00 || UInt32 || Number of Note Information Entries.
+
| 0x00 || UInt32 || '''N''' = Number of Note Information Entries.
 
|-
 
|-
| 0x04 || Byte[4] || {{Unknown-left|'''Unknown'''. Always 0x01000000.}}
+
| 0x04 || [[#Data Reference|DataRef]]['''N'''] || References to Note Information Entries.
|-
 
| 0x08 || UInt32 || Offset to the first Note Information Entry.
 
|-
 
| 0x0C || Byte[4] || {{Unknown-left|'''Unknown'''. Always 0x01000000.}}
 
|-
 
| 0x10 || UInt32 || Offset to the second Note Information Entry.
 
|-
 
| colspan=3 align=center | '''...'''
 
 
|}
 
|}
  
Line 172: Line 148:
 
! Offset !! Type !! Description
 
! Offset !! Type !! Description
 
|-
 
|-
| 0x00 || UInt32 || Wave number
+
| 0x00 || Int32 || Wave Index
 
|-
 
|-
| 0x04 || SByte || Attack (-1–127)
+
| 0x04 || Byte || Attack (-1–127)
 
|-
 
|-
| 0x05 || SByte || InfoDecay (-1–127)
+
| 0x05 || Byte || InfoDecay (-1–127)
 
|-
 
|-
| 0x06 || SByte || Sustain (-1–127)
+
| 0x06 || Byte || Sustain (-1–127)
 
|-
 
|-
| 0x07 || SByte || Release (-1–127)
+
| 0x07 || Byte || Release (-1–127)
 
|-
 
|-
| 0x08 || SByte || Hold (-1–127)
+
| 0x08 || Byte || Hold (-1–127)
 
|-
 
|-
| 0x09 || Byte || WaveDataLocationType:
+
| 0x09 || Byte[3] || {{Unknown-left|Padding}}
* 0x0 = Index
 
* 0x1 = Address
 
* 0x2 = Callback
 
|-
 
| 0x0A || Byte || NoteOffType:
 
* 0x0 = Release
 
* 0x1 = Ignore
 
|-
 
| 0x0B || Byte || AlternateAssign
 
 
|-
 
|-
 
| 0x0C || Byte || OriginalKey
 
| 0x0C || Byte || OriginalKey
Line 205: Line 172:
 
| 0x10 || Float || InfoPitch
 
| 0x10 || Float || InfoPitch
 
|-
 
|-
| 0x14 || Byte[18] || Padding
+
| 0x14 || [[#Data Reference|DataRef]] || {{Unknown-left|Reference to address to LFO Table. Always 0.}}
 +
|-
 +
| 0x1C || [[#Data Reference|DataRef]] || {{Unknown-left|Reference to address to Graph Enviroment Table. Always 0.}}
 +
|-
 +
| 0x24 || [[#Data Reference|DataRef]] || {{Unknown-left|Reference to address to Randomizer Table. Always 0.}}
 +
|-
 +
| 0x2C || UInt32 || {{Unknown-left|Reserved}}
 +
|}
 +
 
 +
== WAVE ==
 +
The WAVE section starts with a header.
 +
 
 +
{| class="wikitable"
 +
|-
 +
! Offset !! Type !! Description
 +
|-
 +
| 0x00 || String || '''Section magic'''. Always ''WAVE'' in ASCII.
 +
|-
 +
| 0x04 || UInt32 || Length of this section.
 +
|-
 +
| 0x08 || UInt32 || '''N''' = Number of offsets.
 +
|-
 +
| 0x0C || UInt32['''N'''] || Offsets to Wave Infos.
 +
|}
 +
 
 +
== 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.
 
|}
 
|}
  

Latest revision as of 06:11, 26 June 2023

Under Construction
This article is not finished. Help improve it by adding accurate information or correcting grammar and spelling.


BRWSD (Binary Revolution Wave Sound Data) is a sub file format found in BRSAR files from many Wii games. It consists of a table of instance parameters that link to direct audios found into BRWAR files.

File Format

File Header

Offset Type Description
0x00 String File magic. Always RWSD 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. (?)
0x08 UInt32 Length of the file in bytes.
0x0C UInt16 Length of this header in bytes.
0x0E UInt16 Number of sections.
0x10 UInt32 Offset to DATA section.
0x14 UInt32 Length of DATA section.
0x18 UInt32 Offset to WAVE section.
0x1C UInt32 Length of WAVE section.

DATA

The DATA section starts with a header.

Offset Type Description
0x00 String Section magic. Always DATA in ASCII.
0x04 UInt32 Length of this section.
0x08 UInt32 N = Number of Wave Information Data Entries.
0x0C DataRef[N] References to Wave Information Data Entries.

Wave Information Data Table

The DATA header is followed by a table that lists the entries of wave information data. All offsets are relative to the start of this table.

Offset Type Description
0x00 DataRef Reference to WSD Information Data Entry.
0x08 DataRef Reference to Track Table.
0x10 DataRef Reference to Note Table.

WSD Information Data Entry

Offset Type Description
0x00 Float Pitch
0x04 Byte Pan (0–127)
0x05 Byte SurroundPan (0–127)
0x06 Byte FxSendA
0x07 Byte FxSendB
0x08 Byte FxSendC
0x09 SByte MainSend
0x0A Byte[2] Padding
0x0C DataRef Reference to address to Graph Enviroment Table. Always 0.
0x14 DataRef Reference to address to Randomizer Table. Always 0.
0x1C UInt32 Reserved.

Track Table

All offsets are relative to the Wave Information Data Table.

Offset Type Description
0x00 UInt32 N = Number of Track Infos.
0x04 DataRef[N] References to Track Info.

Track Info

Offset Type Description
0x00 DataRef Reference to Note Event Table.

Note Event Table

Offset Type Description
0x00 UInt32 N = Number of Note Events.
0x04 DataRef[N] References to Note Events.

Note Event

Offset Type Description
0x00 Float Position
0x04 Float Length
0x08 UInt32 Note Index.
0x10 UInt32 Reserved

Note Table

All offsets are relative to the Wave Information Data Table.

Offset Type Description
0x00 UInt32 N = Number of Note Information Entries.
0x04 DataRef[N] References to Note Information Entries.

Note Information Entry

Offset Type Description
0x00 Int32 Wave Index
0x04 Byte Attack (-1–127)
0x05 Byte InfoDecay (-1–127)
0x06 Byte Sustain (-1–127)
0x07 Byte Release (-1–127)
0x08 Byte Hold (-1–127)
0x09 Byte[3] Padding
0x0C Byte OriginalKey
0x0D Byte Volume (0–127)
0x0E Byte InfoPan (0–127)
0x0F Byte InfoSurroundPan (0–127)
0x10 Float InfoPitch
0x14 DataRef Reference to address to LFO Table. Always 0.
0x1C DataRef Reference to address to Graph Enviroment Table. Always 0.
0x24 DataRef Reference to address to Randomizer Table. Always 0.
0x2C UInt32 Reserved

WAVE

The WAVE section starts with a header.

Offset Type Description
0x00 String Section magic. Always WAVE in ASCII.
0x04 UInt32 Length of this section.
0x08 UInt32 N = Number of offsets.
0x0C UInt32[N] Offsets to Wave Infos.

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 BRWSD files: