Files
TeslaRel410/emulator/vpx-device
CydandClaude Fable 5 cbf7015620 Weapon visuals + aim: beams render from the guns; pick self-target fixes
Renderer (dpl3-revive/patha):
- Instance visibility honored at DRAW time (stored word 4 = live
  dpl_SetInstanceVisibility field): laser beams (4-frame pulses) and
  missile models now render; cache tags w3 0/1 instances 'gated'
- PSFX world bursts (dcs=0 muzzle/impact/explosion) rendered; psfx
  storage list-based so one-shot bursts stop collapsing onto one key
- fix_degenerate applied to INSTANCE chains (was camera-only): the
  beam chain rides four rank-2 rig DCSs; composed rank-2 drew beams
  away from the guns. Offline f1635 now shows both arm beams
  converging on the aim point
- First-person canopy cull: the always-armed cockpit model at the
  head drew as a vertical line down screen center (user-confirmed
  fixed live)

Device (vpx-device/vpxlog.cpp):
- CAM backchannel on the fifosock: bridge streams its validated
  camera (+ vehicle root DCS); raycast_pick aims along the player's
  real look instead of the static view-node pose, which had locked
  every missile/beam onto one fixed wrong world point
- raycast_pick skips hidden-until-armed instances and the player's
  own articulation subtree: picking own beams created a target
  feedback loop, picking own missiles retargeted salvos mid-flight,
  and a picked missile's deleted DCS froze the game (arena2 crash)

Sound (vpx-device/vweawe.cpp): stereo-linked peak limiter replaces
the hard output clamp (the "generator out" crackle); VWE_AWE_LOG
reports pre-limit peaks + duck counts, enabled in launch_pod.ps1.
Missile-fire crackle persists: per-voice EMU8000 clamp suspected.

Eggs/confs: TESTAR2.EGG + gauge_arena2_sound.conf (map=arena2 city
variant); cavern.egg (console-era reference); plasma display on COM2
in the gauge confs; gauge_arena_net_sound.conf (slirp net stack).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 00:09:03 -05:00
..

VPX + AWE32 devices — DOSBox-X integration

Our original source for the emulated pod hardware. Kept here under version control because the DOSBox-X source tree itself (emulator/src/, ~490 MB) is git-ignored.

  • vpxlog.cpp — the Division VPX link adapter (INMOS C012 at I/O base 0x150), grown through Phase 3: iserver handshake responder, FIFO scene decode, GL Division renderer (gallery shading model), VDB video-head splitter windows.
  • vweawe.cpp — the dual-AWE32 sound device: two vendored EMU8000 cores at 0x620/0x640 (+0x400/+0x800 triplets), rear-card DSP/mixer stub at 0x240, autonomous render thread with direct winmm output. Needs the GM ROM (emulator/roms/awe32.raw) via VWE_AWE_ROM or SoundFont uploads are refused (banks declare irom=1MGM). See emulator/SOUND-NOTES.md.
  • emu8k.cpp / emu8k.h / emu8k_shim.h — EMU8000 wavetable core vendored from 86Box (GPL-2.0-or-later, same license as DOSBox-X), with a minimal shim; local changes are listed in the emu8k.cpp header.

Applying to a DOSBox-X source checkout

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

  1. Copy the devices in:
    cp emulator/vpx-device/vpxlog.cpp   emulator/src/src/hardware/
    cp emulator/vpx-device/emu8k.cpp    emulator/src/src/hardware/
    cp emulator/vpx-device/emu8k.h      emulator/src/src/hardware/
    cp emulator/vpx-device/emu8k_shim.h emulator/src/src/hardware/
    cp emulator/vpx-device/vweawe.cpp   emulator/src/src/hardware/
    
  2. Add them to the hardware build — in src/src/hardware/Makefile.am, append vpxlog.cpp emu8k.cpp vweawe.cpp to libhardware_a_SOURCES (we inserted them after glide.cpp; if you edit the generated Makefile/Makefile.in by hand instead of re-running automake, also mirror the $(OBJEXT) list, the .Po depfile list, and the depfile include markers — grep for how vpxlog appears and copy the pattern).
  3. Call the inits — in src/src/gui/sdlmain.cpp, declare void VPXLOG_Init(); and void VWEAWE_Init(); next to the other *_Init() prototypes; call VPXLOG_Init(); right after GLIDE_Init(); and VWEAWE_Init(); right after SBLASTER_Init(); (it needs the mixer initialized).
  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.