libretro / mame2010-libretro

Late 2010 version of MAME (0.139) for libretro. Compatible with MAME 0.139 sets.
32 stars 50 forks source link

Can't bind Player 2 Button 1 or Button 6 within retroarch menu #119

Open randomuseralias opened 6 years ago

randomuseralias commented 6 years ago

Player 2 Button 1 and Button 6 will not bind to actions in game.

palmerj commented 5 years ago

I can also confirm that 5th and 6th buttons are not bound. Also the player 2 controls can not be set in the MAME UI and you can not set the buttons in the MAME UI with a plugged in keyboard or with the 2 player gamepad. My setup uses 2 of the same gamepads which are working fine in MAME 2003 or finalburn backends. @markwkidd any ideas as you have recently applied a patch that added players 3 and 4?

palmerj commented 5 years ago

Here's a log of the emulator running mk1: https://gist.github.com/palmerj/de1212f7c3bc1e0c8acbb2ca74b27459

purplesanz commented 5 years ago

5th and 6th buttons are not bound. Also the player 2 controls can not be set in the MAME UI

Exactly the same issues I'm having. Is there any workaround for this?

Metalwario64 commented 5 years ago

I have this issue as well, and as described above, MAME 2003 (and the Plus version), as well as the FBA cores all have the controls working properly.

In my case, it shows these buttons as bound in the controls screen, but they don't actually work for player 2.

ghost commented 5 years ago

first time using this core the joystick is mapped to the keyboard for some reason? and only player1 controls are set in the controls menu in input general is this intentional or is it a wip?

markwkidd commented 5 years ago

WIP. No one is working on it much though.

On Tue, Apr 9, 2019 at 12:23 AM grant2258 notifications@github.com wrote:

first time using this core the joystick is mapped to the keyboard for some reason? and only player1 controls are set in the controls menu in input general is this intentional or is it a wip?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/libretro/mame2010-libretro/issues/119#issuecomment-481096503, or mute the thread https://github.com/notifications/unsubscribe-auth/ASphdtKDtLu8aSOmJm2caNWogfbGqx3Kks5vfBW0gaJpZM4U9RR9 .

-- Mark W. Kidd http://facebook.com/markwkidd (606)536-0115

ghost commented 5 years ago

Well looks like input on p2 isint working all i thought this core was mature tbh with being newer was just checkout out the video code for the rotation. Ill see if i can get basic digital controls working look like you added it right to me at a glance

ghost commented 5 years ago

Well the input got completely broke somewhere down the line or someone broke it. Its fixed now in the pull request and we have analog controls now as well not done the triggers is easy enough for someone to add them if they want them.

ps the keyboard wasnt even working no idea how it could have been left like that

https://github.com/libretro/mame2010-libretro/pull/125

ghost commented 5 years ago

this is how bad it was i can see why all the input issues where there

before before

after after

ghost commented 5 years ago

the old alternative fix to add the old way of mapping retropads to mames default keys and use the keyboard interface instead of adding it as a joystick device. Players 2+ where added completely wrong. I would recommend adding it as intended in the pull request but each to there own

https://github.com/libretro/mame2010-libretro/compare/master...grant2258:map_retropad_to_mame_default_keyboard_settings?expand=1

purplesanz commented 5 years ago

this is how bad it was i can see why all the input issues where there

Were you able to get six buttons (three punches + three kicks, for example) working on the second gamepad?

thanguya commented 4 years ago

Hey mans, I found a solution for myself but it is quite the convoluted work around. However, it allows me to have Player 1 on my Xbox controller with all 6 buttons. And Player 2 on my arcade stick with all 6 buttons. It requires that you have Antimicro or any Joypad to Keyboard program of your choice. Antimicro allows me to remap controller buttons to a keyboard key and I set it up so when Mame2010 core starts up, it also starts up.

So what I did was map my controller 1 as usual. I cross check this by going into Test or Service inside Mame2010 core while the game is running and Input to see which keys are binded. Or go into Story Mode, let Player 2 Join and punch around. Now for Player 2 I bind keys 1,4,5,6. In Street Fighter EX for example, that’s Low Kick, Low Punch, Medium Punch and Heavy Punch.

This leaves me with two missing kicks. So what I did then was I went into Antimicro and set R2 = Keyboard “E”. This gives me Medium Kick. Now the last step was, you have to disable Retroarch’s exit button from = “escape” to “nul” temporary. You also have to clear any Autohotkeys Scripts associated with Retroarch.

This allows you to clear keys in Mame2010 GUI as Mame2010 accepts two “escape” presses to clear a key. The MameGUI opens via Tab. Run Mame2010 and enter Mame2010 GUI. Then go to where Tab to open GUI is located, it should be in Option Settings or Settings, basically NOT Player 1 or Player 2 but general input settings for navigating the GUI. Select where Tab is allocated and select it and double press “escape”. This clears the Tab key so it no longer opens Mame2010 GUI. Now DO NOT CLOSE RETROARCH. As this saves your configuration and you can’t access the Mame2010 when you reopen retroarch. Now navigate to Player 2 in the GUI and set Button 2 = Tab. Now you have Tab set to Medium Kick. Now you can assign Tab onto your Joypad Controller. The only issue with this is you no longer have access to Mame2010 GUI but after setting up you won’t need to as everything is handled by Retroarch.

Now you should have 6 buttons for player 2, and Player 1 also has 6 buttons.

You can

Setup your program to run with retroarch or your Mame2010 game like this.

un, C:\Program Files (x86)\AntiMicro\antimicro.exe

$Esc:: { Process, Close, antimicro.exe Process, Close, {{{StartupEXE}}} }

Also if everything fails or is messed up. You can go to

Where you Saved Retroach :\RetroArch\saves\mame2010 and delete the entire folder. This resets the Mame2010 GUI settings so you can Tab into again and mess around.

Also if you have difficulty preventing “escape” from exiting in Retroarch. Find retroarch.cfg in and open in Notepad.

Change input_exit_emulator = “escape” to

input_exit_emulator = “null”

I hope all or any of this information makes sense and helps you configure, I’ve spent nearly a week on this problem as I was setting up my Arcade collection and it drove me insane.

pjft commented 4 years ago

@markwkidd apologies for bothering here.

I'm happy to try and give it a shot here, though the MAME codebase is a bit daunting.

I have looked through past PRs, namely yours about adding 3 & 4 player support, and your comment in #21 about this being the location for it to be fixed:

https://github.com/libretro/mame2010-libretro/blob/master/src/emu/inpttype.h#L139-L140

But it is still very alien to me. I see the default definitions there, but then I fail to see how these address (or could be changed) to address the fact that those extra buttons on 6-button games don't work. I do confirm that pushing "E" on the keyboard triggers P2 button 5, but there's nothing there that suggests that "INDEXED(JOYCODE_BUTTON5, 1)" wouldn't as well (which I read as being Button 5?).

I went to the Sony ZN file driver to see if there was anything on the driver initialization or definition, but I felt I was getting way outside of my comfort zone. :)

Any pointers would be very much appreciated, I'll gladly try to look into it and see if I get anywhere.

Thanks and happy Sunday.