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:
@@ -78,6 +78,10 @@ ledger gates below still pass. Raw `1000:c79c` also confirms that the response
|
||||
reads fixed candidate slot 1 at `SS:...d8a2`; later nearer candidates are stored
|
||||
in subsequent 0x34-byte slots but do not replace the applied record. A focused
|
||||
two-candidate harness now seals that record-order behavior.
|
||||
Raw `1000:531e` further corrects the Pascal-order BitBlt interpretation: the
|
||||
DAT994 progress strip is drawn at `(202,328)` with height 13 and width
|
||||
`(stage-1)*7`, rather than the impossible historical 328x202 read from a
|
||||
237x13 bitmap. The focused loading-stage harness seals stages 1, 35, and 0.
|
||||
|
||||
## Reproducible gates
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ address raw_name segment body_bytes status reconstructed_name module evidence no
|
||||
1000:01d3 FUN_1000_01d3 Code1 155 verified tdkpin_main_window_construct reconstructed/tdkpin_game_windows.c disassembly 1000:01d3-026d; verified Borland constructor and TWindow base; USER GetSystemMetrics; reconstructed/tests/test_game_windows.c Exact 14-byte far-constructor frame, null base VMT, 640x480 geometry, signed divide-by-two screen centering, style 0x86ca0000 replacement, returned far object, and constructor-entry failure are represented and tested.
|
||||
1000:0270 FUN_1000_0270 Code1 20357 verified tdkpin_setup_game_window reconstructed/tdkpin_game_setup.c disassembly 1000:0270-51f4; generated typed collision data checked against TDKPIN_GHIDRA_COMPLETE_RAW.c; verified setup dependencies; exact 20 quad calls; reconstructed/tests/test_game_setup.c; tools/generate_game_setup_collision_data.py --check Exact far-window RETF-4 ABI, low-memory message/close/RuntimeExit branch, ObjectWindows/cursor/palette setup, tick seed, all globals/receiver/player defaults, milli/pixel state, executable-relative INI-name construction, clamped language/speed configuration, timer creation/failure-without-close path, 177 ordered typed collision calls including preliminary 169/170 then final overwrite, twenty word quads, and 175 active/contact/zero mirrors are represented; success, low-memory, timer-failure, call-order, table-boundary, and mirror tests pass.
|
||||
1000:51f5 FUN_1000_51f5 Code1 297 verified tdkpin_asset_window_destruct reconstructed/tdkpin_asset_cleanup.c disassembly 1000:51f5-531d; verified sound/message/TWindow/Borland dependencies; exact global/window bitmap inventory; reconstructed/tests/test_asset_cleanup.c Exact Wait cursor save/restore, sound unload, bd9/bd8 publication, optional +49 Dispose(mode 1), message drain, deletion order window+52 then 0859,0863,0865,085f,085b,0861,085d, arrays 430b[0..7],4319[1..4],4321[1..9], intentionally stale handles and retained window+54, PostQuitMessage(18), TWindow destructor, erase=true invalidation, derived ownership finish, six-byte cleanup, and 29-handle sequence are tested.
|
||||
1000:531e FUN_1000_531e Code1 114 verified tdkpin_draw_loading_stage reconstructed/tdkpin_game_assets.c disassembly 1000:531e-538f; exact caller-BP/SS offsets; GDI compatible-DC/select/BitBlt/DeleteObject; reconstructed/tests/test_game_assets.c Exact BP-0c/-04/-02/+0e shared frame contract, byte-stage zero extension, 16-bit (stage-1)*7 wrap, fixed destination 13/y and 328x202 SRCCOPY, select/restore, intentional DeleteObject-on-HDC, four-byte cleanup, and scratch writes are branch-tested.
|
||||
1000:531e FUN_1000_531e Code1 114 verified tdkpin_draw_loading_stage reconstructed/tdkpin_game_assets.c disassembly 1000:531e-538f; exact caller-BP/SS offsets; GDI compatible-DC/select/BitBlt/DeleteObject; reconstructed/tests/test_game_assets.c Exact BP-0c/-04/-02/+0e shared frame contract, byte-stage zero extension, 16-bit (stage-1)*7 width wrap, fixed destination (202,328), 13-pixel height, DAT994 source origin, SRCCOPY, select/restore, intentional DeleteObject-on-HDC, four-byte cleanup, and scratch writes are branch-tested.
|
||||
1000:5390 FUN_1000_5390 Code1 1367 verified tdkpin_initialize_assets_and_redraw reconstructed/tdkpin_asset_initializer.c disassembly 1000:5390-58e6; all internal dependencies verified; exact DAT/BITMAP ID sequence and DGROUP/window offsets; reconstructed/tests/test_asset_initializer.c Exact public ten-byte ABI, entry palette select/unrealize/realize and message drain, static helper split at binary phases 53c5/5619, DAT IDs 995,994,998x2,400..407,701..704,801..809,900,997,901,600, BITMAP IDs 500/102/101, progress stages 2..35, sound init, handle publications, loading-surface draw/delete, palette/cursor restoration, already-redrawn palette retention, transient scene composition, optional mask/image ROPs with coordinate+19 dimensions, score factor/product and positive-player redraw, status sentinel/update, scene-ready publication, and all three control-flow phases are represented and tested.
|
||||
1000:58e7 FUN_1000_58e7 Code1 111 verified tdkpin_palette_change_variant_a reconstructed/tdkpin_game_assets.c disassembly 1000:58e7-5955; exact ObjectWindowsMessage result offsets; USER IsIconic/InvalidateRect/UpdateWindow; reconstructed/tests/test_palette_messages.c Exact zero-wParam reentrancy reset/result zero, active suppression, iconic suppression, non-iconic invalidate/update ordering, result DWORD clear, state publication, uninitialized uint16 suppressed return, and eight-byte cleanup are branch-tested.
|
||||
1000:5956 FUN_1000_5956 Code1 74 verified tdkpin_palette_change_variant_b reconstructed/tdkpin_game_assets.c disassembly 1000:5956-599f; shared palette-update state and invalidate helper; reconstructed/tests/test_palette_messages.c Exact wParam==0 and inactive conjunction, state set, null-rect/non-erasing invalidate, synchronous update, message result DWORD clear, no-op branches, and eight-byte cleanup are represented and tested.
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user