gagarin rebuilds the Red Alert 2 engine as readable C++
The gagarin project decompiles the Red Alert 2 / Yuri's Revenge engine from retail gamemd.exe v1.001 for software preservation.
The gagarin project is reconstructing the engine of Command & Conquer: Red Alert 2 - Yuri’s Revenge as a buildable C++ project. It starts from the retail gamemd.exe v1.001. The stated goal is software preservation, and the code follows Westwood’s class and file layout as closely as the binary allows.
The README reports 4,189 functions matched at 100%, 167 partial rows, and 974 tracked C++ files. The tracked-source object build passes 974 of 974. The project is not finished. The engine link step and whole-image comparison are still open, so a clean compile does not yet prove the rebuilt executable matches the original byte for byte.
You need your own legal copy of gamemd.exe v1.001, plus Wine (WoW64), Python 3, Git, 7-Zip, GNU objdump, Ghidra, and the MSVC 6.0 toolchain. A script fetches the toolchain. The README says not to commit the game binary, assets or toolchain. The steps:
- Run
scripts/vc6/fetch_toolchain.sh. - Run
scripts/vc6/compile_all.sh. - Run
GAMEMD_BINARY="/path/to/gamemd.exe" python3 scripts/vc6/verify_all.py. - Run
python3 scripts/vc6/build_project.py --jobs 8.
The last step compiles objects but does not link an engine.
