BFSAR (File Format)
Jump to navigation
Jump to search
A BFSAR file is an archive containing sound effects. In NSMBU, it also contains all music streams, but I don't think this is the case for MK8.
Format
I found this information by reverse engineering NSMBU and analyzing the files. I think the same applies to MK8, but since I don't have MK8's files, I can't assure this.
Header
Offset | Size | Description |
---|---|---|
0x00 | 4 | Magic ("FSAR") |
0x04 | 2 | Endianness. 0xFEFF is big endian, 0xFFFE is little endian |
0x06 | 2 | Header size? Always 0x0040 |
0x08 | 4 | Version number |
0x0C | 4 | File size of the entire file. |
0x10 | 2 | Section count? Always 0x03. |
0x12 | 2 | Unknown. Always 0. |
0x14 | 3 × 12 | Section info. 3 structures describing the offsets to and sizes of the bfsar sections. |
0x38 | 8 | Unknown. Always 0. |
Section information
Offset | Size | Description |
---|---|---|
0 | 2 | Identifier. Specifies which section it describes. 0x2000 is the STRG section, 0x2001 is INFO and 0x2002 is FILE. |
2 | 2 | Unknown. Always 0. |
4 | 4 | Offset |
8 | 4 | Size |
STRG Section
This section contains a string table and maybe more.
Offset | Size | Description |
---|---|---|
0x00 | 4 | ASCII identifier ("STRG") |
0x04 | 4 | Section size |
0x08 | 4 | Unknown. Always 0x24000000 |
0x0C | 4 | String table offset, relative to field 0x08 of the STRG section. |
0x10 | 4 | Unknown. Always 0x24010000 |
0x14 | 4 | Offset to something else in the STRG section. |
String table
The string table contains structures that point to null terminated strings. All offsets are relative to the start of the string table.
Offset | Size | Description |
---|---|---|
0 | 4 | Unknown |
4 | 4 | Unknown. Always 0x1F010000. |
8 | 4 | Offset to null terminated string. |