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: MAME global custom config stored in default.cfg keeps getting lost  (Read 6596 times)

0 Members and 1 Guest are viewing this topic.

clhug

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 179
  • Last login:April 04, 2024, 10:49:58 pm
Any ideas?  I have a 4 player MAME cabinet, and I've customized some of the controls to avoid special Windows keys and duplicate mappings across different players.  I know this is stored in default.cfg, and after I initially change the mappings, I can see that reflected in default.cfg.

But every so often, and I've not been able to identify any pattern, the default.cfg file gets wiped out and just reverts to, well, the default default.cfg, which is essentially empty other that some comment text.

I've gotten to where I need to make a backup copy of the default.cfg file and when I find that it's been wiped out in MAME, then I copy the backup back in.

I'm now running .178.  I just updated my arcade machine from a several year old version.

Thanks!

Tafoid

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 238
  • Last login:February 12, 2025, 04:47:22 am
  • Emulation Devotee
    • MAMELOAD TNG (Front-End)
Re: MAME global custom config stored in default.cfg keeps getting lost
« Reply #1 on: October 20, 2016, 11:20:57 pm »
Any ideas?  I have a 4 player MAME cabinet, and I've customized some of the controls to avoid special Windows keys and duplicate mappings across different players.  I know this is stored in default.cfg, and after I initially change the mappings, I can see that reflected in default.cfg.

But every so often, and I've not been able to identify any pattern, the default.cfg file gets wiped out and just reverts to, well, the default default.cfg, which is essentially empty other that some comment text.

I've gotten to where I need to make a backup copy of the default.cfg file and when I find that it's been wiped out in MAME, then I copy the backup back in.

I'm now running .178.  I just updated my arcade machine from a several year old version.

Thanks!

To my knowledge, the best way to handle permanent mapping of controls across all games would be to use a .cfg file stored in CTRLR folder.
You can adjust the path and the file used through MAME.ini or using command-line triggers.
-ctrlrpath           path to controller definitions
-ctrlr               preconfigure for specified controller


Hopefully that will help you out.

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
Re: MAME global custom config stored in default.cfg keeps getting lost
« Reply #2 on: October 22, 2016, 01:15:02 am »
Known problem, already has a bug report.

Discussed here

Use a ctrlr file or set the read-only attribute on your default.cfg once you have it how you want it.

clhug

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 179
  • Last login:April 04, 2024, 10:49:58 pm
Re: MAME global custom config stored in default.cfg keeps getting lost
« Reply #3 on: October 22, 2016, 11:49:41 am »
Thanks to both of you.  I'll look into the ctrlr config vs. default.cfg.

I do want to clarify, that other thread about the issue seems to have something to do with plugging and unplugging controllers causing it.  I don't do that.  I have a set of controls that always stay plugged in and never change.  So should that bug still affect me somehow?

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
Re: MAME global custom config stored in default.cfg keeps getting lost
« Reply #4 on: October 22, 2016, 06:34:54 pm »
The bug seems to be in the code that rewrites the cfg file. Changing controllers is an easy way to trigger the bug, but that doesn't mean it's the only way.

If you're already replacing the file when it disappears, setting the file to read-only would accomplish the same thing without further intervention.

I like ctrlr files because I copy things from machine to machine and version to version, but the read-only 'fix' is faster and easier.