Jump to content

DOF and MJR's PinVol


Recommended Posts

Hi guys,

I have a KL25Z with Pinscape Controller v2 and a genuine Ledwiz bought in august 2015 in my pincab.

I wanted to use MJR's PinVol software that let users map a Shift button (i.e. Extra Ball) with other cab buttons to give a Volume + and Volume - function (with automatic save & reload per ROM basis).

But Shift function didn't work for me because my Pinscape Controller was seen as a joystick and not a keyboard.

Talked about that issue with MJR who updated Pinscape firmware and now it is working good.

Except when I launched any table with any VP exe that would quit by itself without any error message.

MJR answered :

"You're running into the well-known LEDWIZ.DLL crash. When Pinscape presents a keyboard interface alongside an Ledwiz interface, it makes the stock LEDWIZ.DLL crash when any program (such as DOF) loads it.

As you discovered, one workaround is to use a NON Ledwiz USB ID.

But there's a better solution : use the fixed versions of DOF and Ledwiz.dll here : http://mjrnet.org/pinscape/dll-updates.html. With those installed, you can go back using an Ledwiz-compatible USB ID, which allows using the Ledwiz compatibility features."

OK it's working great now, MJR DOF build doesn't need ledwiz.dll anymore in the DOF config folder but his build doesn't include latest DJRobX fixes for modulated solenoids.

If I stay on DJ's DOF build + Ledwiz.dll, my buttons LED (connected on my genuine Ledwiz) won't blink smoothly as before, they rather switch on and off.

My Coin button LED, instead of staying fixed while in game, will switch on and off "anarchically". 

So if I want to use DJ's DOF build, I have to revert back my KL to a previous firmware and loose PinVol functionnality.

So maybe it should be great if we had a unified DOF build, including MJR, DJRobX and Westworld fixes and features ?

Thank you and happy new year ;)

 

Link to comment
Share on other sites

The glitchy LedWiz behavior is quite complex.  SwissLizard knows about it, and I've looked into it quite a bit, but unfortunately there's no good solution.  Here's what we know:

1.  The LedWiz itself is the actual source of the bug.  As far as we can tell, it has a poorly written USB interface in its firmware that doesn't properly protect its packet buffer against concurrent read/write access.  It seems that if the host sends a new USB packet at the wrong moment, the LedWiz will interpret PART of the new buffer and PART of the old buffer as a single packet, making a jumbled mess of the two.  This results in outputs getting turned on and off randomly, and being set to random brightness levels.

2. PinballX triggers the problem.  Exactly how it does this is a huge mystery to me, but you can verify this as follows.  Install the DOF version where you see the glitchy behavior.  Exit out of PinballX.  Launch Visual Pinball directly from the Windows desktop, load a game, run.  The LedWiz will run smoothly.

It's been reported that some other third-party software also triggers the problem.  I think someone mentioned Firefox as another trigger.  Again, I don't have any idea what these other programs are doing that affects the USB packet timing, but there's clearly something going on.

3. The only known workaround is to use the DOF "LedWiz delay time" setting.  Slowing down the USB messages reduces the likelihood of triggering the LedWiz bug; it doesn't eliminate it, but it makes it happen less frequently, so a long enough delay time makes it infrequent enough not to be bothersome.  You can experiment with different delay times to see if you can find a setting that works for you.  For a while, a 5ms delay was working pretty well on my system, but the last PinballX update seems to have broken it again even with 5ms, so it may no longer be possible to find a working setting.

4. The DOF version SHOULD make no difference in all of this, but you say that DJRobX's version is glitchy and mine isn't on your machine.  This might be because the last official SwissLizard release doesn't seem to be paying attention to the global LedWiz Delay Time setting any more.  I added code to my version to obey that.  So you might your global settings using a large enough delay time, and it's just not respected in the DJRobX build because of the base version he used.

 

Link to comment
Share on other sites

And to your main point, if DJRobX wants to publish his source code, I can integrate his changes into my version.  Alternatively, my source is already published on github, so he can integrate my updates into his version if he prefers.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...