th06 decomp rebuilds Embodiment of Scarlet Devil 1.02h from source
The GensokyoClub th06 project reconstructs the source code of the PC Touhou game Embodiment of Scarlet Devil, version 1.02h.
The GensokyoClub group has published th06, a decompilation of Touhou Koumakyou ~ the Embodiment of Scarlet Devil 1.02h, the Touhou game made by Team Shanghai Alice. The goal is to rebuild the game’s source code so that it matches the original. The repo has 618 stars.
You need your own copy of 東方紅魔郷.exe, version 1.02h. The README lists a SHA256 hash for the file, and the build expects that exact file. The toolchain is Visual Studio 2002 and DirectX 8.0. The setup scripts download them for you. On Linux and macOS you also need Wine. The README suggests CrossOver on macOS to avoid CL.EXE heap issues.
Contributors check their work with reccmp, a tool that compares the recompiled binary with the original and writes an HTML report. Reverse engineering runs on a shared Ghidra server, and the team asks people who want to help to contact roblabla on Discord for access. A separate portable branch aims at a working port for Linux and modern Windows.
To build it:
- Copy the original exe to
resources/th06.exe. - Run
./scripts/create_th06_prefixon Linux or macOS, orpython scripts/create_devenv.py scripts/dls scripts/prefixon Windows. - Run
python3 ./scripts/build.py.
Decomps like this are slow work, and the hash check makes sure everyone starts from the same binary. Mostly, I’d expect this to matter to people who want to read and change the game’s code, not to people who just want to play it.
