Skip to content

[RM2 2/3] Port demos to the shared runtime - #3

Open
jimmystridh wants to merge 4 commits into
MaximeRivest:mainfrom
jimmystridh:pr/rm2-demo-runtime
Open

jimmystridh wants to merge 4 commits into
MaximeRivest:mainfrom
jimmystridh:pr/rm2-demo-runtime

Conversation

@jimmystridh

Copy link
Copy Markdown

What changed

  • add a compiled demo runtime for signal-aware waits, evdev discovery, display setup, CLI parsing, and pen configuration
  • discover input devices by role, query pen ranges through EVIOCGABS, and apply the panel profile's coordinate transform
  • migrate every demo to the canonical surface API, including format-safe RGB16/RGB32 pixel helpers and capability-gated color demos
  • add a portable map renderer that saves and restores only the clipped backing patch
  • build the archived vanishing-trail example for both supported targets

Why

The original demos duplicate Paper Pro-specific input names, coordinate limits, signal handling, and RGB32 framebuffer assumptions. Centralizing those boundaries makes the examples usable across RM2 and Paper Pro without weakening the core ABI.

Impact

RM2 now builds the interactive demos, including scribble, map_demo, and vanishing_trail. Color-only programs fail cleanly on monochrome panels. Input disconnection terminates the runtime instead of spinning.

Validation

  • sanitizer-backed host tests on macOS and Linux
  • Linux signalfd, evdev disconnect, timeout, and CLI boundary tests
  • strict ARMv7 and AArch64 compilation of the shared runtime
  • full RM2 SDK build of every demo

Series

This is 2 of 3 and depends on #2. GitHub requires the base branch to exist in this repository, so this draft targets main and temporarily includes the two core commits. The focused two-commit delta is jimmystridh/quill#2.

Centralize signal-aware waits, evdev discovery, surface setup, CLI parsing, and pen configuration for device demos. Build the support code as a static archive and migrate the termination probe while keeping RM2 interactive demos gated until their portable conversion.
Move every demo onto the shared runtime and canonical surface APIs, discover live pen ranges, and gate color-only programs by capability. Add a format-safe map renderer with clipped backing-patch restoration and build the archived vanishing-trail example for both supported targets.
@jimmystridh
jimmystridh marked this pull request as ready for review August 20, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant