Files
TeslaRel410/emulator/deploy
CydandClaude Opus 4.8 844c11f792 emulator: in-fork plasma display (serial2=plasma) window in the explode layout
Bring the pod's 128x32 plasma readout in-fork, completing the self-contained
glass cockpit -- no vPLASMA process, no pipe.

- serialplasma.{cpp,h}: CSerialPlasma, a serial<n>=plasma backend that parses
  the game's ESC P graphics stream (L4PLASMA streams whole changed rows;
  receive-only, no replies) into a 128x32 1bpp framebuffer. Transcribed from
  vPLASMA's PlasmaProtocol + VPlasmaDevice (graphics path); the factory
  text-mode/fonts aren't used by the game and aren't rendered, but their escape
  operands are still consumed so the parser can't desync. Seam PLASMA_GetFrame()
  for the renderer.
- vpxlog.cpp: draw the framebuffer as an amber-on-black window in the explode
  layout, lazily created once a plasma port exists, parked centered under the
  lower-left MFD (VPX_PLASMA="x,y,w,h" overrides); WS_EX_NOACTIVATE so it can't
  steal DOSBox focus.
- Register SERIAL_TYPE_PLASMA (serialport.h/.cpp, dosbox.cpp -- documented in
  the vpx-device README step 3d, since those stock files live in the git-ignored
  src tree).
- Confs: serial2 in the _rio confs + deploy templates switches from
  namedpipe pipe:vplasma to the in-fork plasma.

Live-validated 2026-07-24. Real pods keep directserial realport:COM2; the
standalone vPLASMA app keeps namedpipe pipe:vplasma.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 12:48:07 -05:00
..

deploy/ -- install-side artifacts

Sources for the self-contained, air-gapped pod install. See ../DEPLOYMENT-PLAN.md for the full design.

Files

File Role
postinstall.bat elevated entry TeslaLauncher runs after extraction: finds the package folder, installs bundled Npcap, calls configure.ps1
configure.ps1 the per-pod step: detects the NIC + bay IP, derives the game IP = bayIP+100, binds DOSBox's pcap (realnic), renders the conf templates, stamps WATTCP.CFG my_ip
net_loop.conf.tmpl BattleTech conf template (looped netnub)
net_rp.conf.tmpl Red Planet conf template (looped netnub via loop_rp.bat)
package.ps1 assembles the deployable zip from repo sources + a fresh self-contained pod-launch publish

Template tokens filled at install: @@ROOT@@ (package dir), @@REALNIC@@ (this pod's NIC GUID fragment), @@MACADDR@@ (stable MAC derived from the game IP).

Packaged zip layout

The archive extracts to the games root (C:\games). Zip root = one package folder + postinstall.bat:

C:\games\
  postinstall.bat                 <- from deploy/postinstall.bat
  TeslaPod410\                     <- the single package folder (= ROOT)
    pod-launch.exe                 <- built from ../pod-launch (self-contained)
    dosbox-x.exe (+ DLLs)
    net_loop.conf.tmpl             <- from deploy/  (rendered -> net_loop.conf)
    net_rp.conf.tmpl               <- from deploy/  (rendered -> net_rp.conf)
    renderer.exe                   <- frozen renderer (OPEN: packaging w/ David)
    roms\awe32.raw
    ALPHA_1\...                    <- game content (incl. the WATTCP.CFG files)
    net-boot\...                   <- ODI/packet drivers, NET.CFG @340/INT10
    deploy\
      configure.ps1                <- from deploy/
      npcap.exe                    <- bundled Npcap silent installer (NOT in repo)
      vc_redist.x64.exe            <- optional, if the DOSBox build needs it

postinstall.bat derives ROOT as the single folder beside it, so the folder can be named per package.

What runs at install (elevated, no network -- air-gapped)

  1. postinstall.bat locates ROOT, runs ROOT\deploy\npcap.exe /S.
  2. configure.ps1 -Root ROOT:
    • finds the one static IPv4 (the bay IP) + its adapter GUID;
    • realnic = a contiguous, letter-leading fragment of a single GUID block (DOSBox reads a leading digit as an interface index; the fragment must be a substring of \Device\NPF_{GUID});
    • game IP = bay IP + 100 on the last octet (≤32 pods, bays .1-.100);
    • macaddr = 02:00:<game IP octets in hex> (stable, locally-administered);
    • renders *.conf.tmpl -> *.conf (tokens filled);
    • stamps my_ip = gameIP into every ALPHA_1\...\WATTCP.CFG.
  3. pod-launch.exe (the supervisor) then selects + launches the rendered conf.

Verified against a scratch package tree: NIC detect, realnic (contiguous-match checked), bayIP+100, MAC, conf render, and WATTCP stamp all correct.

Building the zip

deploy\package.ps1 [-PackageName TeslaPod410] [-Npcap <installer>] `
                   [-Renderer <exe>] [-VcRedist <exe>] [-NoContent] [-SkipBuild]

Publishes pod-launch self-contained, stages the tree (postinstall.bat at the zip root + the package folder), and writes emulator\dist\<PackageName>.zip. -NoContent skips ALPHA_1/net-boot for a fast structural check. Externally- procured pieces are bundled only when their paths are passed (else flagged).

DLLs / runtime

dosbox-x.exe is a static build (182 MB): its import table is only Windows system DLLs and the delay-import table is empty, so there are no MinGW/SDL DLLs to bundle. The one runtime DLL it needs, wpcap.dll, is provided by the Npcap install. (Its other LoadLibrary strings are optional features our confs don't use -- Glide/3dfx, ASPI, ANGLE, inpout -- or Windows-provided D3D/DXGI.)

Both deploy confs run netnub in a loop until the supervisor is killed (loop.bat for BT, loop_rp.bat for RP) -- no single-shot in the deployable.

Not yet in the repo / OPEN

  • npcap.exe (licensed installer -- procured out-of-band) and any vc_redist.
  • The frozen renderer.exe (packaging decision with David; pod-launch falls back to pyw live_bridge.py when absent).