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: Default config is not aligning with how it's set  (Read 2231 times)

0 Members and 1 Guest are viewing this topic.

markronz

  • We traced the call, and it came from....INSIDE YOUR ARCADE MACHINE!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 821
  • Last login:April 12, 2019, 12:03:08 am
  • Game on!
Default config is not aligning with how it's set
« on: May 19, 2014, 09:39:35 pm »
I have set up MAME many times.   I know how it works, and how its supposed to work.   I am helping a friend set up his now and I cannot explain what is happening.  So I'm hoping someone here can tell me what the heck is going on, because it is starting to make me think I'm losing my mind....

OK, so we set the default keys via MAME.   Then we exit MAME and look in the default.cfg file.  Just as an example, lets look at player 1, buttons 1-6:

            <port type="P1_BUTTON1">
                <newseq type="standard">
                    JOYCODE_1_BUTTON28
                </newseq>
            </port>
            <port type="P1_BUTTON2">
                <newseq type="standard">
                    JOYCODE_1_BUTTON25
                </newseq>
            </port>
            <port type="P1_BUTTON3">
                <newseq type="standard">
                    JOYCODE_1_BUTTON27
                </newseq>
            </port>
            <port type="P1_BUTTON4">
                <newseq type="standard">
                    JOYCODE_1_BUTTON13
                </newseq>
            </port>
            <port type="P1_BUTTON5">
                <newseq type="standard">
                    JOYCODE_1_BUTTON26
                </newseq>
            </port>
            <port type="P1_BUTTON6">
                <newseq type="standard">
                    JOYCODE_1_BUTTON14
                </newseq>
            </port>


Now the next time we open up MAME and open the game again (UMK3 as our example), we look at the default controls via MAME again.  It does NOT align with whats in the default.cfg file.  This is what it shows:

P1 Button 1     Joy 1 Button 28
P1 Button 2     Joy 1 Button 25
P1 Button 3     Joy 1 Button 27
P1 Button 4     Joy 1 Button 12
P1 Button 5     Joy 1 Button 26
P1 Button 6     Joy 1 Button 13

For some reason buttons 4 and 6 shifted one number.   If I exit MAME and look at the default.cfg file, it has not changed.   It still looks like what I have listed above.  There is no "config for this game" file in play here either.  There is only an empty umk3.cfg file and a default.cfg file.

If we set the default config again, the controls set just fine and the numbers get corrected on the screen.  Then the game operates correctly.  As soon as you exit the game and then re-enter the numbers shown are shifted again.

I've never seen anything to weird before and I really have no idea what's happening here.  What gives?  Anyone have any ideas?  I tried to delete the sta file for UMK3, but that did nothing to help the problem either.  I don't know what else to try and I'd really appreciate any help or suggestions anyone can give!

Hoopz

  • Don't brand me a troublemaker!
  • Trade Count: (+8)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5285
  • Last login:June 13, 2025, 09:18:32 pm
  • Intellivision Rocks!
Re: Default config is not aligning with how it's set
« Reply #1 on: May 19, 2014, 10:15:54 pm »
A few random thoughts... Make sure the folder(s) aren't read only, delete all config and ctrlr files, don't pause the game while assigning buttons.  Not sure any of those will be it but worth a shot.  I blame Windows first and try and find an issue there before anything else.

markronz

  • We traced the call, and it came from....INSIDE YOUR ARCADE MACHINE!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 821
  • Last login:April 12, 2019, 12:03:08 am
  • Game on!
Re: Default config is not aligning with how it's set
« Reply #2 on: May 19, 2014, 11:00:51 pm »
We didn't pause the game and the folders are not read only.  I know that much.  We did delete all cfg files already.  I will try the controllers thing.  Not sure it will help but at this point I'm willing to try anything.  None if this makes sense to me. 

markronz

  • We traced the call, and it came from....INSIDE YOUR ARCADE MACHINE!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 821
  • Last login:April 12, 2019, 12:03:08 am
  • Game on!
Re: Default config is not aligning with how it's set
« Reply #3 on: May 20, 2014, 03:38:24 pm »
Tried deleting the cntrlr files, but that did not help either.   Anyone have any more suggestions to try to fix this really weird problem?

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9273
  • Last login:Yesterday at 06:53:06 am
  • ...
Re: Default config is not aligning with how it's set
« Reply #4 on: May 20, 2014, 03:58:32 pm »
Using a front end?  Some of them "help" you by writing to your config files on the fly.


It's interesting that they are shifted by 1.  Some pieces of software start the game controller buttons out at zero, while others start them at 1.
(the button labeled 1 on the controller shows up as button 0 in some programs)

What version of MAME are you using and does it do this for every game?
« Last Edit: May 20, 2014, 04:01:25 pm by BadMouth »

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Default config is not aligning with how it's set
« Reply #5 on: May 20, 2014, 04:16:39 pm »
You can rule out a hardware issue by downloading Poswdm and confirm the button presses on your joystick are consistently the same.

markronz

  • We traced the call, and it came from....INSIDE YOUR ARCADE MACHINE!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 821
  • Last login:April 12, 2019, 12:03:08 am
  • Game on!
Re: Default config is not aligning with how it's set
« Reply #6 on: May 20, 2014, 04:28:36 pm »
BadMouth, thanks for the suggestion of things to look at.  I am using Mala as my Front End.  Pretty positive that I don't have any such options checked, but I will verify once I get into my friend's machine again.   One thing I did think of is that we are using LEDBlinky.   I think in the config there I may have the button numbers screwed up there in the input map.  I don't know if LEDBlinky would mess with MAME like that, but I guess it's something I should correct regardless.   We are on an older version of MAME.  I want to say .128 or something.  But I've used this same MAME folder and everything else on a few different computers and never had such an issue.   I believe this problem is affecting all games, but I will check again and confirm that fact as well.

Headkaze, it's not a hardware issue.  Its a software issue.  The mame Default config gets changed every time a game is launched.  If I go into the controller config area in Windows, I can hit the buttons and they light up the numbers I'd expect all day.  And if we set the default controls in MAME, they appear to set correctly too. The default config right can be set 100% correctly, but when we load a game in MAME and look at it, the numbers are all shifted.   The config file never changes, but what appears on the screen is wrong. 

It's just screwy I tell you.  I have to agree with BadMouth, it really seems like something is changing it "on the fly" because my default.cfg file is right.  And MAME just doesnt seem to care.

markronz

  • We traced the call, and it came from....INSIDE YOUR ARCADE MACHINE!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 821
  • Last login:April 12, 2019, 12:03:08 am
  • Game on!
Re: Default config is not aligning with how it's set
« Reply #7 on: May 20, 2014, 05:57:07 pm »
OK, I did some more playing.   It does happen in every game.

To eliminate the front end from the equation, I used MAMEUI directly.  I did not use Mala, and hence did not use any LEDBlinky stuff.   So I'm going right after it in MAME.

I verified nothing was set to read-only.   I deleted all config files and started from scratch.   I only have one cntrlr file and it's correctly set.  Although I dont exactly know what this file does, or when it really comes into play.

Then I corrected the default.cfg file manually.  Then I launched MAME.  While in MAME, I look at the config settings, some of the buttons are off by 1.  But only SOME.  We can set the config again, via MAME, but it never saves it.  When you exit MAME and go right back in, its changed back to whatever messed up thing it was before.   

Could MAME be possibly loading default config settings from something other than default.cfg?    Or doing it's own "on the fly" type stuff?  Or does this make any sense to anyone?

Beginning to think I might have to try to recopy over my MAME folder again and start from scratch.  Something is really messed up here.

liquid8

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 156
  • Last login:June 11, 2017, 04:02:02 am
  • I working on it.. it'll be a while.
Re: Default config is not aligning with how it's set
« Reply #8 on: May 20, 2014, 08:29:12 pm »
I *think* I may have seen this, around button 27 or button 28.. if not, it was similar. I use a GP-Wiz and kept setting a button and it wouldn't stick. Then I realized it was around there where the problem was.. not saving some buttons, a bug in MAME perhaps. I'll check mine again and see what I ended up doing.

Did you mention the version of MAME you are running?

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9273
  • Last login:Yesterday at 06:53:06 am
  • ...
Re: Default config is not aligning with how it's set
« Reply #9 on: May 20, 2014, 08:39:06 pm »
Try the official version of MAME. http://www.mamedev.org/oldrel.html

I remember I had an old version of MAMEPlus at some point that had its own separate mameplus.cfg file in a different folder separate from mame.cfg.  Not sure about the controller file.

markronz

  • We traced the call, and it came from....INSIDE YOUR ARCADE MACHINE!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 821
  • Last login:April 12, 2019, 12:03:08 am
  • Game on!
Re: Default config is not aligning with how it's set
« Reply #10 on: May 20, 2014, 09:04:39 pm »
I am using the official MAME, granted it's version .128.   

liquid8, that would be great.  Let me know if you have any details about what you did to correct it.   We are using a GP-Wiz as well.   I have the exact same MAME folder on my own computer, exact same, and it works fine.   So I have no idea why it's not working on his PC.   

I guess I will try to compile MAME over again.   And see if the new MAME acts any differently.   I don't want to deal with the headache of fixing roms and game lists and such right now if I don't have to.  So I might just try to recompile version 128 again.  Or something reasonably close to it anyway.

liquid8

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 156
  • Last login:June 11, 2017, 04:02:02 am
  • I working on it.. it'll be a while.
Re: Default config is not aligning with how it's set
« Reply #11 on: May 20, 2014, 11:23:43 pm »
Well I tried to duplicate it and of course, I couldn't. I tried .143 which I was using previously, and I'm currently using .152 - neither would do it for me.. perhaps I had an earlier version at the time. It similar to what you are saying, but if I recall i don't think it re-mapped it to something different, it would just lose it everytime i re-entered mame. I am currently using Xpadder with mapped keys, so it's been a non-issue for awhile.

Perhaps Randy knows of an issue with GP-Wiz and older versions of MAME?

Just grab a newer pre-built mame to test with and see if the problem occurs. As others said, make sure you are running mame standalone to verify that it is in fact mame causing the issue.

I would also add make sure you don't have ANY other joysticks hooked up. That's probably not the issue, but I have a bunch of gamepads hooked up to mine and a disconnect or a stuck button can cause you to pull your hair out.

Good luck!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19431
  • Last login:Today at 02:08:41 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Default config is not aligning with how it's set
« Reply #12 on: May 21, 2014, 02:55:39 pm »
Stuck buttons or bad wiring are definitely a possibility.  I remember several years back I was having a problem and was about to pull my hair out.  It turned out a few of my buttons had a bad ground.... strangely enough the ipac would still register a button press, they just had trouble releasing it.  Fixing the ground connection fixed my problem.