MSBP (File Format)
MSBP (MessageStudio Binary Project) is a file format used in games such as New Super Mario Bros U, Super Mario Odyssey, Super Mario Galaxy 2, Mario Kart 8, Mario Kart 8 Deluxe and Super Mario Party. It is used along with MSBT for the text in-game. MSBP seems to store different text styles, which is used to render the text.
File Format
File Header
The file starts with the following header:
Offset | Type | Description |
---|---|---|
0x00 | Char[8] | File magic. Always MsgPrjBn in ASCII. |
0x08 | UInt16 | Byte-order-mark. FE FF for big endian, FF FE for little endian. |
0x0A | UInt16 | Unknown. |
0x0C | Byte | String encoding. UTF8 = 0, UTF16 = 1. |
0x0D | Byte | Possibly a version number. Games on Wii, Nintendo 3DS and Wii U as well as Mario Kart Tour use 3, games on Nintendo Switch and Super Mario Run use 4. |
0x0E | UInt16 | Number of sections. |
0x10 | UInt16 | Unknown. |
0x12 | UInt32 | File size in bytes. |
0x16 | Byte[10] | Unknown. Always 0. |
CLR1
The CLR1 section stores colors, in RGBA8 format. The section starts with the following header:
Offset | Type | Description |
---|---|---|
0x00 | Char[4] | Section magic. Always CLR1 in ASCII. |
0x04 | UInt32 | Section size (starting from 0x10). |
0x08 | Byte[8] | Unknown. Always 0. |
0x10 | Int32 | Number of colors. |
After the header follows an array of colors, in RGBA8 format. Each color is 4 bytes.
CLB1
The CLB1 section stores color labels.
Offset | Type | Description |
---|---|---|
0x00 | Char[4] | Section magic. Always CLB1 in ASCII. |
0x04 | UInt32 | Section size (starting from 0x10). |
0x08 | Byte[8] | Unknown. Always 0. |
0x10 | Int32 | Number of entries. |
CLB1 Entry
Each entry has the following structure:
Offset | Type | Description |
---|---|---|
0x00 | Int32 | Number of color label strings. |
0x04 | UInt32 | String offset, relative to 0x10 in the CLB1 header. |
ATI2
The ATI2 section stores attribute information.
Offset | Type | Description |
---|---|---|
0x00 | Char[4] | Section magic. Always ATI2 in ASCII. |
0x04 | UInt32 | Section size (starting from 0x10). |
0x08 | Byte[8] | Unknown. Always 0. |
0x10 | UInt32 | Number of entries. |
ATI2 Entry
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Unknown. |
0x04 | UInt32 | Unknown. |
ALB1
The ALB1 section stores attribute labels.
Offset | Type | Description |
---|---|---|
0x00 | Char[4] | Section magic. Always ALB1 in ASCII. |
0x04 | UInt32 | Section size (starting from 0x10). |
0x08 | Byte[8] | Unknown. Always 0. |
ALI2
The ALI2 section stores attribute lists.
Offset | Type | Description |
---|---|---|
0x00 | Char[4] | Section magic. Always ALI2 in ASCII. |
0x04 | UInt32 | Section size (starting from 0x10). |
0x08 | Byte[8] | Unknown. Always 0. |
TGG2
The TGG2 section stores tag groups.
Offset | Type | Description |
---|---|---|
0x00 | Char[4] | Section magic. Always TGG2 in ASCII. |
0x04 | UInt32 | Section size (starting from 0x10). |
0x08 | Byte[8] | Unknown. Always 0. |
0x10 | UInt32 | Number of entries. |
After an array of 32-bit offsets follow, which are relative to 0x10 into the TGG2 header. These link to the entries.
TGG2 Entry
Offset | Type | Description |
---|---|---|
0x00 | UInt16 | Entry index. |
0x02 | UInt16 | Number of index entries. |
After an entry an array of UInt16s, of length specified above, follows. These are TAG2 entry indices. After a null-terminated string follows, which presumable is the entry name.
TAG2
The TAG2 section stores tags.
Offset | Type | Description |
---|---|---|
0x00 | Char[4] | Section magic. Always TAG2 in ASCII. |
0x04 | UInt32 | Section size (starting from 0x10). |
0x08 | Byte[8] | Unknown. Always 0. |
UInt32 | UInt32 | Number of entries. |
After an array of 32-bit offsets follow, which are relative to 0x10 into the TAG2 header. These link to the entries.
TAG2 Entry
Offset | Type | Description |
---|---|---|
0x00 | UInt16 | Number of index entries. |
After an entry an array of UInt16s, of length specified above, follows. These are TGP2 entry indices. After a null-terminated string follows, which presumable is the entry name.
TGP2
The TGP2 section stores tag parameters.
Offset | Type | Description |
---|---|---|
0x00 | Char[4] | Section magic. Always TGP2 in ASCII. |
0x04 | UInt32 | Section size (starting from 0x10). |
0x08 | Byte[8] | Unknown. Always 0. |
0x10 | UInt32 | Number of entries. |
After an array of 32-bit offsets follow, which are relative to 0x10 into the TGP2 header. These link to the entries.
TGP2 Entry
Offset | Type | Description |
---|---|---|
0x00 | Byte | Parameter type. |
Usually a null-terminated string follows, but it's currently unsure how it works.
TGL2
The TGL2 section stores tag lists.
Offset | Type | Description |
---|---|---|
0x00 | Char[4] | Section magic. Always TGL2 in ASCII. |
0x04 | UInt32 | Section size (starting from 0x10). |
0x08 | Byte[8] | Unknown. Always 0. |
0x10 | UInt32 | Number of entries. |
After follows 32-bit offsets, relative to 0x10 into the TGL2 header, which amount is specified above. These points to null-terminated strings.
SYL3
The SYL3 section stores style lists.
Offset | Type | Description |
---|---|---|
0x00 | Char[4] | Section magic. Always SYL3 in ASCII. |
0x04 | UInt32 | Section size (starting from 0x10). |
0x08 | Byte[8] | Unknown. Always 0. |
0x10 | UInt32 | Number of entries. |
SYL3 Entry
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Region width. |
0x04 | UInt32 | Line number. |
0x08 | Int32 | Font index. |
0x0C | Int32 | Base color index. |
SLB1
The SLB1 section stores style labels.
Offset | Type | Description |
---|---|---|
0x00 | Char[4] | Section magic. Always SLB1 in ASCII. |
0x04 | UInt32 | Section size (starting from 0x10). |
0x08 | Byte[8] | Unknown. Always 0. |
0x10 | UInt32 | Number of entries. |
SLB1 Entry
After the header comes the entries. Each entry has the following structure:
Offset | Type | Description |
---|---|---|
0x00 | Int32 | Number of sub entries. |
0x04 | UInt32 | Offset to an array of sub entry, relative to 0x10 in the SLB1 header. |
SLB1 Sub Entry
Each sub entry has the following structure:
Offset | Type | Description |
---|---|---|
0x00 | Byte | Key string size (K). |
0x01 | Char[K] | Key string used to access this message. The string has the length K and is not null-terminated. |
0x01 + K | UInt32 | SYL3 entry index. |
CTI1
The CTI1 section stores content information.
Offset | Type | Description |
---|---|---|
0x00 | Char[4] | Section magic. Always CTI1 in ASCII. |
0x04 | UInt32 | Section size (starting from 0x10). |
0x08 | Byte[8] | Unknown. Always 0. |
0x10 | Int32 | Number of linked file names which the binary message files, MSBT, MSBP and MSBF, are created from. |
After follows 32-bit offsets, relative to 0x10 into the CTI1 header, which amount is specified above. These points to null-terminated strings which are filenames which the message files are created from. MSBT files are created from .mstxt, but there are also other file extensions such as .msalt and .msqry.
Tools
The following tools support MSBP files:
- (none)