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: Change keyboard config outside of Mame?  (Read 7543 times)

0 Members and 1 Guest are viewing this topic.

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1962
  • Last login:June 30, 2025, 02:20:39 pm
Change keyboard config outside of Mame?
« on: March 17, 2002, 05:40:22 pm »
Okay, you know how you can edit the key configuration for the default Mame setup and for each individual game? Well is the only way to do this from within Mame?  Are there any programs that will edit the cfg files for each game for me?  Because they are not ascii editable text files as far as I can see.  Anyways, I'm wondering about this because there a lot of games that I would like to change the keyboard setup for.  I have a cabinet with 4 joysticks and buttons (from left to right, Player A, B,C and D).  For all two player games I want the players B and C (in the middle) to be players 1 and 2 respecitvely.  But for 4 players games (like dungeons and dragons, TMNT, XMen) I want players A  B C D to be players 1 2 3 and 4 respectivly.  But I don't want to have to go into every game that I want to change the key config for.  See my dilema?  There has to be some program out there were I can choose a particular key setup and apply it too many games all at once.  Anyone have any ideas or can anyone point me in the right direction?  Or are any programmers out there interested in writing a small little simple util to do this?  I'm sure I'm not the only one who would find this util useful.

Jakobud
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re: Change keyboard config outside of Mame?
« Reply #1 on: March 17, 2002, 08:30:34 pm »
I spent a ton of time (and still updating JFront) because I couldn't find any other FE that does this.

What I do.  I copy around the default.cfg file based on info for the game.

so setup 4way game once and all 4way games will run with those settings.  If you want all 2 player 8way 6 buttons (ie, SF games) you can swap the punch and kick buttons.  For all 4 player games you can have one setting and all 1,2,3 player games will ignore the stick on the left.

I'm hoping to have a release soon, but I haven't been able to code any for a week.  Hopefully in the next few weeks.
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1962
  • Last login:June 30, 2025, 02:20:39 pm
Re: Change keyboard config outside of Mame?
« Reply #2 on: March 19, 2002, 10:49:51 am »
Okay, so you are saying that the cfg files that are found in the cfg directory only have information in them regarding the keyboard setup for that one game and nothing else?  There is no information in the cfg files regarding the # of credits for the game, high score info or anything like that?

So for example, if I copy the XMen cfg file and rename the copy to be used with the TMNT cfg file, that will work with no problems?  In other words, TMNT will now have the same exact keyboard setup as XMen?  And this will not cause any sort of conflicts?

Jakobud
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 10:27:17 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Change keyboard config outside of Mame?
« Reply #3 on: March 19, 2002, 09:11:24 pm »
yeah jk....  it works... iv'e tried it
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Change keyboard config outside of Mame?
« Reply #4 on: March 19, 2002, 10:11:11 pm »
Quote
...if I copy the XMen cfg file and rename the copy to be used with the TMNT cfg file, that will work with no problems?  In other words, TMNT will now have the same exact keyboard setup as XMen?  And this will not cause any sort of conflicts?

Jakobud


It will work only if the two games have the same input types because the [gamename].cfg files only save the used input settings.  i.e.:  A game with a trackball and no joystick .cfg file only contains info about the trackball settings, and no info about joysticks.

So, while your example might work because both have 4 joysticks with buttons, it won't work if you switch, say, SuperSprint and Xmen .cfg files, because Ssprint has a spinner and Xmen doesn't.  Copying and renaming default.cfg to any gamename might work because default.cfg saves all the input settings.
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »
Robin
Knowledge is Power

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1962
  • Last login:June 30, 2025, 02:20:39 pm
Re: Change keyboard config outside of Mame?
« Reply #5 on: March 20, 2002, 01:38:43 am »
Why the heck haven't the Mame developers made the cfg files editable ascii files that we can open in wordpad??  That would make it so easy to copy stuff around...

Jakobud
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 10:27:17 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Change keyboard config outside of Mame?
« Reply #6 on: March 20, 2002, 05:11:19 pm »
our mame developer friends did alot of odd stuff that i don't understand...

like:  

putting tabs in the listinfo output so when you parse it you have to go to the trouble of removing them  

going to the trouble of saving nvram into text files so high scores, and credits can be saved, but not allowing you to easily edit any of this data externally

making the default button 2 left alt, which no pc game in it's right mind uses because it's a dedicated windows key.  

making all outputted lists arrange by date added by default, which is useful for them but makes the lists rather useless to anyone else without re-arranging them

ok, ok I'm done,but actually I'm just nit-picking........  But since you went there I thought I'd go to.  :D
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re: Change keyboard config outside of Mame?
« Reply #7 on: March 21, 2002, 09:00:47 am »
Somebody below posted the file format if you want... but why?

The whole point in doing this would be so you could configure a game once and have all games that are similar to this work right?

Well, do that by copying the default.cfg and only setting the defaults.  Then keep track of your files.  If you don't want to keep track of the files, you could create the default.cfg.  But why generate a cfg file for each game?

With a little figuring out of the variables you have in hand (number of players, number of buttons, input types, ect) you can come up with an algorythm that will allow you to copy the defaults around for you.

What I use in jfront (about, don't remember the order)
1) custom <so I could create on called MK and set it in each MK game>
2) players_input_buttons (this was primarily to switch the punch and kick buttons on SF games in one shot)
3) players_input (I don't use it, but I added it
4) players (So 4 player games use the joystick on the far left, all 1,2,3 player games use the middle ones)
5) inputs (so all 4 way games can have up notleft notright setup)

This takes care of about 95% of the games with only a few configuration files I copy around.

so when I start a game, I check to see if these files exist
<input_property_value>.cfg
2p_8way_6b.cfg
2p_8way.cfg
2p.cfg
8way.cfg

I first check in the selected control panel directory, then a default directory for each until I find one.  I copy it to cfg/default.cfg when starting and copy it back when I'm done.

I considered adding the config myself, but then I just figured that I would have to create screens to do it, would be a pain in the arshe to configure it since it wouldn't be ingame.... and I didn't want to spend any more time on it.  ;D
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »