AmatCoder / mednaffe

A front-end (GUI) for mednafen emulator
GNU General Public License v3.0
429 stars 35 forks source link

MegaDrive 6-buttons controller input mapping is passed incorrectly to Mednafen #134

Closed SniperJoe closed 3 years ago

SniperJoe commented 3 years ago

When you map up/down/left/right button for MegaDrive 6-buttons controller, Mednaffe passes the mapping with

-md.input.port1.gamepad.down joystick 0x0003046dc21d40140008000b00000000 abs_7+

But the buttons do not work. I have also tried this way of passing input mapping with standalone mednafen:

mednafen -md.input.port1.gamepad.down "joystick 0x0003046dc21d40140008000b00000000 abs_7+"

In order to make it work, the mapping should be passed for 6-buttons controller specifically:

mednafen -md.input.port1.gamepad6.down "joystick 0x0003046dc21d40140008000b00000000 abs_7+"

Everything works fine this way.

Reproduces on Kubuntu 21.10 with Mednaffe installed via flatpak, with Logitech F310 and DualShock 4 controllers. I had removed 6-buttons controller input mapping from mednafen.cfg before every test.

SniperJoe commented 3 years ago

Have just tested Windows version via Wine, same behavior.

haojiezhu commented 3 years ago

I was about to report the same problem. I mapped the 6 buttons (A to Z) to J, K, L, U, I, O key on the keyboard. But somehow A, B, C buttons are still mapped to 1, 2, 3 key on the keyboard numpad when I was playing "Street Fighter II'". X, Y, Z buttons are mapped correctly. To fix this, I had to manually edit the keyboard codes in those lines starting with "md.input.port1.gamepad6" in mednafen.cfg.

SniperJoe commented 3 years ago

A little research showed that the problem may be in md.ui and incorrect <property name="command"> values in 6-buttons controller config section.

P. S. Looks a bit like someone forgot to change commands after copying from 3-buttons controller config section 😂

AmatCoder commented 3 years ago

You are right, this was a copy-paste error ;)

Fixed with commit d33001d.

AmatCoder commented 3 years ago

Fixed with released version 0.9.2