61 lines
3.2 KiB
PowerShell
61 lines
3.2 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,
|
|
[switch]$SwapMFD # swap the two MFD heads' screen positions (win3<->win4)
|
|
# if the 3-color / 2-color order was remembered reversed
|
|
)
|
|
$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
|
|
# win4 = 3-color MFD head (HEAD B), win3 = 2-color MFD head (HEAD A).
|
|
# $MFD3 is the 1440 slot, $MFD2 the 2080 slot; -SwapMFD trades them.
|
|
if ($SwapMFD) { $env:VPX_WIN4 = $MFD2; $env:VPX_WIN3 = $MFD3 }
|
|
else { $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."
|