Files
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

56 lines
1.5 KiB
C

#ifndef TDKPIN_HIGHSCORES_H
#define TDKPIN_HIGHSCORES_H
#include "tdkpin_arithmetic.h"
#include "tdkpin_numeric.h"
#include "tdkpin_shortstrings.h"
#include "tdkpin_strings.h"
enum {
TDKPIN_HIGHSCORE_COUNT = 10,
TDKPIN_HIGHSCORE_NAME_BYTES = 22,
};
typedef struct {
uint16_t object_size;
int16_t negative_size;
uint32_t reserved;
Win16FarPtr destruct;
Win16FarPtr call_original_window_proc;
Win16FarPtr route_command_target;
Win16FarPtr forward_default;
Win16FarPtr forward_event_to_parent;
Win16FarPtr register_class;
Win16FarPtr create_native_window;
Win16FarPtr destroy_native_window;
Win16FarPtr get_field_35;
Win16FarPtr class_name;
Win16FarPtr get_mdi_client;
Win16FarPtr all_children_can_close;
Win16FarPtr build_window_class;
Win16FarPtr setup_window;
Win16FarPtr zero_word_default;
Win16FarPtr transfer_child_data;
Win16FarPtr route_scroll_notification;
Win16FarPtr paint;
} TdkpinHighscoreWindowVmt; /* 1028:010e..015d */
_Static_assert(
sizeof(TdkpinHighscoreWindowVmt) == 80,
"high-score window VMT layout drift");
void tdkpin_save_highscores(
uint16_t ignored_static_link); /* 1000:a8ea */
void tdkpin_load_highscores(
uint16_t ignored_static_link); /* 1000:a99c */
void tdkpin_show_highscore_windows(
uint16_t caller_bp); /* 1000:ab3c */
void tdkpin_insert_current_score(
uint16_t caller_bp); /* 1000:abe5 */
void tdkpin_paint_highscores(
Win16FarPtr ignored_window,
PAINTSTRUCT16 *ignored_paint,
HDC16 dc); /* 1000:5c13 */
#endif