Catacomb Map Format

From ModdingWiki
Jump to: navigation, search
Catacomb Map Format
Catacomb Map Format.png
Format typeMap/level
Map type2D tile-based
Layer count1
Tile size (pixels)8×8
Viewport (pixels)192×192

Catacomb game levels are stored in this format, compressed using Keen 1-3 RLE compression. Levels are stored in LEVEL1.CAT to LEVEL10.CAT for Catacomb I, and LEVEL1.CA2 to LEVEL30.CA2 for Catacomb II. Note that the number in the level name is not padded, unlike in later games.

File Format

Every level is the fixed size of 64×64 tiles, like the later Wolfenstein 3-D, but there is only one plane of data, and each tile is only one byte.


There is no signature, however the decompressed size will always be 4096 so this value could be checked in the file header.


The first 4 bytes of the level file is the size of the uncompressed data in little-endian format. It is always 4096 (64x64). Following that is the compressed level data, compressed with Keen 1-3 RLE compression. There is nothing else in the level file.

Map Codes

The first 256 tiles in the *CHARS.CAT file are the main tiles used for the level and the menu elements drawn on the screen. Assuming the main tiles are all read into a single spritesheet with the dimensions of 2048x8 you can translate any map tile to a texture index by simply multiplying the tile by 8 (tile width).

Here are some possible tile values:

Value (hex) Purpose
41..5A (uppercase ASCII 'A'..'Z') white block with letter A..Z
61..7A (lowercase ASCII 'a'..'z') pink block with letter A..Z
80 green floor (purple in CGA)
81 pink block (white and cyan in CGA)
82 grey left wall of room (black in CGA)
83 top wall of room (purple and grey wall in EGA, white bricks in CGA)
84 bottom right corner of block
85 top left corner of room
86 bottom left corner of block
87 top right corner of block
88 secret passage
89 secret passage in left wall
8A secret passage in top wall
8F bag pickup (secret)
91 key pickup (secret)
A2 bag (not secret)
A3 scroll
A4 key pickup
A6 door
A7 chest
E6 player start
E7 portal
E8 teddy bear
E9 skeleton
EA big red/purple monster's top left corner

Additional Information

  • Not all maps have a start location tile. If the start location tile is not found, the player starts at (2,2)