MSBP (File Format)

From Deep Sea Knowledge
Revision as of 13:44, 5 November 2018 by Shibboleet (talk | contribs) (Add in more sections)
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. All offsets defined in the file are relative to the sections' count offset.

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 labels are defined.

ATI2

Unknown purpose, seems to be attribute indices.

Offset Type Description
0x00 String Section magic. Always "ATI2" 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 attribute indicies.
0x14 End of header.

After the header are the attribute entries.

Offset Type Description
0x00 UInt16 Unknown.
0x02 Uint16 Unknown. Seems to be the same as the index below, if the first value is 0x9.
0x04 UInt32 Index.
0x08 End of header.

ALB1

This section contains the labels for attributes.

Offset Type Description
0x00 String Section magic. Always "ALB1" 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 attribute labels.
0x14 End of header.

Right after the header, the actual labels are defined.

ALI2

This sections contains multiple groups of labels.

Offset Type Description
0x00 String Section magic. Always "ALI2" 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 label groups.
0x14 End of header.

After the header, there are N offsets to each group. A group contains another group count, and N offsets to null terminated strings.

Label Entry

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.