Glue/"MB" .BIN Files


Introduction

HardBall 5's game archives (HARDBALL.BIN and HB5CDROM.BIN) use a format that seems to officially be called "Glue", though it's also known by the two bytes each archive starts with, "MB". (Presumably, this stands for Mike Benna, one of the game's programmers.)


Header

As mentioned above, files start with the string "MB" (0x4D, 0x42). This is followed (file offset 2) by the number of files in the archive (2 bytes, little endian).


File Table

File table entries start at file offset 4.

  • Offset 0: Length
  • Offset 4: Offset
  • Offset 8: Encoded File Name, 0x00 terminated
  • Byte after the 0x00 string terminator: unknown purpose

To decode a file name, subtract 0x60 from each byte. Likewise, to encode a filename, add 0x60 to each byte.

PlayStation 1 Glue archives add another two bytes to the end of each entry; the purpose of these bytes is unknown.

The value after the string terminator differs depending on unknown factors; a list of known values follows:

  • 0x00HB5CDROM.BIN, HB5DEMO.BIN, and any files added with ADD2GLUE.EXE
  • 0x44 – original HB5, minimal install
  • 0x4C – original HB5 & HB5 "enhanced" v5.14LP, full install
  • 0x52 – HB5 "enhanced" v5.13 only, full install