VMP field reference
File page · Format catalogue · Schema source
This page is generated from the Kaitai schema VMP.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 VMP view arrangements
- Byte order: little-endian
- Schema license:
MIT
Description
A VMP file tells the game which VCN blocks make up each wall seen in the dungeon view, and where. It is a list of 16-bit entries, each selecting a block with optional mirroring and compositing over the backdrop. It is not a top-down level map. See the format overview.
All five original files contain a little-endian entry count followed by that many 16-bit entries, with nothing left over. FOREST.VMP has a different count from the other four.
- Scene: the game copies entry (group − 1) × 431 + 330 + area offset, where the group comes from the per-level wall-to-VMP table (0 draws nothing). The view setup uses the area offsets 0, 45, 81, 97, 102, 117, 129, 159 and 239, and offset −330 with wall reference 1 for the 22 × 15 backdrop. A zero entry leaves the tile grid unchanged; columns outside 0–21 are skipped. Mirroring a wall area reverses each row and toggles bit 0x4000 of each nonzero entry.
- Layout: 330 backdrop entries, then one group of 431 entries per wall graphic. Every original file has exactly 330 + 431 × n entries: n = 6 for CRIMSON, DUNG, MEZZ and SILVER, n = 2 for FOREST. The backdrop is the 330 entries before the group of wall reference 1. Only the INF wall mappings and True Seeing (reference 46) write the wall-to-VMP table, and the sixteen original INF files map references 25–74 only, so reference 1 keeps group 1 and the backdrop is always the file's first 330 entries. See drawing the dungeon view.
- Drawing, VGA path: bits 0–13 select a VCN block, bit 0x4000 mirrors it horizontally and bit 0x8000 draws it over a backdrop block: the backdrop is drawn first, then the wall pixels whose mapped colour is nonzero. A block index of zero selects the backdrop. The index is not range-checked.
- Unusual values, VGA path: 0x8000 (composite, block 0) draws the backdrop only; 0x4000 (mirror, block 0) draws the backdrop tile mirrored whatever the backdrop entry's own mirror bit; in a backdrop entry, bit 0x8000 has no effect. A file value 0x4000 copied into a mirrored area becomes 0 and stores 0, which shows the backdrop unmirrored and erases a farther wall tile there; 0x8000 copied mirrored becomes 0xc000. None of these values occurs in the five original files: no flagged entry with block 0, no zero or 0x8000-flagged backdrop entry, no index beyond the VCN block count.
- Other modes: the Tandy mode draws as VGA. The EGA mode decodes the bits the same way, but takes the colours fixed per block at level load and the transparency from the raw pixel value; 0x8000 with block 0 draws block 0 over the backdrop under its own mask, and bit 0x8000 in the backdrop entry of a composite tile is not removed, which addresses the wrong memory. In EGA mode the game also uses the first 330 entries, raw, as indices of a 2,000-byte table: a backdrop entry with bit 0x4000 writes outside it (ANOMALY-80); CRIMSON, DUNG and MEZZ have 47, 3 and 12 such entries. See display modes.
File structure
| Field | Type | Size, repetition and constraints |
|---|---|---|
entry_count | u2 | — |
backdrop | tile_entry | repeated 330 times |
wall_groups | wall_group | repeated (entry_count - 330) / 431 times |
trailing_unknown | bytes to end of stream | — |
entry_count
Number of 16-bit entries that follow.
backdrop
The floor and ceiling backdrop, 22 × 15 entries, row by row, drawn over the whole view before the walls (mirrored on every other block). Taken through the group of wall reference 1 at offset −330, which is group 1 in every original level. Bit 0x8000 has no effect here in VGA mode.
wall_groups
One group of 431 entries per wall graphic; group g is selected by wall references whose wall-to-VMP value is g. Each group holds the left-side and front views of the wall for every place of the dungeon view.
trailing_unknown
Entries or bytes left after the last complete group, unknown; none in the five original files.
Type wall_group
The nine tile areas of one wall graphic, in file order, each a rectangle of entries stored row by row. The view setup copies each area to fixed tile positions; side views on the right of the view are the left-side areas drawn mirrored. Area names follow the distance from the party and the kind of face; see /eob2/view for the positions.
| Field | Type | Size, repetition and constraints |
|---|---|---|
party_row_side | tile_entry | repeated 3 * 15 times |
near_side | tile_entry | repeated 3 * 12 times |
middle_inner_side | tile_entry | repeated 2 * 8 times |
far_inner_side | tile_entry | repeated 1 * 5 times |
far_outer_side | tile_entry | repeated 3 * 5 times |
middle_outer_side | tile_entry | repeated 2 * 6 times |
far_front | tile_entry | repeated 6 * 5 times |
middle_front | tile_entry | repeated 10 * 8 times |
near_front | tile_entry | repeated 16 * 12 times |
party_row_side
Offset 0, 3 × 15 tiles: side faces of the party's row (view blocks 15 and 17).
near_side
Offset 45, 3 × 12 tiles: side faces one step ahead (blocks 12 and 14).
middle_inner_side
Offset 81, 2 × 8 tiles: side faces two steps ahead (blocks 08 and 10).
far_inner_side
Offset 97, 1 × 5 tiles: side faces three steps ahead (blocks 02 and 04).
far_outer_side
Offset 102, 3 × 5 tiles: side faces three steps ahead (blocks 00, 01, 05 and 06).
middle_outer_side
Offset 117, 2 × 6 tiles: side faces two steps ahead (blocks 07 and 11).
far_front
Offset 129, 6 × 5 tiles: front faces three steps ahead (blocks 01 to 05).
middle_front
Offset 159, 10 × 8 tiles: front faces two steps ahead (blocks 08, 09 and 10).
near_front
Offset 239, 16 × 12 tiles: front faces one step ahead (blocks 12, 13 and 14).
Type tile_entry
| Field | Type | Size, repetition and constraints |
|---|---|---|
raw | u2 | — |
raw
Original entry word, with the block index and all drawing bits.
Derived values and positioned data:
| Field | Type | Size, repetition and constraints |
|---|---|---|
tile_index | computed: raw & 0x3fff | — |
horizontal_flip | computed: (raw & 0x4000) != 0 | — |
composite_bit | computed: (raw & 0x8000) != 0 | — |
tile_index
VCN block index in the VGA and EGA modes, not range-checked; zero selects the backdrop.
horizontal_flip
Horizontal mirroring. The scene code toggles this bit when it mirrors a wall area. With block 0, the backdrop tile is drawn mirrored.
composite_bit
Draw the block over a backdrop block; in VGA mode wall pixels mapped to colour zero leave the backdrop visible, in EGA mode pixels of raw value zero. With block 0, VGA mode draws the backdrop only.