BRBNK (File Format)

From Custom Mario Kart
(Redirected from BRBNK)
Jump to: navigation, search
Under Construction
This article is not finished. Help improve it by adding accurate information or correcting grammar and spelling.

BRBNK (Binary Revolution BaNK) is a sub file format found in BRSAR files from many Wii games. It consists of a table of instance parameters that link to the audio samples used in MIDI-like sequences (BRSEQ files).

File Format

File Header

Offset Type Description
0x00 String File magic. Always RBNK in ASCII.
0x04 UInt16 Byte order mark (BOM): The value is always 0xFEFF. If value 0xFFFE is read, then the false endian is used. MKWii 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 Byte[8] Padding.
0x20 End of this file header


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 End of this header

Bank Data Table

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

Offset Type Description
0x00 UInt32 Number of Bank Data Entries.
0x04 Byte[4] Unknown. Always 0x01010000.
0x08 UInt32 Offset to the first Bank Data Entry.
0x0C Byte[4] Unknown. Always 0x01010000.
0x10 UInt32 Offset to the second Bank Data Entry.

Bank Data Entry

Offset Type Description
0x00 UInt32 Wave number
0x04 SByte Attack (-1–127)
0x05 SByte Decay (-1–127)
0x06 SByte Sustain (-1–127)
0x07 SByte Release (-1–127)
0x08 SByte Hold (-1–127)
0x09 Byte WaveDataLocationType:
  • 0x0 = Index
  • 0x1 = Address
  • 0x2 = Callback
0x0A Byte NoteOffType:
  • 0x0 = Release
  • 0x1 = Ignore
0x0B Byte AlternateAssign
0x0C Byte OriginalKey
0x0D Byte Volume (0–127)
0x0E Byte Pan (0–127)
0x0F Byte SurroundPan (0–127)
0x10 Float Pitch
0x14 Byte[18] Padding


The following tools can handle BRBNK files: