Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
04479 Interface Minor Always Sep 4, 2011, 10:16 Sep 2, 2013, 14:14
Tester stealth View Status Public Platform MAME (Unofficial Binary)
Assigned To Resolution Open OS Linux
Status [?] Confirmed Driver
Version 0.143u4 Fixed in Version Build I686
Fixed in Git Commit Github Pull Request #
Summary 04479: Custom JOYCODE input setting in default.cfg is lost if the joypad is not connected.
Description Mame lost my personal settings after playing games without problem (parameters are ok in game)

<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
    <system name="default">
        <input>
            <port type="START1">
                <newseq type="standard">
                    KEYCODE_1PAD OR JOYCODE_1_BUTTON7
                </newseq>
            </port>
            <port type="START2">
                <newseq type="standard">
                    KEYCODE_2PAD OR JOYCODE_2_UNKNOWN_SWITCH
                </newseq>
            </port>
            <port type="COIN1">
                <newseq type="standard">
                    KEYCODE_5PAD OR JOYCODE_1_BUTTON8
                </newseq>
            </port>
            <port type="COIN2">
                <newseq type="standard">
                    KEYCODE_6PAD OR JOYCODE_2_UNKNOWN_SWITCH
                </newseq>
            </port>
            <port type="UI_CANCEL">
                <newseq type="standard">
                    JOYCODE_1_BUTTON6 OR KEYCODE_ESC
                </newseq>
            </port>
        </input>
    </system>
</mameconfig>
Steps To Reproduce 1) Write default.cfg with JOYCODE options
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
    <system name="default">
        <input>
            <port type="START1">
                <newseq type="standard">
                    KEYCODE_1PAD OR JOYCODE_1_BUTTON7
                </newseq>
            </port>
            <port type="START2">
                <newseq type="standard">
                    KEYCODE_2PAD OR JOYCODE_2_BUTTON7
                </newseq>
            </port>
            <port type="COIN1">
                <newseq type="standard">
                    KEYCODE_5PAD OR JOYCODE_1_BUTTON8
                </newseq>
            </port>
            <port type="COIN2">
                <newseq type="standard">
                    KEYCODE_6PAD OR JOYCODE_2_BUTTON7
                </newseq>
            </port>
            <port type="UI_CANCEL">
                <newseq type="standard">
                    JOYCODE_1_BUTTON6 OR KEYCODE_ESC
                </newseq>
            </port>
        </input>
    </system>
</mameconfig>
2) Play game without pad2 connected and mame rewrite file -> see UNKNOWN_SWITCH
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
    <system name="default">
        <input>
            <port type="START1">
                <newseq type="standard">
                    KEYCODE_1PAD OR JOYCODE_1_BUTTON7
                </newseq>
            </port>
            <port type="START2">
                <newseq type="standard">
                    KEYCODE_2PAD OR JOYCODE_2_UNKNOWN_SWITCH
                </newseq>
            </port>
            <port type="COIN1">
                <newseq type="standard">
                    KEYCODE_5PAD OR JOYCODE_1_BUTTON8
                </newseq>
            </port>
            <port type="COIN2">
                <newseq type="standard">
                    KEYCODE_6PAD OR JOYCODE_2_UNKNOWN_SWITCH
                </newseq>
            </port>
            <port type="UI_CANCEL">
                <newseq type="standard">
                    JOYCODE_1_BUTTON6 OR KEYCODE_ESC
                </newseq>
            </port>
        </input>
    </system>
</mameconfig>
3) I play another game and mame lost default.cfg
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
<system name="default" />
</mameconfig>

You can reproduce with pad1 also
<input>
            <port type="START1">
                <newseq type="standard">
                    KEYCODE_1PAD OR JOYCODE_1_UNKNOWN_SWITCH

When i remove an usb pad mame rewrite default.cfg
Additional Information I tested with looping.zip and robby.zip from http://mamedev.org/roms/

Ubuntu Natty and deb from http://sdlmame.wallyweek.org/
Github Commit
Flags
Regression Version
Affected Sets / Systems
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
13
User avatar
No.07764
stealth
Tester
Sep 4, 2011, 10:33
I find something, the problem seems disappear when i removed

           <port type="COIN2">
                <newseq type="standard">
                    KEYCODE_6PAD OR JOYCODE_2_UNKNOWN_SWITCH
                </newseq>
            </port>

           <port type="START2">
                <newseq type="standard">
                    KEYCODE_2PAD OR JOYCODE_2_UNKNOWN_SWITCH
                </newseq>
            </port>

My second pad is not always connected, maybe a link ? The games have only one player
User avatar
No.07765
stealth
Tester
Sep 4, 2011, 10:51
Sorry for the noise but i see exactly where is the problem

Steps to reproduce

1) Write default.cfg with JOYCODE options

?<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
    <system name="default">
        <input>
            <port type="START1">
                <newseq type="standard">
                    KEYCODE_1PAD OR JOYCODE_1_BUTTON7
                </newseq>
            </port>
            <port type="START2">
                <newseq type="standard">
                    KEYCODE_2PAD OR JOYCODE_2_BUTTON7
                </newseq>
            </port>
            <port type="COIN1">
                <newseq type="standard">
                    KEYCODE_5PAD OR JOYCODE_1_BUTTON8
                </newseq>
            </port>
            <port type="COIN2">
                <newseq type="standard">
                    KEYCODE_6PAD OR JOYCODE_2_BUTTON7
                </newseq>
            </port>
            <port type="UI_CANCEL">
                <newseq type="standard">
                    JOYCODE_1_BUTTON6 OR KEYCODE_ESC
                </newseq>
            </port>
        </input>
    </system>
</mameconfig>

2) Play game without pad2 connected and mame rewrite file -> see UNKNOWN_SWITCH

?<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
    <system name="default">
        <input>
            <port type="START1">
                <newseq type="standard">
                    KEYCODE_1PAD OR JOYCODE_1_BUTTON7
                </newseq>
            </port>
            <port type="START2">
                <newseq type="standard">
                    KEYCODE_2PAD OR JOYCODE_2_UNKNOWN_SWITCH
                </newseq>
            </port>
            <port type="COIN1">
                <newseq type="standard">
                    KEYCODE_5PAD OR JOYCODE_1_BUTTON8
                </newseq>
            </port>
            <port type="COIN2">
                <newseq type="standard">
                    KEYCODE_6PAD OR JOYCODE_2_UNKNOWN_SWITCH
                </newseq>
            </port>
            <port type="UI_CANCEL">
                <newseq type="standard">
                    JOYCODE_1_BUTTON6 OR KEYCODE_ESC
                </newseq>
            </port>
        </input>
    </system>
</mameconfig>

3) I play another game and mame lost default.cfg

<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
<system name="default" />
</mameconfig>

You can reproduce with pad1 also

        <input>
            <port type="START1">
                <newseq type="standard">
                    KEYCODE_1PAD OR JOYCODE_1_UNKNOWN_SWITCH

When i remove an usb pad mame rewrite default.cfg
User avatar
No.07767
Fujix
Administrator
Sep 4, 2011, 19:11
I fixed the Summary and the reproduction step.
User avatar
No.07772
stealth
Tester
Sep 9, 2011, 16:45
Just for information no problem with 0.141

About the Summary at the end mame lost all parameters (not only Custom JOYCODE)
User avatar
No.08097
stealth
Tester
Jan 28, 2012, 15:21
Is it still out there ? In last version ?
User avatar
No.08101
Tafoid
Administrator
Jan 29, 2012, 15:45
You have to tell us. I presume it hasn't been fixed yet since you haven't mentioned it.
User avatar
No.08102
pri88
Viewer
Jan 29, 2012, 18:27
i think i remember having a similar problem myself, so as a 'quick fix' i set up default.cfg to how i like it, and then changed the file to read only, so mame cannot make any changes to it, if my joystick is not connected, etc
User avatar
No.08147
stealth
Tester
Feb 5, 2012, 12:57
edited on: Feb 5, 2012, 13:06
Still present with 144u7

If you forget your pad, Mame erase your default.cfg
User avatar
No.08214
stealth
Tester
Feb 19, 2012, 16:30
@pri88 Yes I changed the owner too, but this not practical. A beginner with this problem can be quickly lost
User avatar
No.08254
Sune_S
Senior Tester
Feb 22, 2012, 19:50
Pri88, stealth:

It has always been like this.
It's better to use a ctrlr file for permanent remapping.
Here's how:

do your remapping via TAB menu and exit mame
copy default.cfg to the ctrlr folder
rename it to [whateveryouwant].cfg
in mame.ini, below "core input options" set ctrlr to [whateveryouwant] (no .cfg extension just the filename)

As long as you have ctrlr=[whateveryouwant] in mame.ini you can plug and unplug your gamepad at will, switch ports etc.
User avatar
No.08261
pri88
Viewer
Feb 23, 2012, 16:15
thanks sune, i didnt know this and its good to know
User avatar
No.08265
stealth
Tester
Feb 24, 2012, 10:42
edited on: Feb 24, 2012, 16:39
Thanks Sune_s I will try, but I don't agree there was no problem with 0.141
User avatar
No.09767
iVoid
Tester
Sep 2, 2013, 14:14
I'd like to point out that this isn't limited to just default.cfg, all game cfg files are also affected.