Skip to content

display: add RGB565 frames - #636

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

freezy merged 2 commits into
masterfrom
feat/rgb565-frames

Conversation

@freezy

@freezy freezy commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Adds RGB565 as a display frame format, for gamelogic engines whose DMD is RGB565 to begin with. Colour DMD hardware and dmdext take RGB565 better than RGB24, so these frames can now reach them as they are instead of being widened to RGB24 on the way.

  • DisplayFrameFormat.Dmd565: two bytes per dot, little-endian, red in the top 5 bits (the same layout as LibDmd's RGB565).
  • DisplayEncoding.Rgb565 = 32 for plugins, mapped both ways in GamelogicPluginResources. PluginDisplayFrame.BytesPerPixel gives the bytes per pixel for each encoding; the frame constructor and the stride use it.
  • DotMatrixDisplayComponent draws RGB565 frames, without a palette. The segment display rejects them, like the other pixel formats.
  • Consumers only get RGB565 if they list it in Accepts, so existing plugins keep getting what they got before.

The DMD plugin's support is in VisualPinball/VisualPinball.Engine.DMD (feat/rgb565-frames). It pins the Engine release this PR produces, so this one goes first.

Tests: Rgb565FramesAreTwoBytesPerPixel in VisualPinball.Plugins.Test, which passes along with the rest of the plugin tests (111 passed, 1 skipped, as before). The packages compile in the HDRP and URP players.

Gamelogic engines can send DMD frames as Dmd565, two bytes per dot, little-endian with red in the top 5 bits, which is what colour DMD hardware and dmdext take. Plugins see them as DisplayEncoding.Rgb565. The dot-matrix display draws them without a palette.
@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; the previous finding is fully addressed.

Summary

Adds RGB565 display frames for game engines and plugins, with RGB24 expansion for Unity displays.

  • Gamelogic engines can send packed RGB565 frames to plugins that accept them.
  • Unity dot-matrix displays show RGB565 frames while segment displays reject pixel frames.

No new actionable issues found in the follow-up changes.

Reviews (2) · Last reviewed commit: "display: test the RGB565 expansion byte ..." · Reviewed by Greptile

@freezy
freezy merged commit 643247b into master Nov 19, 2026
18 checks passed
@freezy
freezy deleted the feat/rgb565-frames branch November 19, 2026 19:34
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