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
+24
View File
@@ -0,0 +1,24 @@
#ifndef TDKPIN_FLIPPERS_H
#define TDKPIN_FLIPPERS_H
#include "tdkpin_segmented.h"
void tdkpin_update_flippers(
uint16_t caller_bp); /* 1000:99f0 */
/* Verified dependency seams whose ABI bodies are reconstructed separately. */
void tdkpin_move_flipper_collision_geometry(
uint16_t caller_bp,
int32_t delta,
uint16_t flipper,
uint16_t mode); /* 1000:7ed9 */
void tdkpin_move_flipper_bitmap_geometry_for_receiver(
Win16FarPtr receiver,
int32_t delta,
uint16_t flipper); /* semantic core of 1000:8b0d */
void tdkpin_move_flipper_bitmap_geometry(
uint16_t parent_bp,
int32_t delta,
uint8_t flipper); /* 1000:8b0d */
#endif