Skip to content
N0zoM1z0Public

About

Source reconstruction of 東方錦上京 ~ Fossilized Wonders. Japanese 1.00a (Steamless)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

東方錦上京 ~ Fossilized Wonders.

Original Japanese TH20 title screen

TH20 exact source reconstruction progress

Source reconstruction of the original Japanese TH20 v1.00a Steamless executable. Function-level exactness requires reproducible comparison against one hash-attested target. The workflow follows TH095, with Ghidra and a separate modern MSVC environment for TH20.

Important

Reconstruction is in progress. Verified source components and exact function comparisons are available; the repository does not yet build a playable game. Origin review, source presence, exactness, linkage and runtime behavior are separate statuses.

Exact target

Supply your own executable as resources/th20.exe:

Property Required value
Version Japanese 1.00a, user-selected Steamless variant
Embedded title/replay label 1.00c; recorded separately from registry/package identification
Size 1,858,560 bytes
SHA-256 a274b45fe6ec53511718bb328c2ff169a74e67f95d1b0c74d97d348b955a0897
MD5 e7ccdbd2f319ba868ce386e484fff1d3
Image base 0x00400000
Entry point 0x005435E0
scripts/import-target.sh /path/to/th20.exe
scripts/repo-python scripts/verify-target.py

The Steam-original backup is retained locally as provenance evidence. Its code differs from the comparison target. See target provenance for official Japanese release and independent executable identification. Game executables, assets, private databases, toolchains and reference checkouts are excluded from Git.

Repository status

Area Current position
Target and analysis Locked executable; independent, fully attested Ghidra 12.1.3 project
Inventory 6,928 provisional candidates; origin and boundary review in progress
Source 608 mapped component functions; 606 canonical units across 117 comparison objects; two whole buffer methods remain nonexact
Authored exactness 64 functions, 16,948 bytes
Reference review All 6,945 indexed implementation bodies reviewed; all 113 parser-gap files manually reconciled
Library comparisons Four MSVC minstd_rand component equivalents pass exact replay; excluded from authored totals
Shared float view Three exact comparisons; enclosing owner and origin review remain open
Empty/defaulted lifetime contributions Three exact comparisons; authored versus compiler-synthesized origin remains open
Configuration initializers Two exact comparisons; authored versus compiler-synthesized origin remains open
Window contributions Flags initialization and foreground wrapper pass exact replay; origin remains open
Audio state construction Three complete exact record constructors; authored versus compiler origin remains open
Animation handle construction Complete 23-byte exact value constructor; authored versus compiler origin remains open
ANM lifetime and reset Actual Base/Animation construction, nontrivial destruction, partial reset and inherited extents: 10 whole units / 2,870 comparison bytes; evidence
Vector arithmetic Sixteen complete exact Vector2/Vector3 members; original class spelling and authored/library origin remain open
Timer construction and wrappers Nine additional complete exact members, including fractional age and signed <=; source spelling and origin review remain open
Colored vertex construction Complete 43-byte exact constructor for the actual 20-byte value; source spelling and origin review remain open
Trophy messages Exact shared-buffer decoder and typed record reset; full resource/parser/owner lifetime remains open
Archive codec and allocation Signed decrypt, persistent LZSS/tree and actual byte/array/PMR allocation: 16 new units / 2,676 bytes; evidence
Worker lifetime Real thread start/replacement, guarded join/detach and destructor: 5 new units / 666 body bytes; evidence
Shared locks and random stream Node construction/access, actual recursive-mutex registry and locked seed/next: 9 new units / 693 body bytes; evidence
Intrusive observation and Region lifetime Shared link/list/iterator protocol and Region construction/update: 20 new units / 1,827 body bytes; evidence
Motion update protocol Two complete main updates and direct angle/vector/math dependencies: 18 new units / 2,572 comparison bytes; evidence
Rectangle/segment geometry All 12 related roots plus 9 direct dependencies: 21 new complete units / 10,759 bytes; evidence
Collision geometry Circle/ellipse/polygon/star predicates and vector dependencies: 10 new complete units / 3,841 bytes; evidence
Enemy interpolation Current-first 2.4 KB update, shared/axis factors and direct movement dependencies: 8 new units / 2,716 bytes; evidence
Enemy state and ECL entry Complete state lifetime, typed records and argument-forwarding protocol: 11 new units / 1,581 bytes; whole Enemy dispatcher pending; evidence
State/Manager script pipeline Whole script gate and async traversal with actual member callback and Timer step: 3 new units /419 bytes; evidence
ECL buffer pipeline Actual borrowed-buffer registration and instruction resolution now execute in VM/Manager tests; both remain nonexact. Player Context binding is whole exact; evidence
Profile construction Complete 13,684-byte typed constructor with 123 physical Spell slots and full EH; evidence
ECL async and call setup Whole spawn/find/invalidation, Runtime allocation and Loader activation; real VM lifecycle checks: 7 new units /524 bytes; evidence
Enemy spawn and time-scale orchestration Two complete Enemy core functions and Animation slowdown setter: 3 new units /1399 comparison bytes; evidence
Enemy movement and construction Whole movement composition/bounds, mode configuration and nonthrowing Enemy construction: 9 new units / 1,285 body bytes; evidence
Whole Enemy movement update and graphics owners Complete movement update and actual Graphics/viewport/configuration/file/context construction: 15 new units / 4,215 comparison bytes; evidence
ECL resource lifetime and loading Actual base/derived owner lifetimes and whole 556-byte file loading: 9 new units / 934 bytes; lifetime, loading
ECL argument and tagged stack protocol Whole current instruction, eleven parameter/destination members and generic push/pop/peek: 15 new units / 2,886 bytes; evidence
Enemy writable variables and handles Whole integer/float destinations, checked selection, identifier resolution and actual Data/array construction: 6 new units / 1,820 body bytes; evidence
ECL runtime lifetime and async disposal Complete zero-state construction, real PMR/virtual cleanup and destroy-before-lock scalar release: 10 new units / 701 body bytes; evidence
Process Session and player table Actual 704-byte process owner, CRT initializer, two Contexts/two PlayerRecords, lookups and state queries: 20 new units / 1,177 comparison bytes; evidence
Controller and Task construction Actual 308-byte Controller defaults, native Task flag construction and generation side effects: 2 new units / 385 comparison bytes; evidence
Card construction and time state Actual 200-byte Card, typed handles, wrapping time encoding, full-width validation and Context binding/lookup: 6 new units / 730 comparison bytes; evidence
Player storage construction Actual Option/Feedback/Shot/ShotController and complete 256-shot pool: 7 whole constructors / 1,494 comparison bytes; evidence
Game construction and state Actual 272-byte GameInf, typed Configuration/Timers/doubles, full-width flag queries and restart: 5 whole units / 367 comparison bytes; evidence
Interpolation protocol Shared 4 KB easing and eight typed updates, plus direct dependencies: 32 new units / 13,952 comparison bytes; evidence
Whole-program build and runtime Not available

Generated progress and scripts/report-reconstruction-status.py are the canonical live totals. The authored-byte denominator covers only the currently reviewed set; it is not whole-game completion.

The pinned compiler candidate is MSVC 19.44.35211 x86, with Windows SDK 10.0.26100.0 and D3DX 9.29.952.8. Clean /Od C++20 profiles reproduce the accepted components. These results do not establish executable-wide compiler flags, SDK or CRT identity. Profiles and relocation anchors are recorded per source in config/match-units.toml.

Build and verify

Public checks need Python 3.11+ and a C++20 compiler, with no original game or proprietary toolchain:

scripts/repo-python scripts/ci.py

Private reconstruction checks:

scripts/bootstrap-tools.sh
scripts/repo-python scripts/verify-target.py
scripts/repo-python scripts/report-reconstruction-status.py --summary
scripts/repo-python scripts/validate-tracking.py --require-target
scripts/repo-python scripts/ghidra.py check
scripts/repo-python scripts/replay-exact-units.py

On a fresh private workspace, provision tools as described in Tools, then run scripts/repo-python scripts/ghidra.py import once. Every query re-attests the executable and complete mapped code section; inventory refreshes never overwrite reviewed ledgers.

Reference review

Oracatt/Touhou20 is pinned locally under ignored _reference/Touhou20. Its target hash matches ours. Its v1.00c label comes from embedded strings; our v1.00a identification follows the independent hash registry and supplied package. Both observations are preserved in provenance.

The review records the repository-wide evidence audit, module dispositions, stale reports and independently verified absorption. Validated source diagnostics route further analysis; reference source, build layout and completion claims are not imported wholesale.

The function-by-function review is complete for all 6,945 indexed implementations, including one parser omission recovered during manual review. All 113 parser-gap files are manually reconciled. The final audit records coverage and evidence limits; nonexact implementations remain documented for further reconstruction.

Documentation

Credits

  • Oracatt/Touhou20: reference reconstruction, source diagnostics and behavioral investigations that guide our independent, function-by-function review.
  • N0zoM1z0/th095: reconstruction workflow, exact-oracle control plane, tracking conventions and README/progress layout.

License

MIT for this repository's original code and TH095-derived control plane. It grants no rights to the original game, downloaded tools or external reference material. Maintained prose and commit messages are in English; official names and original target evidence retain their original language.

About

Source reconstruction of 東方錦上京 ~ Fossilized Wonders. Japanese 1.00a (Steamless)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages