Skip to content
N0zoM1z0Public

Repository files navigation

東方花映塚 ~ Phantasmagoria of Flower View

Agent workflow: follow the highest-priority requirements in AGENTS.md. Use affected exact checks and searchable Markdown knowledge; ordinary notes do not require full CI or replay.

Original Japanese TH09 1.50a title screen

TH09 reconstruction progress

This project reconstructs the original Japanese TH09 version 1.50a executable. It starts from an independently versioned, hash-attested target and tracks boundary, origin, source presence, codegen exactness, native-product closure, runtime semantics, and portability as separate facts.

Exact target

Place your own legal copy at the ignored canonical path resources/th09.exe. Repository tools use that path by default. An explicit path or TH09_TARGET_PATH is supported only for deliberate local overrides; normal reconstruction work uses the canonical path.

Property Required value
Version original Japanese 1.50a
Size 685,056 bytes
SHA-256 10350095bcf95edb59e03bee9849a2dc8a7714b4927ad5909c569c550fce6822
MD5 cf634df46e05552e104fa97a971aaac0
Image base 0x00400000
Entry point 0x0047D45F

The pinned thcrap version database classifies this exact SHA-256 and size as th09, v1.50a, (original) and lists the English-patched executable under a different digest. The official 1.50a release post is dated 2005-10-08 JST, consistent with the target's PE timestamp.

python3 scripts/verify-target.py
python3 scripts/validate-tracking.py --require-target
python3 scripts/report-reconstruction-status.py

Analysis uses direct local Ghidra through scripts/ghidra-analysis.py. The runner verifies disk/Program identity, i386 language, entry and every file-backed mapped PE byte before analysis or export, then reuses the saved project. See AGENTS.md and docs/TOOLS.md.

Original executables, game data, analysis databases, decompiler output, and downloaded tools are private and never committed.

Current status

Current ledger-derived counts and exact bytes are in docs/PROGRESS.md. Generate them with python3 -B scripts/progress.py, or inspect the live report:

python3 -B scripts/report-reconstruction-status.py

docs/RE_HANDOFF.md is the single restart guide: current source work, all nonexact owners and focused comparison commands. docs/KNOWLEDGE_BASE.md keeps verified findings, current blockers and useful failed approaches. The candidate inventory is not proven complete; the native Windows product is not yet linked/runtime-validated.

Only rebuild and compare affected complete owners and their dependencies. Use gpt-web: <English summary> for coherent local checkpoints and preserve dirty/untracked operator work. config/build.toml records open whole-product questions; exact functions do not establish that graph.

Retain the original executable, toolchain/game-specific Wine runtime, saved Ghidra projects, maintained source/ledgers/replay scripts and concise knowledge. Remove obsolete archives, duplicate evidence and old trial outputs without creating another archive or cleanup report. A document reference alone is not a reason to retain a file. build/ may be absent; recreate only the selected unit's object. A small experimental context is worth keeping only when an unresolved question depends on it and it is difficult to rebuild.

Use python3 -B scripts/validate-docs.py for links and frontier consistency, python3 -B scripts/ci.py for fast basic syntax/public-file, ledger, link/progress and whitespace checks. This is also the GitHub Actions command. Run affected tool tests separately; python3 -B scripts/ci.py --full adds the optional complete unit suite. Routine commits do not require that full suite.

Required phase order

  1. Preserve the reviewed boundary/origin inventory and recover remaining exact VC7.1 authored units.
  2. Close and exercise the faithful Windows i386 product, including static data ownership, initializers, resources, libraries, and runtime scenarios.
  3. Perform semantic reconstruction with two independent runtime Oracles: the original target and the reconstructed native i386 product.
  4. Start a portability branch only after the native semantic baseline is trustworthy.

Exact functions do not imply a complete or runnable product. A modern port can hide missing original data owners, ABI behavior, and initialization, so it is not an acceptable shortcut around the native-product stage.

Project map

Credits

Thanks to Cirno-Labs/th09 for reference implementations adapted into some maintained source functions. Not every adapted function is exact; file-level attribution and the pinned upstream revision are in THIRD_PARTY_NOTICES.md.

License

Original project code and documentation retain their MIT license. Code adapted from Cirno-Labs/th09 is GPL-3.0-only, so the combined reconstructed program is distributed under GPL-3.0-only. These licenses do not cover the original game or its assets.

Releases

Packages

Contributors

Languages