Game Decompilation with Watcom 10.6: A Cookbook. Byte-Exact Reconstruction Step by Step
A practical step-by-step guide to byte-exact matching decompilation: turning an old compiled program back into C/C++ source code that the original historical compiler translates into the identical binary, byte for byte, with the help of several AI model families. The cookbook covers 15 steps, each with goal, procedure, acceptance criterion ("done when ..."), typical pitfall and measured experience values: prerequisites and legal hygiene, reconstructing the original toolchain, a reassemblable byte-exact baseline, the exact compiler judge with gatekeeper and ratchet, splitting the work by function size and model family, blind drafts, horizontal recombination (Mixer) and vertical inpainting (Layering), siblings and mutators, modelling and inverting the compiler's register and stack allocation, the whole-program link check, post-match cleanup, bug fixes behind compiler switches, verifying the fixed build, release with a build kit and a copyright-free binary patch, and guiding AI agents. A one-page checklist and a glossary are included. All numbers come from three completed byte-exact reconstructions of 1990s DOS games: one built with Watcom C/C++ 10.6 (32-bit C++, 571 translation units, 6,834 functions, 2,477,899 bytes) and two built with Borland C++ 3.1 (16-bit). English and German versions included. The "how" to the two method papers "Matching Decompilation as a Puzzle" (doi:10.5281/zenodo.23806061) and "Game Decompilation with Watcom 10.6: Layered Blind Rewriting of LLM Drafts under an Exact Compiler Judge" (doi:10.5281/zenodo.24287585).
Authors
- Werner Baumgarten
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-16
- DOI
- https://doi.org/10.5281/zenodo.24287816
- Primary Topic
- Software Engineering Research
- Type
- preprint