RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.46k stars 1.92k forks source link

[Feature request] It is not possible to properly key bind Guitar Hero Live's guitar on Linux! #14886

Closed AlperShal closed 11 months ago

AlperShal commented 11 months ago

Quick summary

Since GHL guitar strum bar inputs are not button inputs but range (0-255) inputs it's not possible to key bind it. So option to set specific axis value as button would be nice.

Details

Note: I am using evdev since there is no other device handler for this device to my knowledge.

Every button works except strum bar.

Strum up: type 3 (EV_ABS), code 1 (ABS_Y), value 0 Strum still: type 3 (EV_ABS), code 1 (ABS_Y), value 128 Strum down: type 3 (EV_ABS), code 1 (ABS_Y), value 255

If I try binding any button with strum down, it works. LY+ appears as the input. But if I try binding strum up, nothing happens because strum up is not -255 (which would return LY- I guess) but 0. And as the result: 1- I don't have any strum up. 2- For RPCS it doesn't matter if it's 128 or 255. Both are LY+. Strum down keeps spamming.

The feature I request: It would be awesome if we could just set specific axis/range value as trigger for a button.

Megamouse commented 11 months ago

Try setting that axis to true in the evdev_positive_axis.yml in your config dir. ABS_Y: true

AlperShal commented 11 months ago

Oh yeah that worked. Thanks! It would be awesome if this was included in the wiki: https://wiki.rpcs3.net/index.php?title=Help:Peripherals_and_accessories

Megamouse commented 11 months ago

https://wiki.rpcs3.net/index.php?title=Help:Controller_Configuration#Analog_sticks_not_centered_with_evdev_pad_handler

AlperShal commented 11 months ago

Oh you gotta be kidding me. :D I couldn't see that title since the page's scrolling is a bit broken. (scrolling sidebar doesn't completely show every title) Kinda my bad. Sorry.

AlperShal commented 11 months ago

Eh, a question. Even though key binding problem is solved, RPCS still spams strum down (LY+). Is there a fix for this?

Megamouse commented 11 months ago

post log file with gameplay.

Megamouse commented 11 months ago

ah sorry. post log file of you assigning it in the settings

AlperShal commented 11 months ago

https://mega.nz/file/bG5i0Swb#q5ueD_ShMZyUm6II6LnwSm3ST_9atg3BaP0WCuQN__w

I don't really think it would be related to game logs. When on RPCS menu (The menu that appears when pressed PS Button) strum down (assigned to D-Pad Down) is still spamming.

AlperShal commented 11 months ago

ah sorry. post log file of you assigning it in the settings

I am not really sure of where to find that.

Megamouse commented 11 months ago

go to the pad settings, assign the axis again, close rpcs3, drag and drop the rpcs3.log.gz into your github comment (no need for external file hosters)

AlperShal commented 11 months ago

RPCS3.log.gz Here.

Megamouse commented 11 months ago

It looks like your RZ axis needs the same treatment ?

AlperShal commented 11 months ago

It looks like your RZ axis needs the same treatment ?

Oh yeah makes sense. Still, didn't fix the spamming problem.

Megamouse commented 11 months ago

Can you try this test software in rpcs3 and send a screenshot of it running without touching the strum? GMPADTEST.zip

AlperShal commented 11 months ago

image

AlperShal commented 11 months ago

Oh realized something. When this first initializes, it doesn't keep D-Pad green. If i touch the strum down once and let go it just stucks like that.

Megamouse commented 11 months ago

If it doesn't have a red bar it means it's not "really" pressed. just a little. The thing is that evdev has a so called "flat" value for each axis, which equals the deadzone. For you it's 15 on ABS_Y (seen in the log you posted). I believe it's either too low or only it works on the faulty "positive axis". So i'd try changing the flat value to 20 first for example (don't ask me how, there's probably some tutorial online).

AlperShal commented 11 months ago

Okay will check. Just to give some additional info here is a vid for you to check to see what's happening. https://www.youtube.com/watch?v=L0uqIiKruDE

Megamouse commented 11 months ago

hmm. looks like it's working fine. It's probably just a rounding issue on our side.

AlperShal commented 11 months ago

So nothing I can do? :/ (Btw couldn't find any reference to that flat value on the internet)

Megamouse commented 11 months ago

The flat value is a bit fishy. I'm not sure if it's already applied before the event reaches us, effectively filtering out the noise, or if it's a value we are supposed to use ourselves.

Megamouse commented 11 months ago

I'll try to add it.

Megamouse commented 11 months ago

Can you please test the linked PR ?

AlperShal commented 11 months ago

Can you please test the linked PR ?

Command rpcs3 returns this:

Debugger: 0
Failed to set RLIMIT_MEMLOCK size to 2 GiB. Try to update your system configuration.
warning: direct reference to protected function `_ZN7QObject13connectNotifyERK11QMetaMethod' in `/usr/bin/../lib/libQt6Core.so.6' may break pointer equality
rpcs3: _ZN7QObject13connectNotifyERK11QMetaMethod: /usr/bin/../lib/libQt6Core.so.6: error due to GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS
AlperShal commented 11 months ago

Okay fixed it totally my bad. Not relevant to the build. image

Megamouse commented 11 months ago

Hmm that's weird. are you sure you are using the proper axis fix ?

AlperShal commented 11 months ago

Hmm that's weird. are you sure you are using the proper axis fix ?

I was wondering why I still didn't get any replies. Looks like I have forgotten to press comment lol.

.config/rpcs3/evdev_positive_axis.yml:

- Set ABS_Y: true

- Set ABD_RZ: true

Didn't change anything since our last interaction.

AlperShal commented 11 months ago

Could it be that AppImage is not reading the .yml file? (It actually finds my configs and play history. So probably does not make sense but wanted to ask nevertheless.)

AlperShal commented 11 months ago

Nah I have tried the latest release AppImage, it works as it was. (Using your PR, I can't bind LY- btw. Nothing binds when i strum up.)

Megamouse commented 11 months ago

can you post the yml file here ?

Megamouse commented 11 months ago

Ah, nevermind, I made a mistake with positive axis if the flatness is > 0. It should be fixed now.

AlperShal commented 11 months ago

Yep, your last commit on #14889 fixed it. Thank you so much for taking your time! ❤️

Btw would it be possible to have the option to change .config/rpcs3/evdev_positive_axis.yml settings from the GUI? Not sure if GUI development is something you are taking care of but this seems like an important thing to have in the GUI. Also it looks like it isn't possible to set these options per config that would be nice too.

Megamouse commented 11 months ago

That yml file is just a hack to deal with the faulty evdev drivers. But I guess it wouldn't hurt to integrate it on a per controller basis