Lords2 installer memory-query investigation

Run: scratch/runs/20261106-lords2-memory-query/. Task: NEW-GAME-LORDS2-DEMO-20261015. Guest bytes remain unchanged and read-only test evidence. The modal teardown repair published as a1684598266cb8ed18160ac499178ae4565d4680 is complete and is not repeated here. No installation or gameplay is established by that repair.

Retained evidence and query gap

Personally reviewed predecessor after-cdrom-ok.png: the installer shows System Test Results and a Memory Test warning, not gameplay. Its displayed memory values are not evidence of a particular API invocation or DX:AX result. The retained final readout, SHA-256 c53cfd1399ed1529343eb83236a3e8c442df5d449965af341be530fe60bceb34, contains 2,511 records: 744 selected guest-operation entries, 744 returns, 619 retirement phases, 93 each host class/destroy entries/returns, and 16 each actual destruction callback entries/returns. It contains no memory-query call/result record. Its actual diagnostic module was ea9c475e98e09fb49585c856f57e9a81ea22a6496afb45dac22e45159ab92e3e. retained-review.json records the inventory without copying the predecessor evidence.

The user authorizes one bounded ordinary registered original trace if retained evidence cannot identify the query. This condition is met. Aranna released runtime at 23:17:59Z; the coordinator granted this task the next local runtime. The original trace used the three existing runtime locks and unchanged registered lords2_demo_setup route. No boat or lifecycle operation is authorized or used.

Contract and generated probe

Microsoft's Windows 3.0 Programmer's Reference describes GetFreeSpace as the available global-heap byte count, potentially noncontiguous. Its EMS flag is ignored on non-EMS systems. The same reference distinguishes GlobalCompact as the largest available block. The current src/09e-win16-api.wat implementations both return only (WIN16_SEG_MAX - win16_next_seg_get()) * 65536, omitting freed storage that the real allocator can reuse. The generated fixture below confirms a reusable-block accounting defect, not a demonstrated cause of the original warning.

The tiny generated NE calls real KERNEL ordinals 169, 15, 17 and 25 through normal imported far CALL relocations. It saves DX:AX before allocation, after a 128 KiB allocation, after free, after reallocating that same capacity, and after a second free. It also saves GlobalCompact and SP. No allocator ledger or memory result is injected. Both shipped modules pass the generated control: balanced Pascal frames, successful allocations and frees, and reallocation of the same handle 39. GetFreeSpace returns 61,538,304 bytes initially, 61,407,232 after allocating 128 KiB, and still 61,407,232 after freeing it. Reallocation succeeds using the same backing. check-free-space-contract.cjs asserts recovery of the freed capacity against these real fixture results and fails on both variants (free-space-contract*.log). This is a focused generated reproduction; it is deliberately retained in the run rather than adding a failing test to main.

The run-local read-only observer uses the shipped set_win16_trace and set_trace_esp diagnostics, intercepting and forwarding existing scalar host log events. It retains query arguments, split result, stack cleanup, return address, thread/process/segment context and a bounded sequence of subsequent executed blocks with code bytes. It includes dynamic TOOLHELP ordinal 72 as a candidate; the actual module identity must still be verified. The pure parser control passes DX:AX/frame arity/forwarding/unrelated-call/mismatched-return cases. Both variants pass architecture and all-512-MiB memory equality with observer armed versus disabled and tracing common to both. Six selected calls and returns match real DX:AX saved by the guest; zero errors/drops occur. No production file is currently claimed or changed.

Media

All 181 media files verified in place at /home/user/wine-assembly/scratch/game-media/lords2-demo-20261105/original (14,382,323 bytes). Inventory SHA-256 f73d8da675e08d1a5460e380e1b314a4bfe7cc59031ec1202b8f11560f929afc; registered fixture manifest a1749143a2de176c4f3fdf314337a1767f6101eed4a88b6d5b0dee4d59012f8e; SETUP.EXE c9844241cf6594050cb4cdde5b04d4f994dfa6da83a3c5538dab16e792aa49b7. No source tree or media archive is staged in the run.

Read-only review of the original SIERRA.INF requirements finds MemKB=0, PhysicalMem=7700 and WinVer=395. Thus an apparent low free-memory figure alone cannot establish why the check warned. The actual API call, result and consuming branch remain necessary evidence. No configuration value is changed.

One bounded original: warning reproduced, query still unidentified

The sole original ran 23:19:20–23:22:40 UTC after both generated controls passed. Exact source commit: 92dc49f6d32e211335728b8296cd267e42ba1b1f; production diff is retained as runtime-relevant.binarydiff. Actual loaded standard module SHA-256: 6cd858302895de91df5af17e3a3742281e31f369ddb6528d7b96252b3423caac (2,181,051 bytes). Compatibility control module: 41b0c704c91ba6fc7e4a6645d9421bf7fd3a23139b0b538b576e1e1b85527dd6 (2,183,697 bytes). Exact arguments and deadlines are in original-attempt.json; source/module details are in runtime-source.json.

Personally reviewed all five captures. Ordinary Install, System Test Yes, Wave Yes and CD-ROM Detect OK reached the Memory Test warning. Wave Yes is input, not proof of audible sound. The warning actually says: “You have [not tested] memory ([not tested]).” The required free-memory field says [not required]; the physical requirement is 7700 KB. The background initial test table still shows placeholders (16000 KB physical / 12300 KB free). These are not actual memory-query results. The run stopped at this warning, without Memory Test OK, Continue, installation or gameplay.

memory-failure.json and original-summary.json retain the boundary. The parent stream has 6,131,445 calls and returns; the child has 1,022,336 of each. Both report zero parser errors or dropped selected records. Neither records KERNEL.169 GetFreeSpace, KERNEL.25 GlobalCompact, KERNEL.316 GetFreeMemInfo, USER.284 GetFreeSystemResources, or dynamic ordinal 72 MemManInfo. Neither records KERNEL.50 GetProcAddress. An initial spoken lookup lead was corrected: KERNEL.131 is GetDOSEnvironment, not GetProcAddress. The captured helper code at 0x310470 belongs to a startup/helper segment and establishes no memory-query consumer.

Concrete blocker: this API-only trace reproduces the warning but cannot identify its query or returned value. It does not observe INT 31h/INT 2Fh or all ordinary guest helper calls, and its per-ordinal summary retains the last call rather than every argument. Absence of these candidate API events does not prove that no memory interrogation occurred by another mechanism. No production repair is made: the independently demonstrated GetFreeSpace defect has no established causal link to this failure, and raising its result would not be a supported Lords2 fix.

Next work should trace the guest routine that constructs [not tested], including interrupt-based memory queries and its caller/return values, using this warning as the stopping boundary. A further original run needs a new task authorization; this task's sole original allowance is consumed. No unknown guest command was replayed. No automated safety flag occurred in this task.

Validation and cleanup

Both generated ordinary NE controls pass on their exact modules, including allocation reuse, DX:AX results, stack cleanup, and observer passivity. The expected semantic regression fails on both modules and is preserved. No production/test source changed, so no production build was required for this documentation-only publication. There is no installation or gameplay acceptance.

The 213 HTTP response records include 203 byte-identical successful local-file responses, two HTML responses changed by the existing dev-server injection, and eight 404 responses. Full metadata is retained. All 181 media pins and exact membership verified before launch. No media or source archive was created; tested modules, small generated inputs, logs, captures and relevant patches are retained.

Normal queued quit closed the original. Supervisor, probe, server and Chrome PIDs are absent; port 36914 refuses connections; its profile is absent; all three runtime locks are free (owned-runtime-cleanup.json). Runtime was handed to the next worker at 23:23:46Z. No test boxes were assigned or accessed (ID/state/expiry: none). Free space on /home exceeds 1.5 GB. result.json is written last after publication and evidence validation.