Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider becoming a contibuting member by either clicking this text or the Patreon link on the right.

Patreon

If neither of those of work for you, you can donate any amount by clicking here.

Recommended Posts

Posted

Hi all,

I hope i'm in the right section here. I have some trouble with mapping some keys to my gamepad.

First of all, i got it all working in GameEx. So i can use my gamepad to control the menu. (joystick for scrolling, buttons to select, go back etc)

I use Xpadder to get this all done.

Now my problem is, whenever is start MAME, i NEED to use my keyboard for input 1 (player one) and input 5 (insert coin)

I have mapped 2 buttons on my gamepad to kb1 and kb5. These do work, if i open wordpad and hit the buttons the numbers 1 and 5 do appear. But somehow it does not work in MAME. So i still have to use my keyboard and hit the 1 and 5 on there in order to get player one selected and insert coins.

Anybody had this problem and solved it? Or anybody got some idea's how tyo solve this problem?

Posted

You need to compile mame yourself to accept direct input. Headkaze's MAME Compiler 64 offers this functionality. You'll have to do a Google search for it, I'm in tapatalk and don't have a link in front of me.

Posted

Gonna give it a try right away. Still weird that any other keyboard key is registered but nog the two keys for "player one" and "coin"

Will report after trying.

Posted

You should be able to configure it within Mame itself. Press the {tab} key while in Mame, then find the section to change the input for all games.

Posted

You can switch between raw and di? Since when?

Xpadder only works in DI, so that's the issue here I think, unless I misread.

Posted
  On 2/9/2014 at 11:33 PM, Tempest said:

You should be able to configure it within Mame itself.

I tried that. I changed 1 (player one) and 5 (insert coin) to [ and ]

Now, this works, if i use [ and ] on my keyboard, it works in MAME. Now i changed the mapping on my gamepad to imput [ and ] too. Now here is the weird thing, it still does nt work.

I tried diffrent buttons on my gamepad. All the other buttons are working, so the Ctrl, Alt, Spacebar and Shift doe work on my gamepad. Only ones that will not work are 1 and 5 (after i changed them [ and ] but changed that back)

So, i have to use my keyboard for 1 and 5, and after that i can just play the games with my gamepad. If i want more coins i need to use my keayboard again.

Posted

Again, it's because of Xpadder here. You need DI for that to work.

Posted

No, not Di vs Raw. I would think that you could configure the game pad directly in Mame without Xpadder? Or am I missing something?

Posted

You can, but he said he's using xpadder.

If you add the -joy cl switch to mame, you can configure the joystick too, but he said he was using Xpadder and trying to map key strokes to the joystick. In which case, he needs DI. :-)

I think what's going on here is your mapping keys to the joy stick in MAME but trying to set key strokes in the ui. In many cases MAME will have a default joystick mapping for any connected game pads, but not for those buttons. If you edit the input and press the button you want to use on the joystick instead of the keyboard, you can eliminate Xpadder altogether, which is what Tempest is suggesting.

Posted

Well, working on compiling mame, more about that later.

I also tried that, start a game, hit TAB and then configure the controls. Go to "start" and i see kb1and kb5 is configured there. i hit enter and then it goes blank, press the button i want to use on my gamepad, and i see it changes to that button. so i go down all the way, back to prior menu, back to game, give it a try and it wont work. Double checked by hitting TAB again, input is still ghanged. (Also tried diffrent buttons on my gamepad so i'm sure it's not a malfunction of a particular button)

This all without using Xpadder btw.

For me the weird thing is that any button works with any input, but just the 1 and 5 dont :(

Posted

Well my setup is a hybrid of both Xpadder and the MAME settings. I use regular joystick inputs for these buttons, and mine is working without Xpadder, so I can assure you this works without any extra settings.

A couple of thoughts here: is your MAME.ini set to read only? Immediately after mapping and it says it's mapped, enter the tab menu and look again. Are they still correctly mapped? If so, do they work? Or are your settings not being applied when you exit the game and reenter it?

This sounds more and more like a problem with MAME itself, in which case I owe you an apology, Tempest. My bad. :-)

Posted

Thanks for the super fast replies.

It does not give me a message that something is changed.

I do see the input change from kbd5 to joy-button1 (or whatever button i take on my gamepad). After that i go back to the game, and i can not use the button to add coins. Then i go back there with tab again and it is still changed to my gamepad button. I also tried quitting the game and start it up again, try my button and it still does not work, hit tab and have a look and the button is still assigned there.

Weird thing is, the kb5 still does work, even when in mame its assigned to my gamepad button.

Maybe you can have a look at my ini file?

  Reveal hidden contents

Looks like i can not find kb1 and kb5 there.

Posted

Also tried to turn off joystick in MAMEui settings, and then get it working true xpadder, also no results.

Bed time here now :( Hope to see some more replies tomorow, and fingers crossed that one of those will solve my problem.

Posted

Found it in the ini folder.

Mame ini:

  Reveal hidden contents

Mame32 ini:

  Reveal hidden contents

Btw, this is the mame i'm messing around with to try to get it to work.

For GameEx i got mame64 but can not find a mame.ini file there....

Posted

Can't stand it when i can't solve a problem. So, no sleep.

Problem partially solved. I got 1 and 5 working on my gamepad. BUT....... i can nog change it in "input (general)" but have to change it in "input (this game)" wich means i have to manualy change this to all the games? :o

I'm allmost sure there is a workaround or some neat trick for this.

And now real bedtime

Posted

I made a mistake when I said post your mame.ini. I should have said post your Mame\cfg\default.cfg. That is the file that would indicate your key bindings in general. When you create settings per game, mame creates a file for each game that has per game settings in the cfg folder.If you changed Pacman, there would be a mame\cfg\pacman.cfg file. The fact that you can set keys per game but not globally would indicate to me that either your default.cfg is write protected, or there is a permission issue.

Posted

Allrighty, default.cfg

  Reveal hidden contents
<?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_BUTTON5">
<newseq type="standard">
KEYCODE_Z
</newseq>
</port>
<port type="P1_BUTTON6">
<newseq type="standard">
KEYCODE_X
</newseq>
</port>
<port type="P1_START">
<newseq type="standard">
JOYCODE_1_BUTTON10
</newseq>
</port>
<port type="P1_SELECT">
<newseq type="standard">
JOYCODE_1_BUTTON9
</newseq>
</port>
</input>
</system>
</mameconfig>

And then 1944
  Reveal hidden contents

<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
<system name="1944">
<counters>
<coins index="0" number="7" />
</counters>
<input>
<port tag=":IN2" type="START1" mask="256" defvalue="256">
<newseq type="standard">
JOYCODE_1_BUTTON5
</newseq>
</port>
<port tag=":IN2" type="COIN1" mask="4096" defvalue="4096">
<newseq type="standard">
JOYCODE_1_BUTTON6
</newseq>
</port>
</input>
</system>
</mameconfig>

Off to work now so will have a look myself too when i get home.
Posted

Allright, problem solved. Sad part is no idea HOW.

Yesterday i compiled mame64 myself like Adultery sugested with DI and it's working! So so far so good.

Once again thank you guys for thinking with me. I'm surprised with the quick responses and goodwill to help others. (Time to register my GameEx and help the developers too)

Guest
This topic is now closed to further replies.
×
×
  • Create New...