Skip to content

plugin: pass RGB565 frames through - #9

Merged
freezy merged 3 commits into
masterfrom
feat/rgb565-frames
Nov 19, 2026
Merged

freezy merged 3 commits into
masterfrom
feat/rgb565-frames

Conversation

@freezy

@freezy freezy commented Nov 19, 2026

Copy link
Copy Markdown
Member

Gamelogic engines can now send RGB565 DMD frames (freezy/VisualPinball.Engine, freezy/VisualPinball.Engine#636). This passes them to the render graph unchanged, so DMD hardware that takes RGB565 gets the game's own values, and outputs that only take RGB24 get them converted by LibDmd.

  • VpeGleSource gets an RGB565 source (IRgb565Source). The bridge and the managed pipeline pick gray, RGB24 or RGB565 by the frames' format and rebuild when it changes.
  • The DMD plugin and its source choices accept DisplayEncoding.Rgb565.
  • Colorizers take gray frames, so a pipeline built for colour frames has no converter and doesn't ask the producer for gray frames. Gray pipelines behave as before.
  • Frames shorter than the display are dropped before they can rebuild a pipeline or be read past their end.
  • In-scene displays still get RGB565 converted to RGB24, as before.
  • The Engine dependency moves to 0.0.1-preview.255, the release display: add RGB565 frames freezy/VisualPinball.Engine#636 will produce. Merge that one first.

Known limitation, not new: LibDmd.Core doesn't resize colour frames for fixed-size outputs (TransformRgb24 and TransformRgb565 both return the frame as is), so a source larger than, say, a 128×32 Pixelcade doesn't work for RGB24 either.

Tests: Rgb565FramesReachBothDestinations checks that an RGB565 frame reaches an RGB565 output unchanged and an RGB24-only one converted. All 31 player tests pass, and the package compiles in the HDRP player.

Frames a gamelogic engine sends as RGB565 reach the outputs as they are, so DMD hardware that takes RGB565 gets the game's own values; outputs that only take RGB24 get them converted by the render graph. Needs the engine's Rgb565 display encoding.
…cene displays on RGB24.

Colorizers take gray frames, so a pipeline built for RGB24 or RGB565 frames has no converter and doesn't ask the producer for gray. Frames shorter than the display are dropped instead of being read past their end. In-scene displays get RGB565 converted to RGB24 as before. The Engine dependency is the first release with RGB565 frames.
@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The follow-up changes appear safe to merge once the required Engine release is available.

Summary

Adds RGB565 frame delivery to the DMD plugin and strengthens the tests for both supported output types.

  • DMD outputs can receive RGB565 frames in the format games send.
  • The bridge drops incomplete DMD frames before rendering.

The Engine dependency must be released before this PR merges. No new actionable issues were found in the changes since the previous review.

Reviews (2) · Last reviewed commit: "test: compare whole RGB565 and RGB24 fra..." · Reviewed by Greptile

Comment thread Tests/Player/VpeGleSourceTests.cs Resolved
@freezy
freezy merged commit 85ae274 into master Nov 19, 2026
5 checks passed
@freezy
freezy deleted the feat/rgb565-frames branch November 19, 2026 19:40
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