Skip to main content

VCN field reference

File page · Format catalogue · Schema source

This page is generated from the Kaitai schema VCN.ksy each time the site is built. The schema is the authoritative description; statements are established unless marked inferred or unknown, and the evidence is listed on the file page (see the reading guide).

  • Schema: Eye of the Beholder II DOS VCN decoded graphics
  • Byte order: little-endian
  • Schema license: MIT

Description​

A VCN file is the tile set of a dungeon style: small 8 × 8 graphical blocks, plus two 16-entry colour tables, from which the game assembles the dungeon view. The matching VMP file says which block goes where. This schema reads the decoded payload: the five DOS VCN files are stored in the container described by CPS.ksy (LCW, method 4) and must be decoded first. Offsets below are relative to the decoded data. See the format overview.

Decoding CRIMSON, DUNG, FOREST, MEZZ and SILVER.VCN yields a little-endian block count, 32 bytes of colour tables and count × 32 bytes of blocks, with nothing left over.

  • Loading: the game copies both colour tables and passes them to the renderer. It copies a fixed 47,500 bytes of block data (1,484 whole blocks) to its block buffer, whatever the block count: a block beyond that is not loaded. The largest original file, DUNG, has 1,474 blocks.
  • Drawing, VGA path: the game reads eight rows of four bytes and draws the high nibble before the low nibble; horizontal mirroring reverses the pixel order. The first colour table maps backdrop pixels and the second wall pixels to palette indices.
  • Compositing: a wall pixel whose mapped colour is zero is skipped, leaving the backdrop visible.
  • Display modes (see display modes). VGA (mode 3) and Tandy (mode 6) draw through the path above; in mode 6 the game first replaces entries 1–15 of both tables through a table returned by the display driver (the table's content is unknown). EGA (mode 5): at level load, the game colours blocks 0–999 once, with the backdrop table for blocks used by an unflagged backdrop VMP entry and the wall table otherwise, and blocks 1,000–1,999 with the wall table; the display driver stores the result in video memory. It then builds a mask of the pixels whose raw value is nonzero, which is the transparency of a block drawn over the backdrop in that mode.
  • Lighting and distance: the game does not change block colours with distance or light. The distance darkening of the display driver applies to shapes (items, monsters, flying objects), not to the tiles drawn by the game; see darkening with distance.

File structure​

FieldTypeSize, repetition and constraints
block_countu2—
backdrop_color_map16 bytes—
wall_color_map16 bytes—
blockstilerepeated block_count times
trailing_unknownbytes to end of stream—

block_count

Number of 32-byte blocks after the colour tables.

backdrop_color_map

Maps backdrop pixel values (0–15) to palette indices in the VGA and EGA modes; in the Tandy mode the game first passes entries 1–15 through a table of the display driver.

wall_color_map

Maps wall pixel values (0–15) to palette indices in the VGA and EGA modes. In VGA mode a mapped value of zero is transparent when a wall block is drawn over a backdrop; in EGA mode a raw pixel value of zero is. In the original files only FOREST maps a nonzero value (15) to colour 0, and no FOREST wall block uses it.

blocks

8 × 8 blocks of 32 bytes, two 4-bit pixels per byte, high nibble first, in the VGA and EGA modes. The game loads at most the first 47,500 bytes (1,484 whole blocks); in EGA mode only blocks 0–1,999 are converted for display.

trailing_unknown

Trailing bytes, unknown; none in the five decoded original files.

Type tile​

An 8 × 8 block stored as eight rows of four bytes. The high and low nibbles of a byte are adjacent pixels, high nibble first, in the VGA and EGA modes.

FieldTypeSize, repetition and constraints
rows4 bytesrepeated 8 times

rows

Four bytes holding eight 4-bit pixel values, in row order.