Difference between revisions of "MSBP (File Format)"

From Deep Sea Knowledge
Jump to navigation Jump to search
(Start on MSBP page)
 
(Fix some stuff, add label entry structure.)
Line 1: Line 1:
The purpose of MSBP ('''M'''e'''S'''sage '''B'''inary '''P'''roject) isn't fully known, but it is known that this file is related to colors, some text flow, and other attributes.
+
The purpose of MSBP ('''M'''e'''S'''sage '''B'''inary '''P'''roject) 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 ==
 
== Header ==
Line 11: Line 11:
 
| 0x08 || UInt16 || '''Byte Order Mark''' (BOM): 0xFEFF for big endian and 0xFFFE for little endian.
 
| 0x08 || UInt16 || '''Byte Order Mark''' (BOM): 0xFEFF for big endian and 0xFFFE for little endian.
 
|-
 
|-
| 0x0A || UInt16 || Padding.
+
| 0x0A || UInt32 || Version. Always '''0x40000000'''. If this is the Wii MSBP, '''0x30000000'''
|-
 
| 0x0C || UInt16 || Version. Always '''0x4000'''.
 
 
|-
 
|-
 
| 0x0E || UInt16 || Number of sections.
 
| 0x0E || UInt16 || Number of sections.
Line 42: Line 40:
 
|}
 
|}
  
Directly after the number of colors, there are '''N''' amount of RGBA colors (defined by the count), then after all of the entries, the file is aligned to the nearest 0x10th byte. The padding in question is marked as '''0xAB'''.
+
Directly after the number of colors, there are '''N''' amount of RGBA colors (defined by the count).
  
 
== CLB1 ==
 
== CLB1 ==
Unknown purpose, but seems to link colors to a label; most likely called Color Label.
+
This section links a color entry in the above section to a label.
 
 
  
 
{|class="wikitable"
 
{|class="wikitable"
Line 63: Line 60:
 
|}
 
|}
  
Directly after the header, there are '''N''' amount of offsets (defined by the count) to a length-prefixed string, with an unknown integer following it. Then after all of the strings, the file is aligned to the nearest 0x10th byte. The padding in question is marked as '''0xAB'''.
+
Right after the header, the actual label entries are defined.
 +
 
 +
{|class="wikitable"
 +
|-
 +
! 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.
 +
|}
  
 
[[Category:File formats]]
 
[[Category:File formats]]

Revision as of 13:29, 5 November 2018

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.