Conversation
…D and ZeDMD in parallel
|
@freezy I got all modes to work. It would be nice if you can review the PR and ideally merge it. |
|
I tried this out after updating my ZeDMD and am getting errors. "No external DMD driver found" The old dll is working just fine. I'm hoping to iron out the issues when I run non-colorized stern roms. |
|
@endeemillr You need ZeDMD firmware v3.4.1 and ensure to have the right settings in DmdDevice.ini. @freezy I think the PR is ready to be merged. Maybe @zesinger can post if this version works for him. For everyone who wants to test it, I built these DLLs: |
|
Thanks! I found a com= (blank) line that I commented out and that seemed to do the trick. Would it be possible to share a new .ini file? I've pasted what I could find in the discord, but must be missing something. My Stern 16 shade dmds still act strange. I can control them a little, but usually the main text goes black, and I have to do a full restart to make any color changes effective,and usually only showing in the Stern logo page. |
|
@endeemillr the DmdDevice.ini changes are part of this PR. You can see them here: Ideally you contact me on discord and we can go through your issues. |
|
Awesome! I'll go through it in the next days. |
|
@endeemillr The last commit should fix custom colors for 16 color games. |
|
Here's a build for those who want to test: |
|
@endeemillr reported on discord, that the 16 colors custom palette is working now. |
|
@freezy it would be great if you find some time to review and ideally merge this PR. |
|
Well, you keep adding commits, so I'm assuming it's not for prime time yet? Which .exe do you mean? |
|
@freezy We're done :-) I don't use PinUp Popper. But I have been told that it uses DmdDevice.exe which I don't build for the testers. |
|
Ah, dmdext.exe, gotcha. I'll try to have a go at it tomorrow. |
|
@zesinger also tested the current version of the PR. |
|
@freezy no code change. I just updated libzedmd to the latest version v0.5.0. |
freezy
left a comment
There was a problem hiding this comment.
Thanks! Sorry it took so long to review.
I figure you'd like to have another release after that?
| // 2 colors (1 bit) is not supported by ZeDMD. | ||
| if (numOfColors == 2) { numOfColors = 4; } | ||
|
|
||
| while (numOfColors > 0) { |
There was a problem hiding this comment.
I don't understand how this loop works and its break conditions. Any way to simplify?
There was a problem hiding this comment.
Maybe this feature should be elsewhere in dmdext. But it is the bugfix for @endeemillr report.
it converts a 4 color custom palette into a 16 and a 64 color custom palette. And it sets all, the 4 color and the 16 color and the 64 color palette in ZeDMD which could hold different palettes at the same time.
So it works if DMDext only calls SetPalette() once and then switches between Gray2, Grey4 and Grey6 for different frames.
There was a problem hiding this comment.
This is lacking too much readability for me. How about this? I assume the _pZeDMD pointer doesn't change during the loop?
if (_pZeDMD == IntPtr.Zero) {
return;
}
if (numOfColors != 4 && numOfColors != 16 && numOfColors != 64) {
return;
}
while (numOfColors <= 64) {
var palette = ColorUtil.GetPalette(colors, numOfColors);
var pos = 0;
foreach (var color in palette) {
paletteBuffer[pos++] = color.R;
paletteBuffer[pos++] = color.G;
paletteBuffer[pos++] = color.B;
}
ZeDMD_SetPalette(_pZeDMD, paletteBuffer, numOfColors);
numOfColors *= 4;
}There was a problem hiding this comment.
I agree, this version of the code is easier to read and understand.
No problem.
Yes, another DMDext release would be great. |
|
@freezy I addressed all your concerns. I think the code looks much better now. |
|
If you give me write access to PPUC/dmd-extensions, I'll push some cleanup that you can test before we merge. |
@freezy access granted |
|
Thanks! Pushed my changes. The only remaining part now is the rewrite of the palette function. Did you have a chance to have a look? |
|
@freezy I tested you changes. ZeDMD and ZeDMD HD are working. (Actually, I didn't change the code back again after my experiments to let ZeDMD HD inherit from ZeDMD. So you're changes are correct and simplify the code.) |
|
@freezy I refactored SetPalette() and tested it with Avatar. |
|
So, I think everything is addressed now. |
|
All good, thanks for bearing with me! |
This eases the code within DMDext and avoid the redundant implementation of new features.
libzedmd is the platform independent communication library for ZeDMD which is also used by PPUC and VPX Standalone.