Files
TeslaRel410/dpl3-revive
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
..

dpl3-revive

Porting the Virtual World Entertainment DPL3 renderer (BattleTech / Red Planet arcade pods, c. 199497) to modern hardware. The original ran on an Intel i860 graphics coprocessor driven by an x86 DOS host; the i860 and its PixelPlanes-5-style board are long gone, so the plan is a reimplementation on a modern GPU, not a recompile.

The source drive is treated as a read-only archive. Nothing here writes back to it; the reference source and sample models below were copied out of it.

Status

Milestones 1 & 2a — asset formats decoded. The .B2Z / .V2Z binary geometry format and the .SVT texture format are both fully reverse-engineered, with working, validated parsers. Models export to OBJ; textures export to PNG. The art is now recoverable independent of the dead engine.

Roadmap:

  1. B2Z/V2Z geometry format — spec + parser + OBJ export. 2a. SVT texture format — spec + parser + PNG export (0BGR, size-inferred dims).
  2. GPU viewer — self-contained WebGL page renders textured models on modern hardware (viewer/). Proves the whole art pipeline end-to-end. 2b. SCN scene format — plain-text scenes parsed + assembled into world space (models placed via the exact DPL transform), textured, fogged, and rendered. CANAL.SCN (47 objects) explorable in the viewer.
  3. SPL camera splines — cubic-Hermite fly-through paths evaluated and animated. RAPTOR.SCN + CAMERA.SPL play back the original 1994 flyover in the viewer. 4b. Scene gallery — the viewer now hosts several recovered worlds (Raptor flyover, Red Planet canal, underwater reef). Fish are textured by the model-name convention (sharkSHARK.SVT) when the material carries none. 4c. Historical archive — every resolvable scene (~60) and every binary model (~264) batch-built and browsable in a searchable, lazy-loading viewer (archive.html + serve.py) with Scenes/Models tabs. Camera has mouse orbit + WASD fly movement (Q/E for down/up). A large array to judge render/colour.
  4. Material libraries + output gamma — authoritative per-material colour+texture from each model's .V2Z (DIFFUSE × texture), detail textures as luminance, and the Division card's 10-bit-DAC gamma-1.7 curve (GAMMA.C) for the authentic pastel look. Red rock / grey concrete columns / red pipes now match the original. 5b. Texture V orientation — the original renderer samples v=0 at SVT row 0 (no flip). Fixed a wrong global V-flip that inverted mech cockpits/pods and fish shading. Also decoded GLOMM bit-plane texture packs (*ALL.SVT) — see spec/SVT_FORMAT.md. 5d. Game maps: MAP / MOD — the real playable worlds (BattleTech arenas, Red Planet tracks) from the game trees' MAPS/ dirs: INI-style maps placing .MOD game objects (→ BGF video geometry) with nesting, includes, and pod dropzones (drawn as red markers). Also fixed the 1996 LOD-container BGF layout, which unlocked ~850 game models that previously parsed empty. Archive: 142 scenes + 41 maps + 1,462 models, with a Maps tab in the viewer. 5c. Game-side formats: BGF / BMF / VGF / VMF / BSL — the game pipeline turns out to be the same BIZ2/VIZ2 family: .BGF geometry, .BMF/.VMF material libraries (namespaced refs like stships:eblu4_mtl), plus DIV-BSL2 bit-slice texture packs (texture tag 0x018 = BITSLICE). This unlocked Star Trek (the "Tesla" Galaxy-class starship + Klingon cruiser, hull textures from STEH.BSL) and the BattleTech / Red Planet / Hull Pressure game content. Archive now holds 142 scenes + 608 models across all product lines.
  5. Port the DPL3 geometry pipeline (transform / light / cull / LOD) from the C.
  6. Replace the PXPL5 rasterizer backend with the GPU.

Path A — run the original binaries unmodified (alternative track)

The full original DPL3 engine source is on the archive drive (sda4/DPL3/), both the DOS host side and the i860 board side. That means the VelociRender wire protocol the host uses to drive the (dead) i860 board is fully documented in C — no disassembly. Path A stands up a virtual VelociRender board: emulate the INMOS C012 link adapter (six I/O ports at 0x150) as a DOSBox-X device, answer the 24-command protocol, and use the renderer this project already built as the board's guts — so FLYK.EXE and the other HPDAVE/DPL3 binaries run unmodified, renderer transparently swapped underneath. Spec + architecture: spec/VELOCIRENDER_PROTOCOL.md.

Layout

spec/         format documentation
  B2Z_FORMAT.md   the reverse-engineered DIV-BIZ2 geometry spec
  SVT_FORMAT.md   the reverse-engineered SVT texture spec
  SCN_FORMAT.md   the reverse-engineered SCN scene-format spec
  SPL_FORMAT.md   the reverse-engineered SPL camera-spline spec
parser/       the decoders (pure Python 3, no deps)
  b2z.py          geometry reader + triangulating OBJ exporter
  svt.py          texture reader + PNG exporter
  scn.py          scene-file reader + the DPL instance-transform math
  spl.py          camera-spline evaluator (cubic Hermite) -> camera frames
samples/      small test models/textures from the archive (+ exported .obj/.png)
source-ref/   read-only copies of the original DIVISION source that define the format
viewer/       the WebGL viewers
  bundle.py         packs a few curated scenes into one self-contained HTML
  dpl3-viewer.html  the curated gallery (open in any browser; shareable)
  archive.py        batch-builds EVERY resolvable scene -> data/*.json
  archive.html      the historical archive viewer (searchable, lazy-loads scenes)
  serve.py          local launcher for the archive (needed for fetch())
  data/             one JSON per scene + manifest.json (~60 scenes)
  render_preview.py CPU rasterizer used to verify the pipeline
  preview_*.png     verification renders

Usage

python parser/b2z.py dump samples/TESTBOX.B2Z          # structural dump
python parser/b2z.py obj  samples/BALL.B2Z out.obj     # export triangulated OBJ
python parser/svt.py info samples/SHARK.SVT            # texture dimensions/stats
python parser/svt.py png  samples/SHARK.SVT out.png    # export texture to PNG
python parser/scn.py "<archive>/DPL3RLS/SCENES/CANAL.SCN"  # dump a scene's contents
python viewer/bundle.py                                # (re)build viewer/dpl3-viewer.html

Then open viewer/dpl3-viewer.html in any browser — drag to orbit, scroll to zoom, switch models. It's fully self-contained (geometry inlined, textures as base64).

The historical archive (all ~60 scenes)

python viewer/archive.py     # (re)build data/*.json for every resolvable scene
python viewer/serve.py       # serve locally + open the archive viewer

serve.py opens http://localhost:8765/archive.htmlScenes and Models tabs, each a searchable list grouped by product (Red Planet, BattleTech, Hull Pressure, Star Trek, Milestone, Engine/Demo). Camera: drag to look, scroll to zoom, WASD to fly, Q/E down/up. A live gamma slider (default 1.25) tunes the Division-DAC brightness. A local server is required because browsers block fetch() of local files over file://.

Rebuild subsets with python viewer/archive.py --scenes-only / --models-only; re-tag products (no data rebuild) with --reclassify.

The exported .obj files open in any modern 3D tool (Blender, MeshLab, etc.); the .png textures open anywhere.

Provenance

Format decoded from source-ref/BIZREAD.C — "Copyright DIVISION Limited (c) 1994, author PJA" (Phil Atkin). Data model in source-ref/DPLTYPES.H. See spec/B2Z_FORMAT.md §10 for the validation evidence.