Spelunky Classic v1.1 (Derek Yu, 2008/2009 freeware)

App id spelunky_classic (local-only, lib/apps.js). Download, hashes and licence terms: test/binaries/SOURCES.md, section "Spelunky Classic v1.1". Evidence: scratch/runs/20261124-spelunky/.

What the binary is

Load bases (headless, --trace-api)

Module Runtime base Preferred
Spelunky.exe 0x00400000 same
supersound.dll 0x00862000 0x10000000
msvcrt 0x00994000
oleaut32 0x00ad8000
comctl32 0x00c6a000
D3DX-style helper ~0x01020000

Startup sequence and what each step needed

  1. TSplashForm carries a TWebBrowser ActiveX (SplashWeb). CoCreateInstance(CLSID_WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}). Delphi's TOleControl then runs GetMiscStatus, SetClientSite, QI, GetExtent; TOleControl.SetParent (0x0050f7a4) calls GetClientSite and IOleControl::OnAmbientPropertyChange(DISPID_UNKNOWN). Provided by src/09a7l-webbrowser.wat (blank control; navigation is crash_unimplemented).
  2. RichEdit 1.0 EM_EXGETSEL/EM_EXSETSEL/EM_EXLIMITTEXT on class 24 (Delphi TRichEditStrings.Insert); without them the runner raised an EReadError while streaming its form. Fixed in 09c3-wndprocs5-edit.wat.
  3. Loading splash: ~170 s of wall time headless (≈ batch 19 842 at --batch-size=100000). This is per-byte stream decoding of the appended game data in guest code, not API-bound (--trace-api-counts).
  4. "No sound device detected. Sounds might not play." message box. The check at ~0x004852cf calls the CoCreateInstance thunk at 0x00409054 with the IID at 0x004853c0 (IDirectMusicPerformance8, {679C4137-C62E-4147-B2B4-9D569ACB254C}); message text at 0x004853d8. DirectMusic Performance is not implemented here (a whole subsystem), so the box appears; OK continues. supersound's DirectSound path is unaffected.
  5. Direct3D 8 init. Without --headless-gl the runner shows "Failed to initialize drawing surfaces"; with it the device, textures and LockRect all succeed and the first frame is presented.
  6. Game scripts: load all sound/*.ogg|wav through supersound (63 DirectSound buffers), read settings.cfg, keys.cfg, gamepad.cfg, poll joyGetPos(0)/(1) (both JOYERR_UNPLUGGED, fine).
  7. Render-target surfaces: the D3DX helper walks IDirect3D8::CheckDeviceFormat(usage=D3DUSAGE_RENDERTARGET, rtype=TEXTURE) over 29 formats, three times. Until 2026-11-24 the D3D8 handler answered D3DERR_NOTAVAILABLE for every one, although CreateTexture does make render-target textures. With no surface the game ran its own end path: stop all sound buffers, DeleteFileA+write stats.txt, destroy every form, PostQuitMessage(0), ExitProcess(0) (ret 0x00405851) — a clean exit with no dialog, so it reads like the game choosing to quit. Fix: $d3d9_render_target_texture_format (09ae) is the one rule both CreateTexture and D3D8 CheckDeviceFormat read (test/test-d3d8-render-target-texture-format.js).
  8. Title: with the fix the intro and title room render (run 15: 5180 presents, 1.2M draws, no exit by the 280 s limit; title-intro.png). Input reaches the title room (title-room-after-input.png). Not yet done: the route from the title room into a level (Spelunky's own controls: arrows / Z jump / X whip by default per keys.cfg).

Reproduction

caffeinate -u -t 2
node test/run.js --app=spelunky_classic --headless-gl --quiet-api \
  --max-seconds=280 --max-batches=1000000 --batch-size=100000 --stuck-after=0 \
  --no-close --input=20500:keydown:13,20510:keyup:13 --png=OUT.png

A fresh worktree lacks the gitignored test/binaries/dlls/ (ole32.dll, shell32.dll), and the loader says so; copy them in before chasing an <ord> crash.

Ruled out