Diablo II Shareware demo

November 12: healing and earned XP401 save

The native short-combat run, commit 0df107e3b, restores the complete XP380 checkpoint, heals through Akara from27/55 to55/55, and earns21 outdoor combat XP. Native Save & Exit returns to the title; the complete four-file export then passes normal Load, native XP401/life53/55, fresh movement and the still-active Den objective. This qualifies the XP401 set in the same browser. The 1615 fresh-browser check, commit 8c4ab88de, mounts those unchanged four files in a genuinely new browser and verifies normal Load, XP401/life53/55, the Den objective and fresh movement. Root checked874 references,84 PNGs,18 binding fields and changed document, guest and renderer identities against1540. Later navigation stayed in camp; command83 was refused before dispatch after its reviewed frame became stale. There was no replay, new combat or successor save. The terminal close omitted the global input export;54 physical pulses retain acknowledged releases, without an all-event trust claim. The Den remains uncleared, and exact monster species/count is unproved.

The coordinator checked811 artifact references,75 complete PNGs,18 binding fields and balanced trusted input, and inspected six full persistence-sequence frames. Preserve all four files together from 20261112-diablo2-native-menu-short-combat-1540/earned-save/; the D2S hash starts 8a55786b1923. The older XP380 and death-outcome sets remain separate. Actual remote parent/Chrome exit and kernel drain passed; the local launcher returned143 without actual manager/watchdog join receipts, so those joins remain unknown. The private box stopped normally. No runtime fix is claimed.

Package and installer

The local package is Blizzard's DiabloIIDemo.exe:

test/test-diablo2-demo-installer.js drives setup without fixed-batch dialog timing. It waits for Diablo II Shareware Setup, clicks the launcher's Install button, waits for each real InstallShield control, accepts the default path, and reaches the shortcut/copy phase. A full acceptance run continued through the 127 MiB copy. The worker finished after about 205 seconds; the outer setup window remained on Adding shortcuts to the start menu.., but the complete installed payload was present in the VFS. The retained acceptance screenshot is /private/tmp/diablo2-installer-complete.png.

Saving that VFS exposed a host-export collision: setup creates both the file C:\support\images\msproxy and descendants below a directory with that name. lib/vfs-export.js now preserves the file as msproxy.__vfs_file__ rather than failing the whole export. test/test-vfs-export.js pins that behavior.

The installer-produced payload is staged locally under test/binaries/candidates/diablo-2-demo-installer/installed-extracted/. Its core pins are:

File Size SHA-256
diablo ii.exe 2,154,496 d0aa0d30b55f8313e04026cca560ef0d178ee76b2ece6c3ccdc1fca4af46b3f1
d2data.mpq 44,301,122 82ed65b7f574234a22a36abb4a6d6a1e7f8bebc4746192f39cdb6603ee382d49
d2music.mpq 32,743,265 631172d59cc4a8d9b42faade73b194140b6a327811ea556562df9c89f857a694
storm.dll 266,280 2b6a27f223aac30d2d383f185705be55f43f37a687aa76ebe307a1035b6eea2d

Registry evidence

The raw captures remain under /private/tmp and are not corpus fixtures. Relative to a clean profile, setup wrote:

A clean installed-game launch reaches the menu without pre-seeding either key. The game itself creates HKCU\Software\Blizzard Entertainment\Diablo II Shareware with:

It also probes CompressedData and preference values, but none is required to launch this package.

Compatibility fixes

The installed executable and its DLL graph exposed three concrete gaps:

  1. CRTDLL _vsnprintf was missing. The bounded formatter now returns -1 without a terminator on truncation, matching the Win9x CRT contract.
  2. D2Sound imports authentic Win98 DSOUND ordinals 1 and 2. They now resolve to DirectSoundCreate and DirectSoundEnumerateA.
  3. The original 64-entry synchronization table filled during startup. Storm's later transient CreateEventA returned NULL, so a one-byte MPQ member (data\local\use) reported ERROR_HANDLE_EOF and the game stopped in Archive.cpp line 143. A 256-entry diagnostic build showed startup fill every slot through e00ff; the final 512-entry/8 KiB table leaves space for the fixed pool and streaming events. The same run then read all MPQs, initialized DirectDraw and sound, and rendered the main menu.

The final installer-produced game screenshot is /private/tmp/diablo2-installed-sync512.png: an 800x600 DirectDraw frame with the animated Diablo II logo, Single Player button, Shareware v1.04 label and Exit Diablo II button. test/test-diablo2-demo-installed.js reproduces this from a clean profile, skips the intro with normal keyboard input, pins the EXE/data archives, and validates those menu regions.

One non-fatal diagnostic remains: the loader's first bounded D2CMP DllMain pass reports an incomplete return and the game's recovery path logs an SMemReAlloc() message before normal initialization repeats successfully. It is not present in the rendered game UI and does not prevent the menu or MPQ streaming, but it is the next cleanup target if DLL initialization is made fully resumable.

Character creation and gameplay

The installed demo originally crashed immediately after confirming a new Barbarian. A normal-input trace (Single Player, double-click Barbarian, focus the name field, type TEST, press Enter) stopped at batch 588 in two adjacent CRTDLL imports:

  1. strncmp(0x01e4face, 0x009facf4, 10) jumped through 0x009c4d7e to the fail-fast unimplemented handler.
  2. After implementing that function, _strnicmp(0x01e4f898, 0x005cb3a4, 0x7fffffff) did the same through 0x009c4d78.

Both are now real cdecl handlers: strncmp compares unsigned bytes and both functions stop at the first difference, a shared NUL, or the requested count; _strnicmp additionally folds ASCII A-Z. Zero count returns equality without dereferencing either pointer. test/test-strncmp.js pins those edge cases and the cdecl ABI.

With both imports present, the same input sequence clears the animated Act I loading portal and reaches the playable Rogue Encampment at batch 1600 with a one-million-block batch budget. The retained frame is /private/tmp/d2world-1600.png; it contains the Barbarian and NPC, rain, torches, terrain, belt and skill bar, plus the red life and blue mana orbs. A ground click later scrolls the world to the wagon without a trap; that frame is /private/tmp/d2world-2200.png. test/test-diablo2-demo-gameplay.js reproduces hero creation from --app=diablo2_demo and asserts the rendered terrain and HUD color regions, not merely process survival.

Performance and SIMD

The playable trace is CPU-emulation bound rather than blocked on an obvious host-side subsystem. Over 400 seconds it made 1,754,049 Win32 API calls (about 4.4K/s), while the interpreter recorded three active cooperative guest threads, 17,089,938 block decodes, 46,860 live-cache evictions and 1,672 full cache clears. The page's DirectDraw path already coalesces dirty presentation to at most one upload per animation frame. No API, audio, timer, networking or surface-upload storm was identified.

The cache-clear pressure came from fixed reservation rather than typical compiled size. The old allocator reserved 16KB for every compiled 4KB guest page; a fixed-allocator sample of 795 Diablo II pages found a 2,411-byte mean, with 78.1% fitting in 4KB, 97.1% in 8KB and 99.5% in 12KB. Compiled pages now use 4/8/12/16KB classes, grow only when emitted code requires it, and recycle safely retired chunks. A directory clock also makes the separate 128-index limit explicit instead of refusing all later pages. On the final replay through batch 1660 this reduced full resets to 13; the fixed-size trace recorded 128 resets during batches 1500–1600 alone and 1,672 by batch 2300. Because the host load varied substantially, this establishes the cache-pressure improvement but is not presented as a wall-clock FPS measurement.

MMX is advertised and implemented, with packed operations lowered to WebAssembly SIMD, but this run retired exactly zero MMX instructions. Static SIMD clusters exist in ijl11.dll, binkw32.dll and smackw32.dll; the active game and DirectDraw renderer DLLs contain no credible SIMD routine. The main EXE's three isolated SSE-looking byte sequences are low-confidence scan coincidences, SSE is not advertised, and no SSE path executes. Implementing more SIMD is therefore unlikely to be the first-order gameplay speedup for this shareware build; interpreter/cache/thread efficiency is the measured target.

Gameplay hot-loop census

A post-cache gameplay histogram over batches 1500..1660 mapped runtime block entries back through each PE's load delta and then checked every hot backward edge in disassembly. The table groups blocks belonging to the same loop nest; top entries is the hottest constituent block, not a sum or an instruction count. This avoids double-counting nested loops.

Guest instance Runtime range Original PE range Top entries What it does
main 0x86e1ed..0x86e275 d2gfx 0x100031ed..0x10003275 924,243 clipped rows; inner one-source palette translation at 0x86e24e
main 0x4d8e70..0x4d8e9f EXE, same VA 739,112 scans an array of rectangle/region pointers and performs four bounds tests
main 0x86c141..0x86c2e2 d2gfx 0x10001141..0x100012e2 434,355 15-row Duff/jump-table renderer with 32 unrolled one-source LUT pixels
main 0x86c34d..0x86c6c3 d2gfx 0x1000134d..0x100016c3 324,300 15-row Duff renderer with 32 unrolled two-source 64K blend-table pixels
main 0x86e34d..0x86e418 d2gfx 0x1000334d..0x10003418 251,520 clipped rows; inner two-source palette/blend translation at 0x86e3ca
main 0x655465..0x6554af d2cmp 0x6fe28465..0x6fe284af 235,366 signed RLE command stream: skip, change row, or REP MOVS literal run
main 0x6556a1..0x6557b5 d2cmp 0x6fe286a1..0x6fe287b5 226,217 clipped RLE row decoder; optional in-place two-input palette translation
main 0x4946e4..0x494748 EXE, same VA 217,280 nested 8x8 lighting/color-grid sampling through 0x430df0
main 0x65813f..0x658186 d2cmp 0x6fe2b13f..0x6fe2b186 217,088 nearest-color search using three squared channel distances
main 0x42f8d9..0x42f90c, 0x42fbe0..0x42fc1c EXE, same VAs 119,808 initialize and populate the 48x48 map/light grid, including region queries
main 0x430b73..0x430c60 EXE, same VA 112,632 nested lighting interpolation and per-cell contribution calls
main 0x5025ff..0x5026ed, 0x502a53..0x502b66 EXE, same VAs 107,520 scan fixed bucket arrays and linked game-object/client records
main 0x86c736..0x86c8e0, 0x86c9a1..0x86ccff, 0x86cdc3..0x86cff8 d2gfx 0x10001736..0x10001ff8 112,010 compressed CEL RLE renderers with unrolled LUT/blend suffixes and clipping
main 0x88f753..0x88f790 d2ddraw 0x10003753..0x10003790 96,354 short DirectDraw buffer/scanline loop
main 0x86e471..0x86e73e d2gfx 0x10003471..0x1000373e 84,900 visible-tile/object traversal that selects and calls the renderer variants above
main 0x42145d..0x421475 EXE, same VA 120,960 128-bucket array plus linked-list callback walk
main 0x493f84..0x49433b EXE, same VA 60,148 object/cell render preparation with nested fixed 6x6 grids
main 0x4b54fb..0x4b5561 EXE, same VA 60,175 Bresenham-like collision/region walk with bounds queries
main 0x651188..0x651252 d2cmp 0x6fe24188..0x6fe24252 65,174 scan zero/nonzero spans and emit bounded RLE literal/skip commands

Smaller measured backedges (hottest block 20K–53K) are the same classes, not a new dominant idiom: more clipped d2gfx CEL variants (0x86d0da..0x86d4d5), D2CMP state/color transforms (0x652851..0x65294c, 0x653f8f..0x65408b), EXE object/list traversals (0x421274..0x4212c1, 0x4300d6..0x43049c, 0x494b22..0x49514e), short memory scans/fills (0x41fd7e..0x41fda6, 0x4c9e2e..0x4c9e45), and two short coordinate loops at 0x4dea38 and 0x4deae2. Most contain calls, pointer chasing, multiple branches, or fixed two-dimensional control and are not safe LUT_RUN shapes.

Generalized H418 LUT_RUN removes both genuinely hot byte-translation self-loops: d2gfx runtime 0x86e24e and d2cmp runtime 0x655762. In the same 160-batch main window it reduced handlers from 262,313,891 to 257,258,415 (1.93%) while processing 1,381,859 pixels. The remaining first-order local target was the straight-line/unrolled d2gfx family, especially 0x86c141..0x86c2e2; it needed an unrolled-LUT recognizer, not broader self-loop recognition.

H431 now handles that fixed-span form at decode time. It recognizes the exact descending one-source suffix and symbolically validates MSVC's scheduled two-source blend suffix, then continues into the ordinary outer row tail. On a full replay of the same batches 1500..1660, main handlers fell again from 257,258,415 to 179,778,066: 77,480,349 fewer, or 30.12% beyond H418 alone (31.46% from the original pre-LUT 262,313,891). The d2gfx suffix landings no longer appear in the hot-block top twenty; the jump-table and row-head blocks at 0x86c167, 0x86c141, 0x86c38e and 0x86c34d remain, as expected, because H431 is nonterminal and does not absorb their control flow. The batch 1652 Rogue Encampment capture remained healthy: terrain 87,447, life orb 3,612, mana orb 2,910 and 187 quantized colors. Host load forced the replay to its 320-second cap exactly at batch 1680, so this is an instruction-count result, not a wall-time/FPS claim.

The clipped two-source inner loop at runtime 0x86e3ca (d2gfx original 0x100033ca) now uses H418 as well. Descriptor version one adds a second advancing byte stream, an auxiliary low-byte register, an absolute table displacement and a selector for which source cursor terminates the run. A separate exact recognizer proves the observed xor/xor, two loads, shl 8, three increments, 64KB blend lookup, store and cmp source2,bound / jb order; the executor remains the shared universal LUT kernel.

In a fresh batches-1500..1660 profile, 0x86e3ca fell from the prior capture's 251,520 per-pixel block entries to 26,522 budget resumptions. H418 processed 1,205,355 pixels in 96,689 aggregate runs, while the new canonical ESP load-run recognition drove H408 2,869,328 times and removed H343 -> H343 from the top pairs. That fresh scene retired 145,589,954 main handlers and scored terrain 102,464, life 3,612, mana 2,910 and 189 colors. Its terrain workload differs from the earlier H431 capture and host load exceeded 80, so neither the total handler difference nor wall time is presented as an isolated speed percentage.

High-level meaning of the post-LUT hot blocks

The remaining block heads are easier to understand as engine operations than as instruction pairs. Counts in this table are correlated entries within loop nests and therefore must not be added together.

Operation Current evidence Interpretation
Fixed-shade isometric tile blit d2gfx 0x10001130, runtime row heads 0x86c141 (322,448) and 0x86c167 (345,480) Draws the 15 diamond rows through a Duff jump table. Each source palette index passes through one selected 256-byte row of the 64K table before reaching the 8bpp framebuffer.
Per-pixel-lit isometric tile blit d2gfx 0x10001340, runtime row heads 0x86c34d (289,814) and 0x86c38e (310,515) Combines a tile byte with a byte from the coordinate-selected light field at 0x10014004, using (light << 8) + pixel into the 64K table. This is palette lighting/shading, not a 16/32bpp arithmetic alpha blend.
Clipped palette blit/blend H418 aggregate 1,205,355 pixels in 96,689 runs; d2gfx 0x100031ed/0x1000334d The same fixed-shade and per-pixel-lit operations with horizontal clipping. H418 now absorbs their actual pixel loops; the surrounding row setup remains.
Tile/collision mask query EXE 0x4d8e10, hot scan blocks 0x4d8e70..0x4d8e9f at roughly 307K--384K entries Finds which room rectangle contains a world coordinate, resolves that room's row-offset table, loads a 16-bit tile/collision word and applies the caller's mask. This is simulation/spatial-query work, not renderer clipping.
Light-grid sampling/build EXE 0x4946cd inner 8x8 blocks at 186,048 entries and clamped sampler 0x430df0 at about 194K Repeatedly clamps coordinates to a 48x48 grid and copies one or four light/color bytes while constructing the small lighting grid consumed by the per-pixel tile renderer.
CEL/RLE expansion d2cmp 0x6fe28465, runtime 0x655465 at 198,960 entries Interprets signed commands: negative values skip output or advance a row; positive values copy a literal run. Other d2gfx paths apply the LUT/light operation while decoding compressed CEL rows.

H431 processed 11,825,842 fixed-span pixels in 718,737 invocations in this capture. Dividing the two fixed-tile row-head counts by their 15-row shape gives about 40.8K full-tile equivalents, only as a scale estimate because clipping and variant dispatch make it non-exact. The important consequence is that H431 has already removed most pixel-by-pixel dispatch, so the remaining d2gfx cost is increasingly row setup, diamond-shape jump dispatch and function control.

That changes the next optimization level. An exact full-tile handler covering the fixed-shade and per-pixel-light variants could consume all 15 rows per call and subsume H431 internally. Separate candidates are the room collision-mask query, the fixed 8x8 light-grid builder and the signed D2CMP command decoder. Those are whole engine primitives; generic XOR -> LOAD8 or CMP -> Jcc fusions would only shave pieces of all four.

Browser CPU attribution of pixels versus row control

A subsequent Chrome/V8 sampling profile measured actual Rogue Encampment gameplay rather than inferring native cost from handler counts. The driver did not arm the handler histogram during the CPU window, moved the Barbarian with a ground click, and rejected the sample until the rendered frame contained green terrain plus both life and mana orbs. It then took a separate short histogram window in the same live instance. Two headless runs captured 46,462 samples over 15.53s and 34,918 samples over 10.49s. A state-aware intro driver then repeated the measurement in a real headful/compositor-backed Chrome window: 38,251 samples over 10.43s. Host load was still high (roughly 8--14), so these are CPU self-time shares only, not FPS or throughput measurements.

The result narrows the multi-row claim considerably:

Native function Headless 1 Headless 2 Headful Meaning
$next 22.98% 21.53% 22.44% Threaded dispatch itself remains the largest single native cost.
H431 $th_lut_span 1.68% 1.58% 1.97% The already-folded fixed-span pixel kernel is no longer a dominant cost.
H418 $th_lut_run 0.30% 0.36% 0.32% Clipped palette translation/blending is smaller again.
all Wasm 90.0% 90.4% 91.1% Browser presentation/JS is not the principal ceiling in this capture.

Separating samples whose ancestry goes through thread-manager.js puts H431 at 1.82--2.21% of main-path CPU and H418 at 0.36--0.42%; neither ran on the worker path. Main-thread $next alone was 20.15--21.53%. The worker share varied from 10.7% to 18.3% in these three windows, so the earlier larger blue HUD share is phase-dependent rather than a fixed split.

The matched histogram explains what remains around H431. In the repeat window, the fixed-shade row head ran 134,596 times and the per-pixel-lit row head 122,360 times, while H431 ran 265,541 times in total. Accounting for the existing ESP load-run fusion, the two fixed-tile outer bodies represent about 5.84M row-setup/control handler dispatches out of 62.86M total (about 9.3%); including their H431 calls makes the theoretical handler-count ceiling about 9.7%. A multi-row handler would not remove the pixel work or all address calculation, however. At uniform dispatch cost it saves only about two points of total CPU from $next; direct WAT row setup could save some additional generic-handler cost. Consequently the honest expected ceiling is a few percent until an A/B prototype measures it, not evidence that the outer tile loop dominates the whole browser.

Per-present guest-operation attribution

A temporary guest-EIP range timer measured the main instance between actual DirectDraw presents. The steady Rogue Encampment window contains 57 frames; menus, loading and the first loading-to-gameplay spike are excluded. A matched empty-range control retained the frame/timer hooks but removed all hot-range transitions. The detailed probe raised median active main-guest time from 77.96ms to 89.04ms (14.2%), so uncorrected probe time is not an honest browser frame-time result. A standalone Wasm-to-JS timer-import calibration measured 85.7--92.4ns per transition; the full launch made 4.04M transitions.

The table reports exclusive loop-body buckets. “Adjusted” divides the raw medians and p90s by the measured 1.142 probe inflation. It is a deterministic Node/V8 CLI estimate of computation per DirectDraw present, not browser wall time, and helpers outside a listed EIP range remain in other.

Exclusive operation bucket Raw median Adjusted median Adjusted p90 Mean active share
Fixed/per-pixel-lit isometric tile bodies 12.64ms 11.07ms 18.47ms 14.48%
Lighting-grid build/sample/interpolation 8.75ms 7.66ms 11.88ms 9.87%
Object/list/visible-scene traversal 8.01ms 7.01ms 11.68ms 9.32%
CEL renderer bodies 7.51ms 6.57ms 11.69ms 8.60%
Collision walk and room-mask query 5.94ms 5.20ms 7.46ms 6.56%
D2CMP RLE encode/decode/transform 2.42ms 2.12ms 3.15ms 3.03%
Clipped palette/light blits 2.40ms 2.10ms 3.30ms 2.71%
Nearest-palette-color search 1.97ms 1.72ms 2.73ms 2.34%
DirectDraw scanline loop 0.31ms 0.27ms 0.40ms 0.36%
Everything outside those ranges 37.90ms 33.18ms 52.40ms 42.74%

Thus the larger named buckets are now ranked per present, but these numbers do not prove inclusive whole-function cost or transfer directly to browser milliseconds. The lower-overhead Chrome sampling result above remains the browser authority: $next is 22.44% of total CPU while H431 and H418 themselves are only 1.97% and 0.32%. The operation timer says where the surrounding guest work is concentrated; it does not overturn that native attribution.

Cooperative workers and real browser threads

The browser HUD's blue threads phase is literal wall time spent in ThreadManager.runBudgeted, but the name does not mean Web Workers. The three guest worker WASM instances currently run synchronously and round-robin on the browser's main JavaScript thread. A sequential per-instance histogram over batches 1500..1650 found:

Instance 50-batch handlers Dominant work
T1, Fog service thread 0 parked in WaitForSingleObject
T2, Storm async worker 56,384,573 MPQ Huffman/bitstream decode and ADPCM expansion
T3, D2Sound worker 53,312 mostly waits and DirectSound service calls

T2's hottest nests are Storm runtime 0x9a1f40..0x9a21b3 (original 0x6ffbbf40..0x6ffbc1b3, Huffman bit refill/tree traversal; 433,747 entries in its hottest block) and 0x9a2d30..0x9a2e9f (original 0x6ffbcd30..0x6ffbce9f, ADPCM code expansion and predictor/step-index clamps; 432,499). Its secondary loops build/walk the decode trees at 0x9a1c40..0x9a1e6e and perform smaller output transforms at 0x9a31a6..0x9a31f4. Neither is LUT_RUN, and no worker instance executed H418 during the full replay.

Consequently, real Web Workers should materially improve browser responsiveness for this workload: nearly the entire blue phase could overlap the main guest instead of blocking input and paint. At the sampled rates main averaged about 1.61M handlers/batch and T2 1.13M; perfect independent overlap would put a rough upper bound near 1.7x for their combined CPU phase. That is a ceiling, not an FPS forecast: main sometimes waits for worker events, host imports such as audio/window/storage need a main-thread broker, shared emulator allocators still need locking, and the green d2gfx renderer remains single-threaded. The existing shared WASM memory, per-thread instances, atomic wait table and partitioned decode caches provide useful groundwork; the missing broker and race audit are the implementation cost documented in docs/design-real-threads.md.

Isolated-Worker bounded MPQ waits

The isolated browser backend originally omitted the bounded-wait poll floor already used by the cooperative main scheduler. Its guest clock can advance past Storm's 255ms MPQ completion wait after only one or two concurrent Worker slices. resolveMainWorkerWait() then returned WAIT_TIMEOUT while the Storm decompression worker was still runnable; Storm accepted the resulting short read, and D2CMP later reported Codec.cpp line 1563, top >= 0, while decoding the incomplete data.

ThreadManager.resolveWait() now requires both elapsed guest time and up to the same bounded number of scheduler polls while an isolated main thread still has runnable guest workers. A signal remains immediate, and a permanently unsignalled finite wait still times out after the poll ceiling. The focused regression advances the guest clock by 1000ms during a 255ms wait, proves it does not complete after the second Worker slice, then signals the event and proves normal completion.

The Direct3D renderer (2026-09-19)

The demo ships four renderer back ends beside the executable — d2ddraw.dll, d2direct3d.dll, d2glide.dll, d2gdi.dll — and picks one from HK{CU,LM}\Software\Blizzard Entertainment\Diablo II\VideoConfig. d2ddraw.dll is in the app's static import set, so watching that load says nothing about the choice; the selection shows up as a runtime [LoadLibrary] line. Measured, one headless run per value:

Render runtime LoadLibrary
0 none (DirectDraw)
1 d2direct3d.dll
2 none (DirectDraw)
3 d2glide.dll — then UNIMPLEMENTED API: _grGet@12
4 d2gdi.dll

DeviceName ("Direct3D HAL") and dwFlags do not select anything on their own; Render does. The -d3d command-line switch does not reach the D3D path — with -d3d -w the game loads d2gdi.dll. Repro:

node test/run.js --app=diablo2_demo --no-build --quiet-api \
  --max-batches=20000 --max-seconds=150 --reg-import=<seed>.json

where the seed sets Render = DWORD 1 under both the HKCU and HKLM key.

The renderer is not seeded by default, and should not be: the DirectDraw path is what the app uses today and it works. Both failures below are on the Render=1 route only.

How the value is decoded (disassembly, 2026-09-20)

Two separate numbering schemes are involved, and conflating them is the trap.

The EXE turns Render into a flag byte. RegQueryValueEx of the Render name (string at 0x005a6e08, its only xref) returns into a local, and the value is then range-checked and dispatched:

00401b56  mov  ecx, [esp+0x10]          ; the Render DWORD
00401b5a  lea  eax, [ecx-0x1]
00401b5d  cmp  eax, 3
00401b60  ja   0x401b8f                 ; outside 1..4 -> leave every flag clear
00401b62  jmp  [0x401bbc+eax*4]         ; 4 entries: 401b69 401b73 401b7d 401b87

Each arm sets one byte of a five-byte flag block and falls straight out: Render 1 -> [esp+0x167], 2 -> [esp+0x166], 3 -> [esp+0x165], 4 -> [esp+0x164]. So the byte written is [esp+0x168] - Render — the block is indexed in descending address order, which is why it does not read as an array at a glance.

That also explains the two "none" rows in the table above without needing a second measurement: Render = 0 fails the cmp eax,3 unsigned check (it wraps to 0xFFFFFFFF) and sets nothing at all, so the game keeps the DirectDraw default.

The same block is read back at 0x401a90 before the registry is consulted — bytes 0x165, 0x164, 0x166 and 0x168 are each tested and any one of them set jumps past the registry read entirely. Those are the command-line overrides, which is why a switch beats the registry rather than merging with it. The switch names live in a table of {UPPER, lower, group, id} records at 0x005a60e0 (3DFX/3dfx, OPENGL/opengl, D3D/d3d, ... all in group VIDEO), and its ids are not Render values — do not read the mapping off that table.

D2gfx has its own, different numbering. The backend DLL name is fetched in d2gfx.dll at 0x1000381a:

10003817  mov  eax, [0x1000d1bc+edi*4]  ; edi = video mode
1000381e  cmp  eax, ebx                 ; ebx = 0
10003826  jnz  short 0x10003841
10003829  push 0x1000d2cc               ; "Unsupported video mode - %d"

The name table at 0x1000d1bc is sparse, and its indices are the video mode, not Render:

index [0x1000d1bc + i*4]
0 NULL
1 D2Gdi.dll
2 NULL
3 D2DDraw.dll
4 D2Glide.dll
5 NULL
6 D2Direct3D.dll

A NULL entry is the error path above, not a fallback. Three function pointers sit immediately before the names at 0x1000d1b0 (0x100029e0, 0x10002ba0, 0x10002de0), and the selected mode is published to [0x1001c048].

Reading which backend won, at runtime. d2ddraw.dll is in the app's static import set, so it is loaded on every route and grepping a log for it proves nothing — the choice appears only as a runtime LoadLibrary of d2direct3d.dll / d2glide.dll / d2gdi.dll. That load also happens well after the first frames: it is absent from a 130-batch run even on a seed that demonstrably ends up in Direct3D, so any probe short of the menu reports "DirectDraw" for every value. Give it the full 20000-batch run in the repro above before believing a row.

Our 8 MB video-memory report makes the game wipe its own code

With the stock report, Render=1 dies at ~batch 3380 executing zeros at d2direct3d+0x929b, with every register zero. The image is not corrupt when that batch begins — a dump-mem of the same address at batches 3000/3100/3200/ 3300 shows the real instructions — and --fault-null names the culprit in one line: 561,098,735 unmapped guest accesses from one EIP, sweeping 0x0–0xfffffffc. It is a rep stosd clearing the whole address space, and it reaches d2direct3d's own .text on the way.

The count comes from a signed divide, at d2direct3d.dll+0x9260 (original base 0x10000000):

mov  ebx, [0x1001aa88]      ; bytes per pixel
imul ebx, [esp+0x10]        ; * width
imul ebx, [esp+0x14]        ; * height      -> texture size in bytes
mov  eax, [esp+0xc]
sub  eax, edx               ; a video-memory budget, minus a reserve
cdq
idiv ebx                    ; slots = budget / texture size   (SIGNED)
...
shl  eax, 5
mov  ebp, eax
call <alloc>                ; ebp bytes
mov  edi, eax
shr  ecx, 2
rep  stosd                  ; memset of ebp bytes

--trace-at=d2direct3d+0x1000929b catches it with EBP=0xfff5c200 — a negative byte count, i.e. a negative slot count, i.e. the budget came out below the reserve. $handle_IDirectDraw2_GetAvailableVidMem and the two GetCaps sites in src/09a8-handlers-directx.wat all report a 8 MB card (0x00800000), and that is the number feeding this divide.

Raising it trades the wipe for a texture-slot ceiling

Rebuilt with 64 MB in those five constants, the wipe is gone — and the game then creates 4094 surfaces against 1 release before IDirectDraw_CreateSurface fails and it asserts C:\D2\Source\D2Direct3D\Src\d3dSprite.cpp, line #85, Expression: success. 4096 is our DX object-table size, so the cache D2 sizes from the report simply does not fit. 52 MB asserts in the same place, so this is not a matter of finding a number between the two failures; the slot table is the next wall.

Nothing else in the corpus is sensitive to the constant: MechCommander — the app whose GetCaps budget comment the 8 MB figure was written for — renders pixel-identical (0 of 307200 pixels differ) at 8 MB and at 64 MB.

So the D3D route needs two things, in this order: a video-memory report that is not a lie about a 1998 card, and a DX object table that can hold the cache that report implies. Neither is worth landing until both are done, because each one alone only moves the crash.

Resolved 2026-09-19: it is one constant of D2's, read twice

The guess above was close but the mechanism is more specific, and knowing it turns the tuning into arithmetic.

d2direct3d sizes its texture caches in the function whose arena carve begins at +0x1000271a. It reads [0x10019968] — the dwFree out-parameter of the second GetAvailableVidMem call, the one asking for DDSCAPS_NONLOCALVIDMEM (AGP) texture memory — into edi, and clamps it to its own hardcoded cmp edi, 0x2000000 ceiling. Everything follows from that one value:

The other ceiling is ours: every surface is really a DIB in $DIB_BACKING_BASE (63 MB), and page rounding plus the pitch*16+64 slack row costs 1.09x for 256x256, 1.25x for 128x128 and 2.0x for 32x32 — weighted about 1.29x of what we promise. Measured: 64 MB and 48 MB both fill the arena exactly (pages used 16384 free 0), surfaces come back with dib=0xf0 and CreateSurface fails into the same d3dSprite.cpp:85 assert — the same message as slot exhaustion, from a completely different cause.

Landed: $DX_VIDMEM_TOTAL = 40 MB (one named constant replacing the six scattered literals) and $DX_MAX = 8192 with its seven sibling regions. At 40 MB the first round gets D2's full 32 MB ceiling, the second gets 8 MB, and the arena settles at pages used 14977 free 1407. No wipe, no assert, 687 live surfaces, and the screen goes from desktop teal to black — D2 owns the display and clears it.

Open, and the next lead: it clears but never draws. 120000 batches at --batch-size=200000 finish in 24s with a uniformly black frame, so it is idle rather than working. The wipe and the assert are both gone; what remains is a present/draw question, not a memory one.

2026-09-20: it is not a draw question — the game is spinning, forever

"Clears but never draws" was the wrong reading, and it is worth saying why it was convincing: the frame is black, nothing is presented, and a fixed batch budget finishes in the usual wall time. All three are equally true of a guest executing a two-instruction loop it can never leave, because batches retire normally while the guest makes no progress — a batch is a budget of blocks, and a tight loop retires blocks as fast as anything else.

Driving the verified route (SINGLE PLAYER, Barbarian, name, OK — see Character creation and gameplay) to Act I on Render=1 and taking a snapshot at the black frame puts EIP at d2direct3d+0x10009561, inside the texture cache's eviction loop. Disassembled, that loop cannot terminate for the state it is in:

10009561  cmp  [ecx+0x4], esi      ; esi==0 here: count == 0 ?
10009564  jz   0x100095c0          ;   ... then skip the evict AND the dec
          <evict the LRU item>
100095bd  dec  [ecx+0x4]           ; count--
100095c0  mov  eax, [ecx+0x4]      ; count
100095c3  mov  edx, [ecx]          ; nMaxNumItems
100095c5  cmp  eax, edx
100095c7  jz   0x10009561          ; full? evict again

With count == 0 the body is skipped including the decrement, and with nMaxNumItems == 0 the exit test count == nMaxNumItems is always true. A cache of capacity zero is simultaneously empty and full, so the loop evicts nothing and re-tests forever. It writes no memory, so nothing in a snapshot changes and every heuristic that looks for progress reports "idle".

The state was read straight out of the live hang rather than inferred (exports.get_ecx() → the cache, then its first six fields):

eip=17d0561  ecx=17f2218  nMaxNumItems=0  count=0  head=7ee30604  tail=7ee305e4

head/tail are real heap pointers, so this cache had been populated: the capacity was zeroed by a later re-size, not left uninitialized from the start. That matches the two-round behaviour documented above — the second round is carved from a dwFree we have already billed the first round against — and it means the remaining work is still the video-memory question, not a draw one.

Two things make this newly tractable:

A probe for this is tools/ctl.js eval, whose scope now carries va() and mods so va("d2direct3d+0x1002b218") resolves against the load address this run happened to pick. Reading a guest module's global used to mean grepping the run log for its load line and pasting a base into the expression, which is silently wrong on the next run — a bad base still reads some memory and returns plausible numbers.

2026-09-20: found — a texture Release that never freed the surface

The video-memory question above has an answer, and it is ours, not D2's.

QueryInterface for IDirect3DTexture/IDirect3DTexture2 does not create a new object: it hands back another COM view of the DirectDrawSurface's own DX_OBJECTS slot. So the final release through the texture vtable is the final release of the surface. Both handlers called $dx_free, which retires the slot and returns nothing — the DIB pages stayed allocated and $dx_vidmem_used stayed charged for them. $dx_surface_release, the one path that frees the DIB and refunds the bytes, was never reached, because D2 drops its cache through the texture view.

Measured live at the character screen, before the fix:

live DirectDraw surfaces 705, holding 10.7 MB
runs in the DIB arena owned by nothing 4756, holding 48.5 MB of 63 MB
orphan run sizes 4194 × 1 page, 421 × 10, 95 × 19, 36 × 35
dwFree handed to D2 at its last query 0x88700 — 558 KB
cacheA_256 nMaxNumItems=0 count=0, real LRU pointers
EIP 0x17d0561 — the spin

Those orphan sizes are the game's own tile geometries, which is what identified the owner: a 32x32 at 2 bytes a pixel is one page, a 128x128 is ten with its slack row, a 256x256 is thirty-five. Nothing else in the process allocates in that distribution.

So the whole chain, end to end: texture released through the texture view → pages and video memory stranded → GetAvailableVidMem answers 558 KB → nMaxNumItems = (limit - base) / (bpp * w * h) comes out zero → the eviction loop at +0x9561 can never exit → black screen forever. Three steps separated the symptom from the cause, and each one looked like a different subsystem's bug: a renderer that never draws, then a guest that idles, then a cache that was never initialized.

After the fix, on the same route at the same point: 10 orphan runs holding 3.7 MB (the primary/back pair and page rounding), 3584 live surfaces accounting for all 44.1 MB they hold.

Two notes for anyone working near this:

test/test-d3dim-texture-release-arena.js covers both, and carries its own negative control: a bare $dx_free must still strand the pages, or the other assertions stop being evidence.

Retracted: the lpDDSCaps pool-split lead in the section above — that $handle_IDirectDraw2_GetAvailableVidMem answers local and AGP from one pool, so D2's max(localFree, min(agpFree, 32 MB)) defeats its own clamp. That is still true and still worth fixing one day, but it was not why the figure was 558 KB, and implementing it would have moved the number without touching the leak underneath. Splitting the pools would have made the black screen go away far enough to look fixed, which is the worse outcome.

2026-09-20: a crash dump that named the wrong function

With the spin gone the route reaches the Act I load — it renders, in D3D — and then traps: control transfers into blank low memory (0x140 on one run, 0x280 on another; the batch differs too, 1560 vs 1637, so this is one of the nondeterministic paths) and $decode_block hits unreachable on a run of zeros.

The dump's EIP before batch pointed at storm+0x19319, and an hour went into disassembling that function — a linked-list teardown walk — on the strength of it. It was innocent. eipBefore is where the batch entered, and a batch retires up to a million blocks after that, so on any crash that is not in the first block it names a bystander. The proof was cheap once asked for: a --trace-at on that address shows the function's real live context is EBX=0 (a NULL sentinel) with EDI=0x7e1x007c (Storm heap headers), while the trap had EBX=0x01bb576c, EDI=0x1653. Different registers, different function, no relation.

src/13-exports.wat has exported get_dbg_prev_eip and get_dbg_prev2_eip all along, the second with a comment describing this exact case: when a thread jumps into blank memory, prev_eip is already inside the blank run and the block that jumped is one further back. The crash dump simply never printed them. It does now, and disassembles prev2_eip too, so the next trap into nothing names its own caller instead of costing a session.

With that printed, prev2_eip landed on d2direct3d+0x645d immediately — a function epilogue:

1000643a  mov  eax, [0x1001aa74]      ; the D3D device
1000643f  mov  ecx, [0x1001b138]      ; a vertex buffer
10006445  push 0x1c / 0x96 / 0x1001af94 / ecx / 4 / eax
10006457  call [edx+0x8c]             ; vtable slot 35
1000645d  pop edi / pop esi / pop ebp / pop ebx / pop ecx
10006462  ret  0x1c

Six pushes, vtable slot 35: IDirect3DDevice3::DrawIndexedPrimitiveVB. (The other call on 0x1001b138 — slot 3, four pushes, flags 0x21 — is IDirect3DVertexBuffer::Lock, which is what fixes the object types.) Our handler popped 32 bytes for a 28-byte frame. The v3 signature is (primType, lpVB, lpwIndices, dwIndexCount, dwFlags); only v7 inserts dwStartVertex/dwNumVertices to make it eight dwords, and the v3 handler had been given the v7 count.

So the epilogue above ran one slot high: the five pops took the wrong saved registers and ret took the caller's own first argument as a return address. That is why the two runs jumped to 0x140 and 0x280 — 320 and 640, the screen coordinates d2gfx passes its renderer. Nothing was corrupt; the stack was simply off by one dword, and every downstream symptom was a consequence of reading it at the wrong offset.

Auditing the rest of the draw family ($arg0..$arg4 are esp+4..esp+20, so a sixth argument lives at esp+24) found four more, each cross-checked against the hand-written Device3 twins that already pop 28 and 36 for the same signatures: Device7_DrawPrimitive popped 24 for 28, Device7_ DrawIndexedPrimitive 32 for 36, Device7_DrawIndexedPrimitiveVB 32 for 36 and read esp+20/+24, and Device7_DrawIndexedPrimitiveStrided read esp+20/+24 — those two short reads handed the core a second copy of $arg4 where it wanted lpwIndices, and dropped dwIndexCount entirely.

With that fixed the route runs clean past the old crash to the Rogue Encampment: batch 2996, zero faults, cacheA_256 at capacity 38 and filling, vidFree 39.8 MB. Diablo II now reaches gameplay on Render=1.

Two lessons worth keeping. A wrong stdcall pop does not fail where it happens — it fails in the caller's epilogue, arbitrarily far away, with a register set that belongs to nobody, and it reads convincingly as memory corruption. And the tell is cheap once you know it: the bogus "return address" is one of the caller's own arguments, so a suspiciously round value like 320 or 640 is not garbage, it is data being executed.

2026-09-20: the black ground was a silent-success stub, and it is fixed

Sprites, HUD, rain and torches rendered on Render=1; the floor was black. That shape is the tell. Diablo II batches its floor tiles through IDirect3DDevice3::DrawIndexedPrimitiveVB — vtable slot 35, a TRIANGLELIST over a Locked vertex buffer, the six-push call site at 0x10006445 already recorded above — while its sprites go through the implemented DrawPrimitive. fb397db1 fixed that entry's pop arity (32 → 28) and left the body empty, so the handler stored S_OK, adjusted ESP and drew nothing.

A silent-success stub is the worst failure shape we have: no trap, no UNIMPLEMENTED API line, no wrong return code. The only symptom is absent geometry, which reads as a texture, palette or format bug and sends the investigation into the sampler. Both v3 VB entries now forward into the Device7 VB cores ($d3dim_vb_draw_primitive / $d3dim_vb_draw_indexed_primitive), with start = 0 and count = -1 so the core clamps to the whole buffer.

Verified end to end, not inferred. test/test-d3dim-v3-vertex-buffer-draw.js rasterizes both entries against a real TLVERTEX buffer (FVF 0x1c4, stride 32) and asserts the 28-byte pop, and it fails with "drew nothing" when the stub is put back. Then the full route — SINGLE PLAYER, Barbarian, name, OK — was driven to the Rogue Encampment at batch 1650 with d2direct3d.dll LoadLibrary'd at runtime by the registry seeding, and the capture shows grass, the stone wall, the wagon, the campfire, the NPC and both orbs.

Budget note for whoever runs the gameplay test next. That capture took 569s of wall clock for 1680 batches (3 batches/s) on a box at load 13.6. test/test-diablo2-demo-gameplay.js caps its child at 220s, so on a loaded machine it now times out before it reaches Act I — the assertion is fine, the budget is not. It is the D3D route that is being timed since the startupRegistry seeding landed; the DirectDraw route the 220s was calibrated against is no longer what that test exercises.

2026-09-20: the route's cost is a frame-limiter spin, not rendering

The 569s above is mostly waste, and --trace-api-counts says so in one line. Over the first 100s of the Render=1 route, of 56M Win32 calls:

calls API
18,720,923 PeekMessageA
18,720,903 QueryPerformanceFrequency
18,720,902 QueryPerformanceCounter
18,303 IDirect3DDevice3_DrawPrimitive

99.7% of the route's API calls are three calls in one frame-limiter loop, at about 4.3 blocks an iteration. The headless guest clock only advances between batches, so that loop cannot exit inside a batch: whatever budget is left after the frame's real work is spent spinning, and nothing else. Surplus --batch-size therefore buys spin, not progress. Measured user CPU for the identical route (user CPU, because this box sits at load 10-40 and wall time measures the machine):

--batch-size user CPU to the Act I load
200,000 91s
50,000 49s
20,000 51s

50,000 is the knee; below it per-batch host overhead takes the saving back.

--tick-ms-per-batch is not the other half of this. Giving the guest more time per batch does cut the number of waiting batches, but at 1000ms/batch the Act I load dies in Diablo II's own "This application has encountered a critical error" box, which is the documented consequence of stepping over Storm's 255ms MPQ completion waits (see Isolated-Worker bounded MPQ waits). Keep the default 200.

2026-09-20: the gameplay test is event-driven and split

test/test-diablo2-demo-gameplay.js no longer fires input at fixed batch numbers. Every stage waits for the pixels that stage produces, so the route survives a --batch-size change; the old schedule was calibrated against --batch-size=1000000 and, at any other budget, clicked screens that were not up yet (at 50,000 it sat on SELECT HERO CLASS for 400 batches and captured that). The screen signatures it waits on, at the CLI's 640x480 canvas:

stage signature
main menu >1000 bright desaturated pixels in both (200,145)-(440,185) (SINGLE PLAYER) and (200,425)-(440,465) (EXIT DIABLO II)
SELECT HERO CLASS >40000 pixels changed from the menu and the centred EXIT plate gone
CHARACTER NAME >400 pixels over a dim plate floor in (495,425)-(615,460); that OK plate peaks at 131, not 255, because the screen is lit by one campfire, and a 90 floor scores it 0
Act I load the centred portal (185,105)-(455,365) lit, with (0,0)-(180,480) black — D2's own critical-error box also leaves a mostly black frame but paints that left margin

Working input coordinates are canvas 640x480, not the guest's 800x600: SINGLE PLAYER (320,164), Barbarian mousemove + dblclick (315,210), name field (320,422), OK (553,442). The old schedule's (400,275) missed the Barbarian entirely and (405,527) was off the bottom of the canvas.

The default run stops at the Act I loading portal: 49s of CPU, about 55s wall on a quiet box, 220s at load 26. Its 420s guest guard and the matching 480s row in tools/test-timeouts.json are sized for this machine at load 50, not for the expected duration. DIABLO2_FULL_ROUTE=1 continues into the Rogue Encampment; that took 2163 batches and 270s of wall clock at load 11-17, and is opt-in precisely because that figure is not bounded on a shared box — the same opt-in run repeated at load 73-90 passed at batch 3299 after 152s of user CPU and 11 minutes of wall clock.

One threshold moved with it. The full route's terrain assertion was > 50000 green pixels, calibrated on the 87,447 of the 2026-09-20 capture. That pinned one camera position: three captures of the same encampment — grass, wagon, campfire, NPC, Barbarian, both orbs, HUD — score 87,447, 43,950 and 34,552, because the count is framing-dependent and the Act I load is one of the nondeterministic paths. The failure the assertion exists to catch is the silent-success DrawIndexedPrimitiveVB stub, whose black floor scores 743-2,186 — the same range as the menu and loading screens. It is now > 20000: 10x over that failure, 1.7x under the tightest frame that is genuinely gameplay. The life orb, mana orb and colour assertions are unchanged (measured 2,974 / 2,902 / 961 against 2,500 / 2,000 / 100).

2026-09-28: resolutions, and the 1024x768 "blow-up" that wasn't

What the binaries support: 640x480 and 800x600, nothing else

diablo ii.exe is FileVersion 1.0.4.0 (the menu's "Shareware v 1.04"); the renderer DLLs carry no version resource. Every layer has exactly two resolutions, selected by an index of 0 or 1:

module site what it does
d2gfx.dll 0x10004455 / 0x10004a07 index 0 -> 640x480, 1 -> 800x600, anything else -> "Unknown resolution %d" (0x1000d5c4, Window.cpp); then AdjustWindowRectEx + SetWindowPos
d2direct3d.dll 0x1000207b same 0/1 choice, logs "Opening Direct3D window at 800x600..." / 640x480, then SetCooperativeLevel(hwnd, 0x411) (FULLSCREEN|EXCLUSIVE|MULTITHREADED) and SetDisplayMode(w, h, 16)
d2ddraw.dll, d2gdi.dll, d2glide.dll {640,800} / {480,600} width/height tables (d2ddraw 0x1000d310, d2gdi 0x10008290, d2direct3d 0x100134e0) same pair

There is no 1024x768 constant in any of them, no Resolution value under VideoConfig (the exe's only VideoConfig value names are Render, plus the Gamma/Perspective preferences), and no resolution command-line switch: the switch table at 0x005a60e0 is 3DFX, OPENGL, D3D, RAVE, PERSPECTIVE, QUALITY, GAMMA, VSYNC, FRAMERATE, the network and character switches, and -w. The pre-LoD game does not let the player choose: menus are 800x600, gameplay and cutscenes are 640x480, fixed. LoD's in-game 800x600 option does not exist here.

Measured per backend (probe3 on box 3, --trace-api on the mode calls, full route to the Rogue Encampment; all three reach it):

backend selected by cutscenes menus gameplay
Direct3D (Render=1 or -d3d) runtime LoadLibrary d2direct3d.dll exclusive SetDisplayMode(640,480,16) exclusive 800,600,16 exclusive 640,480,16
DirectDraw (default, Render 0/2, -opengl) static d2ddraw.dll 640,480,8 then 640,480,16 for Bink exclusive 800,600,8 exclusive 640,480,8
GDI (Render=4, -w) d2gdi.dll window 648x508 (640x480 client) SetWindowPos 808x628 (800x600 client) back to 648x508
Glide (Render=3, -3dfx) d2glide.dll -- crashes on _grGet@12 (no glide3x) --

The emulator honours all of these: SetDisplayMode records the mode and resizes the cooperative window to it, and an exclusive primary is fit-scaled onto whatever canvas the host has. The GDI path is windowed, so its 808x628 menu window needs a canvas at least that big — that, and not anything in the DX paths, is why GDI runs are made with --screen=1024x768.

The 1024x768 Direct3D "blow-up" is a harness coordinate bug, not the emulator

Reported: Render=1 + -d3d + --screen=1024x768 through the benchmark driver (~/d2-backends-out/d2-arm.js) took 374s of user CPU over 3024 batches, made 14,445 presents and "never reached a recognisable menu".

The guest does not know the canvas size exists. Same command line at both sizes (--branch-clock --batch-size=50000 --max-batches=3024, run.js directly, no driver):

canvas API calls Flip EndScene user CPU
640x480 102,014,423 14,445 14,440 346.8s
1024x768 102,014,423 14,445 14,440 348.0s

and the 600-batch version without --branch-clock also matches exactly (12,402,964 calls, identical block counts, 47.0s vs 46.5s). D2 asks for the same modes (above) either way.

The driver's own last capture of the failed run (01-main-menu.png) is the main menu — 800x600 fit-scaled to 1024x768. Its stage signatures are written in 640x480-canvas coordinates (SINGLE PLAYER at (200,145)-(440,185)), and with SCALE=1 they sample the sky above the scaled button, so the menu check never passed and the driver spent its whole 300 x 10-batch attempt budget sitting in the menu. With SCALE=1.6 (1024/640) the identical run reaches the menu at batch 264 in 10.4s, the same as the 640x480 canvas (9.4s).

The two numbers that looked like a blow-up are just 2,760 batches of menu:

So: nothing to fix in the D3D/DDraw emulation for this. A driver that runs with a non-default --screen must scale its sample points by canvas width / 640 for the exclusive (fullscreen) backends, and use the window origin plus 1.25 (800/640) for the windowed GDI menus.

2026-09-28: the menu's frame limiter is a QPC clock spin, and now parks

The loop

d2win.dll loads at 0xc97000 (origBase 0x10000000, so runtime = orig - 0x0f369000). The limiter is the function at orig 0x1000b670, and every menu and loading screen runs it on the main thread (ESP 0x074ff1c0, the main guest stack):

0x1000b690: PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE)   ; ret 0x1000b6a3
            if TRUE: GetMessageA / TranslateMessage / DispatchMessageA -> 0x1000b74e
0x1000b6e4: QueryPerformanceCounter(&now)                 ; ret 0x1000b6ef
            QueryPerformanceFrequency(&freq)              ; ret 0x1000b6fa
            _allmul(now - last, 25)  (0x10010fe0)
            if (result > freq) { last = now; frame callback; 0x1000bda0 }
0x1000b742: [0x1005bd08] = [0x1005bd04]
            loop while [0x1001cb68] != 0

A 25 fps cap: a frame when (now - last) * 25 > freq, i.e. every 40ms of QPC time. --trace-api=QueryPerformanceCounter,PeekMessageA shows the API numbers stepping by three (Peek, QPC, QPF) with nothing else in between, the peek returning FALSE every time.

Why neither detector saw it

[spin-park] over the 1,001-batch menu dwell below: no line at all on the old build (zero trips on any thread).

Where the time went in the headless run, and why the saving is not bigger: the batch clock steps 1ms per get_ticks call and stops at the next batch boundary minus one (lib/batch-clock.js). So each batch the limiter renders a frame every ~40 loop passes until the clock reaches base+199, and then spins on a frozen millisecond for whatever budget is left. Only that tail is spin -- about 12,000 passes, ~15ms of CPU a batch. The rest of a menu batch is five real frames of rendering plus the host present.

The fix

QPC is now a clock read, keyed on the millisecond its count is built from ($handle_QueryPerformanceCounter, src/09a7-handlers-dispatch.wat): the count itself never repeats because $perf_counter_lo moves on every call, but the clock under it does, and that is what the guest is waiting on. The park is taken before the counter bump and the store, so a woken call is the whole call again. QPC and QPF are also clock reads for the activity sequence ($spin_is_clock_read, src/09b-dispatch.wat). Every existing guard applies unchanged: same return address and ESP per context, no non-clock Win32 call in between (an empty peek is neutral; a peek that finds a message is work), at most $spin_work_max blocks of guest work between reads, K=8 to qualify a site, one park per millisecond, deadline = next millisecond. --no-spin-park is the old arm, which is exact for D2: the old build took zero parks here. test/test-qpc-spin-park.js pins the shape and each of those resets.

The peek detector was deliberately not widened. The loop is waiting on time, not on the queue, and the clock park is the one that carries the deadline the schedulers sleep to (get_spin_deadline_ms / get_tick_count, which QPC now updates).

Measured (box 3, --batch-size=50000 --branch-clock, user CPU)

Menu dwell: Esc through the intros, then sit in the main menu to batch 1,001 (menu up at batch 264 in both):

arm API calls QPC calls clock parks Flips user CPU
old build 28,571,479 9,258,416 0 4,035 89.9s
QPC park 908,475 50,483 766 3,809 79.1s
old build, --batch-size=60000 37,990,087 12,385,277 0 4,256 100.2s
QPC park, --batch-size=60000 935,956 52,232 -- 3,938 85.2s

-12% and -15%. The earlier "220s of 347s was the loop" was the whole guest slice; the spin tail is ~15ms of a ~110ms menu batch.

Full route through ~/d2-backends-out/d2-arm.js (three runs each):

phase old build QPC park
main menu reached batch 264 (x3) batch 264 (x3)
start -> menu 8.79 / 8.75 / 8.77s 8.08 / 8.07 / 8.10s
menu -> Act I portal (355 batches) 6.59 / 6.53 / 6.57s 6.55 / 6.53 / 6.55s
world -> end (630 gameplay batches) 8.77 / 8.00 / 9.03s, 122 / 113 / 124 flips 9.10 / 9.10 / 8.95s, 124 / 121 / 126 flips
main-thread clock parks, world -> end (run 3) 249 (all GetTickCount) 251
main-thread clock parks, start -> menu (run 3) 0 39

The menu, hero-class, name, named and Act I loading captures are byte-identical between the arms. The encampment and final captures differ, but they also differ between two runs of the old build: the Act I load is nondeterministic (world reached at batch 3099-3259 across the six runs). The QPC park does not fire in gameplay (251 against 249 parks), and gameplay CPU per flip is the same (71-75ms in both arms).

The fewer Flips are the one guest-visible change, and they are the old build's artifact. In the old build the frozen-millisecond tail was not entirely dead: QPC adds 1us per call, so ~11,000 spin passes could move the count the 11ms still missing from a 40ms frame and render one more before the batch ended. That extra frame is bought with surplus budget: the old build renders 4,035 menu flips at 50,000 blocks and 4,256 at 60,000. The QPC park ends the tail instead, leaving the menu at 25 fps of guest time as the limiter intends. In the menu-dwell captures, six of the eight sampled frames (batches 300-1000) are byte-identical between the arms. The other two differ only in the phase of the burning DIABLO II logo, since the extra frames shift the flame animation.

Browser (not measured here, BROWSER-LOCK was held): there the clock is real and the limiter spins the whole 40ms between frames, so this is where the saving is large. A qualified site parks after two reads of one millisecond and sleeps to the next (CLOCK_SPIN_PARK_MS, _spinParkDelay).

One tooling note: --slice-split, --decode-stats and --batch-stats time and count only the first main-thread run() of each batch. D2 has guest threads, so test/run.js also runs main between worker slices within the batch (the cooperative branch after the spin-park handler), and those runs are invisible to all three. With the QPC park, the park is taken in one of those interleaved runs. The next batch's first run() then returns immediately on the pending yield ("blocking wait", 1 block), and the menu's real work happens in the interleaved runs after the handler clears it. The old build spent the whole budget in its first run. So on this route those flags read 77ms/batch against 0.00ms for identical menu frames, which says nothing about cost. Use user CPU at fixed batches for spin A/Bs.

2026-10-04: Glide menu freeze and repeating audio investigation

The user reports frozen menu animation and repeating sound in diablo2_glide_demo. The corrected local observation did not reproduce the menu freeze. Audio continuity and quality remain unverified; this is not a repair or a resolution of the user report.

The registered route inherits the installed demo and sets VideoConfig Render=3 in both registry hives. It dynamically loads D2Glide. All 25 registered files were present (135,378,002 bytes). The observed module was f40d4ca3382279ff9b826188573f8acd9272eaa2dc5024dcbb69aecc35b49063 (1,664,777 bytes); current JavaScript was pinned separately, without claiming that later WAT source changes were included in this module.

Attempt 1 ended with normal ExitProcess(0) after an Escape key sent without a fresh visual gate. It is preserved as a harness route failure, not a game crash or a freeze reproduction. Attempt 2 prohibited Escape, captured state before input, and reached the Shareware 1.04 menu through an ordinary click on the visible title screen.

During the 10.3793-second quiet menu interval, Glide host presentation events increased from 1,539 to 1,812. The logo flames visibly changed between the first and last images; the coordinator independently confirmed this in scratch/diablo2-glide-menu-20261004/root-visual-review.json. These transport counts are diagnostic evidence of progress, not qualified game or display FPS.

The AudioContext was running and advanced from 37.883 to 48.263 seconds. Three later read-only observations of DirectSound worklet voice 720898 showed an advancing cursor, descriptor sequence 758/770/780, and three different 262,144-byte ring hashes over 4.01 seconds. These concurrent memory snapshots show producer activity, not an atomic audio recording or proof of seamless output. Shared waveOut callback registration was zero and its completion queues were empty; this observation does not support the separate Tile World or FOTAQ pending-function-callback diagnosis.

Evidence is in scratch/runs/20261004-diablo2-glide-menu-observation (182 hashed artifacts), with raw analysis.json, rings.json, timed images, owner samples and the actual served files. All 147 unique served file copies passed their recorded hashes. The browser was headful Chrome 151 with explicit --disable-gpu and SwiftShader, so this is not proof of parity with the user's device. Browser session 35990 and its read-only attachment both exited 0; browser and server closed at 16:29:06.090 UTC.

Next, compare the affected URL, build, browser/device and onset route with this local identity, then capture output audio if the complaint persists. No guest state, engine code or pacing was changed, and no gameplay, FPS or release-readiness claim follows from this menu observation.

Menu audio (2026-10-06, claude:65967384)

The menu theme is data\global\music\common\options.wav (d2music.mpq), first in d2sound's music table at 0x1000f668. The playlist (#10033, 0x10004640, driven by d2sound's thread T3 at 0x100027f0) opens it via Fog and hands it to Storm's DDA streaming: SFileDdaBeginEx (Storm #255, called through 0x1000511a). Storm creates the 256 KB 22 kHz stereo buffer itself (flags 0xe0) on the IDirectSound d2sound gave SFileDdaInitialize (#260), and its own thread T2 (start storm+0x6ffc59d0) Locks/fills it (Lock site 0x6ffc6dc1) and Plays it once (0x6ffc6e89). So the music never shows as a d2sound Lock/Play, and a worker's COM calls are not named in --trace-api: count the Storm sites with --count=storm+0x6ffc6dc4,storm+0x6ffc6e8c instead.

2026-10-10: per-object GetTickCount vs the d2win QPC limiter

Two clock loops, which the clock-spin detector must tell apart:

a7e5f4f75 counts a read only when EBX/EBP/ESI/EDI match the context's previous read, discounting any register equal to the previous clock reading. Full route, same build: the limiter parks 38 by the menu and 40 by the Act I load in both arms; in town, parks go 0 (check on) vs 106 over 240 batches (off). Run 20261010T1720Z-clock-spin-regs-check-boat.

2026-10-13: explicit WebGL full-route control qualification

Run 20261013T1930Z-diablo2-webgl-control qualifies the registered diablo2_demo Direct3D route with explicit --headless-gl --d3dim-gpu, rather than the default portal-only test. Tested source was a6bff043a76ae3fb580137afcaaff9dc788b3136 plus the retained driver-only patch; the full build completed all gates and produced Wasm SHA-256 99678a24d2160a69c346e475a947c2f5af7501474901015210ec00d240715005. Node v24.18.1 ran on Linux x64 with Xorg display :0, native @node-3d/webgl 6.0.1 and @node-3d/glfw 7.3.1. Underlying GL vendor and physical hardware acceleration were not captured.

The original 138,309,685-byte installer was downloaded from the Internet Archive storage mirror and matched its existing package hash. It is an embedded MPQ, not a ZIP/7z archive. Existing tools/mpq.js extracted 26 original blocks, matched by payload size and then exact SHA-256 against the existing installed fixture; fixture-receipt.json records every block and hash. No guest files were patched, and this extraction is not a fresh installer UI acceptance run.

The driver retained the full child log after process shutdown, including runtime d2direct3d.dll loading and the final renderer census: 21,985 WebGL draws, 122,496 triangles, 687 clears, eight fallbacks, zero errors. The eight fallback sites were not localized: this is qualification of the existing WebGL renderer with its ordinary fallback behavior, not proof that every command used the GPU. No FPS or software/WebGL speed ratio was measured.

The full route created the Barbarian and reached the Rogue Encampment. Reviewed 640x480 captures show textured grass, stone walls, wagon, NPCs, Barbarian, rain, and life/mana HUD. Ordinary ground input at (470,200) moved the scene: 250,700 pixels changed versus 5,690 during idle. Both windows cover exactly 44 batches at the default 200 ms guest tick and 50,000-block budget. The cursor was placed at the destination before idle, so relocation alone cannot explain the result. The before/after views visibly shift the wagon, wall and NPCs while retaining the HUD. Driver exited zero at batch 3629; no guest crash was recorded.

The driver now saves run.log and control-evidence.json on both success and failure, and equalizes the idle window with the click helper's four input steps plus forty settling steps. These changes were exercised by the full route; default portal-only behavior remains unchanged. Software's historical town evidence is separate and was not rerun for this WebGL qualification.

2026-10-13: prepared wall-clock presentation sampler; not yet executed

The full-route census in run 20261013T1930Z-diablo2-webgl-control reports lib/d3dim-gpu.js lifetime stats.fallbacks=8. This increments at six rejection sites: unsupported primitive/vertex type or insufficient vertices; missing draw description; rejected draw target; failed draw texture decode; rejected clear target; incomplete clear texture descriptor. Each is a draw/clear operation returning zero to the caller's software route, not a failed frame. The target rejection can mean unavailable WebGL, absent DIB, zero/oversize dimensions, or unsupported target bit depth. No one of these reasons is established for this run.

This is not an exhaustive software-operation count: untouched-target clears increment declinedClears instead, exceptions increment errors, and other zero-return paths do not increment fallbacks. The final log alone does not identify the eight sites, guest callers, or whether they occurred before gameplay. GPU draw and triangle totals likewise are not frame counts.

tools/measure-gameplay-presentations.js is prepared source, not runtime validated. On an allocated browser slot, use the normal registered diablo2_demo route with ?debug&perf&perf-stream, normal browser clock, and CDP enabled. Reach Single Player -> Barbarian -> name -> Act I -> Rogue Encampment through ordinary input; review town and a ground-click response before attaching. No guest flags, game state, pacing or counters are patched. Do not pass this helper a CLI frozen/batch-clock session.

Example, substituting the page's exact URL:

node tools/measure-gameplay-presentations.js \
  --cdp=http://localhost:9222 \
  '--url=http://localhost:8080/index.html?debug&perf&perf-stream' \
  '--scene=Diablo II Rogue Encampment after ordinary ground-click control' \
  --seconds=10 --windows=3 --out=/tmp/diablo2-presentation-sample

The helper disconnects from CDP without closing the existing browser. It requires the identity recorded from actual compiled Wasm by host.js and hashes actual loaded same-origin script sources through CDP. Local checkout commit, diff and relevant file hashes are recorded separately; they do not assert the page used the current checkout. Its before/after screenshots must be reviewed. Source/debugger capture happens before timed sampling.

Raw WinePerf presentation timestamps, endpoint cumulative presentation and upload counts, actual performance.now() intervals, and accessible WebGL counter deltas are saved. Null renderer counters mean unavailable, not zero. Three default ten-second windows report guest presentation events per real wall second. Draw rate, canvas uploads, rAF cadence, and logical frame rate are separate; logicalFps and displayFps stay null. A registration perf.logicalFrame is currently absent for Diablo II, and old menu 25/s guest-clock observations do not qualify a town counter.

Next validation: syntax check; attach to an ordinary town run; confirm nonzero counter progress and review before/after. Then qualify one town logical submission boundary against Flip/EndScene/presentation census in a separate bounded diagnostic. Prove the relationship across idle and movement before converting presentation rate to logical FPS. Keep any instrumentation overhead separate from the normal-clock sample. No runtime, FPS, fallback site localization, hardware GPU or physical-device claim has been added.

Sampler hardening: finite nonnegative counters and increasing wall intervals are required; every sampled counter must be monotonic. Navigation and changed Wine/instance/worker/Wasm/telemetry identity invalidate the report. A visibilitychange listener retains hidden mid-window transitions, and an identity monitor latches changes between endpoints. Failed captures retain an explicit failed report. Pure validation/browser-state mocks are in tools/measure-gameplay-presentations.test.js; run them before browser smoke. Node syntax check passed; browser runtime remains queued.

2026-10-13: ordinary browser town/control and real-wall presentations

Run 20261013T1950Z-diablo2-browser-presentations follows the original registered diablo2_demo route in headful Chrome 151.0.7922.108 on Linux x64: title click -> Single Player -> Barbarian -> name Ratecheck -> OK -> Rogue Encampment. The normal default Worker backend remained enabled. An ordinary ground click visibly moved the camera, stone wall, wagon and NPC positions; no guest state or pacing was patched. Screenshots before and after the control and sampling were reviewed. 07-act-i-loading.png was taken after loading had already finished and actually shows town, despite its planned filename.

The page's compiled-module identity was SHA-256 79a828167326142433105270a3cd53fe33a3ce934f71116451e8948315b44c93, 1,792,359 bytes. It is the exact validated build of main 95457854dc818389f67c58373aef4c81133be3b5, reused without rebuilding from /home/user/gl-client-work; the isolated runtime sources match that commit. Sampler commits were cherry-picked into 96cc1384cc33566c194f7691ba9b6d8f2e1c6a3c and the retained sampler-only patch adds Worker census support and preserves the existing browser viewport. The original previously verified 26-file fixture was reused unchanged. Actual parsed page scripts (91) have separate CDP hashes in the reports. Worker source provenance uses the pinned static checkout; its scripts were not independently hashed through the page-only Debugger session.

The first sampler attachment exposed Puppeteer's default connection behavior: it resized the existing page from 900x740 to 800x600. That exploratory report is retained as town-sample/; it is not the final sampler validation. The fix passes defaultViewport: null. A repeat town-sample-preserve-viewport/ kept the existing 800x600 viewport and reviewed town scene throughout:

real wall seconds presentation events presentations/second backend fallback operations backend errors
10.002350 199 19.8953 10,359 0
10.002365 213 21.2950 10,689 0
10.001210 197 19.6976 10,029 0

The total is 609 presentation events / 30.005925 real seconds = 20.296/s; 609 raw presentation timestamps corroborate the endpoint total. This is presentation-event throughput in one town scene, not qualified logical game FPS or physical display FPS. Both remain null. The three windows are one run, not independent benchmark repetitions or a renderer speed comparison. The static loopback server did not implement the optional /api/perf sink; perf-stream therefore generated periodic HTTP 404 requests (about one per second). Console evidence retains them. No page exception or guest trap was observed; the rate includes this instrumentation/network overhead and is not a clean production benchmark.

The sampler now selects wine.guestWorker.d3dStats on this backend. This is the existing asynchronously relayed census: lib/guest-worker.js merges the command encoder snapshot followed by backend stats, so backend fallbacks overwrites the producer's similarly named transport counter. This does not count all software rendering or identify fallback rejection sites. Endpoint census values can lag the sample wall timestamp; the small clears/presents mismatch (212 vs 213, then 198 vs 197) illustrates that limit. The 31,077 fallback operations in these town windows are not dropped frames and are not comparable to the previous eight lifetime CLI fallbacks as if they represented the same route, clock, rendering owner or interval. The sample also records 248,458 accepted draws and 3,207,250 triangles. Renderer reports ANGLE (Intel, Mesa Intel(R) UHD Graphics 620 (KBL GT2), OpenGL 4.6 (Core Profile) Mesa 23.2.1); that string alone is not an independent physical-device attestation.

Pure validation tests pass, including a new counter-source-change rejection. tools/measure-gameplay-presentations.browser.test.js passed in actual headful Chromium with a separate explicitly synthetic telemetry fixture: positive capture, unchanged viewport, hidden-then-visible transition, runtime identity replacement, module identity replacement, decreasing counters, navigation and no presentation progress. Failure cases saved failed reports and cleaned up their owned capture. Synthetic test counts are not emulator measurements. The game/browser supervisor exited zero at 19:58:40 UTC and the test browser exited zero at 19:58:55 UTC; servers bound only to loopback. No public deploy.

Next work, if required, is a separately bounded logical-frame boundary qualification and fallback-site attribution across idle/movement. This run does not establish those, audio quality, other devices, or long-session stability.

Browser fallback-site census, 2026-10-13

Run 20261013T2020Z-diablo2-fallback-reasons uses source 45498b943 and Wasm 79a828167326142433105270a3cd53fe33a3ce934f71116451e8948315b44c93. Original default-Worker browser town and ordinary ground-click movement were reviewed. Across the two sampled scenes, all 33,692 backend fallbacks are fallbackDrawShape (idle 19,024; post-click 14,668); all five other reason deltas and backend-error deltas are zero. Raw endpoint arithmetic and exact reason sums were independently checked by the coordinator. The samples also record 24,390 readbacks.

This locates the rejecting gate, not its precise input or performance cost. That gate combines vertex type, primitive kind and minimum vertex count. Worker census endpoints are asynchronous, timings overlap, and the static server retains optional telemetry-sink HTTP404 overhead. These are diagnostic scenes, not repeated optimization benchmarks; logical/display FPS remains unqualified.

Main 0c90327e adds bounded disjoint predicate masks, count buckets and eight immutable exact input tuple slots plus explicit overflow. Focused positive/negative tests pass. Next sample must validate tuple identities separately from monotonic counts and identify the actual rejected input before changing rendering behavior.

POINTLIST implementation and ordinary browser check, 2026-10-13

Exact-shape run 20261013T2035Z-diablo2-exact-shapes found all 40,605 rejections were transformed-lit vertex type 3, primitive POINTLIST 1, count 1. Generic GPU point support is integrated as 782bc73d43c248766c2e24a27b8231cb000a6a44. It preserves the software 2x2 point footprint and clipping. RGB565 batches; 555/1555/opaque32 use per-point fences to preserve untouched packed bits. Unsupported formats remain explicit fallbacks. Forty native-WAT/WebGL1/WebGL2 pixel cases and depth/blend transition tests passed; a pixel-offset mutation failed. This is a renderer change, not an interpreter optimization.

Paired runs 20261013T2055Z-diablo2-pointlist-control and 20261013T2055Z-diablo2-pointlist-candidate use source d31cf3b784 and 375c3aa819 respectively, the same original fixtures, and canonical Wasm ba6f25ea2d467b3fba00110d83575d48ac1aeb8794a474052190998067723259. Both reached town through ordinary input and responded to a ground click. Read-only target inspection confirms 640x480 RGB565, pitch 1280. Served-source and fixture hashes were checked, and final captures reviewed independently. Each arm sampled two 10-second idle and two 10-second post-click windows.

Counter summed across four windows Control Candidate
Backend fallbacks 38,701 0
GPU points unavailable 51,066
Readbacks 27,556 1,001
Readback bytes 7,260,959,680 1,230,028,800
Backend errors 0 0

Presentation events were 16.0–20.6/s for control and 25.0–25.1/s for candidate. Fresh characters produced different randomized town layouts, so these rates are not an isolated speedup estimate. Logical/display FPS, audio, other devices and long-session stability remain unqualified. Worker counters are asynchronous; read-only heap inspection occurred outside timed samples. The evidence supports removal of the measured fallback/readback mechanism with intact ordinary town rendering and movement. Result manifests retain the exact tested source, rather than relabeling the run with the later integration commit.

Explicit software browser gameplay, 2026-10-13

Run 20261013T2115Z-diablo2-software-town (prepared at21:15, executed 21:26:31–21:29:01 UTC) uses source 2cf59bcff and the same canonical ba6f25ea2d467b3fba00110d83575d48ac1aeb8794a474052190998067723259 module as the earlier WebGL run. Ordinary title, Single Player, Barbarian and name input reached Rogue Encampment. Ground click(405,384) on reviewed open ground moved the hero east and scrolled the camera; before/after town captures were reviewed with terrain, rain and HUD intact. No captured page errors.

This backend is positively attested rather than inferred from the selector: read-only CDP observes an initialized legacy render endpoint with backend=software and no GPU adapter; initialized guest workers report GPU disabled. Completed renderer commands rise595302->826832 across the ordinary input observation (231530 additional commands), endpoint errors0. The corresponding source dispatches those batches to the WASM rasterizer. All119 served JS/Wasm request hashes were checked against exact source blobs or the canonical module hash. Original26fixture hashes were verified during preparation;52remote artifacts were transferred with SHA256 checks.

Evidence result.json was published after root visual/backend review. Supervisor115095, driver115103 and Chrome115116 exited/absent by21:29:10. Together with 20261013T2055Z-diablo2-pointlist-candidate, this supplies ordinary browser town/control evidence for both software and WebGL on the recorded versions. It is not a matched performance comparison: RNG/time differ. No audio, combat, mobile, logical/display FPS or long-session claim is made.

Original WebGL combat attempt, 2026-10-31 (goal incomplete)

Run 20261031T0258Z-diablo2-combat verified all 26 existing original asset hashes before and after; no reinstall or original-asset copies were needed. The initial frozen module 8333a35b1efa694462033e87f62ce4a3f5497941d1423540b39a590c9d31134a (compiled source unknown) hit the original D2Direct3D font assertion at d3dDebugFont.cpp:192. Disassembly of its texture helper identified the DDSCAPS2_OPAQUE texture request rejected by CreateSurface validation.

The repair accepts OPAQUE texture hints in CreateSurface and attached-surface validation, retaining the required texture-only and incompatible dynamic/static hint checks. OPAQUE permits driver optimization; ordinary storage remains valid. The public x86 COM regression covers DD4 and DD7 creation, reported caps and surface descriptions, Texture2 queries, and invalid combinations. node test/test-directdraw-surface47-abi-candidate.js and flock /tmp/wine-build.lock bash tools/build.sh both passed.

The fresh original diablo2_demo retest used explicit WebGL, default guest workers and paired trusted browser mouse input. Its frozen module is 7f9da4e9da5183e9f7f061d2356cd34626fe74bdbaf7da0345f6693dd81152be; source manifest/archive, patch and every frozen host/module response are retained. Read-only worker/backend inspection confirms WebGL execution with guest GPU enabled. Long held presses were needed for reliable game polling; reconnecting browser helpers must use defaultViewport:null to preserve pointer geometry.

Reviewed captures show successful startup, Barbarian name COMBAT, and movement through town. The final retest/25-final-road.png still says Rogue Encampment: the hero is beside the town wall and Gheed/Warriv map labels. The real exit and first monster were not reached within the bounded attempt. There is no combat before/after proof and no complete-playability, audio or FPS claim. This stops at a route/navigation boundary; it does not establish a runtime failure at the exit.

recovery.txt and replay-server.cjs in the run restore the exact tested host and module over the existing verified original assets. No save checkpoint was exported: recovery starts from the original launch/character route. Both owned browsers/controllers were closed; no remote test box was used. Next work is to locate the real exit in this randomized town and capture the first native fight.

Blood Moor exit and first fight, 2026-10-31

Run 20261031T0319Z-diablo2-first-fight reached the real exit and captured the first fight through native browser mouse/keyboard input. It replays the retained repaired host/module from the preceding run, Wasm 7f9da4e9da5183e9f7f061d2356cd34626fe74bdbaf7da0345f6693dd81152be; it is not a current-main build retest. The source manifest/archive and OPAQUE repair patch are retained with the run. Explicit WebGL and default guestWorker were active, with a stable 1024x768 viewport and reconnects using defaultViewport:null. Backend snapshots show WebGL activity and zero errors.

The 25 available original runtime files match the fixture manifest before and after. The separate unused DiabloIIDemo.exe installer archive is now absent; the readiness tool reports that ENOENT, so this run does not claim all 26 manifest entries are present. No original assets, saves or guest state were edited. No execution trace or production repair was needed.

In this randomized layout, the north palisade was a dead end. Returning across open town ground and walking west past the Gheed side reached the palisade opening: inspected 21-gheed-side.png shows Entering The Blood Moor and the Blood Moor area label. This direction is a route observation for this seed, not a universal exit location. 28-rat-before.png identifies a live Quill Rat. After further movement, 38-stand-ground.png shows approaching zombies; 39-stand-attack.png shows the hero swinging with a zombie alongside him. Native left-button attack at the adjacent zombie produces its collapsed body in 40-zombie-hit.png, still present in inspected 41-after-first-fight.png. These are before/after fight evidence, not merely a startup or town claim. Audio, performance and extended play remain unqualified.

Runtime investigation ran 03:18:23–03:37:39 UTC (19m16s). The browser exited zero, its controller and loopback servers closed, and its profile was removed; cleanup was checked separately. No Boat/test box was used (ID/state/expiry not applicable). recovery.txt records fresh-launch replay and native route; there is no exported save checkpoint. Next gameplay work can continue past this first fight toward the Den of Evil.

Den search and bridge encounter, 2026-10-31 (entry unverified)

Run 20261031T0342Z-diablo2-den reuses the retained repaired module 7f9da4e9da5183e9f7f061d2356cd34626fe74bdbaf7da0345f6693dd81152be and frozen host from the first-fight run. Compiled source remains unknown; this is not a current-main build retest. All 144 frozen entries and 148 served host/module responses match; the 25 original runtime files match before and after, with only the unused installer archive absent as previously recorded. Explicit WebGL/default guestWorker, trusted native controls and a stable 1024x768 viewport were retained. Backend errors and page exceptions are zero. No cheats, guest-state patches, asset modifications or production repair occurred.

No prior save checkpoint exists, so recovery starts with fresh Barbarian DEN. Inspected 14-blood-moor.png verifies the Gheed-side palisade exit into Blood Moor. The north/east stone boundary search did not identify the cave. A dark ground/gold-map-marker candidate was not confirmed as an entrance. Moving west reached a riverbank (25-interior-west.png) and stone bridge, where 26-west-search.png shows two armed red enemies. Native Shift plus held left attack produces a visible swing beside an enemy in 27-riverbank-south.png. After releasing Shift, a targeted held left attack runs onward to the stone wall in 28-bridge-attack.png; no hit or kill is verified. The final capture 29-final-bridge.png also shows that wall, despite its planned filename.

Den entry and combat inside remain unverified. The concrete limit is locating and navigating to the entrance within the bounded run, compounded by delayed controller responses; no emulator failure at the cave is established. One redundant mouse release reported an input-helper error, and capture24 exceeded the controller's 55-second timeout but eventually saved a readable screenshot. All 29 capture geometry records are stable. Audio/FPS remain unqualified.

Runtime was 03:40:31–03:59:03 UTC (18m32s). Browser1468391 exited zero; its controller is absent, all three loopback ports are closed and its profile was removed. The controller shell session returned143 after explicit quit and the successful browser finalizer; the cause is unknown, and independent cleanup checks confirm closure. No Boat/test box was used (ID/state/expiry N/A). recovery.txt, native action logs and replay-server.cjs preserve the exact fresh-launch route; there is no exported save. Next work should use the river/bridge landmark to search unexplored Blood Moor interior for the cave.

Native automap search, 2026-10-31 (Den still unverified)

Run 20261031T0402Z-diablo2-automap ran 04:02:11.771–04:20:57.597 UTC (18m46s) with retained repaired Wasm 7f9da4e9da5183e9f7f061d2356cd34626fe74bdbaf7da0345f6693dd81152be. Compiled source remains unknown; this is not a current-main build retest. All 144 frozen entries and 148 served frozen responses match their pins. The 25 original runtime files verify before and after; only the previously absent unused installer is missing. No assets, saves or guest state were edited. Explicit WebGL/default guestWorker and trusted native input were used; all 83 captures retain the same canvas geometry in a 1024x768 viewport. Puppeteer launch uses defaultViewport:null before one explicit viewport setup; reconnects must also use defaultViewport:null. Final backend/page/action errors are zero.

Fresh Barbarian MAP had a different exit arrangement: the Gheed-side and north palisades were enclosed. Native Tab automap inspection identified a river crossing; long held presses repeatedly overshot its approach. Short 500–900ms presses aligned with the visible stone bridge in inspected captures51/52; 53-on-bridge.png shows the hero on it, and 55-field-entry.png explicitly shows Entering The Blood Moor. These coordinates are seed observations, not a reusable blind route.

Automap-guided field search inspected the north stone boundary58/59, interior shrines63–65, Flavie's map label65/68, southeast forest boundary66/67, and a lower sweep72–78 including the mana shrine75. Dark treeline candidates71/80/81 produced no entrance label or transition. Final82/83 show Blood Moor and an armed red enemy nearby; no attack, hit or kill is verified in this run. Den entry and combat inside remain unverified. The concrete blocker is finding and navigating the entrance within the time bound, including held-input overshoot and repeated stone/forest barriers. No emulator failure at the cave was established, and no source fix or build claim is made.

Explicit quit returned successfully, then the controller shell exited143 before its finalizer wrote cleanup or a browser-exit event. The cause and browser exit code are unknown. Independent checks confirm browser1493231/controller1493210 absent, HTTP44607/control33081/CDP37477 closed, and profile removal after those checks. The owned messageboard watcher is closed. No Boat/test box was used (ID/state/expiry N/A); delegated shutdown is complete. recovery.txt, replay server, native action logs and validated captures are retained; no checkpoint was exported. Next work should preserve a useful native save if available and continue from inspected automap landmarks, using short local presses at narrow approaches. Audio, FPS and cave playability remain unqualified.

Native whole-file checkpoint and fresh-page restore, 2026-10-31

Run 20261031T1523Z-diablo2-den-checkpoint preserves a native save and verifies its consumption through a fresh-page native character load and inspected movement. Den entry remains unverified, and this run does not qualify combat under the requested default guestWorker configuration. The first execution dependency was a launch-harness mistake: its frozen-response handler omitted COOP/COEP headers. Captures01–69 record crossOriginIsolated=false and guestWorker=false, despite the enabled Threads preference. This was missed at launch and detected in the final evidence audit; execution should have stopped at that first failed configuration check. The later fresh page records isolation and default guest workers active. No emulator defect is established.

The exact 144 frozen inputs come from the 0402Z replay manifest, including repaired Wasm 7f9da4e9da5183e9f7f061d2356cd34626fe74bdbaf7da0345f6693dd81152be. Compiled source remains unknown; this is not a current-main retest. All 144 pins verify before and after; all 248 frozen responses among 387 total served responses match their pins. The 25 existing original runtime files verify before and after; only the previously absent unused installer is missing. No production code changed; no external edits were made to original assets, INI, clocks, save bytes or guest memory. Explicit WebGL was selected. All 52 captures are 1024x768 with unchanged presentation/game-canvas geometry; the separate cursor overlay moves normally. Launch uses defaultViewport:null, one viewport setup, and no browser reconnect.

Fresh Barbarian DENMAP followed the inspected southeast river approach with 500–900ms local mouse holds, using automap and terrain checks at the bridge. Capture49 shows Entering The Blood Moor. Open-ground exploration reached three approaching zombies in64. Native targeted left attack identifies Zombie and a visible swing in65;66 shows the adjacent zombie collapsed. These are native combat observations on the initial page without guest workers, not acceptance for the requested configuration or combat in the Den. Low life prompted native Escape, Save and Exit Game, and the title menu in69.

The frozen app has no persistFiles setting, so automatic browser persistence is unavailable. After native Save and Exit, read-only VFS extraction preserved all four complete original files in native-checkpoint/, with original paths, sizes and SHA-256 in its manifest:

Native path Bytes Retained whole file
c:\save\denmap.d2s 813 0.bin
c:\save\denmap.key 902 1.bin
c:\save\denmap.map 24 2.bin
c:\save\denmap.ma0 5,190 3.bin

A new document mounted only those unchanged whole files through the normal app-file loader, at their original paths. Served hashes match the manifest. Native Single Player displays DENMAP, Level 1 Barbarian in77; selecting that existing character and native OK in79 loads town in81. Ordinary ground input visibly moves the hero and scrolls town in83. Saved low life is visible; a normal belt potion restores it in85–87. This verifies native consumption and playable restoration, beyond export or trusted DOM events alone. Native restoration returns to town, not the saved field position. The retained export remains immutable; no later save overwrote it. Fresh-page captures72–95 record isolation and default guestWorker active; final backend census is ready, requestedBackend=webgl, with zero errors and software-completed draws zero.

The sole browser ran 15:24:31.308–15:32:47.055 UTC. The new Deus Ex sole151455 FULLRELEASE at15:22:33 and an independent whole-Chrome/global crashpad PID/start gate preceded launch. A durable Python supervisor waited for the wrapper, controller and monitor; all three inherited FD9 for the full browser lock. At15:32:46, free disk reached 2,097,459,200 bytes, below the 2.1GB early-stop threshold but above 2GB. The monitor cooperatively quit; Chrome/controller/wrapper/monitor exited zero without signals. A concurrent movement request96 arrived after quit and timed out unexecuted; it is not in the controller action log. The last inspected worker-backed frame95 remains in town approaching the palisade. No further browser was launched.

Focused checks preserve the failed initial-configuration finding, whole-save and served hashes, balanced 112 trusted input events, stable game geometry, 519 active full-FD9 samples and raw exits. PID/start cleanup confirms owned processes absent, both ports closed, profile removed, held inputs empty and full flock available. Boat/test-box ID, state and expiry are N/A. No build, public deployment, audio/FPS or complete-playability claim is made. recovery.txt describes the retained native restore route. Next execution must first prove isolation/default guestWorker on the initial page, then load this unchanged checkpoint normally and navigate from inspected landmarks to the Den; the initial-page combat cannot substitute for that check.

Isolated native restore and field combat, 2026-10-31 (Den incomplete)

Run 20261031T1543Z-diablo2-isolated-den repairs the isolation omission in a new scratch harness and verifies native DENMAP restoration before movement. The custom responder sets Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp before every response branch. Actual HTTP checks cover frozen HTML/Wasm, static native-save files and both 404 paths; every recorded runtime response has both headers. The initial page positively records crossOriginIsolated=true, default guestWorker=true and explicit WebGL before any game input. All 59 captures retain that configuration, a 1024x768 viewport and stable game-canvas geometry. Launch uses defaultViewport:null, one viewport setup and no reconnect.

This replays the exact 144 frozen inputs from the 0402Z manifest, including repaired Wasm 7f9da4e9da5183e9f7f061d2356cd34626fe74bdbaf7da0345f6693dd81152be. Compiled source remains unknown; this is not a current-main retest. All inputs verify before and after, and all 148 frozen responses among 217 served responses match their pins. The 25 existing original runtime files verify before and after; the previously absent unused installer remains absent. No production code, original assets, INI, clocks, save bytes or guest memory were edited. No guest tracing or input bypass was used.

The four immutable whole files from the 1523Z native-checkpoint/manifest.json were mounted unchanged at their original guest paths through the normal app file loader. Native Single Player shows DENMAP, Level 1 Barbarian in05; selection06 and native OK07 load inspected town08 before movement. Ground movement12 verifies playable consumption. A normal belt potion restores the saved low life. Short local presses, with automap and terrain inspections, clear the palisade approach and stone bridge;42 explicitly shows Entering The Blood Moor. No prior seed or blind route was assumed.

Two zombies approach in70/72. Native targeted attack identifies Zombie and shows the hero's raised weapon in74;76 shows one zombie collapsed beside the remaining standing enemy. Further targeted melee79 and native belt potions lead to two fallen bodies in82, with life restored. These are inspected native combat observations under isolation/default guestWorker/WebGL, in Blood Moor, not inside the Den. Final115 remains Blood Moor beside a barrel and stone boundary; neither a Den label nor a cave transition was observed. Backend snapshots report ready WebGL, zero errors and zero completed software draws. Audio, FPS and extended play remain unqualified.

The first unmet continuation prerequisite was free disk, not an established emulator defect. At16:01:44 UTC the monitor observed 2,090,258,432 bytes free, below the required 2.1GB early-stop threshold but above 2GB, and cooperatively quit. This interrupted the search before the planned native Save and Exit, new whole-file export and second fresh-page restore. No newer checkpoint was exported or verified; the original four-file checkpoint remains unchanged. Request116 arrived after quit, timed out unexecuted and is absent from the controller command log. There was no retry or second browser.

The sole browser ran15:51:57.845–16:01:44.706 UTC, following UT2003's new 15:50:01 FULLRELEASE and an independent prelaunch whole-Chrome/global-crashpad PID/start gate with 2.414GB free. An earlier inline precheck falsely matched its own shell text; that result is retained, and the subsequent lifetime gate was clear before Chrome launched. The durable Python supervisor waited for wrapper/controller/monitor; all raw exits, including Chrome, are zero and no signals were sent. Focused checks verify 124 balanced trusted events, unchanged save/fixture/served hashes, geometry/backend/isolation and 651 active FD9 samples with all three lock holders. PID/start cleanup confirms all owned processes and watcher absent, both ports closed, profile removed, held inputs empty and full flock available; FULLRELEASE was posted16:03:08. Boat/test-box ID/state/expiry are N/A. No build or deployment occurred. recovery.txt retains the normal restore recipe. Next work needs sufficient sustained disk headroom, then a fresh native restore and inspected local route to an actual Den entrance, reserving time to validate any newer native save.

New native checkpoint restored after field combat, 2026-10-31

Run 20261031T1612Z-diablo2-den-route-reserve verifies a newer native save through fresh-page character selection and inspected gameplay. The Den remains unlocated. The original four-file checkpoint remains unchanged. The exact 144 frozen inputs and repaired Wasm 7f9da4e9da5183e9f7f061d2356cd34626fe74bdbaf7da0345f6693dd81152be were retained; compiled source remains unknown, with no current-main retest. All 296 frozen responses among 434 served responses match their pins, and the 25 existing original runtime files verify before and after. No production, asset, INI, clock, save-byte or guest-memory edits occurred.

After UT's new 16:17:30 FULLRELEASE, independent actual Chrome/global-crashpad, profile PID/start and exclusive-lock checks passed with 2,946,596,864 bytes free. The lifetime gate repeated these checks under FD9. Actual HTTP headers, crossOriginIsolated=true, default guestWorker=true and explicit WebGL passed before guest input. All 62 captures retain isolation/default workers and the 1024x768 viewport. Launch uses defaultViewport:null, one viewport setup and no reconnect. Fresh-page startup99 temporarily uses the desktop canvas; all other captures retain the same 640x480 game buffer and 684x536 presentation geometry. Backend errors and completed software draws are zero.

Native Single Player04 shows DENMAP in05; selection06 and OK07 load inspected town09 before movement. Potion10 heals the saved low life. Short 500–900ms presses follow inspected terrain around the palisade stakes and bridge parapet, then across the deck to Blood Moor52. The northeast ground reaches a stone wall/corner58–64; east/south interior exploration finds a live enemy in80. Targeted native melee shows a swing84 and the enemy collapsed in86. This is Blood Moor combat, not Den combat. The final route90/91 ends at dense trees against stone walls, with no entrance label or transition. Locating the entrance remains the concrete navigation dependency; no emulator defect was established. These revealed walls and trees should not be blindly swept again.

Native Escape92 opens the menu and Save and Exit93 eventually returns to the title in96. The three-second capture94 still shows the menu; a read-only seven-second wait confirms completion without repeating the input. An early export95 is retained separately. Whole-file export97 after the title yields the same four hashes and preserves native-checkpoint/manifest.json: denmap.d2s798 bytes, denmap.key902, denmap.map24 and denmap.ma05,420. All bytes are complete native files, unedited. The app has no automatic persistFiles configuration.

Fresh document98 mounts those four files unchanged through the normal app loader. Native Single Player103 displays DENMAP, Level 1 Barbarian in105; selection106/107 and OK108 load town111. Ordinary ground input112 visibly moves the hero and scrolls town113. Saved healthy life and the empty first potion slot remain visible. Native character panel115 shows experience 66. This verifies actual consumption and playable restoration of the newer checkpoint, beyond export or trusted DOM events. Restoration returns to town; there is no saved Den position or claim that the field position is restored. The original checkpoint and newer export both remain immutable.

The sole browser ran 16:17:54–16:30:23 UTC and closed on explicit quit116. Chrome/controller/wrapper/monitor raw exits are zero, without signals. Checks verify 114 balanced trusted events, 706 active samples with all three FD9 holders, and minimum free disk 2,716,598,272 bytes. Cleanup confirms owned processes, supervisor and watcher parent/child absent, both ports closed, profile removed, inputs released and full flock available. FULLRELEASE was posted 16:31:03. Boat/test-box ID/state/expiry are N/A. No build, deployment, audio/FPS or full-playability qualification occurred. recovery.txt records the frozen replay, newer native restore recipe and exhausted local landmarks.

Bounded unexplored frontier attempt, 2026-10-31

Run 20261031T1640Z-diablo2-unexplored-den starts from the verified newer 1612Z checkpoint, with native whole-file sizes 798/902/24/5,420 bytes. Both that checkpoint and the older 1523Z checkpoint remain unchanged. Native Single Player 05 shows DENMAP, Level 1 Barbarian in 06; selection 07 and OK 08 load inspected town 10 before movement 12. Blood Moor 50 shows the native area-entry label. No new combat or Den entrance was observed in this attempt.

Prior captures 90/91 were inspected before launch: dense east trees and the stone corner were marked exhausted in route-plan.json. The new field map 50 instead selects the visibly unrevealed south/southwest ground below the bridge. Short 500–900ms terrain-guided presses reveal open grass, a dirt trail, a chest and finally a stone hut at the left edge of 88. No boundary loop, external map or seed assumption was used. The final inspected 88 remains Blood Moor, with no Den label or cave transition.

The first unmet execution dependency is the scratch command-file handoff. At 16:47:00 the controller's JSON.parse of command.json raised SyntaxError: Unexpected end of JSON input (driver.cjs line 25). The request writer uses an ordinary direct file write; the observed partial-read failure is consistent with polling during that write. Command 89, east of the newly revealed hut, never entered commands.jsonl; its requester timed out with exit 1. There was no retry or second browser, and no emulator defect was established. The controller's normal cleanup closed Chrome before the planned Save and Exit/export/fresh-page verification reserve. No newer save was exported or claimed verified. Continue from the unchanged verified 1612Z save; a future attempt needs a complete command-file handoff before further native navigation, then inspection around the new hut/frontier rather than the exhausted east corner.

The exact frozen 0402Z closure remains 144 entries with Wasm 7f9da4e9da5183e9f7f061d2356cd34626fe74bdbaf7da0345f6693dd81152be, compiled source unknown. All 148 frozen responses among 217 served responses match their pins; 25 original runtime files and both checkpoint bundles verify before and after. No production, asset, INI, clock, save-byte or memory edits occurred. Actual HTTP responses have COOP same-origin/COEP require-corp. Initial isolation/default guestWorker passed before input; all 46 captures retain isolation, WebGL and stable 1024x768 geometry. Backend errors and completed software draws are zero; 94 trusted native events are balanced.

The sole browser ran 16:40:02–16:47:00 UTC after UT's 16:36:32 FULLRELEASE and independent whole-Chrome/global-crashpad/profile PID/start gates, repeated under lifetime FD9, with 2,850,725,888 bytes free before launch. Runtime target/hard/ cleanup deadlines were 16:57:02/16:58:02/16:59:02. Minimum free disk was 2,653,806,592 bytes; 387 active samples retain all three FD9 holders. Chrome, wrapper and monitor raw exits are 0; controller exit 1 records the handoff failure. No signals were sent. Cleanup verifies all owned runtime processes, supervisor, watcher and requester absent, ports closed, profile removed, held inputs empty and full flock available. FULLRELEASE was announced 16:48:03. Boat/test-box ID/state/expiry are N/A. Recovery and focused checks remain in the run directory. This was a docs-only change, with no full build or deployment.

November 12: Den entry and earned XP380 checkpoint

Current Den progression and complete recovery records original field296 normal Load, two Blood Moor zombies, Den entry and its monster objective, and earned combat XP380. Native Save & Exit, the complete four-file export, normal Load, retained quest, and fresh movement all passed. The coordinator verified954 artifact references/793 unique contents,80 capture PNGs,80 command ACKs, balanced trusted input, all four save hashes, and the full Den/quest/post-Load stats/movement images. The Den remains uncleared; Akara healing is the next native objective. No causal SaveExit fix is claimed.

The stylized digit5 was previously read as6: read-only original v71 save decoding gives initial life55/55, Vitality25 and next-level threshold500. The earned save restores XP380, life27/55 and gold3; no stats were edited. Published notes: 4b5002933, 00aea67f3. Tested module:04c53419…. All three private attempts stopped normally with actual parent joins.

2026-11-16: Glide menu drawn in the top-left 512x384

D2Glide calls grSstWinOpen(hwnd 0x10001, res 7 = 640x480, refresh 0, color fmt 2, origin 0, 2 color buffers, 0 aux) twice for the intro (the board is closed in between; _grSstWinClose@4 is not the path, the closer was not traced) and then res 8 (800x600) for the menus, with the window still 640x480. The GPU stream itself is right: 800x600 CREATEs, TARGETS and PRESENT w=800 h=600 (--gpu-stream-dump). glide_display_take resizes the window and its WAT client rect to 800x600, but the window GDI surface is only reallocated by gdi_window_surface_ensure, i.e. on the next DC handed out, and D2 draws its menu through Glide alone. So the renderer back canvas stayed 640x480, and the exclusive compositor stretched the 800x600 Glide layer to that back canvas (640x480) and then by the 800->640 exclusive scale again: 0.64, the top-left 512x384. Every other composite path already drew a GPU layer at its own size; lib/renderer.js now does so here too (test/test-gpu-layer-exclusive-mode-switch.js). Headless repro: --app=diablo2_glide_demo --batch-size=50000 --max-batches=215 with --glide-renderer=software or --headless-gl --glide-renderer=webgl; the menu is up by batch ~190. Evidence scratch/runs/20261116-d2-glide/.