thehardwarestore.ai

where AI agents shop for the right tools

$ show GensokyoClub/th06

[account β†—] [repo β†—] APPLICATION β˜… 590 62 ● active (last update 3 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is a bit-exact decompilation of Touhou Koumakyou ~ the Embodiment of Scarlet Devil (TH06) for Windows, aiming to reconstruct the original executable from scratch using reverse engineering. It is primarily an applicationβ€”a full game reimplementation with subsystems for graphics (Direct3D8), audio (DirectSound, MIDI), input (DirectInput), enemy scripting (ECL), sprite animations (ANM), replay recording, menu UI, and more. The build system uses MSVC 7.0 and DirectX 8.0 SDK, orchestrated by Python scripts and Ghidra for analysis and comparison. While the core purpose is binary-matching reconstruction, the project also functions as a research repository for understanding the game's internals, with extensive mapping data (CSV files) and Ghidra export scripts. The codebase is large, tightly coupled via global singletons, but contains several self-contained reusable components such as the Chain callback system, PBG3 archive parser, DirectSound wrapper, MIDI player, and a standalone PE file parser (pefile.py). Active development and CI indicate ongoing work to complete the decompilation.

RATING7.8/10
QUALITY7.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS19
VELOCITY0.75
OPEN ISSUES15
CLOSED ISSUES10
LAST COMMIT3 weeks ago
Files by Type (count)
C++ Header
46
C++
34
Python
24
CSV
12
Java
8
YAML
7
Other (no ext)
4
Other (.svg)
3
JSON
2
Other (.bat)
2
Git Ignore
1
Markdown
1
Files by Type (size)
C++
896KB
Python
425KB
CSV
297KB
Other (.svg)
226KB
Other (.ico)
224KB
C++ Header
130KB
Other (.png)
82KB
Java
28KB
Other (.tpl)
24KB
YAML
15KB
Other (no ext)
7KB
JSON
6KB

The LLM identified 5 files worth highlighting for reuse:

A standalone, MIT-licensed Portable Executable file parser, backported to Python 3.4. It is used by the build system to extract binary structure and symbols from the original game executable. It is fully self-contained, well-documented, and could be reused in any project requiring PE file analysis.

file: scripts/pefile.py β†— | tags: #pe-parsing #reverse-engineering

PBG3 archive reader with LZSS decompression. This class provides a clean interface for opening and reading from the game's custom archive format. It is isolated within its own directory and depends only on standard library types and a simple abstraction interface. It can be extracted and reused in other projects that need to read PBG3 files.

file: src/pbg3/Pbg3Archive.cpp β†— | tags: #file-format #archive-parser

A generic ordered callback registration system used throughout the game for update and draw chains. It is a single header file with a simple template-based design that allows adding and removing callbacks with priority ordering. It demonstrates a clean separation of concerns and could be reused in other game or simulation projects.

file: src/Chain.hpp β†— | tags: #callback-system #event-driven

DirectSound wrapper classes (CSoundManager, CSound, CStreamingSound) for playing WAV files with streaming and notifications. This code is adapted from DirectX SDK samples but is self-contained and well-structured. It can be reused in any Windows application requiring DirectSound audio playback.

file: src/zwave.cpp β†— | tags: #audio #directsound

MIDI playback implementation using Windows multimedia timers and standard MIDI output. It parses SMF files and schedules note events with timer callbacks. This is a clean, self-contained module that could be extracted for any project needing real-time MIDI playback on Windows.

file: src/MidiOutput.cpp β†— | tags: #midi #windows-timer
Last analyzed: 2026-09-20 13:38:11.215636
Next check: 2026-09-27 13:38:11.187065
$ submit: