Files
CydandClaude Fable 5 3db666f8ee Add emulator/ENV-VARS.md -- pod (L4*/DPLARG) + host emulator env var catalog
Documents L4VIDEO/VIDEOFORMAT/L4GAUGE/L4PLASMA/L4TIMER/L4SOUND/L4CONTROLS/L4DPLCFG/L4EYES/DPLARG (values, meanings, which are getenv-read vs batch-only, the L4VIDEO two-script gotcha) + the VPX_/VWE_/VDB_/VRVIEW_ host vars.

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

5.9 KiB

Environment variables — Tesla pod (game) + emulator (host)

Two separate environments:

  1. The DOS pod/game environment — set inside DOSBox by SETENV.BAT (dev/archive) or VGL_LABS/PARAMETR.BAT (production), consumed by BTL4OPT/RPL4OPT and the MUNGA runtime.
  2. The host emulator environment — set on Windows before launching, read by the DOSBox-X fork's HLE devices (see LAUNCH.md, VDB-NOTES.md).

1. DOS pod/game environment

SETENV.BAT positional args (how the vars get set)

call setenv.bat <1> <2> <3> <4> <5> — our confs use e.g. r f s p:

Arg Values Sets
1 t=Thrustmaster, r=RIO L4CONTROLS
2 s=slow clock, f=fast clock L4TIMER
3 s=sound, n=nosound L4SOUND + AWE mixer init
4 p=plasma+gauges, g=gauges, n=none, r=review L4GAUGE + L4PLASMA
5 i=intercom, n=none L4INTERCOM

No args = RIO, SLOW, SOUND, none, no-intercom.

The variables

Read by the game (getenv, confirmed in CODE/):

Var Values Meaning
L4CONTROLS RIO,KEYBOARD / THRUSTMASTER,KEYBOARD Control input source(s). RIO = the real cockpit board (our vRIO); Thrustmaster = PC gameport joystick.
L4GAUGE 640x480x16 / 640x480x8 / (empty) Cockpit gauge (VDB) render mode. Keys into GAUGE\L4GAUGE.INI for mode/width/height/bytesPerLine/sizeInKB/granularityInKB/pageFcnPtr/special. Empty = no gauge renderer created. (16 = pod/plasma; 8 = review/camera.) See VDB-NOTES.md — RP's INI granularity was the gauge-decode bug.
L4PLASMA com2 / com1 / (empty) Plasma score/status panel serial port. Empty = no plasma. Our pods use COM2. See plasma-display-readout.
L4INTERCOM ON / (empty) Cockpit intercom (PTT/relay via the AWE mixer + L4ICOM). Empty = off.
L4DPLCFG rpdpl.ini / btdpl.ini Per-arena DPL config (fog/light/objectpath per map+time+weather). Defaults from the game dir's SETENV.
L4EYES "x y z rx ry rz [r]" (6 floats + optional type) Division 3D camera EYE offset/rotation. Present = "disconnected eye" (outside/relative view); trailing r = offset relative to the vehicle. Usually UNSET (first-person).
DPLARG arg string (see below) The Division 3D renderer's full argument string. MUST be set for the Division card to come up (else Verify(DPL_Arg) exits).

Batch-only controls (NOT read by the game via getenv — they shape the above):

Var Values Meaning
L4VIDEO svga / ntsc / OFF Division 3D output format, OR an on/off switch — depends on the script (see note). NOT read by game code.
VIDEOFORMAT svga / ntsc (SETENV path) the /video~ format fed into DPLARG. Defaults svga.
L4TIMER FAST / (empty=SLOW) HMI SOS real-time interrupt clock: FAST≈28Hz vs unset≈18.2Hz BIOS. Our conf default = FAST (per-fleet CPU choice historically). See l4timer-fast-default.
L4SOUND OFF / ON / CAMERA / (empty) Gates the AWE32 mixer/upload init in SETENV. The EXE does NOT read it (red herring for in-game audio); sound presence is really the AWE hardware being initialized.

L4VIDEO — the two-script gotcha

  • Production PARAMETR.BAT: L4VIDEO IS the format — %5=SVGA→L4VIDEO=svga, NTSC→L4VIDEO=ntsc, then DPLARG .../video~%L4VIDEO%~.... A :VIDEOOFF path skips DPLARG (no 3D); L4VIDEO is never literally "OFF" there.
  • Archive REL410/{RP,BT}/SETENV.BAT (our confs): L4VIDEO is an ON/OFF switch — if "%L4VIDEO%"=="OFF" goto VIDEODONE skips DPLARG; the format comes from VIDEOFORMAT instead.

So on OUR path: leave L4VIDEO unset for normal 3D, L4VIDEO=OFF to suppress the Division card (non-rendering host roles only), and pick the format with VIDEOFORMAT=svga|ntsc.

DPLARG sub-fields

/tranny~.\vrendmon.btl~ /i860~.\vrnostex.mng~ /device~0x150~ /video~<fmt>~ /pipes~1~ /qual~0x14~ /system_tex~0~

Field Meaning
/device~0x150~ VPX/VelociRender board I/O port (our HLE lives here).
/video~svga|ntsc~ Division output format (from L4VIDEO or VIDEOFORMAT).
/qual~0x14~ Render quality flags.
/pipes~1~ Render pipe count.
/tranny~vrendmon.btl~ Transform/monitor config blob.
/i860~vrnostex.mng~ i860 microcode / no-system-texture image.
/system_tex~0~ System-texture toggle.

HEAPSIZE (game heap, e.g. 15000000), BLASTER/AWE_FRONT/AWE_REAR (SB16/ dual-AWE32 config), TEMP=c:\, VIDEOFORMAT (above). Production-only: PREFGAME (RP/BT), PODTYPE/PODSET, PREFMODE/PREFOPT/PREFSWITCH, PRELOAD, REVIEW/CAMERA (host role), SPOOLSIZE, NETRESOURCE/NDSID/ NETCLIENT (Netware, unused under emulation).


2. Host emulator environment (set on Windows before launch)

Set by render-bridge\launch_pod.ps1 / its flags; see LAUNCH.md.

  • VPX board HLE: VPXLOG (wire log path), VPX_RESPOND=1, VPX_RENDER=1, VPX_EXPLODE=1 (pentapus 7-display), VPX_DUMPDIR, VPX_FIFODUMP, VPX_FIFOSOCK=8621 (bridge tee), VPX_NOMAIN=1, VPX_CLEAR, VPX_WIN<g>/VPX_MAIN (window geometry), VPX_NO_PICK=1 (disable reticle raycast).
  • Sound (dual AWE32/EMU8000): VWE_AWE32=1, VWE_AWE_ROM=<1MB GM rom>, VWE_AWE_LOG=1, VWE_AWE_WAV=<prefix>.
  • RIO tap: RIO_TAP=<path> (logs COM1 TX/RX with host-us timestamps).
  • VDB display diagnostics (default-off, see VDB-NOTES.md): VDB_SCAN, VDB_PALDUMP=<prefix>, VDB_BASE=<hex>, VDB_REALSTRIDE, VDB_APPLYMASK.
  • GL bridge: VRVIEW_MIPMAP (-Mipmap flag), VRVIEW_FILTER=linear, VRVIEW_HUDSCALE, FP_UPOFF/FP_FWDOFF (seat trim), BRIDGE_FPS.

Net map: pod 200.0.0.113, .NET console/host 200.0.0.1, Mac console 200.0.0.10, netnub TCP 1501. Related: LAUNCH.md, VDB-NOTES.md, NET-NOTES.md.