Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller features detection #28

Open
sonik-br opened this issue Mar 29, 2023 · 1 comment
Open

Controller features detection #28

sonik-br opened this issue Mar 29, 2023 · 1 comment

Comments

@sonik-br
Copy link

Opening this more as a way to talk about it. :)

I've been testing and debugging a lot of psx controllers lately.
And comparing my findings with what's documented online. There's a lot of wrong or missing information.

So the big news: There are controllers with multiple switchable modes (not just digital/analog).
And rumble can be supported on all modes, not just on the dualshock device.

Command 0x45 returns the constants:
amount of modes
amount of actuators
And the variable:
current mode (led state too)

Then command 0x46 can get info for each actuator with the constants:
Actuator function (rumble, jog rotation,...)
Sub function (low speed, high speed,...)
Parameter length (if it's just on/off or more complex arguments)
Max current drain

And command 0x44C can get info for each controller mode with some data that I don't understand yet, but can be used to identify the protocol (negcon, digital, analog,...)

I've seen a controller with a physical switch for digital, analog, negcon. All with rumble and two motors.
This device reports as single mode, too signal that the software can't change it's mode. user must move the switch.

And I've seen a controller with a mode button and 4 possible modes (digital, analog, flightstick, negcon).
It reports correctly and all 4 modes can be set from software. (via command 0x44)

So it looks like that rumble is not tied to specific controller types. And most important, games can use those features!
There's some games that only have analog input with a negcon controller. And the same game can have rumble enabled with a negcon compatible controller.

Some of my debug data in the next message...

@sonik-br
Copy link
Author

sonik-br commented Mar 29, 2023

Debug from a DualShock2 device

CMD 0x45: 0xFF, 0xF3, 0x5A, 0x3, 0x2, 0x0, 0x2, 0x1, 0x0, 
Controller Info:
Type: 3
Mode Count: 2
Current Mode: 0
Actuator Count: 2

Actuators:
Actuator: 0
CMD 0x46: 0xFF, 0xF3, 0x5A, 0x0, 0x0, 0x1, 0x2, 0x0, 0xA, 
Function Number: 1 : vibration
Sub Function Number: 2 : high speed rotation
Parameter Data Length: 0 : on/off
Max Curent Drain (units): 10

Actuator: 1
CMD 0x46: 0xFF, 0xF3, 0x5A, 0x0, 0x0, 0x1, 0x1, 0x1, 0x14, 
Function Number: 1 : vibration
Sub Function Number: 1 : low speed rotation
Parameter Data Length: 1 bytes
Max Curent Drain (units): 20

CMD 0x47: 
0xFF, 0xF3, 0x5A, 0x0, 0x0, 0x2, 0x0, 0x1, 0x0, 

Modes:
Mode: 0
CMD 0x4C: 0xFF, 0xF3, 0x5A, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 
Digital Pad???

Mode: 1
CMD 0x4C: 0xFF, 0xF3, 0x5A, 0x0, 0x0, 0x0, 0x7, 0x0, 0x0, 
Analog Pad???


Trying to switch modes (with 3 seconds interval)...

Mode: 0
PSPROTO_DIGITAL

Mode: 1
PSPROTO_DUALSHOCK

Debug from a JogCon device

CMD 0x45: 0xFF, 0xF3, 0x5A, 0x1, 0x2, 0x0, 0x1, 0x1, 0x0, 
Controller Info:
Type: 1
Mode Count: 2
Current Mode: 0
Actuator Count: 1

Actuators:
Actuator: 0
CMD 0x46: 0xFF, 0xF3, 0x5A, 0x0, 0x0, 0x4, 0x3, 0x1, 0x1E, 
Function Number: 4 : rotation
Sub Function Number: 3 : jog?
Parameter Data Length: 1 bytes
Max Curent Drain (units): 30

CMD 0x47: 
0xFF, 0xF3, 0x5A, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 

Modes:
Mode: 0
CMD 0x4C: 0xFF, 0xF3, 0x5A, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 
Digital Pad???

Mode: 1
CMD 0x4C: 0xFF, 0xF3, 0x5A, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 
JogCon???


Trying to switch modes (with 3 seconds interval)...

Mode: 0
PSPROTO_DIGITAL

Mode: 1
PSPROTO_JOGCON

Debug from a Hori controller with 4 possible modes

CMD 0x45: 0xFF, 0xF3, 0x5A, 0x1, 0x4, 0x3, 0x2, 0x1, 0x0, 
Controller Info:
Type: 1
Mode Count: 4
Current Mode: 3
Actuator Count: 2

Actuators:
Actuator: 0
CMD 0x46: 0xFF, 0xF3, 0x5A, 0x0, 0x0, 0x1, 0x2, 0x0, 0xA, 
Function Number: 1 : vibration
Sub Function Number: 2 : high speed rotation
Parameter Data Length: 0 : on/off
Max Curent Drain (units): 10

Actuator: 1
CMD 0x46: 0xFF, 0xF3, 0x5A, 0x0, 0x0, 0x1, 0x1, 0x1, 0x14, 
Function Number: 1 : vibration
Sub Function Number: 1 : low speed rotation
Parameter Data Length: 1 bytes
Max Curent Drain (units): 20

CMD 0x47: 
0xFF, 0xF3, 0x5A, 0x0, 0x0, 0x2, 0x0, 0x1, 0x0, 

Modes:
Mode: 0
CMD 0x4C: 0xFF, 0xF3, 0x5A, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 
Digital Pad???

Mode: 1
CMD 0x4C: 0xFF, 0xF3, 0x5A, 0x0, 0x0, 0x0, 0x7, 0x0, 0x0, 
Analog Pad???

Mode: 2
CMD 0x4C: 0xFF, 0xF3, 0x5A, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 
Negcon???

Mode: 3
CMD 0x4C: 0xFF, 0xF3, 0x5A, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 
Analog Stick???


Trying to switch modes (with 3 seconds interval)...

Mode: 0
PSPROTO_DIGITAL

Mode: 1
PSPROTO_DUALSHOCK

Mode: 2
PSPROTO_NEGCON

Mode: 3
PSPROTO_FLIGHTSTICK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant