How the MAZ format works.



File Header

The picture depicts the ".MAZ" format employed by the "Eye Of The Beholder" series of games. This format contains 6 bytes of map vector data and 4096 bytes of block / cell data (refered to as a CELL).

The map vector data uses three words to depict its information. the first 2 words (4 bytes 1 - 4 ) provide X and Y values for the number of cells of the map. The third word of the map vector ( bytes 5 & 6 ) provides the number of faces for each cell.

File Body

A Cell represents a block within the game, a cell is made up four faces ( North, East, South and West ). The remaining 4096 (X*Y*NoF) bytes of data contain values that represents a face within a cell (hence 4 byte values, 1 byte each face). These face values are a graphic image reference that is stored within the ".INF" filetype. <see ".INF"> for more detail.


struct Maze
   unsigned short width;
   unsigned short height;
   unsigned short nof;
   struct MazeBlock
      unsigned char north;
      unsigned char south;
      unsigned char west;
      unsigned char east;
   } wallMappingIndices[width*height];
Please consult the .inf file specification for a description of the wall mapping structure.


There is 2 byte assumption made for the map vector for bytes 4 and 5 (word 3), this example depicts it as value to determin the number of faces a cell can have. There is no direct or realistic indirect evidence supporting this.

(remarks EOB1&2 AMIGA/EOB1&2 PC/LANDS OF LORE use same MAZ structure except sometimes 2 bytes of each word are swaped and sometimes file is crunched using format 80 method)

See Also

information on .inf files
information on wall type structures