Files
TeslaRel410/emulator/vpx-device
CydandClaude Fable 5 dabc204d0d VPX render: port the restoration gallery shading model; renderer collab doc
Device renderer (vpxlog.cpp, commit-copy of the fork source):
- View-flush fog decode (enable/near/far/rgb at d+72.., mode 5 linear,
  garbage-guarded; VPX_NOFOG=1 diagnostic) applied per fragment.
- Full dpl_MATERIAL parse: emissive/ambient/diffuse/opacity/specular/
  shininess (opacity+specular parsed, not yet applied); fixed-offset
  texture/ramp refs with lazy resolution, rebake on material/ramp reflush.
- Gallery shading model (restoration/gallery_template.html) as a GLSL 1.10
  program over the existing immediate-mode path, fixed-function fallback:
  c = (matAmb*sceneAmb + matDiff*mix(ramp.lo,ramp.hi,acc))*tex + matEmis,
  linear fog with immunity knob. Textured polys use an identity light-ramp
  (texels already baked through the material ramp). Newell flat normals for
  polys without wire normals. Interim sun/ambient until the light node is
  decoded: VPX_AMBIENT / VPX_SUN env overrides.

RENDERER-COLLAB.md: shared working doc with the external-renderer team --
verified FIFO action/node tables, struct offsets, scene assembly and
coordinate conventions, available data taps, open questions (incl. the
type-7 object-vs-light flush conflict).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 16:41:16 -05:00
..

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 base 0x150, 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 separate vpx.cpp.)

Applying to a DOSBox-X source checkout

Tested against DOSBox-X v2026.06.02, MSYS2 mingw64.

  1. Copy the device in:
    cp emulator/vpx-device/vpxlog.cpp  emulator/src/src/hardware/vpxlog.cpp
    
  2. Add it to the hardware build — in src/src/hardware/Makefile.am, append vpxlog.cpp to libhardware_a_SOURCES (we inserted it after glide.cpp).
  3. Call the init — in src/src/gui/sdlmain.cpp, declare void VPXLOG_Init(); next to the other *_Init() prototypes and call VPXLOG_Init(); right after GLIDE_Init(); in the machine bring-up sequence.
  4. Build:
    cd emulator/src
    ./build-mingw-sdl2 --enable-debug=heavy
    
    Output: src/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.