Lighting: stride-8/9 vertices carry a normal (floats 3-5, uv at 6-7). The backend transforms normals by the instance rotation and lights with a single directional sun (GL_LIGHT0, smooth, two-sided, GL_COLOR_MATERIAL). Terrain and hulls shade instead of reading flat. LOD: the lod flush has no switch distances -- the host keeps the active LOD at the child-list head and re-orders over the wire, so children[0] is right and LOD changes come through as the sim runs. The crash that halted the game once the RIO drove the sim was not ours: fault at 0047E1D1 writing 0xFFFFFFFF is the RIO driver's DISABLE_AND_DIE debug macro (PCSPAK.ASM, DIE_ON_ERROR=1), which deliberately faults on a serial-tx anomaly -- error 3 = body char >0x7F during a RIO packet, i.e. a glitch on a board reset. Release build (DIE_ON_ERROR=0) compiles it out and recovers (and al,07Fh). patch_btl4opt.py NOPs all 12 sites by signature (with .orig backup) = release behavior; game then survives RIO resets (1200+ frames). (ALPHA_1 is git-ignored, so the tool ships, not the patched binary.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
VPX device — DOSBox-X integration
Our original source for the emulated Division VPX link adapter. Kept here under
version control because the DOSBox-X source tree itself
(emulator/src/, ~490 MB) is git-ignored.
vpxlog.cpp— Phase 1 logging device. Impersonates the INMOS C012 link adapter at I/O base0x150, answers status reads so the game keeps transmitting, and logs every access to$VPXLOG. (Phase 2 will grow this into a responding transputer-monitor + i860-loader + frame-stream renderer, or fork into a separatevpx.cpp.)
Applying to a DOSBox-X source checkout
Tested against DOSBox-X v2026.06.02, MSYS2 mingw64.
- Copy the device in:
cp emulator/vpx-device/vpxlog.cpp emulator/src/src/hardware/vpxlog.cpp - Add it to the hardware build — in
src/src/hardware/Makefile.am, appendvpxlog.cpptolibhardware_a_SOURCES(we inserted it afterglide.cpp). - Call the init — in
src/src/gui/sdlmain.cpp, declarevoid VPXLOG_Init();next to the other*_Init()prototypes and callVPXLOG_Init();right afterGLIDE_Init();in the machine bring-up sequence. - Build:
Output:
cd emulator/src ./build-mingw-sdl2 --enable-debug=heavysrc/src/dosbox-x.exe.
Running
set VPXLOG=C:\VWE\TeslaRel410\emulator\vpxlog.txt
emulator\src\src\dosbox-x.exe -conf emulator\capture.conf
python emulator\analyze_capture.py
With VPXLOG unset the device is inert and the build behaves like stock
DOSBox-X.