Case study
Touhou 6: reconstructing Embodiment of Scarlet Devil 1.02h source
Reconstructs C++ source for the Windows executable of Touhou 6: Embodiment of Scarlet Devil version 1.02h, aiming at an exact rebuild with the original Visual Studio .NET 2002 and DirectX 8 toolchain. reccmp and objdiff compare the rebuilt binary with the user’s original executable function by function. The committed progress badge reports every function implemented but 98.03% byte accuracy, so whole-binary identity is not claimed.
- Targets
- Game
- Category
- Independent reconstruction cases
- Relationship
- Independent reconstruction project
- Sources reviewed
Requirements & limits
- Prerequisites: Supply your own original 東方紅魔郷.exe version 1.02h matching the SHA-256 in README, copied to resources/th06.exe; reccmp checks the same hash, and the build extracts the game icon from that file. The repository contains no game executable or data; the comparison workflow fetches the original binary from a secret-configured URL.
- Prerequisites: Builds need Python 3.4+, plus msiextract and Wine outside Windows (CrossOver is suggested on macOS); aria2c is optional. scripts/create_devenv.py downloads Visual Studio .NET 2002 and the DirectX 8.0 SDK from web archives, along with ninja, objdiff, Ghidra and helper tools, and scripts/build.py generates and runs a ninja build.
- Scope: README states the aim of perfectly reconstructing the 1.02h source; the committed, mutable progress badge reports 100.0% implemented and 98.03% byte accuracy for TH06.EXE. README points to a separate portable branch for Linux and modern Windows. The team’s Ghidra work is exported as XML to the companion happyhavoc/th06-re repository.
- Testing evidence: Contributors diff with reccmp, which reports per-function accuracy of the rebuilt executable against the original as an HTML report. CI builds on Windows and compares an objdiff build with objects delinked from the original through Ghidra; a small munit suite reads the user’s game archive. Badge figures are project-generated.
- License: The repository is dedicated under CC0 1.0; the original game, the downloaded Microsoft toolchain and third-party tools keep their own terms.
About this entry
The description was reviewed against primary sources.
Primary sources
- README.md GitHub · GensokyoClub/th06 · Revision e840ab4
- reccmp-project.yml GitHub · GensokyoClub/th06 · Revision e840ab4
- resources/progress.svg GitHub · GensokyoClub/th06 · Revision e840ab4
- scripts/create_devenv.py GitHub · GensokyoClub/th06 · Revision e840ab4
- scripts/build.py GitHub · GensokyoClub/th06 · Revision e840ab4
- scripts/extract_icon.py GitHub · GensokyoClub/th06 · Revision e840ab4
- .github/workflows/ci.yml GitHub · GensokyoClub/th06 · Revision e840ab4
- .github/workflows/compare.yml GitHub · GensokyoClub/th06 · Revision e840ab4
- tests/test_Pbg3Archive.cpp GitHub · GensokyoClub/th06 · Revision e840ab4
- LICENSE GitHub · GensokyoClub/th06 · Revision e840ab4
More in Games
- Touhou 7: reconstructing Perfect Cherry Blossom 1.00b source · Case study
- Twilight Princess: a decompilation with fully matching GameCube code · Case study
- Underworld Exhumed: reconstructing Ultima Underworld I and II · Case study
- wii-ipl: a decompilation of the Wii Menu (System Menu 4.3) · Case study
- c1: a C port of PlayStation Crash Bandicoot · Case study
- Firefighter: a decompiled DOS game ported to Rust · Case study