Files
TeslaRel410/emulator/render-bridge/pod_deploy.ps1
T
CydandClaude Fable 5 125d835a05 Deploy: pod_deploy.ps1 cockpit window layout + focus_dosbox.ps1 (renderer topmost, DOSBox focused)
Real-pod deployment launcher for the original VDB + octopus 4-head wiring:
VPX_COCKPIT borderless head windows (radar/win0 800,0; 3-color MFD/win4 1440,0;
2-color MFD/win3 2080,0; all 640x480) + the GL bridge as the main out-the-window
view (0,0, 800x600 via new BRIDGE_W/BRIDGE_H in live_bridge.py). Editable RECTS
at the top of the script for other rigs.

focus_dosbox.ps1 restores the deployment window state: renderer -> always-on-top
(WS_EX_TOPMOST, game view never covered) + DOSBox-X -> 10,10 with foreground
focus (keeps the emu thread at foreground priority so the RIO doesn't starve).
Coexist cleanly: topmost renderer stays above the focused-but-non-topmost DOSBox.
pod_deploy calls it last; re-run anytime the stack is disturbed. LAUNCH.md
documents both.

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

57 lines
2.8 KiB
PowerShell

# Real-pod deployment launcher: cockpit window layout for the ORIGINAL VDB +
# octopus 4-head wiring. Four VGA heads, each a borderless window on its
# physical output:
# Head 1 main out-the-window = the GL bridge window -> 0,0
# Head 2 radar (HEAD C) = win0 (VPX_WIN0) -> 800,0
# Head 3 3-color MFD (HEAD B) = win4 (VPX_WIN4, UL+UC+UR) -> 1440,0
# Head 4 2-color MFD (HEAD A) = win3 (VPX_WIN3, LL+LR) -> 2080,0
# The octopus/DB25 cable splits each MFD head's R/G/B wires to the mono MFDs.
#
# Edit the RECTS below to match this pod's extended-desktop output coordinates,
# then: .\pod_deploy.ps1 (BT, looped drops)
# .\pod_deploy.ps1 -Conf ..\net_rp.conf (Red Planet)
param(
[string]$Conf = "$PSScriptRoot\..\net_loop.conf",
[switch]$NoSound
)
$ErrorActionPreference = 'Stop'
# ---- POD DISPLAY LAYOUT (x,y[,w,h]); edit for this rig's outputs ----------
$MAIN = '0,0'; $MAIN_W = 800; $MAIN_H = 600 # GL bridge (out-the-window)
$RADAR = '800,0,640,480' # Head C -> win0
$MFD3 = '1440,0,640,480' # Head B, 3-color (UL/UC/UR) -> win4
$MFD2 = '2080,0,640,480' # Head A, 2-color (LL/LR) -> win3
# --------------------------------------------------------------------------
# Cockpit window mode: borderless VDB head windows at the rects above.
# VPX_COCKPIT overrides VPX_EXPLODE (which launch_pod sets), so we get the
# 3 head windows (win0/win3/win4), not the 7-window debug spread.
$env:VPX_COCKPIT = '1'
$env:VPX_WIN0 = $RADAR
$env:VPX_WIN4 = $MFD3
$env:VPX_WIN3 = $MFD2
# Main render window size = the main display's native res.
$env:BRIDGE_W = "$MAIN_W"
$env:BRIDGE_H = "$MAIN_H"
$extra = @{}
if ($NoSound) { $extra.NoSound = $true }
# The GL bridge is the main head; park it at $MAIN's origin.
& "$PSScriptRoot\launch_pod.ps1" -Conf $Conf -BridgePos $MAIN @extra
# DOSBox to 10,10 with FOREGROUND FOCUS (keeps the emu thread at foreground
# priority so the RIO doesn't starve). Small wait so the DOSBox window exists,
# then focus it LAST so it wins over the bridge/head windows.
Start-Sleep -Seconds 3
& "$PSScriptRoot\focus_dosbox.ps1" -X 10 -Y 10
Write-Host ""
Write-Host "DEPLOY layout: main(bridge)=$MAIN radar/win0=$RADAR 3col/win4=$MFD3 2col/win3=$MFD2"
Write-Host "DOSBox parked at 10,10 with focus. If focus is lost later (head/bridge"
Write-Host "windows, or a capture), re-run: .\focus_dosbox.ps1"
Write-Host "NOTE: VDB head windows are borderless 640x480. Main render window is"
Write-Host "now sized to $MAIN_W`x$MAIN_H but still has its title bar -- a true kiosk"
Write-Host "deploy wants it BORDERLESS on the main output (BRIDGE_BORDERLESS SDL"
Write-Host "change, TODO). Radar is NOT rotated in cockpit mode (explode rotates it);"
Write-Host "if this pod's radar CRT is portrait, flag it and we'll rotate win0."