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: Why can't MAME remember my keyboard configurations?  (Read 4826 times)

0 Members and 1 Guest are viewing this topic.

Batchman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 62
  • Last login:November 26, 2020, 08:03:49 pm
Why can't MAME remember my keyboard configurations?
« on: July 13, 2016, 04:52:44 pm »
So I decide I want to play some games and go into Mame. I program in all the main game functions for my controller in general controls. I play a bunch of games.

Then I come back tomorrow, and all that is gone, and I have to reprogram everything.

And I have to do that almost every day. Why? This is getting annoying.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9672
  • Last login:Today at 05:30:48 pm
  • Designated spam hunter
Re: Why can't MAME remember my keyboard configurations?
« Reply #1 on: July 13, 2016, 05:09:41 pm »
At first glance, this sounds like either write permission problems (files/folders set to read-only) or possibly windows reassigning gamepad numbers.

More details can help clarify thinigs.

1. What type of encoder? (keyboard-style like an IPac? gamepad-style like a Xin-Mo?)

2. What version/build of MAME? (i.e. v 0.171 GroovyMAME)

3. What platform? (PC, Raspberry Pi, Mac, Coinops on an XBox, etc.)


Scott

Batchman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 62
  • Last login:November 26, 2020, 08:03:49 pm
Re: Why can't MAME remember my keyboard configurations?
« Reply #2 on: July 13, 2016, 05:33:00 pm »
MameUI64 v 174, on a PC, using a USB NES-style game pad.

yotsuya

  • Trade Count: (+21)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19960
  • Last login:July 17, 2025, 10:00:30 pm
  • 2014 UCA Winner, 2014, 2015, 2016 ZapCon Winner
    • forum.arcadecontrols.com/index.php/topic,137636.msg1420628.html
Re: Why can't MAME remember my keyboard configurations?
« Reply #3 on: July 13, 2016, 05:35:24 pm »
If you unplug the game pad, there's an issue right there...
***Build what you dig, bro. Build what you dig.***

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9672
  • Last login:Today at 05:30:48 pm
  • Designated spam hunter
Re: Why can't MAME remember my keyboard configurations?
« Reply #4 on: July 13, 2016, 05:53:09 pm »
If you unplug the game pad, there's an issue right there...
Very true.   :cheers:

Batchman - Check out Drventure's ControllerRemap for Mame and Stigzler's ControllerRemap GUI.


Scott

Batchman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 62
  • Last login:November 26, 2020, 08:03:49 pm
Re: Why can't MAME remember my keyboard configurations?
« Reply #5 on: July 13, 2016, 06:11:41 pm »
Hmmm ...

So it has always done this, always will, and I pretty much just need to live with it.

Being able to play these old games is worth it, if it just has to be that way.

(And I took a look at the first of those, but it looked far more complicated and involved than in just reprogramming the gamepad every time I plug it in.)

Now that I know this is just the way things are, I can deal with it.

Thank you for the information.


But anybody know why all the player one controls can be set under player 1 -except- player one start, which has to be set under other controls? This seems confusing to me. <ggg>

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9672
  • Last login:Today at 05:30:48 pm
  • Designated spam hunter
Re: Why can't MAME remember my keyboard configurations?
« Reply #6 on: July 13, 2016, 07:07:59 pm »
So it has always done this, always will, and I pretty much just need to live with it.
Not necessarily.

I can hot-swap KADESTICK for a USB analog triggerstick and MAMEUIFX will recognize either one as "Joy 1" as long as I swap sticks before launching the game or exit and relaunch the game.

ControllerRemap is useful if you have more than one gamepad and windows is reassigning joystick numbers.

If you are only using one gamepad and it comes up in MAME as "Joy 1" every time when you map the controls, it could be that the config files aren't being saved.

If you don't mind, please post screenshots of your controls configuration menu at these three stages:

1. When you first boot up. (gamepad not working in games)

2. After you map the gamepad controls. (gamepad working in games)

3. After you exit and relaunch MAMEUI or reboot. (gamepad not working in games)


Scott

yamatetsu

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2724
  • Last login:Today at 04:16:44 pm
  • Just because.
Re: Why can't MAME remember my keyboard configurations?
« Reply #7 on: July 13, 2016, 11:35:14 pm »
I don't know whether this is relevant, but who knows. I'm using MAME .161 and a wireless xbox 360 controller. Playing games in this forum's high score competition, I configure each single game for use with the gamepad. MAME remembers those settings just fine, BUT if I forget to turn the gamepad on, the settings are immediately gone.

You might want to try configuring the controls, starting a game to test whether they work, then exit MAME. Unplug the controller, start a game. Go to the config menu, check the controls. Your changes will probably be gone.
So,  next thing to try would be configuring the controls, exiting MAME, leaving the gamepad plugged in, and then starting MAME a few times. Hopefully, as long as you don't unplug the pad, it should work.
                  

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
Re: Why can't MAME remember my keyboard configurations?
« Reply #8 on: July 18, 2016, 03:50:20 am »
(And I took a look at the first of those, but it looked far more complicated and involved than in just reprogramming the gamepad every time I plug it in.)

I would call the lost settings a bug. You might notice that the first time you run MAME with the gamepad disconnected, your modified (grey) settings are still there, minus the missing 'joy' entries, but the next time you run (with or without the gamepad) the settings are all white again.  This is because MAME encounters an unhandled exception during its exit routines while it's trying to figure out how to rewrite the changed configuration. That results in the default.cfg (or gamename.cfg) being truncated to 0 bytes. When MAME starts the next time, it recreates the cfg file with the default (nothing specifically redefined) configuration.

Fortunately, for this case, you don't need to reprogram your settings each time, and you don't need the other utilities unless you have multiple devices that move around on you.

Just connect your gamepad, start a game, reconfigure the controls under General, exit MAME, and copy cfg\default.cfg to ctrlr\gamepad.cfg

Then, when you start MAME, add -ctrlr gamepad to your command line (or change the ctrlr entry in your mame.ini to ctrlr gamepad) Since MAME doesn't modify the ctrlr files, the settings don't get lost even if the gamepad is disconnected.

Note that there could be things in the default.cfg that wouldn't belong in a ctrlr config, but since your default.cfg has been getting wiped out anyway, that's not going to bother you. Also, keep in mind that any game's controls which aren't on the General menu will have to be manually copied from the game's cfg file into the ctrlr file. (You can ask for help with that if you run into those games)

Batchman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 62
  • Last login:November 26, 2020, 08:03:49 pm
Re: Why can't MAME remember my keyboard configurations?
« Reply #9 on: July 18, 2016, 10:35:08 am »
Hmmm ... that could be a great improvement! Thank you!

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
Re: Why can't MAME remember my keyboard configurations?
« Reply #10 on: July 19, 2016, 02:05:35 am »
I was thinking about submitting this on mametesters, but it turns out it was reported about 5 years ago and hasn't been assigned to anyone, possibly because it was reported on Linux.
04479: Custom JOYCODE input setting in default.cfg is lost if the joypad is not connected.

Someone there also suggested the ctrlr workaround, and another commented that setting the Read Only attribute on default.cfg is sufficient. Neither actually fixes the problem, and they both have their limitations, but they'll get you by until someone fixes the code.