Read out game state for LED control (for making start/coin buttons to blink)
-
Hi,
I'm helping out the developer of LEDSPicer. This is an open source project in order to make LED buttons light up in accordance of the game loaded. It's working fine already. Only the buttons light up that are used in a game, but we want to take it a step further:
Coin and start buttons to blink. We want to have the coin buttons blink when the game is waiting for coins and when coins are "inserted", we want the start button to blink.
In mame for windows you can configure the mame.ini file to out put to network. Then all that kind of game data is send to the output as well. For as I can see , this is not possible with the (arcade) emulators running on the Raspberry Pi, is it? Or can somebody help out here?
Thanks.
-
@Yornav By the way, I use a PacDrive for the LED control.
-
@Yornav said in Read out game state for LED control (for making start/coin buttons to blink):
In mame for windows you can configure the mame.ini file to out put to network
What exactly does this mean ?
RetroPie includes quite a few MAME Arcade emulators, most of them based on older MAME versions. You might want to look at
advancemame
as it's based on MAME 0.106 (I think) and it might include a similar feature. If you know when this feature was added in MAME, then you'll know if this is supported in any of the arcade emulators included in RetroPie. -
@mitu said in Read out game state for LED control (for making start/coin buttons to blink):
@Yornav said in Read out game state for LED control (for making start/coin buttons to blink):
In mame for windows you can configure the mame.ini file to out put to network
What exactly does this mean ?
RetroPie includes quite a few MAME Arcade emulators, most of them based on older MAME versions. You might want to look at
advancemame
as it's based on MAME 0.106 (I think) and it might include a similar feature. If you know when this feature was added in MAME, then you'll know if this is supported in any of the arcade emulators included in RetroPie.Some games send out led0 or lamp0 (and probably more) states (1/0), this indiciates if a LED should lit up or not. In the wnidows version you can configure mame.ini to send that output to network and can be read out. The developer from LEDSpicer wrote his software to read the info out that way in order to control the LEDs.
-
I've looked at it some time ago to make it work with RGBCommander and Mame2003-plus (via Mame output protocol). I copy here some of the conclusions:
It seems the standard (non-RA) Mame v0.78 in which Mame2003-plus is based doesn't implement the output system, just lights keyboard leds via hack. According to the outputs' author, Aaron Giles, the output system was introduced in version 0.107u4 (August 2006). When specific game events occur (such as inserting a credit or receiving an impact), Mame sends a predefined signal, and the softwares that have hooked the Mame outputs (such as Mamehooker or Ledblinky in Windows or RGBCommander in Linux) redirect the signal to the physical leds. The following link explains how the output communication system works.
https://aarongiles.com/old/?p=181
It seems this ouput system seamlessly redirects keyboard leds and backdrop lights, which have been supported in much earlier versions of Mame, as outputs. For these, even "old" game drivers (prior 0.107u4) should have outputs.
More complex outputs (like force feedback effects in racing games) are only available in versions after 2006 and newer drivers that were written with the output system in place. The following posts by the developer of Mamehooker provide some info on this:
http://forum.arcadecontrols.com/index.php/topic,100880.msg1066814.html#msg1066814
forum.arcadecontrols.com/index.php/topic,101789.0/all.html
This output system remained unchanged up to version 0.169. From v0.170 to v0.187 the output system broke and was replaced by a new communication system in v0.188 til now. More information can be found in the Mame section at the homepage of the RGBCommander app:
http://users.telenet.be/rgbcommander/
Some example of games using Mame outputs and that may be used for testing are:
Many classic games, such as Galaxian, Dig Dug, Galaga or Asteroids, for which the start button blinks after inserting credits and until pushing start.
Terminator 2: leds blick when guns are fired or received impacts.
ChaseHQ: police lights blick when chase starts.
Outrun: start, brake lights and forcefeedback effects.
Ajax: bomb button lights when available
Spyhunter: backdrop lights up based on game events.
So, it seems that none of the RA mame cores in Retropie implement the mame output system. But this may be different for advancemame.
-
@janderclander14 Does the outputs then also work on a Raspberry Pi?
-
@Yornav No for Retroarch cores, as far as I know. Maybe for some version of advancemame, but I have not look at it. They will work if you compile the latest standard mame, but it will run very slowly on the Raspberry.
-
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.