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: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?  (Read 5579 times)

0 Members and 1 Guest are viewing this topic.

1UP

  • Token Junkie
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2081
  • Last login:November 11, 2014, 01:37:18 am
  • Yes, that is a joystick in my pocket.
    • 1UPArcade
So I see that there are various methods to have special versions of Mame or certain frontends light the controls that are used for a game and do fancy attract routines.  Has anyone succeeded in having Mame coin LED signals or key presses forwarded to an LED-Wiz light?  For example, could I have an LED light every time I press the Fire button?  Or when the keyboard LEDs are lit?

Thanks for any info!

1UP

Free resource for building your own rotating control panels!

My other job...


Hoopz

  • Don't brand me a troublemaker!
  • Trade Count: (+8)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5283
  • Last login:February 09, 2024, 02:36:26 pm
  • Intellivision Rocks!
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #1 on: February 26, 2010, 06:41:17 am »
Some people are always pushing the envelope....  ;)

That's a great question.  I'd suggest posting this in the software section to see if Headkaze, arzoo or another genius in there can do it.  May try one of these two:

Led Blinky - http://forum.arcadecontrols.com/index.php?topic=73905.0

or

Mame Hooker - http://forum.arcadecontrols.com/index.php?topic=69439.0

I'm interested to follow the answer too!


arzoo

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2092
  • Last login:April 14, 2024, 11:15:11 am
  • Robots WILL kill you.
    • LEDBlinky
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #2 on: February 26, 2010, 09:03:20 am »
LEDBlinky has advanced features to handle mame outputs. It can also flash buttons when pressed - but only when the FE is active. I believe another member wrote an app that can light each button as it's pressed - I did a quick search but could not find it.
Robots will kill you.



Arcade Addiction

Havok

  • Keeper of the __Blue_Stars___
  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4522
  • Last login:October 22, 2023, 09:14:44 pm
  • Insufficient facts always invite danger.
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #3 on: February 26, 2010, 11:02:51 am »
Yeah - I saw a Youtube video I think where someone did that, but can't remember who did it...

Thenasty

  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4414
  • Last login:Yesterday at 08:36:42 pm
    • Thenasty's Arcademania Horizontal/Vertical monitor setup.
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #4 on: February 26, 2010, 12:01:43 pm »
For example, could I have an LED light every time I press the Fire button?  Or when the keyboard LEDs are lit?

Thanks for any info!

1UP

Sounds like you could do this just with HARDWARE. Hook up the switch from the FIRE button (maybe using some sort of a OPTO-ISOLATOR, so it wo'nt put any juice to your encoder) to light a BULB (or anything) when push (at anytime even in FE). Hope you got I am trying to bla bla bla  ;D
Thenasty's Arcademania Horizontal/Vertical setup.
http://forum.arcadecontrols.com/index.php?topic=26696.0

Free VGA Breakout Cable
http://forum.arcadecontrols.com/index.php?topic=38228.0

Ultimate All in One Coin Mech write up (Make your own)
http://forum.arcadecontrols.com/index.php?topic=19200.0

1UP

  • Token Junkie
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2081
  • Last login:November 11, 2014, 01:37:18 am
  • Yes, that is a joystick in my pocket.
    • 1UPArcade
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #5 on: February 26, 2010, 01:45:32 pm »
Thanks, I will check out LED Blinky and Mame Hooker.  I could probably do the button light thing mechanically...but to tell the truth that is not really what I am after.  While I would still like to have the coin slots blink in Pac-Man or get the skill level buttons to flash in Space Ace and such, the end goal is really to use this to send inputs to my Happ solenoid controller board.

The board itself is made to fire the solenoids whenever the trigger is pulled, but since I eventually plan to hack Dave Widel's DMAME williams driver to control the solenoids for T2, I need to make them software controllable.  Since the board is set up to hook directly in line with any unknown generic machine's Start, Coin, and Trigger inputs as a retrofit, I'm pretty sure it's already properly isolating the solenoid electronics from the switch inputs.  So my only worry is how to get those inputs out of Mame on demand...

Free resource for building your own rotating control panels!

My other job...


arzoo

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2092
  • Last login:April 14, 2024, 11:15:11 am
  • Robots WILL kill you.
    • LEDBlinky
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #6 on: February 26, 2010, 04:40:58 pm »
Thanks, I will check out LED Blinky and Mame Hooker.  I could probably do the button light thing mechanically...but to tell the truth that is not really what I am after.  While I would still like to have the coin slots blink in Pac-Man or get the skill level buttons to flash in Space Ace and such, the end goal is really to use this to send inputs to my Happ solenoid controller board.

The board itself is made to fire the solenoids whenever the trigger is pulled, but since I eventually plan to hack Dave Widel's DMAME williams driver to control the solenoids for T2, I need to make them software controllable.  Since the board is set up to hook directly in line with any unknown generic machine's Start, Coin, and Trigger inputs as a retrofit, I'm pretty sure it's already properly isolating the solenoid electronics from the switch inputs.  So my only worry is how to get those inputs out of Mame on demand...

I think you'll need to use Mame Hooker and some other custom software to communicate with the Happ controller board. LEDBlinky is only good for lighting LEDs  ;)
Robots will kill you.



Arcade Addiction

1UP

  • Token Junkie
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2081
  • Last login:November 11, 2014, 01:37:18 am
  • Yes, that is a joystick in my pocket.
    • 1UPArcade
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #7 on: February 26, 2010, 04:53:15 pm »
I think you'll need to use Mame Hooker and some other custom software to communicate with the Happ controller board. LEDBlinky is only good for lighting LEDs  ;)

Hmm...wouldn't you be able to put a transistor in place of the LED to act as a switch?  I'd heard that the LEDwiz can handle outputs other than LEDs.  All I really need is a closed circuit that acts like a button press.

Free resource for building your own rotating control panels!

My other job...


1UP

  • Token Junkie
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2081
  • Last login:November 11, 2014, 01:37:18 am
  • Yes, that is a joystick in my pocket.
    • 1UPArcade
So very close!  After a few emails with Randy I've got the LED-Wiz triggering the solenoid board via LEDBlinky!  Rapid fire recoil baby!  :applaud:  I feel the final breakthrough (or break down?) will happen tomorrow, when I have a chance to mess around with Mame Hooker, hopefully getting some outputs from T2.  Now I need sleep...my brain is too tired and the MH docs make my brain hurt.
« Last Edit: March 07, 2010, 07:55:43 am by 1UP »

Free resource for building your own rotating control panels!

My other job...


shilmover

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 533
  • Last login:September 25, 2018, 12:36:59 am
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #9 on: November 27, 2010, 10:03:58 pm »
So very close!  After a few emails with Randy I've got the LED-Wiz triggering the solenoid board via LEDBlinky!  Rapid fire recoil baby!  :applaud:  I feel the final breakthrough (or break down?) will happen tomorrow, when I have a chance to mess around with Mame Hooker, hopefully getting some outputs from T2.  Now I need sleep...my brain is too tired and the MH docs make my brain hurt.

How did you get this going?
My projects...

Finished:  Stargate (only 'cause I got it that way)
In progress:  Tron, 48-in-1 for School Auction, DKJr (currently a 60-in-1), Millipede, MAME System

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #10 on: November 27, 2010, 10:41:57 pm »
Keep us posted and please do a write up!

I have a big 'ole mounted gun that I was trying to trigger a feedback motor on a while back.
Every time I thought I had a simple solution figured out, it threw me a new curve.
One of many unfinished experiments.   :-\

1UP

  • Token Junkie
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2081
  • Last login:November 11, 2014, 01:37:18 am
  • Yes, that is a joystick in my pocket.
    • 1UPArcade

Free resource for building your own rotating control panels!

My other job...


BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #12 on: November 28, 2010, 09:52:35 am »
Thanks, but I'm trying to avoid scripts, extra configuration, etc.

The feedback motor is just a lopsided weight on a dc motor.
It just needs to spin whenever the trigger is held in.  It's currently
wired to a solid state relay with a 3v trigger point.  It works fine
if I use 5v from a gameport to trigger it, but when I use
the ground that registers a button press, the voltage drops to
2.5v and the relay doesn't activate.  I set it aside for a while because
I was afraid of damaging something.  There was a thread about
illuminating buttons when they are pressed a while back and I got
some new ideas from that, but just haven't taken the time to mess
with it.

1UP

  • Token Junkie
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2081
  • Last login:November 11, 2014, 01:37:18 am
  • Yes, that is a joystick in my pocket.
    • 1UPArcade
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #13 on: November 29, 2010, 02:32:23 am »
Sorry for the confusion.  My reply was intended to answer Shilmover's question.

Free resource for building your own rotating control panels!

My other job...


ntk

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 46
  • Last login:June 06, 2011, 12:09:59 pm
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #14 on: November 29, 2010, 03:38:16 am »
i ask the ledblinkey creator same question a month a go and this is what he told me

"LEDBlinky can flash on a button press (or joystick if it’s not analog) but only when the front-end is active. During game play the flash feature is disabled for performance reasons."

ntk

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 46
  • Last login:June 06, 2011, 12:09:59 pm
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #15 on: November 29, 2010, 03:39:16 am »
Keep us posted and please do a write up!

I have a big 'ole mounted gun that I was trying to trigger a feedback motor on a while back.
Every time I thought I had a simple solution figured out, it threw me a new curve.
One of many unfinished experiments.   :-\

check this post ( in this video i connected a 3V to the motors now i have 12v connected so it much stronger )

http://forum.arcadecontrols.com/index.php?topic=106979.msg1133493#msg1133493
« Last Edit: November 29, 2010, 03:41:36 am by ntk »

Nephasth

  • Guest
  • Trade Count: (0)
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #16 on: December 08, 2010, 07:49:07 pm »
Thanks, but I'm trying to avoid scripts, extra configuration, etc.

The feedback motor is just a lopsided weight on a dc motor.
It just needs to spin whenever the trigger is held in.  It's currently
wired to a solid state relay with a 3v trigger point.  It works fine
if I use 5v from a gameport to trigger it, but when I use
the ground that registers a button press, the voltage drops to
2.5v and the relay doesn't activate.  I set it aside for a while because
I was afraid of damaging something.  There was a thread about
illuminating buttons when they are pressed a while back and I got
some new ideas from that, but just haven't taken the time to mess
with it.

How is your relay wired up? And is your trigger switch a DPST switch? If it is you could run the relay's ground wire to the NC contact of the trigger switch, thus having the relay energized when the trigger isn't pulled. Wire the relay up so when it's energized  your feedback motor circuit is open. Then when you pull the trigger, the relay's ground will open, de-energizing the relay and sending power to your feedback motor. This should keep your relay circuit and trigger circuit seperated from one another eliminating your voltage drop.
« Last Edit: December 08, 2010, 07:56:00 pm by Nephasth »

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #17 on: December 08, 2010, 10:26:21 pm »
Still haven't got around to messing with it again, but I have this sweeeet diagram I made up at work a while back when I thought I had it figured out.
It would be the perfect diagram if it actually worked (everything but ffb works).
The gun uses LEAF SWITCHES(even though I put microswitches on my diagram), so no DT .
There was a thread about getting LEDs to light on a button press.  
I got some ideas from that, but haven't tried them yet.

Here's the last configuration I tried:


For some reason, the voltage drops from 5v to 2.5v when the trigger is pulled.
The relay needs 3V to trip (only draws 35mA max IIRC).
If I jump one of the 5V pins to the relay it works fine.
When I try to use the Button 1 pin though, I get the voltage drop.

From what I've read, I'm sure I could get it working by adding a transistor or hex inverter, but there has to be a simpler way.
I'm all over the map with various projects, I'm in no big hurry on this one.

 

« Last Edit: June 02, 2011, 04:01:39 pm by BadMouth »

Nephasth

  • Guest
  • Trade Count: (0)
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #18 on: December 08, 2010, 10:36:49 pm »
Still haven't got around to messing with it again, but I have this sweeeet diagram I made up at work a while back when I thought I had it figured out.
It would be the perfect diagram if it actually worked (everything but ffb works).
The gun uses LEAF SWITCHES(even though I put microswitches on my diagram), so no DT .
There was a thread about getting LEDs to light on a button press.  
I got some ideas from that, but haven't tried them yet.

Here's the last configuration I tried:


For some reason, the voltage drops from 5v to 2.5v when the trigger is pulled.
The relay needs 3V to trip (only draws 35mA max IIRC).
If I jump one of the 5V pins to the relay it works fine.
When I try to use the Button 1 pin though, I get the voltage drop.

From what I've read, I'm sure I could get it working by adding a transistor or hex inverter, but there has to be a simpler way.
I'm all over the map with various projects, I'm in no big hurry on this one.


What voltage are you reading from pin 2 (button 1) to pin 4 (ground) with your trigger button and relay removed?

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #19 on: December 08, 2010, 10:38:31 pm »
What voltage are you reading from pin 2 (button 1) to pin 4 (ground) with your trigger button and relay removed?

5V as far as I remember, but I think I used the outside of the joystick connector as the ground and not pin 4.
It's been a while since I worked on it.
I was trying to remember if I tried it without the switch.  I'm not sure if I did.  :(
Probably gonna have to hook it back up to troubleshoot again.
« Last Edit: December 08, 2010, 10:41:16 pm by BadMouth »

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #20 on: December 08, 2010, 10:45:35 pm »
I'll wire it back up to my computer tomorrow so I can test rather than relying on what I remember from a few months ago.

Nephasth

  • Guest
  • Trade Count: (0)
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #21 on: December 08, 2010, 10:55:13 pm »
According to your diagram, your diode is backwards. If you do have the proper 5v at the pin. Try wiring it up like the first example. If that doesn't work, move your SSR to the voltage side of the switch like in the second example.

Nephasth

  • Guest
  • Trade Count: (0)
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #22 on: December 08, 2010, 11:07:53 pm »
Also found this diagram, which would suggest wiring it up like example 2 in my previous post.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #23 on: December 08, 2010, 11:12:25 pm »
Thanks.  I'll try those.  The diode is backwards because I don't know what I'm doing, which is one of the reasons I never finished it.
Would it make sense to have the switch ground both the relay and the button circuit, but with power coming from separate pins?:


That's all I got for tonight.  I'll try and find time to hook it up tomorrow.
Thanks for the help.  :cheers:
« Last Edit: June 02, 2011, 04:03:01 pm by BadMouth »

Nephasth

  • Guest
  • Trade Count: (0)
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #24 on: December 08, 2010, 11:29:10 pm »
I think doing that will complicate things. If wiring the diode up correctly doesn't change anything with the voltage drop, you've got high resistance somewhere, chances are in the switch. You shouldn't need to bring the additional 5v from a seperate pin, the voltage from pin 2 should be adequate (if there really is 5v there). If pin 2 isn't putting out 5v you might try putting in a DPST or SPDT leaf switch for the trigger, then you can pull the 5v for the relay off of a +5 VDC pin. That's the only way to control two ciruits of different voltages with one switch. If that's what it needs, changing a switch and adding a wire should be pretty easy. Personally I have a preference of mechanical relays over SSRs.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #25 on: December 13, 2010, 08:35:17 pm »
Made some time to mess around with it some more.
Pin 2 was 5v until the button was pressed, then it drops.
Any way I tried with the relay in the loop, I still got the voltage drop and the button press wouldn't register consistently.
Ended up going this route:  EDIT-- THIS DIAGRAM IS WRONG!!!!!



It works perfectly.  Doesn't seem to be harming anything so far.
The way I had the motor wiring on my diagram wasn't correct before.
I think that's why the protection diode looked backwards.
Is it correct in this last one?

I wish I knew if the feedback motor was made to handle more than 12V.
I can't see any markings from the top and I don't want to disassemble the whole gun to find out.
It's from a Gaelco Wild Pilot game.  I haven't had any luck finding a manual.
I tested it at 24V for a few seconds and it shakes a whole lot harder.

EDIT:  After 15 minutes of playing, my hands are numb.    :P

          On to the next project!!!
« Last Edit: June 02, 2011, 04:03:55 pm by BadMouth »

Nephasth

  • Guest
  • Trade Count: (0)
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #26 on: December 13, 2010, 11:31:14 pm »
Glad you got it figured out. But by looking at your diagram, I don't see how it works as the relay is both powered and grounded with the switch in either position. I wouldn't change anything though if it's working. And if 15 mins of 12v play is enough to make your hands numb, I would say there is no need to bump it up to 24v. Have fun!  :applaud:

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #27 on: December 14, 2010, 08:04:33 am »
But by looking at your diagram, I don't see how it works as the relay is both powered and grounded with the switch in either position.

 :angry:  YOU ARE ABSOLUTELY CORRECT!!!
The diagram is wrong, the ground from the relay should be BEFORE the switch.
:sigh:  I'll fix it as soon as I get a chance.
Thanks for helping, despite me feeding bad information.  :-\

FINAL REVISION (i hope):


(I didn't use one of the other 5V pins for the relay because the USB joystick adapter I'm using only supports one joystick and doesn't provide power to those pins.  Buttons 3 and 4 work though)
« Last Edit: June 02, 2011, 04:04:44 pm by BadMouth »

BobA

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5943
  • Last login:July 11, 2018, 09:52:14 pm
  • What Me Worry?
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #28 on: December 14, 2010, 12:14:11 pm »
AFAIK the protection diode is not required for a SSR.   A zener can be used for OVP on the input but since there is no coil there is no protection needed for an inductive spike.

Nephasth

  • Guest
  • Trade Count: (0)
Re: Is it possible to get an input in Mame to trigger an ouput in LED-Wiz?
« Reply #29 on: December 14, 2010, 11:57:32 pm »
That diagram looks much better and makes sense now. I agree about the protection diode, but wasn't too sure since I have never delt with SSRs.