Files
TeslaRel410/emulator/pod-launch/Modes.cs
T
CydandClaude Opus 4.8 9df87f2c01 Deploy: pod install scaffold -- supervisor entry-point, postinstall, packaging
Network-agnostic, air-gapped pod install for the two DOSBox titles (BT/RP 4.10),
fitting the existing TeslaConsole/TeslaLauncher pod-bay architecture.

emulator/DEPLOYMENT-PLAN.md
  Full design: bridge on the one NIC (pods form a source-proven P2P TCP mesh, so
  NAT/slirp is out); launcher keeps the bay IP, the DOSBox guest bridges at
  bayIP+100 (egg/mesh/game endpoint); two-edit +100 convention (postinstall +
  console DOSBox flag); static, air-gapped, <=32 pods.

emulator/pod-launch/  (C# net8 supervising entry-point)
  Creates a Job Object (KILL_ON_JOB_CLOSE), launches DOSBox-X + the render bridge
  into it and blocks -- kill this process and both die (kernel-enforced, even on
  a hard TerminateProcess of a hung session; verified). Mode dispatch: bt/rp
  wired (also serve camera + live mission-review via egg hostType); review +
  diagnostics recognized but fail clean until their DOS launch args are known.

emulator/deploy/  (install side)
  postinstall.bat (thin elevated wrapper) + configure.ps1 (NIC detect, realnic
  bind as a contiguous letter-leading GUID fragment, game IP = bayIP+100, stable
  MAC, render net_*.conf templates, stamp WATTCP.CFG my_ip) + tokenized conf
  templates + package.ps1 (assemble the zip). Render/bind/stamp + packaging
  verified against a scratch tree.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 10:36:30 -05:00

66 lines
2.9 KiB
C#

// Mode dispatch -- the console's ExitCodeID vocabulary -> how the emulator
// launches it.
//
// KEY (see ../CAMERA-REVIEW-NOTES.md): cockpit, Live-Cam, and LIVE mission-review
// are the SAME networked boot -- the console assigns the role per-IP via the
// egg's hostType= (0 pod / 1 camera / 2 review), so they are NOT separate launch
// modes. `bt` and `rp` cover all three. The only genuinely distinct launches are
// review PLAYBACK (replays last.spl through the non-networked playback app) and
// the DOS diagnostics; their launch mechanics aren't in the archive, so they're
// recognized here but marked unsupported (fail clean, don't guess).
using System;
using System.Text;
namespace VwePod
{
internal sealed class Mode
{
public string Name;
public string ConfBase; // rendered conf basename (no ext); null if not a conf-launch
public bool Supported;
public string Note;
}
internal static class Modes
{
private static readonly Mode[] All =
{
new Mode { Name = "bt", ConfBase = "net_loop", Supported = true,
Note = "BattleTech, networked cockpit. Also serves the camera ship and LIVE mission-review -- the console sets the role per-IP via the egg hostType, so no separate mode is needed." },
new Mode { Name = "rp", ConfBase = "net_rp", Supported = true,
Note = "Red Planet, networked cockpit (also camera / live mission-review via egg hostType)." },
// Distinct launches, mechanics not yet wired on the emulator:
new Mode { Name = "review", ConfBase = null, Supported = false,
Note = "Mission-review PLAYBACK: replays last.spl through the non-networked playback app (BTL4PlaybackApplication). The DOS launch arg for playback mode is not in the archive -- confirm before wiring." },
new Mode { Name = "test-plasma", ConfBase = null, Supported = false,
Note = "TestPlasmaDisplay diagnostic -- DOS launch mechanic not yet wired." },
new Mode { Name = "reset-rio", ConfBase = null, Supported = false,
Note = "ResetRIO diagnostic -- not yet wired." },
new Mode { Name = "audio-test", ConfBase = null, Supported = false,
Note = "RunAudioTest diagnostic -- not yet wired." },
};
public static Mode Find(string name)
{
if (name == null) return null;
foreach (var m in All)
if (string.Equals(m.Name, name, StringComparison.OrdinalIgnoreCase)) return m;
return null;
}
public static string Names()
{
var sb = new StringBuilder();
foreach (var m in All)
{
if (sb.Length > 0) sb.Append(", ");
sb.Append(m.Name);
if (!m.Supported) sb.Append("(unsupported)");
}
return sb.ToString();
}
}
}