Skip to content

reMarkable 2 support: AppLoad windowed mode and xochitl companion mode#24

Closed
icetingyu wants to merge 1 commit into
MaximeRivest:mainfrom
icetingyu:rm2-support
Closed

reMarkable 2 support: AppLoad windowed mode and xochitl companion mode#24
icetingyu wants to merge 1 commit into
MaximeRivest:mainfrom
icetingyu:rm2-support

Conversation

@icetingyu

@icetingyu icetingyu commented Jul 11, 2026

Copy link
Copy Markdown

Note on overlap: #1, #4 and #19 already propose the RM2 qtfb/windowed groundwork (geometry, FBFMT_RM2FB, ARM32 init offsets, build scripts) — #19's runtime-selected approach is closest to this one. Rather than competing on that ground, the parts of this PR that are not covered by any of them are: the xochitl companion mode, the CJK reply pipeline, the ARM32 input event parsing fix, and the e-ink re-drive. Happy to rebase those increments onto whichever base PR the maintainer prefers.

This ports the diary to the reMarkable 2 (tested on firmware 3.28.0.162), alongside the existing Paper Pro support. Everything is runtime-selected; the Paper Pro paths are untouched.

What's in it

Windowed mode (AppLoad/qtfb) — RM2 framebuffer format and geometry (1404x1872 RGB565), and ARM32 wire-format handling: the qtfb server packs message payloads at pointer-width offsets, so the init reply and input events parse differently on 32-bit (input events are 24 bytes with payload at offset 4 — they get silently dropped by the 64-bit parse).

Companion mode (no AppLoad needed) — riddle runs beside stock xochitl: it reads the Wacom digitizer in shared (non-grab) mode, and replays Tom's generated strokes back through the same device, so the stock notebook records the reply as ordinary ink. Injection pauses whenever the user's real pen comes near the panel (hover included) so the two event streams never interleave into stray ink.

CJK replies — Zhang-Suen thinning destroys dense ideographs (missing strokes), so CJK text is rasterized per character and animated one glyph at a time from row-run strokes; the anti-aliasing coverage threshold is tuned so hairline strokes survive; after the reply finishes, the region is re-driven a couple of times so fast-waveform e-ink develops to full black. Reply font is Noto Sans TC (SIL OFL 1.1), resolved relative to the executable, with the embedded Dancing Script as fallback.

Update pacing — ink flushes to qtfb are coalesced at 16ms so the update socket never saturates.

Build with riddle/build-rm2.sh (cross or cargo + armv7 toolchain); appload-rm2.sh is the AppLoad entry point, start-rm2.sh/stop-rm2.sh run companion mode. README-RM2.md documents install/use/remove.

🤖 Generated with Claude Code

Ports the diary to the reMarkable 2 (firmware 3.28, 1404x1872 RGB565):

- qtfb: RM2 framebuffer format, ARM32 server message offsets (init reply
  and input events follow the server's pointer width)
- pen: query digitizer axis ranges at runtime and rotate the RM2's
  landscape Wacom axes into portrait screen space; optional shared
  (non-grab) mode; PenWriter can replay generated strokes through the
  Wacom device so stock xochitl records them (companion mode), with
  real-pen detection that pauses injection while the user's pen is near
- CJK replies: per-character rasterization animated one glyph at a
  time, row-run strokes instead of Zhang-Suen thinning (which destroys
  dense ideographs), coverage threshold tuned for thin strokes, and a
  post-reply re-drive that develops fast-waveform ink to full black
- fonts: loads a Traditional Chinese font (Noto Sans TC, SIL OFL 1.1)
  resolved relative to the executable, falling back to the embedded
  Dancing Script
- coalesced qtfb flushes (16ms) to avoid saturating the update socket
- RM2 build and launch scripts, AppLoad bundle manifest
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@icetingyu

Copy link
Copy Markdown
Author

Closing for now — will rework this against the existing RM2 PRs (#1/#4/#19) rather than adding a fourth overlapping port.

@icetingyu icetingyu closed this Jul 11, 2026
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