Files
TeslaRel410/emulator/render-bridge/launch_pod.ps1
T
CydandClaude Fable 5 f2687a3146 BT410 5.3.72: the fault caught in the act; the inside view gets its cockpit
VPX_PF_WATCH (fork, cpu/paging.cpp): on a guest page fault at the watched
linear address, dump guest registers, the last 64 serial RX deliveries with
guest cs:eip at each, the code bytes at the faulting EIP and the stack top.
serialnamedpipe's doReceive feeds the ring.  Armed in podrun.sh and
launch_pod.ps1.

The first catch decoded the residual fault completely: CS:EIP 00FF:000066D4
in the DPMI host, EBX = F000CA60 -- an IVT entry read as a dword, segment
F000 offset CA60, a BIOS default interrupt handler -- and the faulting access
is [EBX+0x3004], whose 0x80000000 segment-base wrap gives exactly cr2
7000FA64.  The host probes a word 0x3004 bytes past a real-mode vector value
treated as a flat pointer: harmless for its own low-memory handlers, a fault
for BIOS F000:xxxx defaults.  The serial ring shows a steady 1-byte/1-3ms
vRIO stream with nothing special at the fault -- the stream determines which
vectors get walked, not the crash itself.  The 0x3004 appears nowhere in
DPMI32VM.OVL or 32RTM.EXE as an immediate, so the probe now also dumps code
bytes at EIP; faulthunt.sh loops runs until the next catch.

Shipped baseline streak: 4/4 clean -- consistent with exposure, not yet
discriminating.

The inside view now loads the COCKPIT skeleton: the fleet-wide X-variant
naming convention (MAD->MAX etc., all 64 skeletons present) selects the same
25-joint chain with a single object -- max_cop.bgf, the MAX_COP canopy shell
with the PUNCH-texel windows from the capture forensics.  The donor names the
same mechanism from the decomp side (inside = SkeletonType_A with '_cop'
selection).  Fallback to the body skeleton when no X file exists.

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

101 lines
5.5 KiB
PowerShell

# Launch the full pod experience: DOSBox-X pod (pentapus 7-display explode
# mode + dual-AWE32 sound) + Dave's GL renderer bridged to the live wire.
#
# .\launch_pod.ps1 # restart pod + bridge (stops previous run)
# .\launch_pod.ps1 -NoSound # skip AWE32 (saves the ~4 min SBK upload)
# .\launch_pod.ps1 -NoBridge # pod only
# .\launch_pod.ps1 -Conf <path> # different mission/conf
#
# Pentapus mode (VPX_EXPLODE=1): all 7 cockpit displays as desktop windows --
# 5 mono MFDs (green phosphor), portrait radar, Division main -- needs a wide
# desktop (~2830px). Per-window override: VPX_WIN<g>/VPX_MAIN = "x,y[,w,h]".
# Eye height for the bridge camera: FP_UPOFF env (see live_bridge.py).
param(
[string]$Conf = "$PSScriptRoot\gauge_arena_sound.conf",
[string]$Work = "$env:LOCALAPPDATA\Temp\vwe-pod",
[string]$BridgePos = '2020,20', # Division head slot (explode layout)
[switch]$NoBridge,
[switch]$NoSound,
[switch]$ShowNative, # also show the native Division window
# (wire-decode diagnostic; black clear)
[switch]$Mipmap # VRVIEW_MIPMAP=1: mip-filter minified
# textures (kills RP's checkerboard-floor
# shimmer). Non-authentic (board had no
# mipmaps); set at BOOT so no mid-mission
# bridge restart churns the RIO.
)
$ErrorActionPreference = 'Stop'
New-Item -ItemType Directory -Force $Work | Out-Null
# pcap backend needs wpcap.dll; without it the NE2000 silently comes up dead
# ("NO PACKET DRIVER FOUND" at netnub). Don't trust the invoking shell's PATH.
if ($env:Path -notlike '*\Npcap*') { $env:Path = "C:\Windows\System32\Npcap;$env:Path" }
# a restart means the previous run dies first (COM1 + the fifodump are exclusive)
foreach ($pidfile in "$Work\pod_pid.txt", "$Work\bridge_pid.txt") {
if (Test-Path $pidfile) {
$old = Get-Process -Id (Get-Content $pidfile) -ErrorAction SilentlyContinue
if ($old) { Write-Host "stopping previous $([IO.Path]::GetFileNameWithoutExtension($pidfile)) ($($old.Id))"; $old | Stop-Process -Force }
}
}
# the bridge pid file records the py.exe wrapper; its python child holds the
# fifodump open (blocks the Remove-Item below) -- sweep it by command line
Get-CimInstance Win32_Process -Filter "Name like 'py%'" |
Where-Object { $_.CommandLine -match 'live_bridge' } |
ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }
# fresh wire artifacts each run (the RIO tap APPENDS across runs otherwise --
# stale init sequences from the previous run poison diagnosis)
Remove-Item "$Work\live.fifodump", "$Work\riotap.txt" -ErrorAction SilentlyContinue
$env:VPXLOG = "$Work\vpxresp.txt"
$env:VPX_RESPOND = '1'
$env:VPX_RENDER = '1'
$env:VPX_EXPLODE = '1' # pentapus: 7 cockpit displays
$env:VPX_DUMPDIR = $Work
$env:VPX_FIFODUMP = "$Work\live.fifodump" # archival/replay copy
$env:VPX_FIFOSOCK = '8621' # live tee the bridge rides
$env:VPX_PF_WATCH = '7000FA64' # residual load-window fault: dump serial-RX ring on hit
$env:RIO_TAP = "$Work\riotap.txt"
# Dave's bridge is the out-the-window view; the native Division window is a
# decode diagnostic (-ShowNative), cleared black so missing geometry doesn't
# masquerade as sky.
if ($ShowNative) { Remove-Item Env:VPX_NOMAIN -ErrorAction SilentlyContinue }
else { $env:VPX_NOMAIN = '1' }
$env:VPX_CLEAR = '0,0,0'
if ($NoSound) {
Remove-Item Env:VWE_AWE32, Env:VWE_AWE_ROM -ErrorAction SilentlyContinue
} else {
$env:VWE_AWE32 = '1'
$env:VWE_AWE_ROM = (Resolve-Path "$PSScriptRoot\..\roms\awe32.raw").Path
$env:VWE_AWE_LOG = '1' # 10s reports incl. limiter stats (crackle diagnosis)
$env:VWE_AWE_WAV = "$Work\awe" # crackle taps: awe_front/_rear/_mix.wav
}
$dosbox = (Resolve-Path "$PSScriptRoot\..\src\src\dosbox-x.exe").Path
$p = Start-Process $dosbox -ArgumentList '-conf', $Conf `
-RedirectStandardError "$Work\pod_err.txt" `
-RedirectStandardOutput "$Work\pod_out.txt" -PassThru
$p.Id | Set-Content "$Work\pod_pid.txt"
Write-Host "pod PID $($p.Id) conf=$([IO.Path]::GetFileName($Conf)) work=$Work"
if (-not $NoSound) { Write-Host "sound ON: boot adds ~4 min for the SoundFont upload" }
if (-not $NoBridge) {
# park the bridge window on the Division head slot (SDL honors this at
# window creation)
$env:SDL_VIDEO_WINDOW_POS = $BridgePos
if ($Mipmap) { $env:VRVIEW_MIPMAP = '1' }
else { Remove-Item Env:VRVIEW_MIPMAP -ErrorAction SilentlyContinue }
# bridge rides the socket tee (retries until the device listens); the
# fifodump path is its catch-up source if it ever (re)starts mid-mission.
# Launch with pyw (windowless pythonw), NOT py: py opens a console window
# that parks over the displays, and Start-Process ignores -WindowStyle once
# stdout/stderr are redirected (UseShellExecute=false). pyw has no console
# at all; stdout/stderr still land in the bridge_*.txt logs, and the GL
# render window appears normally at SDL_VIDEO_WINDOW_POS.
$b = Start-Process pyw -ArgumentList '-3.13', "$PSScriptRoot\live_bridge.py", 'tcp:8621', "$Work\live.fifodump" `
-RedirectStandardError "$Work\bridge_err.txt" `
-RedirectStandardOutput "$Work\bridge_out.txt" -PassThru
$b.Id | Set-Content "$Work\bridge_pid.txt"
Write-Host "bridge PID $($b.Id) [GL, windowless] (arrows in the RENDER window tune eye height)"
}