SukkoPera / PsxNewLib

Playstation controller interface library for Arduino
GNU General Public License v3.0
130 stars 28 forks source link

Analog Dualshock controller (SCPH-1200) gives type "Guitar Hero". #16

Open mcgurk opened 2 years ago

mcgurk commented 2 years ago

With DumpButtonsBitBang and DumpButtonsHwSpi examples my SCPH-1200 controller gives controller type "Guitar Hero" to Serial Monitor. Other than that, controller works fully with PsxNewLib, so this doesn't matter much. (I got library from Arduino IDE library manager. It is version 0.4.0)

SukkoPera commented 2 years ago

Yeah, this is a known issue, it's even noted in the function header. That function is a carryover from the PS2X library, but it's undocumented and based on data reported by controllers that nobody really knows how to interpret.

I think I will just remove that function in the devel branch, sooner or later.

There's another similar function that is much more reliable, as it will report what protocol the library is actually using to talk to the controller. Please see getProtocol().

sonik-br commented 1 year ago

@SukkoPera I've got an original guitar to try. It sends DPAD LEFT as always pressed and reports as dualshock.

Holding the dpad left was also a trick to use a dualshock to play the games on ps2. Hold it when booting the game so it detects it as a guitar.

I will do more tests and see if there's any other way to identify it. But checking for the dapd state might be a good fallback.

SukkoPera commented 1 year ago

So I guess this function really has to go! :)

sonik-br commented 1 year ago

Noooooooo. Please don't kill it :)

Function is really useful to detect the presence of a jogcon. We can't rely only on the reported protocol. Jogcon reports as digital protocol and this function can identify if it's a jogcon connected in digital mode.

Some findings on the guitar hero device. Can be useful if anyone need to identify if a guitar deice is connected:

This was tested with a wireless guitar and the original Kramer Striker Wireless Receiver.