MSBP (File Format)

From Deep Sea Knowledge
Revision as of 13:29, 5 November 2018 by Shibboleet (talk | contribs) (Fix some stuff, add label entry structure.)
Jump to navigation Jump to search

The purpose of MSBP (MeSsage Binary Project) isn't fully known, but it is known that this file is related to colors, some text flow, and other attributes. Every section is aligned to the 0x10th byte with 0xAB.

Header

Offset Type Description
0x00 String File magic. Always "MsgPrjBn" in ASCII.
0x08 UInt16 Byte Order Mark (BOM): 0xFEFF for big endian and 0xFFFE for little endian.
0x0A UInt32 Version. Always 0x40000000. If this is the Wii MSBP, 0x30000000
0x0E UInt16 Number of sections.
0x10 UInt64 Filesize.
0x18 UInt64 Padding.
0x20 End of header.

CLR1

Seems to stand for "color".

Offset Type Description
0x00 String Section magic. Always "CLR1" in ASCII.
0x04 UInt32 Section size. The first 0x10 bytes of this section and the alignment are not counted towards this size.
0x08 UInt64 Padding.
0x10 UInt32 Number of colors.
0x14 End of header.

Directly after the number of colors, there are N amount of RGBA colors (defined by the count).

CLB1

This section links a color entry in the above section to a label.

Offset Type Description
0x00 String Section magic. Always "CLB1" in ASCII.
0x04 UInt32 Section size. The first 0x10 bytes of this section and the alignment are not counted towards this size.
0x08 UInt64 Padding.
0x10 UInt32 Number of labels.
0x14 End of header.

Right after the header, the actual label entries are defined.

Offset Type Description
0x00 Byte String length.
0x01 Byte[N] Label name, where N is the string length.
0x01 + N UInt32 Index of the color that is assigned to this label.
0x01 + N + 0x04 End of label entry.