Skip to content

Technical Analysis

Edoardo BAROLO edited this page Jun 10, 2026 · 1 revision

Technical Analysis

The full 3,193-line technical analysis is in docs/TECHNICAL_ANALYSIS.md in the repository.

Summary

Executable

  • Original: BTECH.EXE (packed)
  • Unpacked: UNBTECH.EXE (MS-DOS 16-bit Real Mode, MZ executable)
  • Compiler: Microsoft C 5.0
  • Code segments: 23 segments covering game loop, combat, rendering, BLD interpreter

Combat System

  • Turn-based, 24 unit slots (4 player + 8 infantry + 12 enemy mechs)
  • 2D6 to-hit resolution with skill, terrain, heat, and story modifiers
  • 8-direction ray-cast Line of Sight
  • Twin 12×24 fog of war grids
  • Heat system (cap 30), ammo tracking (10 bins per mech)
  • AI target selection via story state property scanning

Story System

  • 3-layer state machine: D30C[256] generic state + story properties + milestone flags
  • Story dispatcher at 1000:0D10 with 100+ story indices
  • 26 BLD script files drive all interactions

World Map

  • 64×64 tile grid (93 tile types)
  • 2048-byte bit-packed visibility (128×128)
  • 15 local maps (MAP1-15.MTP)
  • 22 location entries mapped to BLD scripts

Memory Map

Clone this wiki locally