Progress Continues
We've already had 21555 updates since Dolphin 5.0. Keep up with Dolphin's continuing progress through the Dolphin Blog: February, March, and April 2024 Dolphin Progress Report. |
The Dolphin Emulator Wiki needs your help! Dolphin can play thousands of games, and changes are happening all the time. Help us keep up! Join in and help us make this the best resource for Dolphin. |
Motion evdev: Difference between revisions
(Add dualsense axis based on discussion on discord) |
(Add notes for the DualSense) |
||
Line 1: | Line 1: | ||
These instruction are made with a Nintendo Pro controller and Joy-Cons. While the overall process will be the same the motion axis may not match those found on a Sony DualShock 4. | These instruction are made with a Nintendo Pro controller and Joy-Cons. While the overall process will be the same the motion axis may not match those found on a Sony DualShock 4 or DualSense. The Sony DualSense also exposes two devices like the Nintendo controllers. | ||
* Recent dolphin version (do not use 5.0 stable!) | * Recent dolphin version (do not use 5.0 stable!) | ||
Line 5: | Line 5: | ||
* Switch pro or Joy-Con. | * Switch pro or Joy-Con. | ||
The HID Nintendo kernel driver exposes 2 evdev devices, one for the buttons and another (IMU) for the accelerators/gyroscopes. Do note that Joy-Cons will have 2 devices each (4 in total). | The HID Nintendo kernel driver exposes 2 evdev devices, one for the buttons and another (IMU) for the accelerators/gyroscopes. Do note that Joy-Cons will have 2 devices each (4 in total). For the Sony DualSense controller the accelerators/gyroscopes are on the "Wireless Controller Motion Sensors" evdev device. | ||
The IMU input device does not automatically get tagged with `uaccess` while the "regular" device is. If you do not see an IMU device listed in Dolphin's devicelist add the following udev rule to /etc/udev/rules.f/99-hidnintendo.rules. reload udev rules with "udevadm control --reload-rules" and reconnect the device(s). | The IMU input device does not automatically get tagged with `uaccess` while the "regular" device is. If you do not see an IMU device listed in Dolphin's devicelist add the following udev rule to /etc/udev/rules.f/99-hidnintendo.rules. reload udev rules with "udevadm control --reload-rules" and reconnect the device(s). |
Revision as of 16:18, 23 November 2021
These instruction are made with a Nintendo Pro controller and Joy-Cons. While the overall process will be the same the motion axis may not match those found on a Sony DualShock 4 or DualSense. The Sony DualSense also exposes two devices like the Nintendo controllers.
- Recent dolphin version (do not use 5.0 stable!)
- HID Nintendo kernel driver (dkms https://github.com/nicman23/dkms-hid-nintendo)
- Switch pro or Joy-Con.
The HID Nintendo kernel driver exposes 2 evdev devices, one for the buttons and another (IMU) for the accelerators/gyroscopes. Do note that Joy-Cons will have 2 devices each (4 in total). For the Sony DualSense controller the accelerators/gyroscopes are on the "Wireless Controller Motion Sensors" evdev device.
The IMU input device does not automatically get tagged with `uaccess` while the "regular" device is. If you do not see an IMU device listed in Dolphin's devicelist add the following udev rule to /etc/udev/rules.f/99-hidnintendo.rules. reload udev rules with "udevadm control --reload-rules" and reconnect the device(s).
ACTION!="add", GOTO="imuend" SUBSYSTEM!="input", GOTO="imuend" KERNEL!="event*", GOTO="imuend" ATTRS{id/vendor}=="057e", ATTRS{id/product}=="2009", ATTRS{name}=="*IMU*", TAG+="uaccess" ATTRS{id/vendor}=="057e", ATTRS{id/product}=="2006", ATTRS{name}=="*IMU*", TAG+="uaccess" ATTRS{id/vendor}=="057e", ATTRS{id/product}=="2007", ATTRS{name}=="*IMU*", TAG+="uaccess" ATTRS{id/vendor}=="057e", ATTRS{id/product}=="200e", ATTRS{name}=="*IMU*", TAG+="uaccess" ATTRS{id/vendor}=="057e", ATTRS{id/product}=="2017", ATTRS{name}=="*IMU*", TAG+="uaccess" LABEL="imuend"
It took me a bit of time figuring out which axis corresponds with the right motion control in dolphin. These axis might change in the future when evdev standardizes them.
Dolphin motion | Evdev axis HID Nintendo | Evdev axis Sony DualSense |
---|---|---|
Accel Up | Accel Z+ | Accel Y+ |
Accel Down | Accel Z- | Accel Y- |
Accel Left | Accel Y+ | Accel X- |
Accel Right | Accel Y- | Accel X+ |
Accel Forward | Accel X+ | Accel Z- |
Accel Backward | Accel X- | Accel Z+ |
Pitch Up | Gyro Y- | Gyro X+ |
Pitch Down | Gyro Y+ | Gyro X- |
Roll Left | Gyro X- | Gyro Z+ |
Roll Right | Gyro X+ | Gyro Z- |
Yaw Left | Gyro Z+ | Gyro Y+ |
Yaw Right | Gyro Z- | Gyro Y- |
As the default buttons are all wrong reset all buttons in the Wii Remote configuration. To configure the motion controls you have to use the advanced config window. Right click on each motion button in the Wii Remote configure window. Select the appropriate IMU device at the top in the device selection.
Select the corresponding Accel or Gyro axis, select it and click ok. For example for "Accel Up" in dolphin you need to select "Accel Z+". The end result should look like below.
Repeat this for every motion.