-
Notifications
You must be signed in to change notification settings - Fork 55
Add support for PWM frames #542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
fea9e50
pwm: Add interfaces for 8-bit frames.
freezy 916bca9
pwm: Add rendering support to virtual DMD.
freezy 0a41c7d
pwm: Add gray8 -> rgb565 conversion.
freezy d694d44
pwm: Add gray8 -> rgb24 conversion.
freezy f058023
pwm: Add gray8 -> gray4/2 conversion.
freezy c6ad54f
pwm: Add gray8 -> colored gray6 conversion.
freezy 8d9d1af
pwm: Send legacy frames to colorizer but never render them.
freezy e19ef84
pwm: Cosmetics.
freezy 477c808
pwm: Fix misuse of pre-calculated colors.
freezy 25a887d
pwm: Fall back to 2-bit ID frame when PinMAME API isn't up-to-date yet.
freezy 9d689c6
pwm: Cosmetics.
freezy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,22 @@ | ||
| using System.Windows.Media; | ||
| using LibDmd.Frame; | ||
|
|
||
| namespace LibDmd.DmdDevice | ||
| { | ||
| public interface IDmdDevice | ||
| { | ||
| void Close(); | ||
| void SetColorize(bool colorize); | ||
| void SetGameName(string gameName); | ||
| void SetColor(Color color); | ||
| void ConsoleData(byte data); | ||
| void Init(); | ||
| void LoadPalette(uint palIndex); | ||
| void SetPalette(Color[] colors); | ||
| void RenderRgb24(DmdFrame frame); | ||
| void RenderGray4(DmdFrame frame); | ||
| void RenderGray2(DmdFrame frame); | ||
| void RenderAlphaNumeric(NumericalLayout numericalLayout, ushort[] readUInt16Array, ushort[] ushorts); | ||
| } | ||
| } | ||
| using System.Windows.Media; | ||
| using LibDmd.Frame; | ||
|
|
||
| namespace LibDmd.DmdDevice | ||
| { | ||
| public interface IDmdDevice | ||
| { | ||
| void Close(); | ||
| void SetColorize(bool colorize); | ||
| void SetGameName(string gameName); | ||
| void SetColor(Color color); | ||
| void ConsoleData(byte data); | ||
| void Init(); | ||
| void LoadPalette(uint palIndex); | ||
| void SetPalette(Color[] colors); | ||
| void RenderRgb24(DmdFrame frame); | ||
| void RenderGray8(DmdFrame frame, DmdFrame identifyFrame = null); | ||
| void RenderGray4(DmdFrame frame); | ||
| void RenderGray2(DmdFrame frame); | ||
| void RenderAlphaNumeric(NumericalLayout numericalLayout, ushort[] readUInt16Array, ushort[] ushorts); | ||
| } | ||
| } |
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| using System; | ||
| using LibDmd.Frame; | ||
|
|
||
| namespace LibDmd.Input | ||
| { | ||
|
|
||
| /// <summary> | ||
| /// A source that is able to deliver 8-bit grayscale frames without conversion. | ||
| /// </summary> | ||
| public interface IGray8Source : ISource | ||
| { | ||
| /// <summary> | ||
| /// Returns an observable that produces a sequence of 8-bit frames. | ||
| /// | ||
| /// The returned byte array contains Width * Height bytes, with values | ||
| /// between 0 and 255 for every pixel. | ||
| /// </summary> | ||
| /// <param name="dedupe"></param> | ||
| /// <remarks>When disposed, frame production must stop.</remarks> | ||
| IObservable<DmdFrame> GetGray8Frames(bool dedupe); | ||
| } | ||
| } |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.