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: Fixing mames broken button layout..  (Read 6786 times)

0 Members and 1 Guest are viewing this topic.

syntax_x

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 42
  • Last login:October 27, 2019, 09:32:44 pm
Fixing mames broken button layout..
« on: May 09, 2017, 10:35:51 am »
What is everyone doing to fix Mames button layout

I'm thinking of creating batch cfg files per game in categories of buttons used but wanted to ask if there was an easier solution available first.

Mame asks for the following button layout (if your a street fighter) unused buttons will be in ()

123(7)
456(8}

Kind of makes playing 2 and 3 button games a pain.

For 2-3 button games I need

(4568)
123(7)

And for 4 button games I need
34(78)
12(56)

Titchgamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4222
  • Last login:December 17, 2023, 08:05:48 am
  • I have a gaming addiction.....
Re: Fixing mames broken button layout..
« Reply #1 on: May 10, 2017, 03:25:45 am »
When you are jumbleing the buttons around that much I would just configure them on a per game basis via tab menu.

big10p

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 698
  • Last login:May 01, 2023, 01:46:23 pm
  • Mmmm, arcade classics!
Re: Fixing mames broken button layout..
« Reply #2 on: May 10, 2017, 05:12:50 am »
I don't get what you're trying to do. What exactly is 'broken' in MAME's button layout?

Titchgamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4222
  • Last login:December 17, 2023, 08:05:48 am
  • I have a gaming addiction.....
Re: Fixing mames broken button layout..
« Reply #3 on: May 10, 2017, 08:40:19 am »
I don't get what you're trying to do. What exactly is 'broken' in MAME's button layout?

Nothing, Just the way the OP wants to configure his buttons :p

thomas_surles

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2118
  • Last login:September 13, 2024, 06:34:49 pm
Re: Fixing mames broken button layout..
« Reply #4 on: May 10, 2017, 09:20:44 am »
When doing 3 button or less game try this approach.

123  or  12 (3)   or 111
123.       12 (3)        111


It makes it easier for guests not to have to guess.

syntax_x

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 42
  • Last login:October 27, 2019, 09:32:44 pm
Re: Fixing mames broken button layout..
« Reply #5 on: May 10, 2017, 02:45:04 pm »
I don't get what you're trying to do. What exactly is 'broken' in MAME's button layout?

Nothing, Just the way the OP wants to configure his buttons :p


If you setup controls for a 6 button game on mame like Street Fighter the default is this

123(7)
456(8}

So when you go to play 2-3 or 4 buttons games you have to play on the top row which is stupid.

Is that so hard to understand? This is not the first time the topic has been come up.

Titchgamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4222
  • Last login:December 17, 2023, 08:05:48 am
  • I have a gaming addiction.....
Re: Fixing mames broken button layout..
« Reply #6 on: May 10, 2017, 02:49:55 pm »
Nothing wrong with playing with the top row, or the bottom row really.

MAMEs control system is not broken, you set it the way you want.

If you want it set up as

456(8
123(7)

Do that then change it to

123(7)
456(8)

for 6 button games like SF individually.

syntax_x

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 42
  • Last login:October 27, 2019, 09:32:44 pm
Re: Fixing mames broken button layout..
« Reply #7 on: May 10, 2017, 02:58:04 pm »
I wasn't really keen on setting anything up individually.

What I was asking was if there was a program or an easy way to make controller configs based on buttons used.

There are old threads/methods I could dig up that require the use of windows powershell but I figured there would be something already made or in the works.
« Last Edit: May 10, 2017, 03:02:30 pm by syntax_x »

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: Fixing mames broken button layout..
« Reply #8 on: May 10, 2017, 03:42:15 pm »
When you say "make controller configs", are you talking about a program which you just have to run once (or only every time you add to your game inventory) which will create the individual config files for each MAME rom you have, or a process which will run  just before each game is launched, which would change MAME's default config based on the number of buttons the game uses?  Or either method is acceptable to you?
« Last Edit: May 10, 2017, 03:43:56 pm by DrakeTungsten »
No Quarter - a basic FE, WIP

ark_ader

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5645
  • Last login:March 02, 2019, 07:35:34 pm
  • I glow in the dark.
Re: Fixing mames broken button layout..
« Reply #9 on: May 10, 2017, 03:56:06 pm »
I can see the a for this.  But in reality the average Joe likes to play 20 games with regularity, and that is not too hard to set up.

I would see it as a noob utility, or go one step further and setup key maps to service controls other than Mame like customer softwares, such as people with disabilities or making an adaptive simulation for academic and military purposes.   I could see some mame or 2600 titles used as rehabilitation tasks, and the utility would change the key map to suit the patient/individual.

A quick search did not bring up any solutions, so I would think the idea has some merit.
If I had only one wish, it would be for three more wishes.

woosdom

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 63
  • Last login:June 13, 2025, 06:14:45 pm
  • I want to build my own arcade controls!
Re: Fixing mames broken button layout..
« Reply #10 on: May 10, 2017, 07:18:35 pm »
open an already populated ctrlr file and edit per system as you like. i have a few different setups for the different controls i have.  i have a ctrlr file for xin-mo, fightsticks, xbox360, etc.  i just use the file i need for each different setup i have.

i could send you a copy of what i have so you can see what i mean.

syntax_x

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 42
  • Last login:October 27, 2019, 09:32:44 pm
Re: Fixing mames broken button layout..
« Reply #11 on: May 10, 2017, 09:15:25 pm »
I was more thinking of an automated method of creating separate controller .ini files for each game.
I think it way past due to have a gui based system for remapping buttons.

Here is a quote from an old post, forum member u_rebelscum 

Thread can be found here http://forum.arcadecontrols.com/index.php?topic=87356.0


"What I'd do is a little work up front, but easy once you know the games: use ctrlr file.  First find all the games you want to play that needs to swap top and bottom rows (6 button games mostly so I'll call them that, but maybe mortal kombat also).  (MAWS (deluxe search) or romlister can help.)  Then group them by parent, and bios or mame driver source file (probably you'll have parents sharing a bios or mame driver file), and see if other non 6 button games share on the same parent, bios, and mame driver file.  If all games in the groups are 6 button, you'll use that.  If not, check which map has more parents (if it's a split bios/driver) or clones (if a split parent).

Example: SF2 uses 6 buttons, is the parent of other 6 button games, and is in the source file cps1.c that also has sf2ce (another parent), but the cps1.c file also has many more other games that are not 6 button games.  The driver cps2.c, OTOH, is mostly 6 button games, but has 3 normal map games might want to play, 19xx, ddsom, & ddtod, and a few you don't want to play.  So for you decide to have sf2, sf2ce, and cps2.c in the 6 button map list, and 19xx, ddsom & ddtod in the "unmaps" list.

Once you have the lists (I'm assuming your layout is set up so you use mame's defaults for most games), start up mame and map for 6 button games using the "Input (general)" menu.  Exit mame.  Rename the new cfg/default.cfg to 6button.cfg and move that file into the ctrlr folder.  Edit mame.ini to have ctrlr 6button.  Again, start mame, and again using the "Input (general)" menu, map back to normal.  Exit mame.  Rename the new cfg/default.cfg to normal.cfg and move it into the ctrlr folder.  Open the 6button.cfg file in a text editor.  Notice <system name="default">?  Erase the default (leaving the quotes), and select from the system until /system (including the greater than and less than symbols), and copy it (ctrl-c in most windows apps).  Fill in the blank name you have in the 6 button list.  Paste after the last /system and fill in with the next name.  Repeat for all names in the 6 button list.  (Save but leave open.)  Open the normal.cfg file in text editor, erase the default, and select & copy the whole system again.  Go back to the 6button.cfg file, and paste what you copied from normal.cfg, after the last /system.  Fill in the name from the unmap list.  Repeat pasting at end and filling in the blank for all names in unmap list.  Save.

You're done.  (You might want to look at the wiki on ctrlr files, too.)

It's a little simpler if you just make a 6 button list filled with only groups that have all 6 button games, but the list will be longer, filled only with parents.  Also, it's a little more steps if your layout is not mame's default; I'd do it too, and make it so mame treats both top and bottom as buttons 123 (and do the additional work of finding the more than 3 button games and their required remap), but that's just me.  (If you couldn't tell, I use ctrlr file a lot.)"

syntax_x

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 42
  • Last login:October 27, 2019, 09:32:44 pm
Re: Fixing mames broken button layout..
« Reply #12 on: May 10, 2017, 09:38:41 pm »
open an already populated ctrlr file and edit per system as you like. i have a few different setups for the different controls i have.  i have a ctrlr file for xin-mo, fightsticks, xbox360, etc.  i just use the file i need for each different setup i have.

i could send you a copy of what i have so you can see what i mean.

I wasn't aware you could setup "per system". If you could post up an example that would be great :)

woosdom

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 63
  • Last login:June 13, 2025, 06:14:45 pm
  • I want to build my own arcade controls!
Fixing mames broken button layout..
« Reply #13 on: May 11, 2017, 12:01:41 am »
http://forum.arcadecontrols.com/index.php?topic=100079.0

i started with this thread and used the ctrlr file as a base and changed it up as needed for my setups.  it has the different sections where you can change the setup for sf, cps2, neo geo.  i will try and post my setup on here once i get a chance, but for example with my fight stick for neo geo i have
1234
1234
on both rows.  that way like someone said earlier there is not much guessing to it.  i like this file since i have wireless xbox 360 controllers that i can just start up and they'll take over from 1player to 4player depending on how many you have powered on.  now for the xarcade setup you can just change button settings or delete them.  either way, this gave me a good understanding of how to set up my own ctrlr .cfg.

my Madcatz xbox 360 fight stick button layout is
3 4   6 5
1 2 10 9
these are the numbers that light up in the controller test in the "Setup USB game controllers" option in windows when pressed. now here is the neogeo section of the .cfg setup to reflect my desired layout for neogeo

1234
1234

neogeo

   <system name="neogeo">
      <input>
         <port type="P1_BUTTON1">
            <newseq type="standard">KEYCODE_C          OR JOYCODE_1_BUTTON1 OR JOYCODE_1_BUTTON3</newseq>
         </port>
         <port type="P1_BUTTON2">
            <newseq type="standard">KEYCODE_LSHIFT     OR JOYCODE_1_BUTTON2 OR JOYCODE_1_BUTTON4</newseq>
         </port>
         <port type="P1_BUTTON3">
            <newseq type="standard">KEYCODE_Z          OR JOYCODE_1_BUTTON10 OR JOYCODE_1_BUTTON6</newseq>
         </port>
         <port type="P1_BUTTON4">
            <newseq type="standard">KEYCODE_X          OR JOYCODE_1_BUTTON9 OR JOYCODE_1_BUTTON5</newseq>
         </port>
         <port type="P2_BUTTON1">
            <newseq type="standard">KEYCODE_CLOSEBRACE OR JOYCODE_2_BUTTON1 OR JOYCODE_2_BUTTON3</newseq>
         </port>
         <port type="P2_BUTTON2">
            <newseq type="standard">KEYCODE_W          OR JOYCODE_2_BUTTON2 OR JOYCODE_2_BUTTON4</newseq>
         </port>
         <port type="P2_BUTTON3">
            <newseq type="standard">KEYCODE_E          OR JOYCODE_2_BUTTON10 OR JOYCODE_2_BUTTON6</newseq>
         </port>
         <port type="P2_BUTTON4">
            <newseq type="standard">KEYCODE_OPENBRACE  OR JOYCODE_2_BUTTON9 OR JOYCODE_2_BUTTON5</newseq>
         </port>
      </input>
   </system>

you can also set up different controller .cfg files for each system and then make separate .ini files for each system. this method may be easier to organize but requires an .ini and ctrlr .cfg file for each system and you have to identify the ctrlr location in the .ini
http://docs.mamedev.org/advanced/multiconfig.html

hope I didn't confuse you too much :dizzy:.  if someone can explain this better, please do.   ;D


« Last Edit: May 11, 2017, 12:40:12 am by woosdom »

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9272
  • Last login:Yesterday at 03:15:04 pm
  • ...
Re: Fixing mames broken button layout..
« Reply #14 on: May 11, 2017, 10:47:34 am »
If you setup controls for a 6 button game on mame like Street Fighter the default is this

123(7)
456(8}

So when you go to play 2-3 or 4 buttons games you have to play on the top row which is stupid.

Is that so hard to understand? This is not the first time the topic has been come up.

You kids.  :lol  You have been ruined by xbox controllers.

We start reading from the upper left corner.  If you were going to alphabetize items on a book/movie shelf, you'd start in the upper left corner.
Button #1 should be in the upper left corner.  That's the logical place for it.

My buttons are labeled and wired to hacked xbox360 controllers.
I put AB on the top row, XY on bottom row because myself and everyone else instinctively places their index finger on the top left button.

I mapped globally to
1237
4568
Then made a neogeo.ini for the neogeo games, and mapped the 4 button Namco fighters individually.
However after doing those, I found that I actually liked the default MAME layout better for neogeo and Namco fighters.
In the end, I ended up with
1234
4
for the Neo Geo games so they could be played either way.


Laythe

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 726
  • Last login:July 30, 2025, 03:35:00 pm
  • "-smurfing- delivers." - Yots
    • forum.arcadecontrols.com/index.php/topic,149109.0.html
Re: Fixing mames broken button layout..
« Reply #15 on: May 11, 2017, 02:33:52 pm »
I think it way past due to have a gui based system for remapping buttons.

... like ... the one in MAME when you pull up the tab menu?

It suffices just fine for setting up a hundred or two games.  You'll spend more time writing a tool than just doing it will take.

If you want to set up six thousand games, I'd argue the problem is not the remapping system - it's the six thousand games.

Titchgamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4222
  • Last login:December 17, 2023, 08:05:48 am
  • I have a gaming addiction.....
Re: Fixing mames broken button layout..
« Reply #16 on: May 11, 2017, 04:03:33 pm »
I think it way past due to have a gui based system for remapping buttons.

... like ... the one in MAME when you pull up the tab menu?

It suffices just fine for setting up a hundred or two games.  You'll spend more time writing a tool than just doing it will take.

If you want to set up six thousand games, I'd argue the problem is not the remapping system - it's the six thousand games.

Nailed it.

syntax_x

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 42
  • Last login:October 27, 2019, 09:32:44 pm
Re: Fixing mames broken button layout..
« Reply #17 on: May 11, 2017, 06:37:49 pm »
I think it way past due to have a gui based system for remapping buttons.

... like ... the one in MAME when you pull up the tab menu?

It suffices just fine for setting up a hundred or two games.  You'll spend more time writing a tool than just doing it will take.

If you want to set up six thousand games, I'd argue the problem is not the remapping system - it's the six thousand games.

Nailed it.


Wow you have some odd logic.
Ofcourse an individual would take longer to code a gui interface than map the majority of 6000 games to acceptable buttons. The whole point of it would be to make mapping controllers easier for others.

You've got people playing solely on a playsation style fightstick, people that play on only an xbox controllers, then others that play on multiple different controllers.

There really should of been a solution for this already.

Suggesting mames archaic  tab menu? LMAO maybe if it had option to map per system, or even better  follow Retroarchs suit and make a MAMEpad, and then go into a menu where you remap the MAMEpad to each system or by buttons used.
How hard would that be?

Mames almost as old as some of you lot now....
« Last Edit: May 11, 2017, 06:44:07 pm by syntax_x »

Titchgamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4222
  • Last login:December 17, 2023, 08:05:48 am
  • I have a gaming addiction.....
Re: Fixing mames broken button layout..
« Reply #18 on: May 11, 2017, 07:41:04 pm »


Mames almost as old as some of you lot now....

On here? Nahh lol

Ime prob one of the younger members on here and was well into my teens when MAME came out lol

I have a mame cab with more games on than I could ever play, But I have only ever changed controls for a hand full of them.

woosdom

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 63
  • Last login:June 13, 2025, 06:14:45 pm
  • I want to build my own arcade controls!
Fixing mames broken button layout..
« Reply #19 on: May 11, 2017, 10:05:51 pm »
not everyone places their fingers on the top left button position.  if everyone did the same thing then there wouldnt be a need for an option menu to change button layouts and configurations.   

i have many people come over and play that are not gamers. the first thing they do is go for that lowest bottom left button.  so with my setups that have many games.  i've set up configs per game with duplicate buttons or all the same button depending on the number of buttons the game uses.  time consuming, but it works.

...oh and i play with the southpaw stick layout when on console fps games also weird to a lot of people.
« Last Edit: May 11, 2017, 10:07:42 pm by woosdom »