BRSEQ (File Format)

From Wexos's Wiki
(Redirected from BRSEQ)
Jump to navigationJump to search

BRSEQ (Binary Revolution SEQuence) is a sub file format found in BRSAR files from games like Mario Kart Wii. It corresponds to the music data represented in a MIDI-like file, but in binary. Commands that process changes in attributes such as sound generation and volume change over time are described on this kind of file. Since the sequence data is simply a set of commands, sounds are actually producing using bank data (stored in BRBNK sub files) that corresponds to the sound source data.

File Format

File Header

The file starts with a file header that is 0x20 bytes long.

Offset Type Description
0x00 Char[4] File magic. Always RSEQ in ASCII.
0x04 UInt16 Byte-order-mark. FE FF for big endian, FF FE for little endian.
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 LABL section.
0x1C UInt32 Length of LABL section.
0x20 End of this file header

DATA

The DATA starts with a header.

Offset Type Description
0x00 Char[4] Section magic. Always DATA in ASCII.
0x04 UInt32 Length of this section.
0x08 UInt32 Length of this header (always 0x0C).

After the header, the sound data is specified. It contains different commands and parameters for the sound.

LABL

Offset Type Description
0x00 Char[4] Section magic. Always LABL in ASCII.
0x04 UInt32 Length of this section.
0x08 UInt32 N = Number of sound labels.
0x0C UInt32[N] Offset to label, relative to offset 0x08 in this header.

This is the label structure.

Offset Type Description
0x00 UInt32 Offset to the sound data this label uses. Relative to the end of the DATA header.
0x04 UInt32 L = Length of label string.
0x08 String Label name.

Tools

The following tools can handle BRSEQ files: