Previous Thread
Next Thread
Print Thread
#73865 - 10/25/11 09:34 PM Custom joy input setting in default.cfg is lost  
Joined: Jul 2007
Posts: 22
fbs777 Offline
Member
fbs777  Offline
Member

Joined: Jul 2007
Posts: 22
im using the 1.43 version w/ubunut 10.10 and im having the same problem posted here ( http://mametesters.org/view.php?id=4479 ) about the 1.43u4 version.

When i remove an usb pad mame rewrite default.cfg

there is something i can do to solve this?

can someone confirm if this happens w/ 1.42 too?

Last edited by fbs777; 10/25/11 09:37 PM.
#73867 - 10/25/11 10:18 PM Re: Custom joy input setting in default.cfg is lost [Re: fbs777]  
Joined: Mar 2001
Posts: 15,733
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,733
USA
That is a core function. It is intended to prevent MAME from being non-functional if you set it up for a controller and later don't have that controller. Is there some reason you can't just leave the controller plugged in?

Last edited by R. Belmont; 10/25/11 10:18 PM.
#73868 - 10/25/11 10:42 PM Re: Custom joy input setting in default.cfg is lost [Re: fbs777]  
Joined: Jul 2007
Posts: 22
fbs777 Offline
Member
fbs777  Offline
Member

Joined: Jul 2007
Posts: 22
i think (not sure yet) sometimes when i turn on the pc w/ both controller in other usb ports the mame do the same thing.

So, i must to keep both controllers forever plugged in and in the same usb ports. :-(

for now, im using the chattr command so all .cfg files cannot be modified...

btw, in this link is marked as a bug confirmed, so i think isnt a core function, and the tester said this dont happen in .141 version

Last edited by fbs777; 10/25/11 11:19 PM.
#73917 - 10/28/11 03:59 AM Re: Custom joy input setting in default.cfg is lost [Re: fbs777]  
Joined: Feb 2007
Posts: 540
Sune Offline
Senior Member
Sune  Offline
Senior Member

Joined: Feb 2007
Posts: 540
Brazil
Originally Posted By fbs777

When i remove an usb pad mame rewrite default.cfg
there is something i can do to solve this?


Make ctrlr.cfg files for your controllers.

Here's one for the Xbox 360 controller.
P1 joystick is mapped to the d-pad, dual joysticks are mapped to the d-pad + the ABXY buttons. I didn't map analog controls because they aren't consistent across different games anyway.

Code:
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
    <system name="default">
        <input>
            <port type="P1_JOYSTICK_UP">
                <newseq type="standard">
                    KEYCODE_UP OR JOYCODE_1_HATSWITCHU
                </newseq>
            </port>
            <port type="P1_JOYSTICK_DOWN">
                <newseq type="standard">
                    KEYCODE_DOWN OR JOYCODE_1_HATSWITCHD
                </newseq>
            </port>
            <port type="P1_JOYSTICK_LEFT">
                <newseq type="standard">
                    KEYCODE_LEFT OR JOYCODE_1_HATSWITCHL
                </newseq>
            </port>
            <port type="P1_JOYSTICK_RIGHT">
                <newseq type="standard">
                    KEYCODE_RIGHT OR JOYCODE_1_HATSWITCHR
                </newseq>
            </port>
            <port type="P1_JOYSTICKRIGHT_UP">
                <newseq type="standard">
                    KEYCODE_I OR JOYCODE_1_BUTTON4
                </newseq>
            </port>
            <port type="P1_JOYSTICKRIGHT_DOWN">
                <newseq type="standard">
                    KEYCODE_K OR JOYCODE_1_BUTTON1
                </newseq>
            </port>
            <port type="P1_JOYSTICKRIGHT_LEFT">
                <newseq type="standard">
                    KEYCODE_J OR JOYCODE_1_BUTTON3
                </newseq>
            </port>
            <port type="P1_JOYSTICKRIGHT_RIGHT">
                <newseq type="standard">
                    KEYCODE_L OR JOYCODE_1_BUTTON2
                </newseq>
            </port>
            <port type="P1_JOYSTICKLEFT_UP">
                <newseq type="standard">
                    KEYCODE_E OR JOYCODE_1_HATSWITCHU
                </newseq>
            </port>
            <port type="P1_JOYSTICKLEFT_DOWN">
                <newseq type="standard">
                    KEYCODE_D OR JOYCODE_1_HATSWITCHD
                </newseq>
            </port>
            <port type="P1_JOYSTICKLEFT_LEFT">
                <newseq type="standard">
                    KEYCODE_S OR JOYCODE_1_HATSWITCHL
                </newseq>
            </port>
            <port type="P1_JOYSTICKLEFT_RIGHT">
                <newseq type="standard">
                    KEYCODE_F OR JOYCODE_1_HATSWITCHR
                </newseq>
            </port>
            <port type="P1_BUTTON1">
                <newseq type="standard">
                    JOYCODE_1_BUTTON1 OR KEYCODE_LCONTROL OR MOUSECODE_1_BUTTON1
                </newseq>
            </port>
            <port type="P1_BUTTON2">
                <newseq type="standard">
                    KEYCODE_LALT OR JOYCODE_1_BUTTON2 OR MOUSECODE_1_BUTTON2
                </newseq>
            </port>
            <port type="P1_BUTTON3">
                <newseq type="standard">
                    KEYCODE_SPACE OR JOYCODE_1_BUTTON4
                </newseq>
            </port>
            <port type="P1_BUTTON4">
                <newseq type="standard">
                    KEYCODE_LSHIFT OR JOYCODE_1_BUTTON3
                </newseq>
            </port>
            <port type="P1_BUTTON5">
                <newseq type="standard">
                    KEYCODE_Z
                </newseq>
            </port>
            <port type="P1_BUTTON6">
                <newseq type="standard">
                    KEYCODE_X
                </newseq>
            </port>
            <port type="P1_BUTTON7">
                <newseq type="standard">
                    KEYCODE_C
                </newseq>
            </port>
            <port type="P1_BUTTON8">
                <newseq type="standard">
                    KEYCODE_V
                </newseq>
            </port>
            <port type="P1_BUTTON9">
                <newseq type="standard">
                    KEYCODE_B
                </newseq>
            </port>
            <port type="P1_BUTTON10">
                <newseq type="standard">
                    KEYCODE_N
                </newseq>
            </port>
            <port type="P1_START">
                <newseq type="standard">
                    KEYCODE_1 OR JOYCODE_1_BUTTON8
                </newseq>
            </port>
            <port type="P1_SELECT">
                <newseq type="standard">
                    KEYCODE_5 OR JOYCODE_1_BUTTON7
                </newseq>
            </port>
            <port type="START1">
                <newseq type="standard">
                    KEYCODE_1 OR JOYCODE_1_BUTTON8
                </newseq>
            </port>
            <port type="COIN1">
                <newseq type="standard">
                    KEYCODE_5 OR JOYCODE_1_BUTTON7
                </newseq>
            </port>
        </input>
    </system>
</mameconfig>

It's not "clean", it still has mame's default keys/mouse buttons in it. But it works.


Moderated by  R. Belmont 

Who's Online Now
0 registered members (), 17 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,425
Posts109,185
Members4,759
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.025s Queries: 14 (0.009s) Memory: 4.9528 MB (Peak: 5.1296 MB) Zlib enabled. Server Time: 2017-10-17 06:00:03 UTC