0xreversed/with.ai
Games and modsWorksSource available
Target: Sid Meier's Civilization (MS-DOS)

Civilization civd: AI-assisted reconstruction with project hash checks

by sjmelia Repository0 views

Evidence at a glance

Based on the linked sources. The author's reported result and independent confirmation are separate checks.

AI involvement
Reported models: OpenAI LLMs, Anthropic LLMs, Google LLMs. Tools: Microsoft C 5.1, MASM 5.10, LINK 5.01, Microsoft MAKE 4.07, DOSBox-X. The writeup below describes the work attributed to AI.
Reported result
Works. This is the directory's source-based outcome classification.
Independent confirmation
Not reported.
Human work and limitations
The project emphasizes that this is a reconstruction rather than the original source. It relies on a specific build environment, including DOSBox-X and period-accurate compilers, to achieve verification. The author notes that the build process includes a four-byte startup correction.

What was done

The civd project provides a reverse-engineered source reconstruction of the 1991 MS-DOS game Sid Meier's Civilization, utilizing LLMs and period-accurate build tools to achieve a byte-for-byte executable match for version 474.05, excluding a four-byte startup correction.

The civd project provides a reverse-engineered source reconstruction of the 1991 MS-DOS game Sid Meier's Civilization. The project utilized LLMs from OpenAI, Anthropic, and Google to assist in code and documentation generation, followed by manual editing and build verification. The reconstruction builds upon earlier decompilation efforts, notably OpenCiv1. The build process uses period-accurate tools, including Microsoft C 5.1, MASM 5.10, and LINK 5.01, to produce an executable that matches version 474.05 byte-for-byte, with the exception of a four-byte startup correction. The project documentation notes that names, comments, and certain type declarations are inferred, and an exact executable match does not guarantee that the reconstructed source matches the original source code. Verification is performed against pinned SHA-256 hashes for the executable, raw linker output, and drivers.

From the source

Reproduce it

setup
Install Docker and VS Code with the Dev Containers extension. Open the repository in a container to automatically download Microsoft C 5.1 disk images and MASM, then run 'just setup' followed by 'just verify' to perform the clean build and hash check.