fix(ui): restore staged loading progress

Correct raw 1000:531e's Pascal-order BitBlt to destination (202,328), height 13, and width (stage-1)*7 from original DAT994. Render stages 2 through 35 over DAT995, add deterministic loading screenshots, and update the C harness and evidence ledger for the corrected 237x13 source.

Test Plan:
- bash original/tools/test_reconstructed_c.sh
- python3 original/tools/audit_reconstruction.py --require-complete
- cargo test --all-targets
- cargo clippy --all-targets --all-features -- -D warnings
- rumdl check original/C_RECONSTRUCTION_FINAL_AUDIT.md tdkpin-rs/CHANGELOG.md tdkpin-rs/RECONSTRUCTION.md tdkpin-rs/README.md
- cargo run --quiet -- --simulate loading --at 0.55 --screenshot /tmp/tdkpin-loading-mid.png
- git diff --check
This commit is contained in:
2026-08-23 19:03:09 +02:00
parent 8168d9dc23
commit c80f5e2136
11 changed files with 83 additions and 26 deletions
+6 -6
View File
@@ -10,9 +10,9 @@ enum {
FRAME_PREVIOUS_BITMAP = -0x04,
FRAME_LOADING_BITMAP = -0x02,
FRAME_DESTINATION_DC = 0x0e,
LOADING_DESTINATION_X = 13,
LOADING_WIDTH = 328,
LOADING_HEIGHT = 202,
LOADING_DESTINATION_X = 202,
LOADING_DESTINATION_Y = 328,
LOADING_HEIGHT = 13,
WIN16_SRCCOPY = 0x00cc0020,
DGROUP_OVERLAY_BITMAP = 0x0867,
WINDOW_HANDLE_OFFSET = 4,
@@ -51,12 +51,12 @@ void tdkpin_draw_loading_stage(Win16FarPtr caller_bp, uint8_t stage)
HGDIOBJ16 previous = SelectObject16(memory_dc, loading_bitmap);
win16_write_u16(
frame_field(caller_bp, FRAME_PREVIOUS_BITMAP), 0, previous);
uint16_t wrapped_y = (uint16_t)(((uint16_t)stage - 1) * 7);
uint16_t wrapped_width = (uint16_t)(((uint16_t)stage - 1) * 7);
(void)BitBlt16(
destination,
LOADING_DESTINATION_X,
(INT16)wrapped_y,
LOADING_WIDTH,
LOADING_DESTINATION_Y,
(INT16)wrapped_width,
LOADING_HEIGHT,
memory_dc,
0,
@@ -5,7 +5,7 @@
static uint8_t g_stack[0x400];
static unsigned g_step;
static INT16 g_expected_y;
static INT16 g_expected_width;
HDC16 CreateCompatibleDC16(HDC16 dc)
{
@@ -37,8 +37,8 @@ BOOL16 BitBlt16(
{
assert(++g_step == 3);
assert(destination == 0x1111 && source == 0x2222);
assert(destination_x == 13 && destination_y == g_expected_y);
assert(width == 328 && height == 202);
assert(destination_x == 202 && destination_y == 328);
assert(width == g_expected_width && height == 13);
assert(source_x == 0 && source_y == 0);
assert(raster_operation == 0x00cc0020);
return 1;
@@ -50,14 +50,14 @@ BOOL16 DeleteObject16(HGDIOBJ16 object)
return 1;
}
static void run_stage(uint8_t stage, INT16 expected_y)
static void run_stage(uint8_t stage, INT16 expected_width)
{
memset(g_stack, 0, sizeof(g_stack));
Win16FarPtr frame = win16_make_far_pointer(0x6000, 0x100);
win16_write_u16(frame, 0x0e, 0x1111);
win16_write_u16(frame, 0xfffe, 0x3333);
g_step = 0;
g_expected_y = expected_y;
g_expected_width = expected_width;
tdkpin_draw_loading_stage(frame, stage);
assert(g_step == 5);
assert(win16_read_u16(win16_far_add_offset(frame, 0xfff4)) == 0x2222);