diff --git a/context/pod-hardware.md b/context/pod-hardware.md index 0c98c1c..b90744c 100644 --- a/context/pod-hardware.md +++ b/context/pod-hardware.md @@ -317,6 +317,28 @@ Verified on build 4.11.813 with the launcher carrying none of it: `[boot] enviro setting(s) applied`, `[cockpit] -fit: borderless 800x600`, `[glasswin] radar rotation 0 (none)`, and all three surfaces on their intended `\\.\DISPLAYn`. +**Surviving a NEW BUILD, not just a reboot.** Both frozen files live INSIDE the versioned install +(`content\environ.ini`, `content\glass_layout.cfg`) and NEITHER ships in the zip — environ.ini is +generated on first run. So extracting a new build gives a cab that comes up wrong with no error +anywhere. The masters therefore live at the stable `C:\bt411\` (`podprofile.ini`, +`glass_layout.cfg`, `podkit.ps1`), and **`setup_pod.bat` pushes them into the newest `BT411_*` +folder** — run it once after each extract. `runpod.bat` resolves the newest install and applies +the kit itself before launching, so the remote path needs no hand-editing per build. Re-tuning the +cab means editing the MASTER at `C:\bt411\`, not the install's copy: the apply overwrites it, on +purpose, so there is one place to look when a panel moves. Repo copies: `scratchpad/pod/`. + +**The tester launchers work on the cab unchanged (verified 2026-08-06) [T2].** `play_solo.bat`, +`join.bat`, `join_lan.bat`, `play_steam.bat` and `joyconfig.bat` set `BT_PLATFORM=glass`, +`BT_START_INSIDE=1`, `BT_DEV_GAUGES=1` plus their own mode flag — and **not one pod key** between +them. So each inherits the whole rig from environ.ini without knowing the pod exists. This is the +argument against a separate pod-only settings file: a second file would need every launcher to opt +in, which is the shape of the "competing keymaps" bug that made glass the default profile. +Observed: `play_solo.bat` on the cart logs `environ.ini: 7 setting(s) applied` — 7 not 9, because +the bat sets `BT_PLATFORM` and `BT_START_INSIDE` itself and the real environment wins. +Steam MP needs the **client installed and logged in** (AppID 480/Spacewar, so any account, no +purchase); installed on the cart 2026-08-06. ⚠ **#68: a failed JOIN/HOST exits the process +SILENTLY** — "Steam not running" and a real crash look identical to a player. + **Working on the cart, remotely.** SSH over Tailscale lands in **session 0**, which has a dummy "WinDisc" display and CANNOT see or enumerate session 1's windows — GUI work must go through `schtasks /run /tn BT411Run` (task registered `/IT`), and window enumeration over SSH silently diff --git a/scratchpad/pod/glass_layout_alphamr.cfg b/scratchpad/pod/glass_layout_alphamr.cfg new file mode 100644 index 0000000..44b5cd8 --- /dev/null +++ b/scratchpad/pod/glass_layout_alphamr.cfg @@ -0,0 +1,11 @@ +# ALPHA-MR cab layout -- VERIFIED BY EYE 2026-08-06 (do not re-guess from +# desktop coordinates; they say nothing about physical cab position). +# DISPLAY4 -> the COLOUR RADAR LCD in the yellow-button frame, so the colour +# surface goes there. (An RGB composite landed here first and +# showed all three channels overlaid.) +# DISPLAY2 -> the VGA port feeding the Heat + Comm + Mfd2 CRT group. +# DISPLAY1 -> the VGA port feeding the Mfd1 + Mfd3 CRT group. +# monitor: binding, not pixel rects -- the USB graphics adapter re-enumerates. +Secondary / Radar=monitor:DISPLAY4,bare +VGA Port A=monitor:DISPLAY2,bare +VGA Port B=monitor:DISPLAY1,bare diff --git a/scratchpad/pod/podkit.ps1 b/scratchpad/pod/podkit.ps1 new file mode 100644 index 0000000..ffe6382 --- /dev/null +++ b/scratchpad/pod/podkit.ps1 @@ -0,0 +1,41 @@ +# Apply the ALPHA-MR pod kit to a BT411 install's content directory. +# +# WHY THIS EXISTS: the frozen rig config lives in content\environ.ini and +# glass_layout.cfg -- both INSIDE the versioned install folder, and neither is +# shipped in the zip (environ.ini is generated on first run). So extracting a +# new build gives you a cab that comes up wrong with no error anywhere. The +# MASTERS live beside this script at a stable path; this pushes them into +# whichever install you point it at. Idempotent -- safe to re-run. +param([Parameter(Mandatory=$true)][string]$Content) + +$here = Split-Path -Parent $MyInvocation.MyCommand.Definition +$prof = Join-Path $here 'podprofile.ini' +$lay = Join-Path $here 'glass_layout.cfg' +$ini = Join-Path $Content 'environ.ini' + +if (-not (Test-Path $Content)) { Write-Output "NO SUCH CONTENT DIR: $Content"; exit 1 } +if (-not (Test-Path $prof)) { Write-Output "MISSING MASTER: $prof"; exit 1 } + +# --- the env block: replace anything between the markers, keep the rest ------ +$block = Get-Content $prof +$keep = @() +if (Test-Path $ini) { + $inBlock = $false + foreach ($line in (Get-Content $ini)) { + if ($line -match '^# ==== BT411 POD PROFILE') { $inBlock = $true; continue } + if ($line -match '^# ==== END BT411 POD PROFILE') { $inBlock = $false; continue } + if (-not $inBlock) { $keep += $line } + } + while ($keep.Count -gt 0 -and $keep[-1].Trim() -eq '') { $keep = $keep[0..($keep.Count-2)] } +} +($keep + @('') + $block) | Set-Content $ini -Encoding ascii + +# --- the layout: the master always wins ------------------------------------- +# Re-tuning the cab means editing the MASTER beside this script, not the copy +# in the install -- a BT_GLASS_LAYOUT=save drag inside an install is overwritten +# on the next apply, on purpose. One place to look when a panel moves. +if (Test-Path $lay) { Copy-Item $lay (Join-Path $Content 'glass_layout.cfg') -Force } + +Write-Output "pod kit applied to $Content" +Get-Content $ini | Select-String '^(BT_|L4)' | ForEach-Object { " " + $_.Line } +if (Test-Path $lay) { Get-Content (Join-Path $Content 'glass_layout.cfg') | Select-String '^[A-Z]' | ForEach-Object { " " + $_.Line } } diff --git a/scratchpad/pod/runpod.bat b/scratchpad/pod/runpod.bat index 045d63d..e94abe0 100644 --- a/scratchpad/pod/runpod.bat +++ b/scratchpad/pod/runpod.bat @@ -1,9 +1,22 @@ @echo off -REM BT411 pod -- ALPHA-MR. The rig config is FROZEN in content\environ.ini -REM (glass panels, RGB split, channel map, radar rotation, -fit, no plasma), -REM so this launcher carries nothing but the log switches and the mission. -REM Fallback if environ.ini is ever lost: runpod_env.bat sets it all inline. -cd /d C:\bt411\BT411_4.11.801\content +REM BT411 pod -- ALPHA-MR. Resolves the NEWEST BT411_* install, applies the +REM frozen rig config (so a fresh zip drop needs no hand-editing), and launches +REM straight into a mission. The rig itself is frozen in content\environ.ini; +REM this carries only the log switches and the mission. +REM Fallback if the kit is ever lost: runpod_env.bat sets everything inline. +setlocal +set ROOT=C:\bt411 +set INSTALL= +for /f "delims=" %%d in ('dir /b /ad /o-d "%ROOT%\BT411_*" 2^>nul') do ( + if not defined INSTALL set INSTALL=%ROOT%\%%d +) +if not defined INSTALL goto noinstall +powershell -NoProfile -ExecutionPolicy Bypass -File "%ROOT%\podkit.ps1" -Content "%INSTALL%\content" >nul +cd /d %INSTALL%\content set BT_GLASS_LOG=1 set BT_LOG=podrun.log start "" ..\build\Release\btl4.exe -egg PODTEST.EGG +exit /b +:noinstall +echo No BT411_* folder found under %ROOT%. +exit /b 1 diff --git a/scratchpad/pod/setup_pod.bat b/scratchpad/pod/setup_pod.bat new file mode 100644 index 0000000..cc1edbb --- /dev/null +++ b/scratchpad/pod/setup_pod.bat @@ -0,0 +1,24 @@ +@echo off +REM ============================================================================ +REM RUN THIS AFTER EXTRACTING A NEW BT411 BUILD. +REM It finds the newest BT411_* folder under C:\bt411 and pushes the cab's +REM frozen rig config into it (environ.ini block + glass_layout.cfg). +REM Without it a fresh extract comes up with the MFDs wrong and no error. +REM ============================================================================ +setlocal +set ROOT=C:\bt411 +set INSTALL= +for /f "delims=" %%d in ('dir /b /ad /o-d "%ROOT%\BT411_*" 2^>nul') do ( + if not defined INSTALL set INSTALL=%ROOT%\%%d +) +if not defined INSTALL goto noinstall +echo Newest install: %INSTALL% +powershell -NoProfile -ExecutionPolicy Bypass -File "%ROOT%\podkit.ps1" -Content "%INSTALL%\content" +echo. +echo Done. play_solo.bat / join.bat / play_steam.bat in that folder will now +echo all come up on the pod glass -- they inherit it from environ.ini. +pause +exit /b +:noinstall +echo No BT411_* folder found under %ROOT%. Extract the zip there first. +pause