Skip to content
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

dmd-ext 2.3.0 not working with zedmd #516

Open
jueank opened this issue Nov 29, 2024 · 19 comments
Open

dmd-ext 2.3.0 not working with zedmd #516

jueank opened this issue Nov 29, 2024 · 19 comments

Comments

@jueank
Copy link

jueank commented Nov 29, 2024

Please see below for the conversation that I had in the #help-zedmd channel of the "Colorizing DMD and Serum" Discord server.
After some assistance & feedback from Zedrummer & others, it turned out, that my config and installation is ok. We tried multiple versions of pinmame to sort out issues. dmd-ext 2.3.0 is not working with zedmd (3.6.0 & 4.0.2) while dmd-ext 2.2.0 is working fine.

Yesterday a friend of mine faced the very same issue. He was doing a fresh installation on his own (setting up a new PC for pinball). He also had to go back to 2.2.0 in order to get zedmd running.

Here is the first part of the discord conversation: (https://discord.com/channels/1053573768536150017/1088882361225195690/1308530343359545418)
When starting a ROM based table, ZeDMD shows the logo for 1/2 second, then goes blank and a few seconds later, VPX terminates before being able to show the table on screen. Everything is working fine with ZeDMD 4.0.2 and dmdext 2.2.0. All in all, I installed dmdext 2.3.0 four times, always trying something different and was going back inbetween to 2.2.0.
I'm using VPX 10.8 RC5 GL 64 bit, VPinMAME 3.6.0-998 64 bit.
I have renamed the altcolor folder to avoid loading any colorization file.
I have used my untouched dmddevice.ini as well as the one from dmdext Github project.
Also, I tried a minimized dmddevice.ini like this - one time with giving the port, one time without:
[global]

[zedmd]
enabled = true
brightness = 4
rgborder = 3
port = COM3
I also unplugged my other ESP (Wemos D1), which controls the LED matrixes over COM6.
I might be mistaken, but I think there is something broken with either dmdext or ZeDMD. I would assume that for my otherwise working setup with dmdext 2.2.0, I see no reason why this should now fail with dmdext 2.3.0. I will eventually file an issue for dmdext later.

@freezy
Copy link
Owner

freezy commented Nov 29, 2024

Did you try the latest v4.1.0 libzedmd that seems to fix comm issues with the device?

@jueank
Copy link
Author

jueank commented Nov 29, 2024

Not sure if I can follow you properly.
libzedmd? There is version 0.7.5 (https://github.com/PPUC/libzedmd/releases) But this is built into dmddevice64.dll, not a separate file in the dmd-ext delivery.
Or did you mean an updated firmware for zedmd after 4.0.2? Where would I get it? There is only 4.0.2 as an official release.
Maybe I'm confused...

@jueank
Copy link
Author

jueank commented Nov 29, 2024

Markus Kalkbrenner mentioned zedmd 4.1.0 recently in one of his YT videos, but I don't think it's publicly available...
https://www.youtube.com/watch?v=gkqTqCoOxNI

@PastorL69
Copy link

PastorL69 commented Nov 29, 2024

You have a 128x32 zedmd using USB right?

Then get these files:
ZeDMD-128x32
libzedmd-0.7.6-win-x64-Release

I see that you are trying to set the brightness values and rgb values manually. Avoid this for now to ensure you get it to work first.
Also, delete your dmddevice.ini and let it generate a new one using the latest dmdext 2.2.3. Then simply enabling the [zedmd] in the .ini file should be sufficient for it to work.

@jueank
Copy link
Author

jueank commented Nov 29, 2024

Thank you for the quick assistance.
I will try the linked zedmd firmware version from the github action runs, for the sake of checking if the reported issue is really the same.
Besides that I was mainly after letting you know, that there is a fix needed for everyone, not just me. I'm good if there will be a public release of zedmd in the near future.
@PastorL69 What do you mean with setting brightness & color order manually? I have microswitches on my custom PCB for that, but the documented way to set this is through these ini keys. How would I set it else?

@jueank
Copy link
Author

jueank commented Nov 29, 2024

Just tried out the preliminary zeDMD 4.1.0 firmware from thelink above with dmd-ext 2.3.0.
It shows the same error as before. Terminating, when starting a rom though VPinMAME (Setup64.exe).
I'm going back to 2.2.0.

@freezy
Copy link
Owner

freezy commented Nov 29, 2024

Did you update ZeDMD's firmware, too?

@jueank
Copy link
Author

jueank commented Nov 29, 2024

Yes, of course. (I used zeDMDUpdater and picked the bin file manually)
zeDMD firmwares 3.6.0, 4.0.0 - 4.0.2, 4.1.0 (preliminary build from the link above). All of them work properly with dmd-ext 2.2.2 64bit. None of them work with dmd-ext 2.3.0 64bit. I have tried several builds of VPinMAME (998, 1112, ...)

In want to point out that there is really little software involved. It's Setup64.exe & the vpinmame DLL plus the dmddevice64.dll in order to test if a ROM is working and showing something on the DMD. (VirtualDMD is working btw.)
Only the dmddevice64.dll is changed (2.2.2 -> 2.3.0). (But I don't need to tell you that)

When using dmd-ext 2.3.0, VPinMAME terminates after the initialization of zeDMD. You can see the Logo + colored border for 1/2 second. The moment, the first content from the rom is supposed to appear on the DMD, the DMD turns black and the windows process (Setup64.exe) or VisualpinballX.exe crashes.

My technical understanding is that irrespective of the zeDMD firmware, dmd-ext/VPinMAME should never crash, right? Even if I have a toaster connected to COM3, dmd-ext should continue to run. So I assume there must be something fixed in dmd-ext, not the zeDMD firmware. Please correct me if I'm wrong.

Also, if there is something wrong on my side, I'm willing to learn what it is. But since dmd-ext 2.2.2 runs just fine, I cannot imagine what this should be. We can also chat on Discord (see the link above, you will find me).

@PastorL69
Copy link

PastorL69 commented Nov 29, 2024

@PastorL69 What do you mean with setting brightness & color order manually? I have microswitches on my custom PCB for that, but the documented way to set this is through these ini keys. How would I set it else?

You set them via the custom PCB like you mentioned.
For now just put a ; infront of all settings in the .ini

If possible add some dmddevice.log files. It's the only way for us to attempt to help you. A screenshot of your entire vpinmame directory with all files would also be nice.
Sucks that we can't get it to work for you, but it works fine for many including myself.

@jueank
Copy link
Author

jueank commented Nov 29, 2024

dmddevice.log attached.
I can send you the vpinmame folder. But it's a fresh install from the github repository. There is nothing special in it.
DmdDevice.log
Why did you linked to libzedmd-0.7.6? Does ext-dmd have a dependency to it at runtime? I copied libserialport64.dll and zedmd64.dll plus the 2 zedmdtest.exe into the vpinmame folder, but that did not made any difference.
Btw. zedmdtest.exe is also terminating after printing this to the console:

C:\Visual Pinball\VPinMAME>zedmd_test_s.exe
Searching for ZeDMD...
ZeDMD found: device=COM3, width=128, height=32
ZeDMDComm run thread starting

@freezy
Copy link
Owner

freezy commented Nov 29, 2024

The data goes: VPM (or whatever host) -> dmdext -> zedmd.dll -> usb -> zedmd firmware -> panel

Anything between zedmd.dll and the panel are potential error sources in your setup, 2.2.0 uses a different zedmd.dll for example. I'm assuming that the virtual display is working fine even in your setup, that leaves the zedmd.dll -> ... -> panel part that I can only partly control.

According to your log, it seems to hang at the ZeDMD initialization. I would go ask on the zedmd discord, I'm sure @mkalkbrenner or @zesinger will have a look.

@freezy
Copy link
Owner

freezy commented Nov 29, 2024

Oh, and if it crashes and the log doesn't contain a stack trace, then that's definitely a crash within zedmd.dll.

@PastorL69
Copy link

dmddevice.log attached. I can send you the vpinmame folder. But it's a fresh install from the github repository. There is nothing special in it. DmdDevice.log Why did you linked to libzedmd-0.7.6? Does ext-dmd have a dependency to it at runtime? I copied libserialport64.dll and zedmd64.dll plus the 2 zedmdtest.exe into the vpinmame folder, but that did not made any difference.

Make sure you copy everything over from the libzedmd zip file. Just drag and drop into the vpinmame folder.

@jueank
Copy link
Author

jueank commented Nov 30, 2024

Are the libzedmd files needed at all? They are mentioned nowhere. Not in the installation instructions, nor are they part of the dmd-ext .msi or .zip file. No other user would have these files in his dmd-ext installation.....

@freezy
Copy link
Owner

freezy commented Nov 30, 2024

They are bundled in dmdext.exe and dmddevice.dll. However, if you place zedmd.dll along those files, the external DLL will take precedence when loading.

@PastorL69
Copy link

OK so I looked into your previous dmddevice.ini file you supplied in the discord, tried it myself and.. works fine.

At this point I think that you are not flashing the ZeDMD correctly. It must 100% be related to the ZeDMD firmware now, almost no doubt.

Can you share how you flash it? Does the 4.1.0 appear on your zedmd at all?

@jueank
Copy link
Author

jueank commented Nov 30, 2024

zeDMDupdater, so esptool.
Yes, the version number appears.
I also tried the WiFi firmware version (4.0.2). I was not using it before, because I don't intend to use Wifi.
With the Wifi firmware, zeDMD stopped working in the middle of playing a table.
I went back to the regular 4.0.2 for now.
But I will make myself familiar with esptool and use it through the commandline. Will do a verify after writing the firmware. And then - is there a dedicated section in the flashmem to store data, like the brightness & color order value? Maybe erasing that before flashing would also help.

But then again - I'm still refusing to believe some of that stuff. I flashed 4.0.2 now multiple times. And this is working just fine (with dmd-ext 2.2.2). So, why should flashing of 4.1.0 fail, but 4.0.2 succeed every time?

@PastorL69
Copy link

PastorL69 commented Nov 30, 2024

You can hard reset your ESP32 through the command line too, might be worth a shot.

esptool --chip esp32 erase_flash

Flash the 4.1.0 firmware through the command line too, and don't forget that 4.1.0 can only be used with the latest libzedmd 0.7.6 files I shared.
If you have more questions about this it's best to ask @mkalkbrenner from now on.

Flashing command example:

C:\Users\Administrator\Desktop\ZeDMD_Updater1.7\esptool.exe --chip esp32 --port COM3 write_flash 0x0 C:\Users\Administrator\Desktop\ZeDMD.bin

@jueank
Copy link
Author

jueank commented Nov 30, 2024

Hello, I wanted to briefly report on the latest status:

  • I have erased the ESP as described above and flashed the zeDMD 4.1.0 firmware via command line.
  • dmd-ext 2.3.0 still does not work with zeDMD 4.1.0 when using the libzedmd files! (I have unpacked ALL of them into the VPinMAME directory).
  • dmd-ext 2.2.2 also does NOT work with zeDMD 4.1.0 as long as the the libzedmd files are present in the VPinMAME directory. (dmd-ext 2.2.2 probably also uses the external DLLs instead of the internal ones).
  • dmd-ext 2.2.2 works FINE with ZeDMD 4.1.0 if the libzedmd files are removed from the VPinMAME directory!

Thank you for your time and patience! I filed this bug because I assumed it was a common problem and other people besides me would benefit from fixing it. It is not (and was not) about personal support (I would not have bothered you with that).

I still think it's a general problem (in libzedmd) - in my opinion, that's obvious to see in my summary above. I'll let @mkalkbrenner know.

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

No branches or pull requests

3 participants