Editor: rework to the original Win32 RIO control-panel layout

Reworked the profile/mapping editor to mirror the original unfinished Win32
RIO driver's control-panel design (docs/Win32RIO, by FASA / Michel Lowrance)
instead of the flat config-sheet grid. The wallpaper region positions are a
VGA chroma-split display artifact, not the cockpit's logical shape.

- RioJoy.Core.Editing.CockpitPanel: the functional layout — five MFD clusters,
  four board columns (Throttle/Secondary/Screen/Joystick-Hat), an encoder-gauge
  strip, and the two later-added 4x4 keypads (Internal/External). Places every
  address 0x00-0x47 / 0x50-0x6F exactly once (unit-tested).
- Tray PanelView/PanelCanvas render the panel; ProfileEditorForm drives it.
  Buttons show label + assigned function (ButtonBinding.Describe -> CTL-N, JOY1,
  POV-U, Mse LB, RIO command names; unit-tested). Lamp shade is driven by the
  IsLit flag (not by whether a function is assigned); keypads are neutral blue
  with no Lit checkbox. Added an Unassign button next to Apply.
- Removed the superseded sheet-grid UI (SheetView/SheetCanvas); SheetLayout +
  config-sheet.csv stay as reference data.

docs/Win32RIO: the original driver (tasgame.sys, a 32-bit kernel HID minidriver
that opened the serial port, set baud/8N1/DTR, and spoke the *identical* RIO
protocol -- AnalogRequest/Reply, Button Pressed/Released, Check/Lamp/Reset/
Version -- validating our protocol port), oemsetup.inf, RemoteDriver.doc, and the
extracted control-panel / game-controllers mockups.

~236 xUnit tests green. PLAN.md updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-06-27 19:48:14 -05:00
co-authored by Claude Opus 4.8
parent 8d2d0b71aa
commit 094637b0a4
17 changed files with 625 additions and 212 deletions
+16 -15
View File
@@ -238,21 +238,22 @@ Replaces the legacy Google-Sheet → `.data` → GIMP → Script-Fu pipeline
activation). The live `SystemParametersInfo` apply changes a user setting, so it
is gated behind config and not exercised by tests. ⏳ Optional: restore the prior
wallpaper when going dormant.
- **Mapping editor — first cut done ✅.** `RioJoy.Tray/Editor/ProfileEditorForm`
shows the cockpit as a scrollable, clickable grid that mirrors the legacy
authoring spreadsheet's **logical** layout — parsed from the sheet's CSV export
(`docs/reference/customBackground/config-sheet.csv`) by `SheetLayout`, coloured
by section. (The layout deliberately follows the sheet, **not** the wallpaper
region positions: the wallpaper drives 6 displays via VGA chroma-channel
splitting, so its label positions stack and don't reflect the physical cockpit.)
Clicking an address cell edits its label and action/modifiers/lamp; the `iRIO`
word is read/written through `ButtonBinding``RioMapEntry.Create` (round-trip
tested) — no hex bit-twiddling. The value field is a **context-sensitive picker**:
keyboard actions pick a key by name (`KeyCatalog` VK names), joystick a Button N,
hat a direction, mouse/RIO-command the enum name; modifiers enable only for
keyboard. Opened from the tray ("Edit profile…"); Save persists the profile.
⏳ Still to refine: grouping a button's two bank addresses (edit once → both),
and clone-from-existing.
- **Mapping editor — done ✅ (cockpit control-panel layout).**
`RioJoy.Tray/Editor/ProfileEditorForm` shows the cockpit as a clickable control
panel matching the **original Win32 RIO design** (docs/Win32RIO/, by FASA/Michel
Lowrance): five MFD clusters, four board columns (Throttle/Secondary/Screen/
Joystick-Hat), an encoder-gauge strip, and the two later-added 4×4 keypads
(rendered without lamps). The layout (`RioJoy.Core.Editing.CockpitPanel`, which
places every address 0x000x47 / 0x500x6F exactly once, unit-tested) deliberately
follows the design, **not** the wallpaper positions (those are a VGA chroma-split
display artifact). Lamp buttons shade Off/assigned; keypads are neutral. Clicking
a button edits its label and action/modifiers/lamp; the `iRIO` word goes through
`ButtonBinding``RioMapEntry.Create` — no hex. The value field is a
context-sensitive picker (keyboard key by name via `KeyCatalog`, joystick Button N,
hat direction, mouse/RIO-command enum); modifiers enable only for keyboard.
Opened from the tray ("Edit profile…"); Save persists the profile.
⏳ Still to refine: live encoder gauges, showing each button's assigned key as a
caption, grouping a button's two bank addresses, and clone-from-existing.
- The unified profile JSON supersedes both `RIO.ini` and the Google Sheet, with
importers for each.
- To confirm at Phase 7: target wallpaper resolution(s); static wallpaper vs.