mgba-emu / mgba

mGBA Game Boy Advance Emulator
https://mgba.io/
Mozilla Public License 2.0
5.76k stars 794 forks source link

NS Pro Controller has no rumble effect #3147

Closed Hexaae closed 6 months ago

Hexaae commented 9 months ago

mGBA 0.11-8325-49d9b70e6 Win 11 23H3, NVidia GTX 1070 8GB, i7-8750H 32GB RAM

Bought an hybrid modern controller perfectly seen as an original XBox One BT controller or NS Pro Controller. With XBox One controller mode rumble works fine (a bit lite maybe... wish there was a Force slider #2797 ...) for games like Drill Dozer for GBA, but with NS Pro Controller rumble is simply absent.

image

Gyro works with Kirby Tilt 'n Tumble.

Hexaae commented 8 months ago

Still the same with DEV 8331-d8ab5529a, Nintendo Switch Pro Controller has gyro (Kirby Tilt'n'Tumble) but no rumble in games like "Drill Dozer"

endrift commented 8 months ago

I pushed a change that might have fixed this. Please test the latest build.

Hexaae commented 8 months ago

8332-c8c9fcb66 still no rumble with NS Pro Controller (only, XBox Controller does rumble)😭

Hexaae commented 6 months ago

Currently using 0.11-8442. NS Pro Controller (only) still missing rumble effect.

endrift commented 6 months ago

So I've confirmed on my end that it does work on latest Windows build with my Pro Controller, both wired and over Bluetooth. Is the firmware on your Pro Controller up to date? I might need to figure out how to collect logs from SDL.

Hexaae commented 6 months ago

It's a compatible controller (EasySMX X10), but it does work everywhere including Steam Input (SDL2) with rumble... Need to test very latest MGBA build though...

Hexaae commented 6 months ago

No, rumble still doesn't work with Drill Dozer

endrift commented 6 months ago

This model? https://www.easysmx.com/products/easysmx-x10-game-controller-with-mechanical-buttons-and-hall-joysticks

I'd probably need to actually buy one to debug this. It might be possible to give you some commands to run to get some logs but I would need to figure that out.

Hexaae commented 6 months ago

Sure, send me all SDL loggers/tracers you need and I'll do the work for you... Or even a remote TeamViewer connection if you prefer to operate directly on this machine and inspect controller.

endrift commented 6 months ago

testgamecontroller.zip

Here's a copy of the test utility that comes with SDL built against the same version of SDL in mGBA. It should vibrate with one motor when you hit ZR and the other when you hit ZL. Do they both work in Switch mode?

Hexaae commented 6 months ago

ZL works (but with a long delay after you press it and 1 sec later it rumbles), ZR does nothing...

endrift commented 6 months ago

I have gotten an X10 controller now and can reproduce the ZL working but ZR not. This may be an issue with the controller itself, which is unfortunate considering NS mode has a gyro and therefore would be good for WarioWare, but XInput mode doesn't.

Hexaae commented 6 months ago

Sigh... from a non-programmer POV all I can say is that it works flawlessly including gyro+rumble with Steam (still SDL2) in games like Horizon Zero Dawn and others, and CEMU, Yuzu... Strange it doesn't with mgba only (different SDKs used?) :( Given the price was an amazing controller with a lot of good features...

Hexaae commented 6 months ago

@endrift Did you update firmware of X10 BTW? Here is official latest fw update: https://drive.google.com/file/d/1eWgEnhekRx1xJMW-s1QxBJ98eDP4pGLr/view from Discord channel of EasySMX

endrift commented 6 months ago

Just updated. No change. I'm going to look into fixing SDL on my end so all inputs to rumble work, and not just some.

endrift commented 6 months ago

Unfortunately using a real Switch I've verified that the controller does not parse the rumble data properly and thus only rumbles on a seemingly random subset of inputs. This is definitely a bug with the controller firmware.

Hexaae commented 6 months ago

Thanks for checking this out... Will report the issue in the support channel of EasySMX... 🤞🏻