th06
th06 copied to clipboard
Decompilation of 東方紅魔郷 ~ the Embodiment of Scarlet Devil (1.02h)
東方紅魔郷 ~ the Embodiment of Scarlet Devil
This project aims to perfectly reconstruct the source code of Touhou Koumakyou ~ the Embodiment of Scarlet Devil 1.02h by Team Shanghai Alice.
This project is still highly work in progress and in its early stages.
Installation
Executable
This project requires the original 東方紅魔郷.exe version 1.02h (9f76483c46256804792399296619c1274363c31cd8f1775fafb55106fb852245)
Copy 東方紅魔郷.exe to resources/game.exe.
Dependencies
The build system has the following package requirements:
python3>= 3.4msiextract(On linux/macos only)wine(on linux/macos only, prefer CrossOver on macOS to avoid possible CL.EXE heap issues)aria2c(optional, allows for torrent downloads, will automatically install on Windows if selected.)
The rest of the build system is constructed out of Visual Studio 2002 and DirectX 8.0 from the Web Archive.
Configure devenv
Run the following script:
# NOTE: On macOS if you use CrossOver.
# export WINE=<CrossOverPath>/wine
./scripts/create_th06_prefix
Building
Run the following script:
python3 ./scripts/build.py
This will automatically generate a ninja build script build.ninja, and run
ninja on it.
Reverse Engineering
You can find an XML export of our Ghidra RE in the companion repository
th06-re. This repo is updated nightly through [scripts/export_ghidra_database.py],
and its history matches the checkin history from our team's Ghidra Server.
If you wish to help us in our Reverse Engineering effort, please contact @roblabla on discord so we can give you an account on the Ghidra Server.
Credits
We would like to extend our thanks to the following individuals for their invaluable contributions:
- @EstexNT for porting the
var_orderpragma to MSVC7.