Files
TeslaRel410/emulator/vpx-device
CydandClaude Opus 4.8 aadda7f9a5 Cockpit camera complete + namedpipe transport + 832x512 native res
Render bridge (live_bridge.py, vrview_gl.py):
- Hat glances render (left/right frame the canopy, hat-down = clean rear).
  Root bug was a stale _ckpt['fix'] key -> KeyError every glance frame ->
  render aborted (screen froze on hold, snapped back on release). The glance
  itself is the authentic eye-DCS action-0x1f reflush fp_cam already applies.
- Torso twist turret-true (root-axis yaw, zero parallax); lasers follow torso.
- Rear glance drops the canopy shell for a clean view (original-hardware
  behavior); mission-fade shroud 9fd hidden.
- Wireframe debug mode (VRVIEW_WIREFRAME / 'w' key), scene-pass scoped.
- Renderer output = 832x512, the dPL3 board's native framebuffer res.

DOSBox-X fork: namedpipe serial backend (serialnamedpipe.cpp/.h) for
vRIO/vPLASMA, replacing com0com; overlapped non-blocking I/O; typed frames
(0x00 data / 0x01 DTR+RTS). Tracked copies + apply steps in vpx-device.

Docs: COCKPIT-CAGE-NOTES (full glance/twist/rear forensics), XP-PORT-PLAN
(back-burnered), RIO-NOTES (namedpipe + keypad), pipe/egg conf variants.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 10:08:15 -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.
  • serialnamedpipe.cpp / serialnamedpipe.hserial<n>=namedpipe pipe:<name> backend (2026-07-12): serial-over-named-pipe for vRIO/vPLASMA, replacing com0com. DOSBox is the pipe CLIENT with 500ms background retry; typed frames carry data (0x00 len bytes) and DTR/RTS line state (0x01 bits); the full wire contract is in the header comment (pinned with the vRIO session). Supports the directserial rxpollus/rxburst/rxdelay low-latency knobs. Smoke-tested end-to-end 2026-07-12.

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). 3b. The namedpipe serial backend:
    cp emulator/vpx-device/serialnamedpipe.cpp emulator/src/src/hardware/serialport/
    cp emulator/vpx-device/serialnamedpipe.h   emulator/src/src/hardware/serialport/
    
    plus four small stock edits:
    • src/src/hardware/serialport/Makefile.am: append serialnamedpipe.cpp serialnamedpipe.h to libserial_a_SOURCES (same generated-Makefile caveat as step 2).
    • src/include/serialport.h: add SERIAL_TYPE_NAMED_PIPE to SerialTypesE under #if defined(WIN32) (before SERIAL_TYPE_DIRECT_SERIAL).
    • src/src/hardware/serialport/serialport.cpp: #include "serialnamedpipe.h"; add the type=="namedpipe" case to BOTH dispatch switches (SERIALPORTS ctor + the SERIAL command) and "namedpipe" to the serialTypes[] string table — grep for how "file" appears and copy the pattern.
    • src/src/dosbox.cpp: add "namedpipe" to the serials[] allowed-values list (without this the config parser silently falls back to dummy).
  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.