The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: Howard_Casto on August 06, 2016, 05:23:30 pm

Title: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
Post by: Howard_Casto on August 06, 2016, 05:23:30 pm
In the recent versions of mame, the output system has changed.  To use apps built with the old system, please set "outputs" to "windows" in the mame.ini  Thanks!

Please Sticky this thread.
Title: Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
Post by: PL1 on August 06, 2016, 05:43:34 pm
The MAME Windows output system sends commands to control the hardware on the original arcade cabinet that was controlled by commands from the original game PCB.

Examples of this include the Q*bert knocker, the flashing start button LED after adding a coin in Dig Dug (0:55-1:00), and lighting up the selected mission on the Lunar Lander Mission Control Panel.

Q*bert knocker (http://www.youtube.com/watch?v=6KE8Qn5KRyc#)

Dig Dug (http://www.youtube.com/watch?v=FnF_wy-G6DY#)

Lunar Lander (http://www.youtube.com/watch?v=L-GBq2X1wpg#)

    NOTE: This should not be confused with using LEDBlinky and "controls.ini" to light RGB LED buttons.  That is an external process not controlled by MAME because the original cabinets did not have RGB LED buttons.

There are two five important questions that need to be answered:

  1. Which version of MAME broke the old output system?  0.170
(so people with earlier versions know that they can disregard this post)

  2. Which version of MAME did the old output system start working again?  0.176 (?)
(so people know that they need to upgrade to that version or newer to use the old output system)

  3. How do I use the old output system with MAME 0.176 and later?
Just set the following in mame.ini:

Code: [Select]
#
# OSD OUTPUT OPTIONS
#
output                    windows

  4. Which version of MAME added the new Windows output system?  Headkaze's patch was added in 0.175.

  5. Which version of MAME has the new Windows output system working?  To be determined.
(As mentioned here (http://forum.arcadecontrols.com/index.php/topic,62982.msg1583252.html#msg1583252) there is still testing to do and further patches to implement and software developers will need to rewrite their .DLL library files to work with the new system)


Scott
EDIT: Added probable version #s.
EDIT 2: Added more questions and examples.
Title: Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
Post by: Howard_Casto on August 06, 2016, 06:42:50 pm
I'm not sure.  The changes were never documented, so we are just stumbling upon answers.  I'll download a few versions tomorrow and see if I can figure it out.
Title: Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
Post by: PL1 on August 06, 2016, 07:28:50 pm
Thanks, Howard.   :cheers:


Scott

EDIT: I think I found a good starting point in the LEDBlinky thread.
As of mame .170 the output system is broken and LEDBlinky can't detect any mame output events. A patch has been submitted and implemented as of .176 but the interface library (between LEDBlinky and mame) is still in the process of getting updated.
Title: Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
Post by: Arbee on July 05, 2017, 02:41:05 pm
I have some news.  I used the long holiday weekend just now in the US to seriously upgrade the "network" output system.  It should now be usable in a similar way to the legacy Windows window message passing.  The changes are in Github top of tree now and will ship in 0.188.

Here's how it works:
- Connect to TCP port 8000 on the MAME machine (this is valid starting when the first info screen appears)
- MAME will say "hello =1\1" (more on the \1 later)
- To get the game's name, send "send_id = 0\1" to MAME.  MAME will reply "req_id = propcycl\1" or whatever the game's set name is.
- To get the output IDs, send "send_id = 1\1" (and 2, 3, 4, etc) to MAME, just as you did with the legacy Windows setup.
- MAME will send outputs as they happen, stuff like "led0 = 0\1" (led 0 off) and "led0 = 1\1" (led 0 on).
- When MAME is exiting, it will send "mamerun = 0\1" to indicate impending shutdown.
- Closing the TCP connection automatically removes your client from the system, you don't need to send an explicit removal command as you did with the Windows output.

A few notes:
- If you're busy while MAME has a lot to say, you may get multiple messages in one data read.  Crack the incoming data apart on the \1 (hex 0x01) boundries to make sure you don't miss anything.
- \1 was chosen because it's OS-neutral; the more logical \n is two bytes on Windows and one on everything else.  You should be able to talk to MAME with identical high-level code across platforms now, just the low-level sockets details differ.
- I have a working Linux/Mac client in C++ which I will post soon, I'm working on a sample Windows one.
Title: Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
Post by: ZoOl007 on July 05, 2017, 03:45:06 pm
 :cheers: That's cool man. I'll code support for it in RGBcommander.
I'm glad you fixed this. I wanted to fix it too but never found the time to do it.
My initial thought was to let Mame send udp packets to an ini specified port - that way the client software would just need to listen and not pro actively connect or send commands.
That would have been perfect for my daemon but tcp is fine too.
Kudos to you! :)
Title: Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
Post by: headkaze on July 06, 2017, 01:45:44 am
- I have a working Linux/Mac client in C++ which I will post soon, I'm working on a sample Windows one.

I've already written a working Windows client although it will need to be updated to support the new delimiter (I personally would have just gone with '\r')

You can download the source in the MameInterop SDK v1.2 (http://forum.arcadecontrols.com/index.php/topic,62982.0.html) thread.
Title: Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
Post by: Arbee on July 17, 2017, 11:14:32 am
Thanks Headkaze!
Title: Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
Post by: mdsavio on February 25, 2019, 12:58:50 pm
Hi people, someone know, if I-PAC LED board function correctly with rgbcommander?
I have installed this magnific software, but nothing happend... and on the net nothing about... almost... only on Ultimark...  :banghead:
Title: Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
Post by: abispac on September 26, 2019, 03:26:59 pm
Hey, sorry to bump this up, im just waondering, what are the mamehooker commands for a generix xbox360 control? thanks for any help.
Title: Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
Post by: DallasJ on December 15, 2019, 04:33:21 am
Hi,  I can't seem to make MAME Hooker show my led wiz or Xbox 360 controller on my windows 10 64 bit machine.  Also if I have it running and execute a rom in Mame64 0.209 it doesn't alert me of outputs if I say play T2.

My controller does rumble if I test it in MH.

Anything I should try?
Title: Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
Post by: gstav on December 16, 2021, 01:46:41 pm
Old thread but I guess it's worth a shot.  8)
I have MAME Hooker working just fine when starting a ArcadePC title (Elevator Action Death parade),
But when I launch it in RocketLauncher the LEDBlinky software also starts up and this seems to be a thing as the buttons dosent light up as previously started session.
Anyo e know how to bypass LEDBlinky in RL or how to have Mamehooker work anyways. The guns recoil and stuff works even when started in Rocketlauncher, just o rgb buttons when from. RL

Any input welcome  :cheers: