Merge origin/master: the D1 relay/operator line + input remap meet the glass layer

33 master commits in (relay TCP/UDP + PySide6 operator console, CONTROLS.MAP
+XInput binding engine, camera seats, torso pitch aim, sign fixes, the 1995
manual, version stamping, 18-mech certification).  Conflicts: .gitignore +
CLAUDE.md router rows (combined).

SEMANTIC RECONCILIATION (the one real overlap): masters btinput binding
engine (ungated, CONTROLS.MAP) and the glass PadRIO (gated, bindings.txt)
would both read the keyboard/pad in a glass+PAD session.  btinput now joins
the stand-down convention: BTInputPoll yields (and BTInputSuppressKey claims
NOTHING, so authentic hotkeys flow) when an operational cockpit device owns
the input path -- BTRIODevicePresent, BT_KEY_BRIDGE force-override honored,
forced harness exempt.  One input system per mode: btinput on pod/dev
desktops, PadRIO on glass.  The mechmppr/mech4 bridge merges composed clean
(masters negate-once sign fix inside our device-gated bridge).  The D1 relay
keeps its own raw sockets by design (an alternative LAN wire; Steam and
relay are separate modes).

Verified post-merge: all 3 configs build; glass boots with [input] binding
engine standing down + PadRIO owning input (30 ticks); pod forced-walk
speedDemand=61.501 with btinput ACTIVE; 2-node loopback MP full 31/31
mission, 76/76 ticks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-18 17:46:41 -05:00
co-authored by Claude Fable 5
48 changed files with 7234 additions and 141 deletions
+9 -3
View File
@@ -18,6 +18,7 @@
// #define BT_HEAPCHECK // enable to validate the heap on every alloc (heap-corruption hunt)
#include <windows.h>
#include <shellapi.h> // CommandLineToArgvW
#include <btversion.h> // generated: 4.11.<commit count> (<hash>)
#include <crtdbg.h> // _CrtSetDbgFlag (heap validation, gated by BT_HEAPCHECK)
#include <fstream>
#include <iostream>
@@ -448,7 +449,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
fclose(file);
}
std::cout << "BattleTech v4.10 (reconstructed port)" << std::endl << std::flush;
// Version scheme: 4.10 = the 1995 arcade release; 4.11 = this win32
// reconstruction; build = git commit count, hash pins exact source
// ('+' = built from an uncommitted tree). Stamped by tools/btversion.cmake.
std::cout << "BattleTech " << BT_VERSION_FULL
<< " (win32 reconstruction of Tesla 4.10)" << std::endl << std::flush;
// CPU pin (timing stability). BT_AFFINITY overrides the mask; =0 disables --
// required for multi-instance runs (two instances pinned to core 0 starve
@@ -550,9 +555,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
if (np != 0)
sscanf(np + 4, " %d", &netPort);
if (netPort > 0)
swprintf(winTitle, 64, L"BattleTech \x2014 node %d", netPort);
swprintf(winTitle, 64, L"BattleTech %S \x2014 node %d",
BT_VERSION_STRING, netPort);
else
wcscpy(winTitle, L"BattleTech");
swprintf(winTitle, 64, L"BattleTech %S", BT_VERSION_STRING);
}
hWnd = CreateWindowEx(0, L"MainWndClass", winTitle, WS_OVERLAPPEDWINDOW,
0, 0, wr.right - wr.left, wr.bottom - wr.top,