Repository navigation
display: add RGB565 frames - #636
Merged
Merged
Conversation
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.
[Medium impact] The follow-up changes appear safe to merge; the previous finding is fully addressed. SummaryAdds RGB565 display frames for game engines and plugins, with RGB24 expansion for Unity displays.
No new actionable issues found in the follow-up changes. Reviews (2) · Last reviewed commit: "display: test the RGB565 expansion byte ..." · Reviewed by Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 = 32for plugins, mapped both ways inGamelogicPluginResources.PluginDisplayFrame.BytesPerPixelgives the bytes per pixel for each encoding; the frame constructor and the stride use it.DotMatrixDisplayComponentdraws RGB565 frames, without a palette. The segment display rejects them, like the other pixel formats.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:
Rgb565FramesAreTwoBytesPerPixelin 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.