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: Saving button configs in mame (what am I doing wrong?)  (Read 2671 times)

0 Members and 1 Guest are viewing this topic.

crashwg

  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3076
  • Last login:May 24, 2019, 11:01:05 am
Saving button configs in mame (what am I doing wrong?)
« on: April 06, 2004, 07:09:30 pm »
If I were to go through all the games I play in mame and remap the controls so they feel right with my setup, what, if this is posible at all, should I copy from 1 pc to the next so mame is setup the same with both.

To be a little more clear, I'll give an example...
My setup is
  567
1234

so in order to play games like streetfighter I need to remap it so it's like
  123
x456

What do I have to copy to make two computers react the same way to my particular setup?
« Last Edit: April 11, 2004, 12:41:17 am by crashwg »
If there's bees in the trap I'm catching em
By the thorax and abdomen
And sanding the stingers down to a rough quill
Then I dip em in ink, and I scribble a bit
But if it they wriggle then I tickle em until they hold still
Lemme say it again
In my land of pretend
I use bees as a mf'n pen

cdbrown

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1241
  • Last login:October 16, 2017, 09:52:03 pm
  • Bowowow
Re:Saving button configs in mame
« Reply #1 on: April 06, 2004, 08:30:13 pm »
How did you set up your controls - in game pressing the tab key or by ctrlr files as suggested earlier?  It sounds like you didn't set up ctrlr files (as that would be all you need to copy) so you would need to copy across the individual game config files that are created whenever you play a game.  These are in the cfg directory.

crashwg

  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3076
  • Last login:May 24, 2019, 11:01:05 am
Re:Saving button configs in mame
« Reply #2 on: April 06, 2004, 11:21:03 pm »
I change the configuration in mame by pressing tab.

I'm not too mame savvy, so forgive me for not knowing much about ctrlr files?
Are those the things mame has listed as:
Standard
Hotrod
HotrodSE, etc...?

If so, wouldn't I have to switch back and forth between the settings everytime I want to play a different configuration of buttons?

What I realy want is just to take the time and get it set up innitially and then just not have to worry about it, know what I meen?

As for the individual game's config files, those would be the files in dir:cfg and seem to be a bunch of mumbo jumbo?  Is there a way to edit those outside of mame, so maybe I could do this more efficiently?
If there's bees in the trap I'm catching em
By the thorax and abdomen
And sanding the stingers down to a rough quill
Then I dip em in ink, and I scribble a bit
But if it they wriggle then I tickle em until they hold still
Lemme say it again
In my land of pretend
I use bees as a mf'n pen

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8187
  • Last login:Yesterday at 05:29:50 pm
  • The Bears Still Suck!
Re:Saving button configs in mame
« Reply #3 on: April 07, 2004, 12:01:17 am »
Ctrlr files allow you remap mame's controls.  It is much btter than the tab menu.  You can do individual game by gamenam.ini.  But you can also do something like mouse.ini, vector.ini, neogeo.ini, etc... to remap controls just for those games.  If you use NoNameMame my ctrlr file hacks are in there.  So you could have your default mapping to
  567
1234
Then make a button6.ini file that remaps for 6 button games to
  456
x123

I know there is a good tutorial for ctrlr files out there, it was linked recently in another control question thread.

http://www.arcadecontrols.org/yabbse/index.php?board=3;action=display;threadid=17868
« Last Edit: April 07, 2004, 12:01:53 am by SirPoonga »

cdbrown

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1241
  • Last login:October 16, 2017, 09:52:03 pm
  • Bowowow
Re:Saving button configs in mame
« Reply #4 on: April 07, 2004, 12:08:10 am »
The cfg files in the mame/cfg/ folder are automatically generated when playing a game.  I'm not sure which program you could use to edit it nor what information it might actually contain.  All I know is when I played a game and changed the controls using tab it updated the cfg file for that game.

ctrlr files are very handy and most people should set them up instead of the in game change.

create a new folder within the mame/ctrlr/ folder  I'll call it mine
so I now have mame/ctrlr/mine.  Copy the std.ini file (located in the ctrlr folder) into the mine folder.  Rename this to default.ini.  This is the base file which you can set all your mappings to.  I have remapped my whole control panel so I wouldn't have any buttons mapped to ctrl, alt, shift.  Change the codes within this file to be your base case.

If you have the default set out with the codes done as below (this is mame default without mouse or joycode inputs)
  567
1234

P1_BUTTON1              "KEYCODE_LCONTROL"
P1_BUTTON2              "KEYCODE_LALT"
P1_BUTTON3              "KEYCODE_SPACE"
P1_BUTTON4              "KEYCODE_LSHIFT"
P1_BUTTON5              "KEYCODE_Z"
P1_BUTTON6              "KEYCODE_X"
P1_BUTTON7              "KEYCODE_C"

In your example for sf your button layout is
  123
X456

So make a copy of the default.ini and rename it to sf.ini.  The keycodes in sf.ini would be
P1_BUTTON1              "KEYCODE_Z"
P1_BUTTON2              "KEYCODE_X"
P1_BUTTON3              "KEYCODE_C"
P1_BUTTON4              "KEYCODE_LALT"
P1_BUTTON5              "KEYCODE_SPACE"
P1_BUTTON6              "KEYCODE_LSHIFT"
P1_BUTTON7              "CODE_NONE"
You would actually only need to put the buttons in for player 1 and 2 and not need any other info in the sf.ini.  I'm not sure if you need to make a copy of this file and call it sf2.ini etc for each of those games.  Hopefully someone will be able to help on that.

neogeo.ini
  XXX
1234

P1_BUTTON1              "KEYCODE_LCONTROL"
P1_BUTTON2              "KEYCODE_LALT"
P1_BUTTON3              "KEYCODE_SPACE"
P1_BUTTON4              "KEYCODE_LSHIFT"
P1_BUTTON5              "CODE_NONE"
P1_BUTTON6              "CODE_NONE"
P1_BUTTON7              "CODE_NONE"

nbajam.ini
  XXX
X123

P1_BUTTON1              "KEYCODE_LALT"
P1_BUTTON2              "KEYCODE_SPACE"
P1_BUTTON3              "KEYCODE_LSHIFT"
P1_BUTTON4              "CODE_NONE"
P1_BUTTON5              "CODE_NONE"
P1_BUTTON6              "CODE_NONE"
P1_BUTTON7              "CODE_NONE"

Don't actually need the code_none in neogeo games as it doesn't read buttons 5 onwards anyway but it's just an illustration.
I hope this helps and if you need more info then let me know.
Cheers
-cdbrown

cdbrown

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1241
  • Last login:October 16, 2017, 09:52:03 pm
  • Bowowow
Re:Saving button configs in mame
« Reply #5 on: April 07, 2004, 08:31:47 pm »
Anyway to get one of these ctrlr threads as a sticky considering how many people have been asking about button setups lately?

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8187
  • Last login:Yesterday at 05:29:50 pm
  • The Bears Still Suck!
Re:Saving button configs in mame
« Reply #6 on: April 07, 2004, 08:39:56 pm »
actually, just tell people about
http://www.mameworld.net/easyemu/

crashwg

  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3076
  • Last login:May 24, 2019, 11:01:05 am
Re:Saving button configs in mame
« Reply #7 on: April 08, 2004, 03:26:55 pm »
I'm still a little unsure of what my options are and the pro's and con's of each.

If I screw arround with the ctrlr files, I will need to switch them before I start the game right?  If not, how would mame know which one you want to use for which game?

And if I'm right in my thinking that you would have to switch between ctrlr files before you start each game, that's not what I'm looking to accomplish.

Lets say with my setup, I play SF, the controls will obviously be wrong with my default layout so I remap the controls with the in-game tab menu, unless there's an editor for the cfg files (becuase they look like this: "
If there's bees in the trap I'm catching em
By the thorax and abdomen
And sanding the stingers down to a rough quill
Then I dip em in ink, and I scribble a bit
But if it they wriggle then I tickle em until they hold still
Lemme say it again
In my land of pretend
I use bees as a mf'n pen

crashwg

  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3076
  • Last login:May 24, 2019, 11:01:05 am
Re:Saving button configs in mame (still looking for answers)
« Reply #8 on: April 09, 2004, 02:26:50 pm »
Bump
If there's bees in the trap I'm catching em
By the thorax and abdomen
And sanding the stingers down to a rough quill
Then I dip em in ink, and I scribble a bit
But if it they wriggle then I tickle em until they hold still
Lemme say it again
In my land of pretend
I use bees as a mf'n pen

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 10:37:38 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Saving button configs in mame (still looking for answers)
« Reply #9 on: April 09, 2004, 02:57:50 pm »
Bump


Don't bump unless you want on my list.  We do NOT bump on this board, it's like a little child begging Mommie for attention.


Ctrlr files are heirarchical.... you put all your files in a folder and tell mame "this is my ctrlr folder" via settings.  If you name a ctrlr file after a rom, mame knows to load the file for that rom, same goes for parents, drivers, ect.... So no it's automatic if you set it up.

I suggest you do some research on your own, I think everyone has been more than helpful steering you in the right direction, but no one is going to do your entire setup for you.  


crashwg

  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3076
  • Last login:May 24, 2019, 11:01:05 am
Re:Saving button configs in mame (still looking for answers)
« Reply #10 on: April 09, 2004, 03:42:00 pm »
Put me on your list all you want howard, I could give a F*^# less.  Until you become an admin on this board, you are just another member who's opinion is just that.

But thanks for the answer anyways.  I didn't know that mame compared ctrlr files with the roms as I have never read anything that states that, and believe me I've looked.

If there's bees in the trap I'm catching em
By the thorax and abdomen
And sanding the stingers down to a rough quill
Then I dip em in ink, and I scribble a bit
But if it they wriggle then I tickle em until they hold still
Lemme say it again
In my land of pretend
I use bees as a mf'n pen

romkiller

  • Trade Count: (0)
  • Newbie
  • *
  • Offline Offline
  • Posts: 1
  • Last login:April 09, 2004, 06:10:22 pm
  • I'm a llama!
Re:Saving button configs in mame (still looking for answers)
« Reply #11 on: April 09, 2004, 06:15:11 pm »
Jeez just answer teh guys question. Do not be such dick howard. If you were as smart as yuo think you are your dragion king front end would not be so full of buggs. the lurking days have ended.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re:Saving button configs in mame
« Reply #12 on: April 10, 2004, 02:57:55 pm »
You would actually only need to put the buttons in for player 1 and 2 and not need any other info in the sf.ini.  I'm not sure if you need to make a copy of this file and call it sf2.ini etc for each of those games.  Hopefully someone will be able to help on that.
neogeo.ini
neogeo.ini fixes all the neo-geo games.  Otherwise, parent-clone works, so SF.ini fixes SF and all the clones of SF, but if SF2 is another parent, you need to copy and rename the file (but you don't have to re-type everything).

Also, in your mame.ini file (Run mame with the -cc option if you don't have one - you need to change the following two lines -

### Windows path and directory options ###
ctrlr_directory         ctrlr
### Input device options ###
ctrlr                   Mine

(or whatever you named the ctrlr\xxx folder)

Also, the tab set values override the ctrlr.ini files so for any game that you set inputs using the TAB menu, you need to delete the gamename.cfg files before MAME will use the new assignments.  This will also delete any dipswithch changes you have made, so you will have to reset those.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

crashwg

  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3076
  • Last login:May 24, 2019, 11:01:05 am
Re:Saving button configs in mame (What am I doing wrong)
« Reply #13 on: April 11, 2004, 12:40:46 am »
I'm not sure if I'm doing something wrong or what, but I can't seem to get this to work for the life of me.

Ok, here's what I did.  It's more of an experiment at this time, as I do know that not all capcom games use the 3 over 3 layout but anyway.

I made a new folder in mame/ctrlr called my setup so now I have mame/ctrlr/my setup.  I copied to that folder std.ini twice and named one default.ini and one capcom.ini.  I changed capcom.ini to look like this:
P1_BUTTON1              "KEYCODE_Z | JOYCODE_1_BUTTON5"
P1_BUTTON2              "KEYCODE_X | JOYCODE_1_BUTTON6"
P1_BUTTON3              "KEYCODE_C"
P1_BUTTON4              "KEYCODE_LALT | JOYCODE_1_BUTTON2  | MOUSECODE_1_BUTTON2"
P1_BUTTON5              "KEYCODE_SPACE | JOYCODE_1_BUTTON3"
P1_BUTTON6              "KEYCODE_LSHIFT | JOYCODE_1_BUTTON4"

Keep in mind, that's the only thing I changed.

I changed mame32.ini's ctrlr line to reflect the my setup folder and then tested it out.

I tried multiple capcom games and none are any different than when I started.  It still has the buttons set up as 4 on the bottom and the first two on top.

Now what is it that I'm doing wrong?  Is there a tutorial on ctrlr folders and files out there?  GRRRRR, this is so confusing!
If there's bees in the trap I'm catching em
By the thorax and abdomen
And sanding the stingers down to a rough quill
Then I dip em in ink, and I scribble a bit
But if it they wriggle then I tickle em until they hold still
Lemme say it again
In my land of pretend
I use bees as a mf'n pen

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re:Saving button configs in mame (What am I doing wrong)
« Reply #14 on: April 12, 2004, 06:58:17 am »
I'm not sure if I'm doing something wrong or what, but I can't seem to get this to work for the life of me.

Ok, here's what I did.  It's more of an experiment at this time, as I do know that not all capcom games use the 3 over 3 layout but anyway.

I made a new folder in mame/ctrlr called my setup so now I have mame/ctrlr/my setup.  I copied to that folder std.ini twice and named one default.ini and one capcom.ini.  I changed capcom.ini to look like this:
P1_BUTTON1              "KEYCODE_Z | JOYCODE_1_BUTTON5"
P1_BUTTON2              "KEYCODE_X | JOYCODE_1_BUTTON6"
P1_BUTTON3              "KEYCODE_C"
P1_BUTTON4              "KEYCODE_LALT | JOYCODE_1_BUTTON2  | MOUSECODE_1_BUTTON2"
P1_BUTTON5              "KEYCODE_SPACE | JOYCODE_1_BUTTON3"
P1_BUTTON6              "KEYCODE_LSHIFT | JOYCODE_1_BUTTON4"

Keep in mind, that's the only thing I changed.

I changed mame32.ini's ctrlr line to reflect the my setup folder and then tested it out.

I tried multiple capcom games and none are any different than when I started.  It still has the buttons set up as 4 on the bottom and the first two on top.

Now what is it that I'm doing wrong?  Is there a tutorial on ctrlr folders and files out there?  GRRRRR, this is so confusing!
2 problems -

I wouldn't name the folder "my setup"  MAME might not recognize the spaces.  It might, but I'm not sure.  Recommend changing it to "mysetup" for both the folder name and the mame.ini file entry.

Second, MAME will NOT recognize capcom.ini.  neogeo.ini is a special case.  You need to name the file like a mame parent rom name such as sf1.ini.  With sf1.ini defined, sf1, sf1jp, sf1p, and sf1us should all use the new keys.  Then copy your sf1.ini file and rename it as sfa2.ini, sfa3.ini, etc.

As SirPoonga said, best tutorial is at http://www.mameworld.net/easyemu/mamecontrolini.htm
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

cdbrown

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1241
  • Last login:October 16, 2017, 09:52:03 pm
  • Bowowow
Re:Saving button configs in mame (what am I doing wrong?)
« Reply #15 on: April 12, 2004, 11:54:48 pm »
I think "driver" may be an incorrect word - should be bios.  Games that require bios files such as neogeo and stv can be set using bios ini files (neogeo.ini, stvbios.ini)  Capcom games don't have this bios and can't be grouped that way.  I would make multiple copies of that capcom.ini file and then rename them sf1.ini, sf2.ini etc.