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: LEDBlinky: Issues with non-standard control names in MAME  (Read 2321 times)

0 Members and 1 Guest are viewing this topic.

byancey

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:October 07, 2023, 03:11:17 pm
  • I want to build my own arcade controls!
LEDBlinky: Issues with non-standard control names in MAME
« on: February 09, 2019, 04:32:38 pm »
I've run across a few MAME games that use non-standard control names that LEDBlinky doesn't understand, and as a result, I'm unable to get LEDBlinky to light up the buttons mapped to those controls.

The most recent example I've come across is "Vs. Balloon Fight".   This game actually emulates two machines with side-by-side displays, and includes a separate set of 1-player and 2-player start buttons for each side.  I am able to map each set of start buttons to the control panel within MAME just fine, and the first set lights up fine, but the second set are non-standard and I've not been able to figure out how to get LEDBlinky to recognize and map them.  For the few games I have this issue with, I would be content just telling LEDBlinky which keycodes from the button mapping file to light-up...but while I can do this with other emulators, LEDBlinky does not allow me to do this with MAME.  It insists on running the mapping through the games config file, which it can't interpret in these cases.

Any idea how I might resolve this issue?

Thanks!



byancey

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:October 07, 2023, 03:11:17 pm
  • I want to build my own arcade controls!
Re: LEDBlinky: Issues with non-standard control names in MAME
« Reply #1 on: February 10, 2019, 08:06:49 pm »
If there is a more direct way to do this, I'd still love to hear it, but here's how I ended up solving the problem.  I basically wrote a wrapper for LEDBlinky (Just an ahk script compiled as an exe) and had LaunchBox call the wrapper instead of LEDBlinky directly.   By default, the wrapper just invokes LEDBlinky with the exact parameters that were passed to it.  However, for specific MAME games that LEDBlinky won't light correctly, the wrapper changes the emulator name from MAME  to "Direct" when it invokes LEDBlinky.   In other words, instead of seeing "9 balonfgt MAME" LEDBlinky sees "9 balonfgt Direct".  I then setup an emulator in LEDBlinky named "Direct" and configured the mappings for the games I need this for.  Since LEDBlinky doesn't know the game is a MAME game, it doesn't attempt to map the buttons through the games config file (which it can't do correctly in any case), and I'm able to directly configure the buttons to light just as I would for any other non-MAME game.  Hope that makes sense.  It's a lot of hoops to jump through for something that I would have thought LEDBlinky would have allowed me to do directly, but at least I now have the right controls lighting up.

spiffo

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:August 11, 2022, 03:19:49 pm
  • I want to build my own arcade controls!
Re: LEDBlinky: Issues with non-standard control names in MAME
« Reply #2 on: February 23, 2019, 04:04:11 am »
Yep, I too run into problems getting the correct LEDs to light up if I change the MAME Controls away from the standard ones.

As far as I understand it, LED Blinky will look first for a custom .cfg file in \MAME\cfg, which will be generated if you have customised the MAME Controls. To get it to work correctly I have to analyse that .cfg file for the game.

Example, taken from a custom .cfg file:

<port tag=":IN0" type="P1_BUTTON5" mask="64" defvalue="0">
                <newseq type="standard">
                    KEYCODE_SPACE

KEYCODE_SPACE is mapped to Physical Player 1 Button 3 on my iPAC Controller but MAME has decided it now maps to Virtual P1_BUTTON5

In order to get LED Blinky to light up the correct LEDs you need to use that Virtual MAME Button.

So in the LEDBlinky Controls Editor if you want Physical Player 1 Button 3 to light up you have to specify it NOT as P1_Button3 but as P1_Button5

I still run into another problem though as I have several MAME Configs that have mapped controls to P1_Button11 & P1_Button12 and in the LEDBlinky Controls Editor you can't specify anything above P1_Button10, so basically I cannot configure those LEDs at all!