Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: LEDWIZ and PC Games  (Read 2789 times)

0 Members and 1 Guest are viewing this topic.

Antropus

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 61
  • Last login:March 14, 2017, 01:09:19 am
    • Antropus' Online Portfolio
LEDWIZ and PC Games
« on: December 09, 2013, 03:28:34 pm »
Hi,
 
I'm starting this topic to gather information from any of our "LedWizards" out there about the best approaches to get contactors and LEDs to fire during games that are just not ready for it.
 
In the future, this topic might serve as a good resource for anyone looking for this kind of info, similarly to this topic I started months ago that is now helping many people to have their plasma DMDs running in their cabs, thanks to the incredible info posted by some very smart people in this forum: http://www.vpforums.org/index.php?showtopic=23249
 
Here's the info I gathered so far:
 
LIGHTS:
For PC games (Pinball FX2 and Pinball Arcade, also any VP or FP table that doesn't support it yet), a nice way to fire the RGBs is by using the ability to translate sounds into light pulses, similarly to what Winamp does.
 
The options we have to do so are:
a) LEDBlinky - http://www.ledblinky.net/ledblinky.htm
or
b) LuminAudio Engine ( http://forum.arcadecontrols.com/index.php?topic=69607.msg711032#msg711032 )
 
Either can be used to translate the game sounds into a light show. It works very nicely if you set them well. They are not linked to events, but rather sound frequencies. Naturally, different sounds will cause different lights to turn on and off, but not only that, the music itself will be taken into consideration (I wished there was a way to drive everything by sound FX only, separated from the music, but this is just wishful thinking).
Using those programs you can actually select other toys to be included to the light show. You can set a wiper motor or a shaker to go off at certain frequency, for example, which can be cool, but can also get a little "messy" .
 
FLIPPER CONTACTORS:
I'm still looking for a solution for it. I really don't want to go the route of wiring things with optos, because I believe there's a simpler (and more controllable) solution out there using software only.
I know that VBScript used by VP works wonders, firing all kinds of lights and toys simultaneously, flippers hold as you hold the push buttons etc.
 
For this reason alone I believe that any programmer here could come up with a little stand alone app that could be used to fire the flippers exactly the way it happens while playing VP or FP,for example.
The advantage is that this little app could be launched at the start of any system that doesn't support ledwiz, like the PC games mentioned above. The lack of mechanical sounds and force feedback really kills the whole experience, unfortunately.
 
Since I'm not a programmer, I tried different approaches, but always hit a wall.
I tried calling VBScripts using cscript.exe from an ahk script for example. That resulted in incredible lag and also limitations when it comes to pressing and holding the push buttons, since the KeyWait command in ahk works only for one button at the time. So, if I press both push buttons, only one flipper will fire and hold, while the other will have to wait in order to proceed to the next command.
 
Randy from LedWiz told me to use the clipboard method, called from an ahk script. I tried it and although it works quite fast, with almost no lag at all (much faster than using cscript+vbs file), the clipboard itself, depending on the speed you press the push button, starts missing commands and gives errors about not being able to retrieve the clipboard information. I tried ledwiz87.exe set to monitor the clipboard for that and sent the commands to the clipboard (^c). The problem was again getting ahk to send two commands at same time, with the ability to press and hold buttons. No luck.
 
I also tried using LWSend.exe to turn on the contactors as well, but turns out that under the hood seems like LWSend uses the exact same clipboard method, because the behavior and error messages were exactly the same. Also, the whole things about pressing and holding the pushbutton to keep the contactor on needs something like GetKeyState or KeyWait (ahk) and seems like neither handle two inputs at same time, as they only recognize the first pressed button and only execute the rest of the command on its release.
 
My question here is: how difficult would it really be to create a little app (or a compiled ahk that actually worked), that could send simultaneous commands to the ledwiz, supporting press and hold of multiple buttons?
I'm so surprised that after researching all the different related forums I wasn't able to find a solution for it yet, other than "use optos and wire directly to the push buttons" or "use (the not so ideal) the clipboard method driven by ahk".
 
What do you guys think? Any directions?
 
Thanks!
-Kris

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Today at 11:06:50 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: LEDWIZ and PC Games
« Reply #1 on: December 09, 2013, 06:02:59 pm »
Well I've been slowly drifting away from my arcade related projects, but mamehooker + troubleshooter 2 is the solution to all of those problems. 

The current build of mamehooker doesn't support it, but in the next release (assuming I ever get to it) you can send commands via TS2 to mamehooker to control outputs.  Since TS2 is a memory hacking program... you simply figure out the address in memory of the "whats-it" you want to control a light and setup a ini for it in ts2. 

Antropus

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 61
  • Last login:March 14, 2017, 01:09:19 am
    • Antropus' Online Portfolio
Re: LEDWIZ and PC Games
« Reply #2 on: December 09, 2013, 08:31:35 pm »
Thanks for your reply, Howard! That sounds like an interesting way to do it. Waiting for the next version.

-Kris