30 Commits
Author SHA1 Message Date
CydandClaude Fable 5 697cf3129b Pipe endpoints join the connection pickers; no more COM11/COM12 auto-bind
Each device row now serves one endpoint at a time, picked from a list of
pipe:vrio / pipe:vplasma (first, default) plus the machine's COM ports —
nothing opens automatically at startup. The pipe services gained an
IsListening property and are started/stopped by the row's Open/Close
button instead of running for the whole app lifetime, which also retires
the dual-transport warning. Status line shows the active endpoint;
OFFLINE when none. Standalone vPLASMA is unchanged (hardwired COM12 +
permanent pipe). Also fixes the xUnit1031 warnings in the plasma pipe
tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 23:17:34 -05:00
CydandClaude Fable 5 e507f1740c Named-pipe transport for the DOSBox-X fork's namedpipe backend
Both devices now serve \.\pipe\vrio and \.\pipe\vplasma for the whole
app lifetime alongside the COM rows — the com0com-free path. Framing per
the pinned contract (0x00 len data / 0x01 DTR+RTS lines, one lines frame
on connect, unknown type = log + drop): PipeFraming/PipeFrameDecoder and
VRioPipeService (TX paced at the wire rate, peer DTR edges feed
HostHandshake) in VRio.Core, listener-only VPlasmaPipeService twin in
VPlasma.Core. Busy pipe names retry, so vRIO's built-in glass and the
standalone vPLASMA coexist. README documents the transport and the fork
conf lines.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 23:03:02 -05:00
CydandClaude Fable 5 0674cf5ba4 Drop unused Microsoft.Bcl.HashCode, fix README typo
HashCode.Combine is called nowhere; the package (and its DLL in the dist
zip) was dead weight since the Core projects were created.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
v2026.07.11
2026-07-11 20:40:14 -05:00
CydandClaude Fable 5 90bf6723dc vRIO builds in the vPLASMA display
The plasma glass now lives in vRIO's encoder strip: PlasmaCanvas grew a
dot-pitch parameter (default keeps the standalone glass pixel-identical)
and is compile-linked into VRio.App at pitch 3, parked at the strip's
left slot. The axis gauges move to the grid's right edge, the strip is
as tall as the glass, and the status text sits between them with the
axis readout split onto two lines. The button grid also compacts: rows
shift up past the layout's empty row 0 and the spare bottom row is
trimmed (the shared CockpitLayout is untouched, so coordinates still
match RIOJoy's map).

Control strip: the COM row labels are now the device names -- vRIO and
vPLASMA -- coloured by port status (green open, gray closed), replacing
the port-status line. The plasma row auto-opens COM12 at startup like
the RIO row does COM11; one Rescan refreshes both pickers. Plasma log
lines share the wire log under a vPLASMA: prefix, and the standalone
gestures carry over (double-click self-test, right-click reset).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 15:30:51 -05:00
CydandClaude Fable 5 359e1c0a40 vRIO auto-opens COM11 at startup when present
The usual port (device end of the COM1 pair) is selected and opened
automatically at launch. Missing or busy just logs to the wire log --
no modal at startup -- and leaves the manual picker in charge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
v2026.07.09
2026-07-09 08:25:28 -05:00
CydandClaude Fable 5 c6e0522408 PlasmaNew: replica goes USB-CDC (Win x64 hosts), park pending dump
The cockpit PCs are now Win x64, so the replica needs no real RS-232 — a
native-USB MCU presenting as a USB CDC virtual COM port is transparent to
the host (opens COMx, can't tell it isn't a UART). Records the consequences
(baud cosmetic, timing instant, pin the COM number, LEDs need their own
power) and marks the hardware/protocol thread parked until the U3 EPROM
firmware dump (or Babcock programming manual) is in hand.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 21:10:34 -05:00
CydandClaude Fable 5 9a1c8478bf Add PlasmaNew: plasma display reverse-engineering reference
Historical reference for recreating the cockpit plasma display in hardware.
The original Babcock plasma panels are failing; the end goal is a drop-in
replica — a modern microcontroller driving a 128x32 LED array that reads the
same RS-232 serial bus and speaks the same command protocol as the original
PD01D221. vPLASMA (the C# app) is the executable spec and test oracle for
that firmware.

Contents:
- PD01D221.pdf — Babcock datasheet (doc 9200-0109 Rev A)
- Board photos: controller overview, Cherry silkscreen, EPROM/SRAM, JP1
- README.md — full investigation: hardware ID (stock Babcock PD01D221,
  Cherry PCB 4317-C), chip inventory, recovered ESC command protocol, the
  JP1 config-jumper map (MODA/MODB hardwired to expanded mode), and the
  firmware-dump plan.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 20:50:35 -05:00
CydandClaude Fable 5 19a1abbff2 vPLASMA slims to a bare glass hardwired to COM12
The window is now just the display: 640x160 dot field (5 px pitch,
4 px bezel) plus the title bar, which carries the port status. COM12 —
the device end of the plasma's null-modem pair — is hardwired and
opened at startup, with a retry timer that keeps trying while the port
is missing or busy and reopens it if it dies. The control strip, port
picker, counters, and wire log are gone; the glass keeps two gestures:
double-click cycles the self-test pages, right-click resets the
display to its power-on state.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
v2026.07.07.2
2026-07-07 15:06:36 -05:00
CydandClaude Fable 5 a1b7dae3da vPLASMA: companion app emulating the cockpit plasma display
The cockpit's second serial device joins vRIO: the 128x32 dot-matrix
plasma on COM2 (9600 8N1) that the game draws mission text and status
graphics on. VPlasma.App opens the device end of a COM port, decodes
the display's command stream, and renders the matrix in plasma orange.

The command set is recovered from two Tesla 4.10 artifacts: the game's
driver (L4PLASMA.CPP — ESC P packed-bitmap row writes, ESC G 0 cursor
hide at boot) and the factory test tool PLASMA.EXE, whose data segment
pairs each command literal with its printf description (BS/HT/LF/VT/CR
motion, ESC @ clear, ESC L home, ESC G cursor, ESC K fonts, ESC H
attributes: intensity/underline/reverse/flash). Text renders through
the classic public-domain 5x7 set standing in for the lost ROM glyphs;
fonts 0-3 give 21x4 cells, fonts 4-7 the doubled 10x2. A Self test
cycles banner/charset/graphics pages through the same parser the wire
feeds, and the wire log shows every decoded command.

Verified end-to-end over the second com0com pair (host writing COM2,
vPLASMA listening on COM12). The verify skill gains the cross-process
combo-box lesson: string-carrying CB_* messages hang across processes,
so select ports by locally computed index via CB_SETCURSEL.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 14:22:00 -05:00
CydandClaude Fable 5 767473d1cf Project verify skill: drive the GUI via PostMessage + PrintWindow
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
v2026.07.07
2026-07-07 09:47:35 -05:00
CydandClaude Fable 5 007d15e668 Wire carries stick-up as negative; Invert Y opts back to physical
The old Invert joystick Y box (checked by default) is now the wire's
native convention: full up = -80 in AnalogReply with the flag off.
Checking the renamed Invert Y sends the physical direction (up = +80).

Control strip cleanup: test-mode buttons and the firmware selector are
gone (the device still reports 4.2), Keyboard/Gamepad/Invert Y share
one line, the help text drops the bindings sentence, and the wire log
gets the reclaimed height.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 09:47:25 -05:00
CydandClaude Opus 4.8 391c53f294 Capture a chosen keyboard's keys without window focus (Raw Input)
The WinForms focus path only sees keys while vRIO is foreground and can't
tell one keyboard from another, so vRIO went deaf the moment the sim took
focus. The new "Capture keyboard" picker in the Input panel taps one
physical keyboard through the Win32 Raw Input API (RIDEV_INPUTSINK) and
routes its keys to the panel even in the background — the input-side twin
of the lamp mirror writing that keyboard's LEDs under the same condition.

Raw Input observes without intercepting, so keys still reach the focused
app; the picker defaults to "All keyboards (focus only)", preserving the
prior focus-bound behavior, and only registers Raw Input while a specific
device is selected. While capturing, the focus path stands down but still
swallows bound keys so they can't click panel buttons.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 21:31:49 -05:00
CydandClaude Fable 5 bec3bb1e4a Sparse package icons need resources.pri at the external location
The shell resolves Square44x44Logo through the package resource index;
this package never had a resources.pri, so every icon lookup failed and
Start/taskbar showed a generic icon regardless of the Assets PNGs.
Empirically (SHLoadIndirectString against the live package), with
AllowExternalContent MRT loads resources from the EXTERNAL location,
not the manifest's folder — so Register-vRIO.ps1 now copies Assets\ and
resources.pri next to the exe before registering. Make-Assets.ps1
regenerates the PNGs from vwe.ico and rebuilds the pri (needs makepri
from the Windows SDK / SDK.BuildTools NuGet). Package version bumped;
the MrtCache is keyed by package full name, so same-version
re-registration serves stale lookups.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 19:43:37 -05:00
CydandClaude Fable 5 6923c9f252 Panel readout shows the wire values while the dot stays physical
With Invert Y checked the readout claimed "Y 80" while the AnalogReply
carried -80. The flip is factored into VRioDevice.WireY, shared by the
reply builder and the new GetWireAxis accessor; the canvas readout uses
a WireAxisProvider fed from it, and toggling the checkbox repaints so
the sign flips in place. Dot and gauges keep tracking the stick.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 19:33:28 -05:00
CydandClaude Fable 5 23204ba9c6 Package assets carry the vwe.ico artwork so the taskbar shows it
With package identity the taskbar/Start icon comes from the manifest's
Square44x44Logo assets, not the exe's embedded icon — the placeholder
PNGs are replaced with renders of vwe.ico, plus the targetsize /
altform-unplated variants the Win11 taskbar prefers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 19:28:31 -05:00
CydandClaude Fable 5 97e78b0eea App icon: vwe.ico as the exe and window icon
ApplicationIcon embeds it in the exe (Explorer, taskbar); MainForm pulls
the same embedded icon for the title bar via ExtractAssociatedIcon.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 19:22:30 -05:00
CydandClaude Fable 5 ce5ed1117a Invert Y on the wire, not in the router: the panel keeps tracking the stick
InputRouter.InvertJoystickY flipped the stored axis, so the X/Y dot and
readout moved opposite the physical stick. The toggle now lives on
VRioDevice and negates joystick Y only while building AnalogReply: local
state keeps the physical direction for every source (pad, keys, panel
drags) and only the host sees the flip. Negating a full -8192 deflection
lands one past the 14-bit Max, so the reply clamps it to 8191.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 19:21:57 -05:00
CydandClaude Fable 5 41f6ef364d Invert-Y input toggle; git-stamped version in the window title
- InputRouter.InvertJoystickY flips the composed joystick Y (keys and
  pad alike) before wire scaling; panel drags write the device directly
  and stay untouched. New "Invert joystick Y" checkbox in the Input
  group, default on.
- StampGitVersion target bakes "YYYY.MM.DD (shortsha)" of HEAD into
  InformationalVersion; the title shows it via Application.ProductVersion
  so a running build can be matched to its vYYYY.MM.DD release tag.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 18:46:02 -05:00
CydandClaude Fable 5 f77cd55b11 pkg: package identity so Dynamic Lighting grants background control
The Settings "Background light control" list only offers apps that have
BOTH package identity and the com.microsoft.windows.lighting
windows.appExtension in their manifest (declaration verified against
Lenovo's LegionLightingController manifest) — without a grant, Windows
hands the LEDs to vRIO only while it is the foreground window, i.e.
never during gameplay.

pkg/AppxManifest.xml is a sparse package (external location) that
grants the existing VRio.App.exe identity as-is: win32App runtime
behavior, runFullTrust + unvirtualizedResources, and the lighting
app-extension. Register-vRIO.ps1 registers/unregisters it against any
exe folder (repo build or an extracted dist zip); unsigned registration
needs Developer Mode. Identity is granted through shell activation
only — launch from the Start menu entry or an AUMID taskbar pin, not by
double-clicking the exe (the script prints this warning).

Verified end-to-end on this machine: process reports the package full
name, vRIO appears in the background-control list, and the wire log
shows the withheld → available transition once granted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:08:38 -05:00
CydandClaude Fable 5 31c3a910f0 Mirror lamps onto RGB keyboards via Windows Dynamic Lighting
Opt-in checkbox in the Input group: keys bound to lamp-capable button
addresses glow with the panel's palette (red family, yellow for the
Secondary/Screen columns) and blink at the panel's own flash rates, so
keyboard and on-screen panel stay in step; unbound keys are blacked out
so the keyboard reads as the button field. Zone-lit keyboards without
per-key addressing (e.g. this laptop's 24-zone ITE board) fall back to
mirroring the strongest current lamp board-wide. A picker under the
checkbox narrows the mirror to one keyboard when several are attached
(hot-plug aware; releases the others back to Windows).

KeyboardLampMirror claims keyboard-kind LampArrays via a DeviceWatcher,
repaints at 100 ms only when colors actually change, survives paint
faults (a leaked Timer exception would kill the process), and logs
attach/detach plus IsAvailable transitions with a pointer to the
Dynamic Lighting background-control setting. Disabling releases every
claim so the LEDs revert to the ambient scene.

Also: the wire log gets a horizontal scrollbar (long lines don't wrap).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:08:38 -05:00
CydandClaude Fable 5 1e79711181 Drop the reply-wedge emulation controls from the UI
The "Emulate the v4.2 reply-wedge bug" checkbox and "Wedge analog now"
button are not needed for the renderer-comparison work, so remove them
from the control strip: Device group shrinks 60px and the Input group,
counters, help text, and wire log move up to match (the log gains the
height). EmulateReplyWedge/WedgeAnalogNow stay in VRio.Core with their
tests; only the UI entry points are gone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
v2026.07.06.2
2026-07-06 13:41:54 -05:00
CydandClaude Fable 5 dc9a294101 Writer thread survives write faults instead of dying mid-run
A single failed port write killed the paced writer thread permanently
while the port still reported open, so every later byte (ACKs, the
CheckRequest handshake) queued forever: wire tap showed 2 of 3 bytes of
a stray ButtonPressed at t=54ms, then 1167 unanswered CheckRequests.
The trigger was com0com flow control with the game side not yet open --
the third byte blocked past WriteTimeout, threw, and the catch returned.

A real UART cannot wedge; it shifts bits into the line whether or not
anyone listens. On a write fault, drop the stalled byte plus the stale
backlog, log the stall/recovery transition once, and keep the writer
alive -- TX resumes as soon as the host drains its end.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 13:41:16 -05:00
CydandClaude Fable 5 1eded793af CheckRequest: send the real board's test-mode handshake
The host waits up to 5s after CheckRequest for TestModeChange ENTER
(8C 01 0D) before anything else, and sends no requests until the
matching EXIT (8C 00 0C) arrives; vRIO jumped straight to the
CheckReply dump, so hosts logged "RIO never came back from check
request" and skipped the version exchange. Bracket the per-board
BoardOk replies with enter/exit, byte-for-byte what the real v4.2
board sends on the wire tap.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 13:13:06 -05:00
CydandClaude Fable 5 44dc8e48e7 Default bindings: pad-mandatory axes, full keyboard button field
Rework the shipped default profile around a required Xbox controller,
refined from live-game testing:

- All five axes are pad-only now (left stick / triggers / right stick);
  the key-axis bindings (arrows/WASD-style deflect and rate) are gone
  from the defaults, though the grammar remains supported.
- Keyboard becomes the button field, geometry mirroring the panel:
  number row + QWERTY row = upper MFD bank, home + bottom rows =
  lower MFD bank as two 4-key blocks with an unbound gap key (G / B)
  standing in for the panel keypad gap, F1-F6 / F7-F12 = the
  Secondary / Screen columns top-to-bottom (0x16/0x17, 0x1E/0x1F
  deliberately unmapped), numpad = the full internal keypad with the
  hex keys on the operators (/ * - + . Enter = A-F).
- Hat rides the arrow keys, Main stays on Space; Pinky / Middle /
  Upper / Panic are pad-only so no panic key sits inside the MFD field.
- Pad B and LeftShoulder swap to Middle / Panic.
- Rest of the throttle column and the external keypad stay unmapped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 12:17:40 -05:00
CydandClaude Fable 5 d26000f906 Pace TX bytes at the 9600-baud wire rate
vRIO wrote whole reply packets in one SerialPort.Write; through a
com0com null-modem (no UART) the host saw the bytes ~30-40 us apart,
a burst no real board can produce and the prime suspect in a rocky
game init. Replies now leave one byte per 10-bit frame (~1.04 ms), so
the 45-byte CheckRequest response takes ~47 ms like real hardware
(measured 0.94-1.10 ms gaps over a com0com pair).

- Transmit frames queue to a writer thread; each byte is scheduled
  against a monotonic slot deadline slot = max(prev + period, now),
  so the stream averages true 9600 baud without bursting after idle.
- After a write the schedule is floored at the actual emission time:
  a late wake-up can never be followed by a catch-up burst - two
  frames closer than the frame time is structurally impossible.
- 1 ms system timer resolution while the port is open (timeBeginPeriod)
  so the pacer sleeps most of each gap and only spins the last ~1.8 ms.
- Side benefit: UI clicks no longer block on SerialPort.Write (a
  stalled port could previously hang the UI for the 2 s write timeout).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 11:31:39 -05:00
CydandClaude Fable 5 e590b89c47 Keyboard and Xbox-gamepad input drive the panel
New input pipeline: sources feed an InputRouter (VRio.Core.Input) that
calls the same VRioDevice press/release/axis entry points the mouse
canvas uses, so routed input is indistinguishable on the wire.

- Bindings live in %APPDATA%\vRIO\bindings.txt (plain text, commented
  defaults written on first run; Reload/Edit buttons in the new Input
  group). Keys and pad buttons press any RIO address, momentary or
  toggle; axes bind in normalized units of each axis realistic travel
  window with deflect (spring-back), rate (position holds), deadzone,
  and invert options - RioAxisRange supplies the wire signs.
- Router suppresses key auto-repeat, edge-detects pad buttons, and
  hold-counts per address so overlapping sources press once and
  release last; axes only write when the composed value changes, so
  mouse drags keep working while sources idle.
- Xbox pad via a zero-dependency XInput P/Invoke poller (xinput1_4,
  fallback xinput9_1_0), throttled rescan while disconnected.
- MainForm intercepts bound keys in ProcessCmdKey so arrows/space
  reach the panel instead of moving focus; keys release on focus
  loss; center-axes and host ResetRequest reset the rate integrators.
- Canvas highlights router-held addresses like clicks.
- Defaults: arrows=stick, W/S=throttle, Q/E=pedals, numpad=internal
  keypad, IJKL/Space=hat+main; pad left stick/triggers/right stick =
  stick/pedals/throttle-rate, ABXY/dpad/shoulders = named buttons.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 11:30:55 -05:00
CydandClaude Fable 5 1f0781f06a Realistic axis travel, wire-log fixes, compact layout
- Axes now span the hardware windows from RIOJoy's calibrator instead of
  the full 14-bit wire range: throttle rests at 0 and travels to -800
  (forward runs negative, matching the ratchet math), spring-loaded
  pedals rest at 0 and press to +500, stick covers +/-80 around center
  (new RioAxisRange in VRio.Core documents the provenance).
- Stick X sign flipped: RIOJoy maps negative samples to the high half of
  its output axis, so dragging right now lowers raw X.
- Removed the Rz mix bar - the real RIO has no such indicator.
- Wire log: newest entries on top with the bound trimming the oldest
  lines, and fixed the anchoring bug that let the box grow past the
  window edge (the panel got its height only after children snapshotted
  their anchors), which also hid the Clear log button.
- Tighter layout: axis readout sits under the status lines, encoder
  strip shrunk to fit the gauges, and the window sizes itself to the
  canvas + control strip.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
v2026.07.06
2026-07-06 10:33:01 -05:00
CydandClaude Fable 5 8e0a9e71bc Add com0com installer
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 09:38:57 -05:00
CydandClaude Fable 5 d3552b3227 Ignore com0com installer files
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 09:22:20 -05:00
CydandClaude Fable 5 7995c0b1c1 vRIO: virtual RIO cockpit device emulator
Speaks the device side of the RIO serial protocol (per riojoy's
PROTOCOL.md) on a COM port, behind an interactive replica of the
profile editor's cockpit panel: click cells to press buttons/keys,
drag the encoder gauges to move the five analog axes, and watch
host-commanded lamp states (incl. flash modes) light the cells.

Device behavior grounded in the real v4.2 firmware dump: version 4.2,
4-retry NAK budget ending in RESTART, and an optional emulation of the
analog reply-wedge latch leak for exercising host recovery watchdogs.

Verified: 33 unit tests, plus an interop harness driving RIOJoy's
actual RioSerialLink against VRioDevice over an in-memory transport
(version/check/analog/lamp/button/keypad/reset all round-trip).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 07:39:38 -05:00