Interstate '76 Arsenal (demo)

Activision, 1998, car combat. The demo is "3D accelerated only" (readme): its two missions exist only for the hardware path. Registered as i76_arsenal_demo (candidate i76-arsenal-demo, local only), playable in the browser after the DirectDraw GetCaps fix (2da06701f, see below).

Source and layout

Command line (parser 0x498d90)

Fixed: -d3d t03 exited with code 5 (our GetCaps)

Cause (fixed 2da06701f): the caps-logging function 0x486910 calls IDirectDraw::GetCaps with two stack DDCAPS whose dwSize it never sets. On Windows that is DDERR_INVALIDPARAMS and nothing is written (the log then prints stack garbage, which is why the "SELECTED D3D HW DESC" section reads "None" -- a red herring). We treated an invalid dwSize as 380 and wrote 380 bytes, over the return address; the function "returned" into the CRT exit and WinMain looked like it returned 5. Found by a block-entry trace of the last batch (--trace-eip-range=0x401000-0x4d0000 --trace-eip-from=1): the caps log's ret went straight to 0x4c323f. test-directdraw-getcaps-size.js.

The notes below were the investigation before that:

Route (browser) and controls

Registration notes