Case study / internal R&D

Legacy software.
Recovered
and verified.

This internal research project explored how AI-assisted implementation and deterministic verification can support legacy software recovery. The result: a reconstructed implementation of Wizardry VII, with game code in C and low-level components in assembly, that rebuilds byte for byte.

  • 16-BIT DOS
  • 640K
  • MANX AZTEC C
  • BYTE-EXACT
  • AI-ASSISTED
  • VERIFIED
  • OVERLAYS
  • DRIVERS
The problem

Reconstructing
Wizardry VII.

Wizardry VII, a 1992 DOS game, combines memory overlays, separate graphics and sound drivers, and a period-specific compiler toolchain. Reconstructing its implementation required understanding these dependencies and verifying that recovered routines compiled to the original machine code.

Inside the method

Compare. Refine. Verify.

This illustration shows how successive implementations can be checked against the original bytes. The comparison provides a concrete test for each reconstruction.

VERIFIED SOFTWARE RECOVERYCOMPILE / COMPARE
DRAFT / COMPILE / COMPAREBYTE-EXACT ✓

Illustrative comparison of successive reconstruction attempts.

Verification methodology

Define a reproducible standard for verification.

  1. 01 — REBUILD

    Establish a baseline disassembly that reassembles to the original executable. Use that reproducible build as the reference for subsequent reconstruction.

  2. 02 — RECOVER THE COMPILER

    Identify the original compiler and build settings, then reproduce the compilation environment in DOSBox.

  3. 03 — COMPARE

    Compile each recovered C routine and compare the resulting machine code byte for byte with the reference. Accept a reconstruction only when it meets that check.

ORIGINAL / DISASSEMBLED8086
RECOVERED / CK&R DIALECT
MANX AZTEC CSAME BYTES ✓

FIG. 0x42 — clamp_value_to_range, one of the game’s routines

Implementation process

Automated iteration.
Verified results.

AI agents drafted C routines and iterated against automated byte comparisons. Engineering oversight focused on verification tooling, review, and interpretation of recovered structures. Repeated failure patterns informed improvements to the tooling.

  1. 01

    Establish the analysis environment, including a DOS debugger, labels, and a reproducible disassembly.

  2. 02

    Separate the disassembly into routines that can be reconstructed and verified independently.

  3. 03

    Reproduce the compiler settings and validate the first recovered C routine against the original bytes.

  4. 04

    Expand automated reconstruction across routines, with discrete commits, review, and improvements to verification tooling.

AGENTS

  • Draft C for each routine
  • Iterate against the byte check
  • Propose names for routines and data
  • Process routines through the verification workflow

ENGINEERING OVERSIGHT

  • Build and harden the verification tooling
  • Review every commit before it lands
  • Reject plausible-but-wrong names and structure
  • Maintain scope and acceptance criteria
The outcome

A reproducible
implementation.

The game program was reconstructed in C, with drivers and low-level routines retained in readable, macro-based assembly. The resulting build matches the original bytes. This research demonstrates a verification-led approach to software recovery; commercial applications require their own assessment of available artifacts, toolchains, and acceptance criteria.

Discuss your project

Let’s discuss
your requirements.

Tell us what you need to accomplish and which systems are involved. We begin with a discussion of your objectives and constraints, then identify the information, access, and discovery work needed to define the next step.