
There are three types of graphics:
CGA is 4-colour, while EGA is 16-colour. Both use standard predefined palettes defining which number corresponds to which colour. VGA, on the other hand, is 256-colour and uses its own custom palette.
The graphics files each contain a tileset. Most of them contain a series of 16x16 tiles. The bytes in the files correspond to the pixels of the tile going from left to right, top to bottom.
The way these bytes are encoded depends on the graphics type:
So depending on the format, you would read (16 * 16 / bpp) bytes at a time (where bpp = bits per pixel) to get each tile.
Note that this information is not necessarily consistent with what is known about the game files, simply because not everything is known about the game files. For example, it naturally makes sense that the T1K*.BIN files are double the size of the CGA counterparts, but the fact that the T1K*.BIN files and the EGA*.BIN files are the same size may mean that EGA*.BIN are not actually VGA files (which was merely an assumption of mine). But why have two sets of EGA graphics? I tried experimenting with parsing the EGA*.BIN files as EGA, but they don't produce the correct tiles. I've uploaded parsed tilesets so you can compare the EGA tileset and the T1K tileset.
What does T1K actually mean, anyway? It actually stands for Tandy 1000, a line of computers from the 80s which had 16 colours and was EGA-compatible.
Another thing of note is that *FIGHT.BIN has the same size across all formats. We don't know what *FIGHT.BIN contain, to this day.
More information about the CGA/EGA/VGA file formats can be found at:
To date, no one has fully deciphered the file format of the savegame files. However, I have made significant progress with understanding this file format. A scan of my handwritten notes [JPG] is available.
MAP.BIN contains the world map. The following is taken from technical notes provided by Johnny Wood:
The world map consists of 13104 bytes. The world map itself is 168x156 or 26208. Therefore, for each byte read in on the world map, the byte represents two tiles. The low 4
bytes[bits] represent the first tile while the next fourbytes[bits] represent the second. The numbers themselves need no conversion and are simply offset into the tileset generated from the xxxtiles.bin file. For example, a value of '10' will equal a grass tile '1' followed by a water tile '0'.
TCD.BIN contains the town and castle maps. They are stored as 10x38x18 [this info also comes from Johnny Wood's notes]. This means that towns and castles are 38 tiles wide and 18 tiles high, and there are 10 of them. This is because there are 8 different towns and 2 castles, and they are repeated across each continent.
© by Daniel D'Agostino 2002-2009