The Blues Brothers Map Format
Format type | Map/level |
---|---|
Map type | 2D tile-based |
Layer count | Unknown |
Games |
There are six levels in The Blues Brothers. Here's a table which shows which files are used in which level.
Level number | French name | English translation | Level data | First 128 background tiles | Second 128 background tiles 2 | Foreground tiles | Tile attributes | Enemy sprites |
---|---|---|---|---|---|---|---|---|
1 | Magasin | Store | MAG.SQL | MAG.CK1 | MAG.CK2 | AVTMAG.SQV | MAGASIN.BIN | ENEMI1.SQV |
2 | Entrepot | Warehouse | ENT.SQL | ENT.CK1 | ENT.CK2 | AVTENT.SQV | ENTREPOT.BIN | ENEMI2.SQV |
3 | Prison | Prison | PRISON.SQL | PRISON.CK1 | PRISON.CK2 | AVTPRIS.SQV | PRISON.BIN | ENEMI3.SQV |
4 | Egout | Sewer | EGOU.SQL | EGOU.CK1 | EGOU.CK2 | AVTEGOU.SQV | EGOU.BIN | ENEMI4.SQV |
5 | Ville | City | VILLE.SQL | VILLE.CK1 | VILLE.CK2 | AVTVILLE.SQV | VILLE.BIN | ENEMI5.SQV |
6 | Concert | Concert | CONCERT.SQL | CONCERT.CK1 | CONCERT.CK2 | none | CONCERT.BIN | ENEMI6.SQV |
Each level has a width of 128 tiles, the height of a level is equal to filesize / 128. Every byte in the level data corresponds to a background tile. When the value of a byte is smaller than 128 the tile is found in a .CK1 file, when the value is 128 or more the tile is found in a .CK2 file.
The positions of the players, enemies and gates are stored in the executables. For 1.EXE the offsets are:
Level number | Player 1 x | Player 1 y | Player 2 x | Player 2 y | Enemies x | Enemies y | Enemy types | Gates x | Gates y |
---|---|---|---|---|---|---|---|---|---|
1 | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown |
2 | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown |
3 | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown |
4 | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown |
5 | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown |
6 | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown |
And for 2.EXE the offsets are:
Level number | Player 1 x | Player 1 y | Player 2 x | Player 2 y | Enemies x | Enemies y | Enemy types | Gates x | Gates y |
---|---|---|---|---|---|---|---|---|---|
1 | 0x18469 | 0x1822B | 0x1846B | 0x1822D | 0x1841B | 0x181DD | unknown | unknown | unknown |
2 | 0x182CF | 0x18091 | 0x182D1 | 0x18093 | unknown | unknown | unknown | unknown | unknown |
3 | 0x18321 | 0x180E3 | 0x18323 | 0x180E5 | unknown | unknown | unknown | unknown | unknown |
4 | 0x18373 | 0x18135 | 0x18375 | 0x18137 | unknown | unknown | unknown | unknown | unknown |
5 | 0x183C5 | 0x18187 | 0x183C7 | 0x18189 | unknown | unknown | unknown | unknown | unknown |
6 | 0x18417 | 0x181D9 | 0x18419 | 0x181DB | 0x183C9 | 0x1818B | unknown | unknown | unknown |
The unit of the values of the UINT16LEs found at these offsets is pixels.
Attributes
The .BIN file associated to the level contains 256 entries which are 10 bytes long each, these indices do represent the tiles found in associated CK1 and CK2 sprite sheets.
Byte index | Type | Meaning |
---|---|---|
0 | UINT8? |
0x01 : spike ? 0x05 : weapon, there is only one -> the crate 0x07 : ladder (except the edges ?) 0x0A : walkable / ground / cannot pass through |
1 | unknown | always 0x00 or 0x03 |
2 | unknown | unknown |
3 | unknown |
MAG : 0x00 ENT : 0x00, 0x01 PRISON : 0x00, 0x01, 0x02, 0x03 EGOU : 0x00, 0x01, 0x02 VILLE : 0x00 CONCERT : 0x00, 0x01, 0x02 |
4 | unknown | unknown |
5 | unknown | always 0x00 or 0x01 |
6 | unknown | probably related to front tiles since for CONCERT it is always 0xFF |
7 | unknown |
For level 1, either 0x00 or tile index: - when 0x00 object is not animated (exceptions: camera, moving walkway; these are animated) - when not 0x00 object is animated : sparkles, vinyls (actually only these) |
8 | unknown | unknown |
9 | INT8 |
Index of the front tile to draw from the associated AVTXXX.SQV file, if 0xFF it means there is no front tile for this tile. For CONCERT level it will be always 0xFF since there are no front tiles associated to this level. |
Note: pay attention to signed/unsigned type in the table above. For instance, the value of byte 9 will mean -1, not 255 when its value is 0xFF.
Parsing example (C#):
byte tile = ...;
if((sbyte)tile > -1)
{
// tile has a front tile, draw it
}
// it is more meaningful than writing
byte tile = ...;
if(tile != 0xFF)
{
// ...
}
Credits
This file format was reverse engineered by Frenkel. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)