feat(reconstruction): complete binary-backed C recovery

Replace the partial mechanics transcriptions with a separate, readable C11
reconstruction of the complete Win16 image while preserving the original raw
Ghidra export as immutable evidence. Cover all ordinary and overlapping entry
points, Borland runtime behavior, Win16 imports, segmented data, callbacks,
resources, indirect control flow, physics, rendering, persistence, and
startup/shutdown lifecycles.

Add deterministic extraction and audit tooling plus address-linked ledgers for
functions, imports, DGROUP ranges and objects, relocations, resources, and
callbacks. The final gate records zero raw, partial, restored, unknown,
blocked, or unclassified required units. Keep the semantic-fidelity boundary
explicit: the portable C is not claimed to reproduce a byte-identical Borland
NE build.

Add strict focused harnesses for every reconstructed C unit, exact resource
round-trip checks, and a 16-bit Borland Real48 reference probe. No Rust source
or Cargo metadata is changed in this phase.

Test Plan:
- `bash original/tools/test_reconstructed_c.sh` -- passed
- `bash original/tools/probe_real48_reference.sh` -- passed bit-for-bit
- `python3 original/tools/audit_reconstruction.py --require-complete` -- passed
- `git diff --cached --check` -- passed
- `git diff HEAD -- '*.rs' Cargo.toml Cargo.lock` -- empty
This commit is contained in:
2026-08-23 16:41:17 +02:00
parent aef404c834
commit 8b99e9607c
253 changed files with 79031 additions and 51 deletions
+6 -5
View File
@@ -1,5 +1,5 @@
/*
* Readable fixed-point physics transcription for TDKPIN.EXE.
* HISTORICAL PARTIAL fixed-point physics transcription for TDKPIN.EXE.
*
* Authority:
* SHA-256 a9022f1894e3e6e21fc42e8f6c932f7c549ca77f63aaa0c488bb9d55d9d0174c
@@ -12,10 +12,11 @@
* FUN_1000_7ed9 / FUN_1000_8b0d (moving flipper records)
* FUN_1000_b476 (rule flags)
*
* This file transcribes behavior that has both static and live differential
* evidence. It is not claimed to be the vendor's source. Unrestored rule and
* persistent-contact branches remain in TDKPIN_GHIDRA_RAW.c rather than being
* replaced here with plausible code.
* This superseded intermediate is retained only as provenance for earlier
* static/live comparison work and is not part of the completed deliverable.
* The complete 1000:c79c implementation is reconstructed/tdkpin_physics.c;
* its rule and persistent-contact dependencies are likewise represented by
* address-linked verified modules under reconstructed/.
*/
#include <math.h>