mame2003-plus: hundreds of new games, improved input, features, new bugs - now with runahead support
-
ok do me a favor test mame standard 078 see if it hooks the output from what i see in the standard code youll get 3 leds only in mame078
-
@grant2258 I had a look at it and it seems the standard Mame 0.78 doesn't implement the output system, just the keyboard leds. According to Aaron Giles, the output system was introduced in version 107u4 (August 2006). The following link explains how the outputs work.
https://aarongiles.com/old/?p=181
It seems that the ouput system seamlessly redirects keyboard leds and backdrop lights, which have been supported in much earlier versions of Mame, so that third party softwares can use them to light external leds. Obviouly, more complex outputs (like force feedback effects in racing games) are only available in versions after 2006 and newer drivers. 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
I don't know whether it could be feasible to backport the mame output system from v107u4 to lr-mame so that at least keyboard leds and backdrop lights are offered as outputs. More complex outputs would likely be unfeasible, because they would imply backporting much newer (and less efficient) drivers.
-
backdrop leds already work and the flashing numlock ect is easy enough to add back. To me a flashing numlock and capslock doesnt mean a lot. I there any reason you want random numnlock ect flashing?i would probably vary from game to game but it wouldnt be a big deal to add outputs that arent there to a drivers in some cases. I just dont see how a random blinking led tells you anything.
RA has a led driver for raspberry pi io and and overlay. you just want random things to blink ?
-
im guess what im trying to say is what function do you personally want these led functions to do for you.
If i had some kind of idea of what the end result would do for you and why that would go a long way into understanding what you want to do. Is it just lighting up joystick buttons or something else?
Ra can do things already with the outputs if they are there like in outrun if you crash you could make the joypad rumble to emulate the steering wheel shaking ect. Im sure we can work something out if its to lightup joystick leds
-
@grant2258 Assuming buttons have leds, a basic use would be to blink the start button after inserting a coin or the coin button when no credits have been inserted. In specific games, leds can have specific meanings (as in the original cabinet) such as the braking light in Outrun or the police lights in Chase hq. These can be mapped to unused buttons or to leds in the cabinet marquee. The thing is that these outputs are already there for many mame drivers and led management can be handled by programs such as Rgbcommander (for linux) or Mamehooker (for Windows). What these programs need is to hook to the Mame outputs in other to know when the leds should be lightened when the game runs. Because this infraestructure relies on the standard Mame output protocol, if this protocol can be reproduced in lr-mame, then they will work without having to adapt drivers or to introduce specific code in lr-mame to manage leds. If not, then I think developing an ad hoc system that lights keyboard leds or outputs the gpio will be of no interest, because it is not standard and output management programs will not work.
-
the game would have to support this do you have an example of a game that does this ? so i can see the naming conventions used. makehooker isint using mame communications by the looks of things it uses dde.
I see you pointing out examples which is helpful but i need a specific game and example that you do use so i can look at the source of teh game and makehooker. It would give me a clearer picture of whats going on.
let me be more specfic teh outputs would need customized per game it isint hard to make code to send to a raspberry pi io ports to blink a led driver ect there is no need for mamehooker in that sense. we need something that works on linux and windows dde is windows ill try take a look at what rgbcommander is
-
from the info i have looked up rgbcommander lights up the buttons / leds based on romname via an xml file.
http://forum.arcadecontrols.com/index.php/topic,154590.0.html
-
@grant2258 In the following posts you can find some examples of games that have outputs:
Outrun:
forum.arcadecontrols.com/index.php/topic,101789.0/all.html
Ajax:
http://forum.arcadecontrols.com/index.php/topic,82987.msg866938.html#msg866938
Spyhunter:
http://forum.arcadecontrols.com/index.php/topic,82987.msg866958.html#msg866958
Dig dug, q-bert:
http://forum.arcadecontrols.com/index.php/topic,151464.msg1583332.html#msg1583332
Moreover, many games should send outputs to blink the start/coin buttons.
Personally, I use RGBcommander with Retropie (other led management softwares like Mame hooker or LedBlindky are Windows only), and employ a led driver to light up leds (Ledwiz), because the Pi gpio is too limited for this. Indeed, RGBcommander lights the buttons used by the games/system by using an config Xml file and the name of the game and emulator/core. Also, it can also read some basic mame outputs, such as start, coin and a pair or in-game leds and make this leds blink when needed. See the Mame section of its homepage:
users.telenet.be/rgbcommander/
Obviously, the latter only works with the standard Mame.
-
I just need one game that blinks the start and coin buttons for you then i can start piecing something together on how the information is sent. from what i can see the xml is setting the lights so i need a game that behaves like this for you to start to see whats going on here.
-
@grant2258 You can use classic games such as: Galaxian, Dig Dug, Galaga or Asteroids. For these, the start button blinks when you insert some credits. This is the behavior of the original cabinets and it is properly emulated by Mame via outputs.
-
@janderclander14 is this working on your setup right now is what im asking. We can control leds very easily on the pi with a driver like here
-
the only reason im asking this is because every video ive seen is a random led flashing that we can do easily
-
@grant2258 Yes, this works with the regular Mame. You can see some videos with proper outputs linked to leds here:
Terminator 2: leds blick when guns are fired, or get impacts
Chase HQ police leds: only when the chase starts
And yes, Ledwiz is a commercial led controller similar to the controller you linked. It gets the input via the Pi's usb port and has it own power input to feed many leds.
-
again we can make a led blinker dont need rgbcommander for that.
I dont see any vids where the joystick credit is button flashing you just want a generic blinker thats easily done. You could even display a row of leds at the top of the screen in an ra overlay and blink them. i did see a overlay led driver in RA not sure if its functional though
-
@grant2258 This video shows what you ask: in Outrun, the start button blinks after introducing some credits and stops blinking after pressing it (seconds 42-52). This is achieved in the cabinet of the video with Mame outputs and Mamehooker.
-
Ok this looks like a specific setup that is mapped to the real arcade outputs. I know you can do this if you wire everything to outrun specs.
- What im asking is do you have this hardware?
- do you need to config your mame outputs per game to physical hardware
I need a specific example from your personal use that use the io and what your doing with it. IE are you coin and credit buttons flashing in games that support it or do they need setup per game.
Are your credit and coins all blinking for games on your joystick panel for games that support it or do you need to map your outputs to something per game.
What would happen in dig dug if it was run in this cab. If it set per game it seems the user has to decide what to do with these outputs. Led or servo of some sort.
Can you give me a real life example that you have setup. I just need this to start working on a solution
-
@grant2258 None of the vids is my hardware, but all of them use mame outputs rather than physical connections to drive leds, as you can see in the descriptions.
I just use led buttons in a generic arcade cabinet. To use mame outputs I just configure RGBcommander or Mamehooker to tell them which physical leds from by cabinet correspond to the led mame outputs.
For example, RGBcommander supports outputs for P1coin led, P1start led, P1button led, etc, which I assign to the leds of my buttons. This is done once and in general, not per game basis. If you download Rgbcommander you can see this at the beginning of the Xml config file.
Then, when a game that has outputs runs (such as the examples I listed above), the leds act as they have been emulated in the game's outputs, e.g., blinking when inserting credits, or when some in game event occur. As you can see here:
https://aarongiles.com/old/?p=181
Whenever these events occur, Mame sends a predefined signal, and the softwares that have hooked the Mame outputs redirect the signal to the physical led, as stated in the generic configuration of the software hooked to the outputs. If the games do not have ouputs or those have not been emulated, then I get nothing.
So, for this to work:
- the Mame version in use should have the output protocol, as described in the Aaron Giles blog.
- games should have outputs emulated
- a led management software should listen to the mame outputs and act on the physical leds.
Hope this helps.
-
well the information you giving in helping me understand im looking at the mame0.121u4 source for galaga/digdug and its not making much sense why this is mapping to coins and start as it just a general led signal not sending a message out as a coin.
{
set_led_status(1,data & 1);
set_led_status(0,data & 2);
coin_counter_w(1,~data & 4);
coin_counter_w(0,~data & 8); -
just one last question what hardware are you using fro your encoder and led driver
-
@grant2258 My led driver hardware is Ledwiz, which is connected to the Pi' s usb.
https://groovygamegear.com/webstore/index.php?main_page=product_info&products_id=239
Both Rgbcommander and Mamehooker support it (they also support other drivers, such as Ultimarc's). You only need to tell them that you are using this driver model and how many leds you have physically connected. After that it is plug and play.
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.