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: Mame custom button assignment to launch mame?  (Read 3094 times)

0 Members and 1 Guest are viewing this topic.

BillytheGoat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 34
  • Last login:August 16, 2018, 07:12:03 pm
  • I want to build my own arcade controls!
Mame custom button assignment to launch mame?
« on: June 22, 2018, 09:36:23 am »
I have an extra button on my homemade arcade console that I don't use.  It's in the back out of the way.  Can I use this button to launch Mame64.exe from my Windows 10 desktop?   

Couldn't I just change a button assignment in Mame's default.cfg file to run an executable, in this case Mame64.exe?

I know it's a small thing, but hey, extra unused button!


BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:March 25, 2024, 08:10:48 pm
  • ...
Re: Mame custom button assignment to launch mame?
« Reply #1 on: June 22, 2018, 09:41:06 am »
Autohotkey.  If you learn how to use it, it will come in handy for a dozen other emulator related things.

DrakeTungsten

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:August 14, 2022, 06:36:45 pm
  • I effed with the wrong person!
    • No Quarter - a basic FE, WIP
Re: Mame custom button assignment to launch mame?
« Reply #2 on: June 22, 2018, 11:15:59 am »
I think this only works with shortcuts on your Windows desktop, and only if you also have the Control and Alt keys mapped to buttons as well (but given that these are the Mame defaults for player 1 button 1 and 2, you likely do have them mapped)...

Create a shortcut to mame64.exe on your desktop. Right-click this shortcut and click the "shortcut" tab. In the "shortcut key" field, hit your out-of-the-way/extra button. Windows will automatically put in a Control + Alt modifier for you. Click "OK". You should then be able to launch Mame with the three-button combination.  This works in windows XP and 7. I'm not in front of a windows 10 machine to test it for Windows 10.

That said, I agree with BadMouth that AHK is how I would do this (unless the PC connected to this "console" is only running games, in which case I would have Mame or some front-end auto-start on boot), and learning some AHK will likely help you solve other problems further down the road.
« Last Edit: June 22, 2018, 11:31:37 am by DrakeTungsten »
No Quarter - a basic FE, WIP

empardopo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 526
  • Last login:March 24, 2024, 06:52:15 pm
    • My personal forum
Re: Mame custom button assignment to launch mame?
« Reply #3 on: June 22, 2018, 12:14:20 pm »
You could use ALLINONEFYC.

Enviado desde mi MI MAX 2 mediante Tapatalk


BillytheGoat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 34
  • Last login:August 16, 2018, 07:12:03 pm
  • I want to build my own arcade controls!
Re: Mame custom button assignment to launch mame?
« Reply #4 on: June 22, 2018, 02:03:18 pm »
Thanks for the replies!

I'm still wading into this and seeing how much interest my kids show, but I'll keep your suggestions in mind.  I've already experimented with a couple launchers but I found my self going back to the simple Mame default menu using a few snapshots for flavor.   

I tried DrakeTungsten's suggestion, but I can't get windows to register a value for the button when trying to enter the shortcut key.   I can see Ctrl-Alt fill the field when I hold them and it works for other keyboard characters, but not the buttons. 

Actually, AFTER messing around with it for a while, I only now realize this won't work because it would have to launch Mame FIRST in order to have Mame bind Ctrl and Alt to the keys and that's putting the cart before the horse.  This is really a windows issue of having the joystick and buttons having some kind of default bindings that I can work with before Mame is launched.

It's not that important to me.  I just thought maybe there was a quick solution.

Thanks for the help!

DrakeTungsten

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:August 14, 2022, 06:36:45 pm
  • I effed with the wrong person!
    • No Quarter - a basic FE, WIP
Re: Mame custom button assignment to launch mame?
« Reply #5 on: June 22, 2018, 03:43:35 pm »
I suppose I made the mistake of assuming you're using a keyboard encoder. If the buttons on your console register as game controller buttons in Windows, then my method won't work. OTOH, if the buttons on your console register as keyboard keys in Windows, then you definitely do not need to have Mame running first, at all, or ever. My solution is not Mame-specific, it is a feature of Windows to allow you to launch any program (including Mame) with a keyboard shortcut. So if these conditions are met: Two buttons on your console map to the Control and Alt keys, and your third button maps to some other keyboard key (there might be a problem with non-printable-character keys - IDK for sure), and Windows 10 did not deprecate or change this feature, then you will be able to launch Mame with a three-button combination. 
No Quarter - a basic FE, WIP

keilmillerjr

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1847
  • Last login:October 06, 2023, 10:20:39 pm
  • Web Developer.
Re: Mame custom button assignment to launch mame?
« Reply #6 on: June 22, 2018, 10:00:05 pm »
Change your windows shell to mame (will automatically launch on windows startup instead of explorer). If your using your arcade machine as a primary desktop, picture me on the shltter with my palm to my forehead.

BillytheGoat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 34
  • Last login:August 16, 2018, 07:12:03 pm
  • I want to build my own arcade controls!
Re: Mame custom button assignment to launch mame?
« Reply #7 on: June 23, 2018, 01:22:32 pm »
I suppose I made the mistake of assuming you're using a keyboard encoder. If the buttons on your console register as game controller buttons in Windows, then my method won't work. OTOH, if the buttons on your console register as keyboard keys in Windows, then you definitely do not need to have Mame running first, at all, or ever. My solution is not Mame-specific, it is a feature of Windows to allow you to launch any program (including Mame) with a keyboard shortcut. So if these conditions are met: Two buttons on your console map to the Control and Alt keys, and your third button maps to some other keyboard key (there might be a problem with non-printable-character keys - IDK for sure), and Windows 10 did not deprecate or change this feature, then you will be able to launch Mame with a three-button combination.

Yep!  You said it much more elegantly, but that's what I meant when I said it's a windows thing.   Your advice is right on but it's not that important to me to setup the encoder at this time.   For now I'm just enjoying the old games but so far I haven't gotten serious about dedicating a PC (or even a cabinet) to it.   These forums seem to be great resource with helpful people. 

Thanks.

BillytheGoat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 34
  • Last login:August 16, 2018, 07:12:03 pm
  • I want to build my own arcade controls!
Re: Mame custom button assignment to launch mame?
« Reply #8 on: June 23, 2018, 01:27:30 pm »
Change your windows shell to mame (will automatically launch on windows startup instead of explorer). If your using your arcade machine as a primary desktop, picture me on the shltter with my palm to my forehead.

ha ha. not the issue.  Why did I have to picture you on the shitter?  thanks alot

Mike A

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5884
  • Last login:Today at 01:33:13 pm
  • This plan is foolproof
Re: Mame custom button assignment to launch mame?
« Reply #9 on: June 23, 2018, 02:25:23 pm »
You didn't have to picture him, but you did anyway. Now you have to figure out how to move forward with this new realization about yourself.