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: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?  (Read 3861 times)

0 Members and 1 Guest are viewing this topic.

kelemvor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 426
  • Last login:May 13, 2012, 09:40:44 am
Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« on: February 11, 2006, 09:45:14 am »
WHen I go into the Mame settings window to change controls and I press my Left Ctrl button for a key, Mame always sets it to Left Ctrl AND Right Ctrl.  How can I get it to ONLY set it to Left Ctrl like the keys are by default?

It seems when I set it and it says both Left and Right then it makes them not actually work.

Thanks.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #1 on: February 13, 2006, 04:59:30 am »
Do not pause MAME while mapping keys.

kelemvor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 426
  • Last login:May 13, 2012, 09:40:44 am
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #2 on: February 13, 2006, 08:38:40 am »
Really?  Is that what's causing the problem?  Never thought to try changing the keys without pausing the game since I normally notice something isn't right once I've started playing.

I'll give that a try.

thebrownshow

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 546
  • Last login:December 14, 2010, 03:14:32 pm
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #3 on: February 13, 2006, 10:39:29 am »
That's definitely the problem.  I recently replaced my control panel and needed to go through all the fighter games and update the controls.  Found that whenever I had MAME paused, hitting either CTRL or SHIFT keys would cause the LEFT and RIGHT thing to happen. 

jjd

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 89
  • Last login:June 17, 2025, 10:56:21 am
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #4 on: February 13, 2006, 11:00:22 am »
Ugh.  I spent about 2 hours one night last week trying to get mame to quit mapping both the left and right control.  I thought it was my KeyWiz.  I rebotted about 5 times and then it randomly seemed to work (when I configured the controls for about the 30th time).  I guess I didn't pause mame that time. 

This will definitely save some time and stress the next time my 4-yr old starts randomly pushing buttons and manages to change the default inputs. 

I love deadlines. I like the whooshing sound they make as they fly by.

- Douglas Adams

kelemvor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 426
  • Last login:May 13, 2012, 09:40:44 am
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #5 on: February 13, 2006, 11:02:07 am »
Is this a BUG that should be submitted to the Mame people or is it designed to do it this way for some retarded reason?

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #6 on: February 13, 2006, 11:02:34 am »
Using a ctrlr file is probably a better overall solution anyway, if you can be bothered to set one up.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #7 on: February 13, 2006, 11:03:37 am »
Is this a BUG that should be submitted to the Mame people or is it designed to do it this way for some retarded reason?

It's been like this for ages and I'm sure the MAMEdev know about it...but I have no idea why it occurs.  Unimportant bug I suspect.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 12:27:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #8 on: February 13, 2006, 11:14:00 am »
Actually.... at this point the cfgs and ctrlrs are the same, so I suggest that global input changes should be changed in menu and that you periodically "backup" the default.cfg by taking it's input contents and transferring them to a ctrlr file. 

Someone (not me) really needs to add a "save to ctrlr file" option in mame, since it is very possible now. 


Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #9 on: February 13, 2006, 11:56:09 am »
Someone (not me) really needs to add a "save to ctrlr file" option in mame, since it is very possible now. 

That's a pretty good idea, but why not just have MAME automatically save it's controls (even game-specific) to a ctrlr file...removing the need for the \cfg files (?)

However last time I tried the analog settings (sensitivity etc) are flawed (ie useless) within ctrlr files, but work in the \cfg files.  Also nobody seemed in the least bit interested in fixing this...

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #10 on: February 13, 2006, 11:59:34 am »
the cfg files also store dipswitch settings and other stuff.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #11 on: February 13, 2006, 12:01:08 pm »
the cfg files also store dipswitch settings and other stuff.

Yeah I know, but why does the controls need to be there too, with the ctrlr system in place?

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #12 on: February 13, 2006, 12:17:33 pm »
Yeah I know, but why does the controls need to be there too, with the ctrlr system in place?
Actually, since the cfgs are now text based the question is why are the ctrlrs still around.  I think one could combine the two systems into one now.  cfgs essentially do that, just add in support for system based cfgs (like neogeo) and premade configs like the slikstik and xarcade ctrlr files.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 12:27:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #13 on: February 13, 2006, 01:13:12 pm »
No got it backwards Sirp, minwah is correct in that the key assignments need to be removed from the cfg files, leaving ctrlr files left alone.

Why?

It's real simple.... cfg data, other than the key configs contain "real" data.  That is data that would actually be stored on the real arcade machine via dip positions, counters, ect. 

Key assignments, on the other hand are virtual and pertain only to mame. 

Cfg data, generally should be changed when a driver is updated, while key configs, 9 times out of 10 should be left in tact. 

So it's more logical to keep the two data types separate rather than merging them in the cfg like they are now. 

Logically speaking, at least, modifying mame to work with this method would be a breeze. 


Input (General) and Input (This Game) would have company. 

Input(This Driver) and Input(This Parent) would need to be added. 

Also the glitch/oversight in the current ctrlr files would need to be fixed, where entries are read in the order they are printed in the file and not in the hierarchy (default,driver,parent,clone).

Other than that it's just a matter of re-routing the save to the ctrlr file rather than the cfg files.  Since they use the same writing method now, in theory, it'd be easy. 



SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #14 on: February 13, 2006, 01:19:45 pm »
well, yeah, that's the other route to take.  Either combine it all or seperate out the controls completely.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #15 on: February 14, 2006, 05:14:38 am »
well, yeah, that's the other route to take.  Either combine it all or seperate out the controls completely.

The latter for sure...on top of what Howard said if you want to manually create your own ctrlr file (I did) then you can.  If ctrlr files were removed you would have the hassle of fiddling with cfg files.

I wonder if the devs would accept the idea of removing controls from cfg files tho?  Something tells me they might be more likely to remove the ctrlr stuff completely...

Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1031
  • Last login:November 29, 2022, 08:22:22 pm
  • Building a 'Classic' MAME Cab
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #16 on: February 14, 2006, 10:49:01 am »
Just FYI, the same pause issue arises when setting mouse buttons.  (At least, it did with my and my OptiWiz).  Paused it doesnt work, unpaused it works fine.


Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 12:27:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #17 on: February 14, 2006, 05:24:33 pm »
well, yeah, that's the other route to take.  Either combine it all or seperate out the controls completely.

The latter for sure...on top of what Howard said if you want to manually create your own ctrlr file (I did) then you can.  If ctrlr files were removed you would have the hassle of fiddling with cfg files.

I wonder if the devs would accept the idea of removing controls from cfg files tho?  Something tells me they might be more likely to remove the ctrlr stuff completely...

Yeah that was my train of thought.... if a game isn't working and the solution is the delete the cfg file then you have lost both your game settings and your key settings.  If they are seperate it'd be much more likely that you'd only have to alter one and not both. 

I dunno... if haze was still mame head I'd say yes, but Aaron is a big fan of the ctrlr files.  He might be willing to do it. 

Somebody might want to send a friendly email about that. 

If we got a go-ahead I think I have enough understanding of how the ctrlr/cfg stuff works to make the patch and submit it. 

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #18 on: February 15, 2006, 05:12:23 am »
Somebody might want to send a friendly email about that. 

I went ahead and emailed Aaron...we'll see what he says :)

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #19 on: February 15, 2006, 10:39:09 am »
I went ahead and emailed Aaron...we'll see what he says :)

He's kindly replied already :)  Basically, he is not entirely convinced based on the 'eggs in one basket' idea - if MAME messes up writing the ctrlr file, then potentially a LOT of info would be lost.  I have to agree with that really.

However he did say he is interested in anything which fixes current issues, and since there are a few I think we could proceed with taking a look at some - fixing these would improve things considerably IMO.  Here are the issues I know of:

1) Analog settings are ignored in the ctrlr file (or perhaps over-ridden by the settings in the cfg file),
2) Ctrlr file read in order (literally), not hierarchy (see Howards post below),
3) Ctrlr mappings are sometimes over-ridden by the cfg file ones (point 1 could be related to this).

Probably need to look at these in more detail...it has been a while for me and I can't exactly remember how the ctrlr/cfg system is supposed to work exactly (like when should either have priority?).

Something that just entered my head is how about making the ctrlr file always take priority over cfg files.  So, if a ctrlr entry for a given game exists, MAME totally ignores the cfg file for that game (control-wise).  This wouldn't affect anyone who doesn't use ctrlr files (most mame users), and people with a ctrlr file with game-specific entries would know to expect this behaviour.  It might get a bit more complicated when thinking about driver/clone level etc...

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #20 on: February 15, 2006, 11:45:18 am »
Something that just entered my head is how about making the ctrlr file always take priority over cfg files.  So, if a ctrlr entry for a given game exists, MAME totally ignores the cfg file for that game (control-wise).  This wouldn't affect anyone who doesn't use ctrlr files (most mame users), and people with a ctrlr file with game-specific entries would know to expect this behaviour.  It might get a bit more complicated when thinking about driver/clone level etc...
This will be "fixed" if the controls are taken out of the cfg files.  As howard said, it would be best to seperate them to ctrlr files and have an in mame way of editting it.  this will involve not only editting the game's controls, but everything possible higher up in the hierarchy.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #21 on: February 15, 2006, 11:52:31 am »
This will be "fixed" if the controls are taken out of the cfg files.  As howard said, it would be best to seperate them to ctrlr files and have an in mame way of editting it.  this will involve not only editting the game's controls, but everything possible higher up in the hierarchy.

I agree (read my posts), but for the moment at least this isn't going to happen (in official mame).  I suppose a way around it would be to use seperate ctrlr files for each game/driver/whatever (similarly to the old ctrlr ini files), but I don't know if this will go down well either.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #22 on: February 15, 2006, 11:59:39 am »
Maybe someone can start working on it for powermame???

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 12:27:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #23 on: February 15, 2006, 12:13:20 pm »
I always thought the new method of storing every game's ctrrlr data in a single file is rather silly anyway.  I suppose mame itself wouldn't have any problem, but any file format parser (ini, xml, ect) get's bogged down once the file reaches a certain size. 

And as Aaron pointed out, if the file gets corupted too badly you are screwed.  Perhaps ctrlr files need to be replaced by a third type of file that is basically the cfg minus the dip/bookkeeping data and THEN the cfg files need cleared of key data. 

I could see a "cfg" folder and a "keycfg" folder.  The only additions being added from traditional cfgs would be the ability to make driver and parent specific files.  And of course edit them in-game. 

Since you would be able to set the keycfg path in your mame.ini, much like you do now with mame's folders, you would still have ctrlr-like functionality and a "hotrod keycfg" or a "slickstik keycfg" folder could still be included with the default build.  Or even do it with the sub-folder method, much like it was done in the ini days. 


Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #24 on: February 16, 2006, 10:18:55 am »
I think that would work Howard.  Rather than invent a third type of file though, why not just split up the ctrlr file and support multiple files (game/driver specific etc.).

I reckon this would work pretty well.  Create your own ctrlr file(s) if you like and never have to mess with cfg files.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 12:27:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Setting controsl in MAME. Left Ctrl vs LeftCtrl Right Ctrl?
« Reply #25 on: February 16, 2006, 03:21:57 pm »
Well the reason being is that ctrlr files need "fixed" and cfg's don't.  The keycfg in the cfg files already writes each cfg to an individual file and supports analog adjustments while ctrlr files don't.  This third type would actually be the cfg code modified to read/write to another file in another directory with the added support for driver files. 

The cfg read code is already written to first check cfgs and then check ctrlrs.  That section could be re-written to first check a driver file and then check keycfgs.