Skip to content
N0zoM1z0Public

Repository files navigation

東方靈異伝 ~ The Highly Responsive to Prayers

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.

TH01 per-program exactness

This repository rebuilds the original Japanese PC-98 Touhou 1: The Highly Responsive to Prayers (ZUNSOFT.COM, OP.EXE, REIIDEN.EXE, FUUIN.EXE) from checked-in C++ and assembly with ZUN's original Borland toolchain, and compares every output byte with the pinned Japanese release. All four programs are byte-identical.

Progress · Handoff · ReC98 import · Architecture · Toolchain

Build

The build needs Linux x86-64, Wine, mtools, a C compiler for the host-side sprite converter, and your own copy of the Japanese game. Proprietary tools, targets and outputs stay under the ignored .analysis/ directory.

git clone https://github.com/nmlgc/ReC98.git _reference/ReC98
git -C _reference/ReC98 checkout --detach b6ba5b0a529edbb31efdf8c0e939263804f8ee47
python3 scripts/import_targets.py /path/to/jp.hdi        # or the RAR holding zun.hdi
DISPLAY= WAYLAND_DISPLAY= bash scripts/bootstrap_toolchain.sh
python3 scripts/build.py --run-id first

build.py copies src/ into a fresh private directory, compiles with Turbo C++ 4.0J, TASM32 and TLINK 6.10 through MS-DOS Player, and reports raw, header and relocation-order results for all four programs. See docs/TOOLCHAIN.md for installing the compiler from a sibling repository instead of downloading it.

Credits

ZUN (上海アリス幻樂団 / Team Shanghai Alice) created Touhou Project and the original TH01 game, characters, artwork and music.

This reconstruction is built on ReC98 by nmlgc and contributors, who completely decompiled TH01. Almost all C++, assembly, headers and sprite sources here are their work, imported at revision b6ba5b0a with the provenance of every file recorded in config/rec98_import.csv. This repository adds the target pinning, build, comparison and the remaining module-partition and packaging reconstruction needed for byte-identical files.

Also thanks to:

  • master.lib (Koizuka and contributors), imported through ReC98, and the PiLoad loader shipped with it.
  • UNP by Ben Castricum, whose l -h header optimizer writes FUUIN.EXE's final header.
  • MS-DOS Player (Takeda Toshiya; nmlgc fork) for running the 16-bit Borland tools.
  • Wine and mtools.
  • Our TH03 and TH04 reconstructions, whose toolchain, target and comparison infrastructure this repository reuses.

Project-authored code and documentation use the MIT License. Imported ReC98 files keep their upstream terms.

Releases

Packages

Contributors

Languages