vPLASMA (standalone): restore config panel with the 7 JP1 jumpers

The standalone app gets its right-side config panel back, now built around
the real PD01D221's JP1 jumper block (from PlasmaNew/FIRMWARE.md): seven
toggles labelled with each strap's function and HC11 pin. The two baud
straps drive the open baud (4800/9600/19.2K/38.4K; jumper 2 = 9600 default,
the game's rate) via a new VPlasmaSerialService.Baud property; jumper 6
runs a demonstration loop, mirroring the firmware's jumper-6 demo. Plus the
Display controls (self test / clear), live counters, and the wire log.

The glass, auto-open COM12 + named-pipe transport, double-click self-test,
and right-click reset all stay. Only VPlasma.App is touched (plus the
additive Baud property) — the vPLASMA glass embedded in vRIO, which shares
PlasmaCanvas, is left exactly as it was.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-16 18:04:55 -05:00
co-authored by Claude Opus 4.8
parent 49e88fbe20
commit 90a57ba2cf
2 changed files with 251 additions and 45 deletions
@@ -27,6 +27,14 @@ public sealed class VPlasmaSerialService : IDisposable
_device = device ?? throw new ArgumentNullException(nameof(device));
}
/// <summary>
/// Bit rate to open the port at (default 9600). On the real display this is
/// the baud the two JP1 jumpers select (4800/9600/19.2K/38.4K); over a
/// virtual null-modem it's cosmetic, but the standalone app exposes the
/// jumpers so it's honored on the next open. Set before <see cref="Open"/>.
/// </summary>
public int Baud { get; set; } = PlasmaProtocol.BaudRate;
/// <summary>True while a COM port is open.</summary>
public bool IsOpen => _port?.IsOpen == true;
@@ -47,7 +55,7 @@ public sealed class VPlasmaSerialService : IDisposable
Close();
var port = new SerialPort(portName, PlasmaProtocol.BaudRate, Parity.None, 8, StopBits.One)
var port = new SerialPort(portName, Baud, Parity.None, 8, StopBits.One)
{
Handshake = Handshake.None,
// Finite read timeout so the reader thread can notice shutdown.
@@ -65,7 +73,7 @@ public sealed class VPlasmaSerialService : IDisposable
_reader = new Thread(ReadLoop) { IsBackground = true, Name = "vPLASMA serial reader" };
_reader.Start();
Logged?.Invoke($"Opened {portName} @ {PlasmaProtocol.BaudRate} 8N1 — listening for the host");
Logged?.Invoke($"Opened {portName} @ {Baud} 8N1 — listening for the host");
ConnectionChanged?.Invoke(true);
}