Files
tdkpin/original/reconstructed/tdkpin_borland_objects.h
ddidderr 8b99e9607c 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
2026-08-23 16:41:17 +02:00

28 lines
932 B
C

#ifndef TDKPIN_BORLAND_OBJECTS_H
#define TDKPIN_BORLAND_OBJECTS_H
#include "tdkpin_borland_runtime.h"
/* Mutable hidden stack fields used by Borland constructor/destructor calls. */
typedef struct {
Win16FarPtr object;
uint16_t vmt_argument;
} BorlandObjectCallFrame;
bool borland_enter_object_constructor(
BorlandObjectCallFrame *frame,
uint16_t vmt_field_offset); /* 1020:03ef */
void borland_finish_object_destructor(
BorlandObjectCallFrame *frame,
uint16_t vmt_field_offset); /* 1020:0439 */
Win16FarPtr borland_default_object_constructor(
Win16FarPtr object, uint16_t vmt); /* 1008:2d99 */
void borland_default_object_destructor(
Win16FarPtr object, uint16_t vmt); /* 1008:2dcd */
void borland_dispose_object(Win16FarPtr object); /* 1008:2db3 */
_Noreturn void borland_abstract_method_error(void); /* 1008:2d87 */
_Noreturn void object_windows_abstract_method(void); /* 1018:0d8a */
#endif