• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Controllers v
« Previous 1 ... 38 39 40 41 42 ... 321 Next »

Nintendo Pro Switch Device -
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Nintendo Pro Switch Device -
02-19-2020, 12:38 AM (This post was last modified: 02-19-2020, 01:29 AM by Grimish. Edit Reason: Add kernel.org patch reference )
#1
Grimish Offline
Junior Member
**
Posts: 5
Threads: 1
Joined: Feb 2020
So there is a kernel driver that has been developed for Nintendo Switch joycons and Nintendo Switch Pro Controller. Here is the built module below. There is an input device that is successful in populating within dolphin-emu - which is awsome.
/dev/input/by-id/usb-Nintendo_Co.__Ltd._Pro_Controller_000000000001-event-joystick
/dev/input/by-id/usb-Nintendo_Co.__Ltd._Pro_Controller_000000000001-joystick


There is in addition an accelerometer/gyroscope device as well. evtest shows events:
/dev/input/by-id/usb-Nintendo_Co.__Ltd._Pro_Controller_000000000001-event-if00

evtest /dev/input/by-id/usb-Nintendo_Co.__Ltd._Pro_Controller_000000000001-event-if00
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x57e product 0x2009 version 0x8111
Input device name: "Nintendo Switch Pro Controller IMU"
Supported events:
 Event type 0 (EV_SYN)
 Event type 3 (EV_ABS)
   Event code 0 (ABS_X)
     Value    599
     Min   -32767
     Max    32767
     Fuzz      10
     Resolution    4096
   Event code 1 (ABS_Y)
     Value   1491
     Min   -32767
     Max    32767
     Fuzz      10
     Resolution    4096
   Event code 2 (ABS_Z)
     Value   3154
     Min   -32767
     Max    32767
     Fuzz      10
     Resolution    4096
   Event code 3 (ABS_RX)
     Value    -23
     Min   -32767
     Max    32767
     Fuzz      10
     Resolution      14
   Event code 4 (ABS_RY)
     Value      4
     Min   -32767
     Max    32767
     Fuzz      10
     Resolution      14
   Event code 5 (ABS_RZ)
     Value      0
     Min   -32767
     Max    32767
     Fuzz      10
     Resolution      14
 Event type 4 (EV_MSC)
   Event code 5 (MSC_TIMESTAMP)
Properties:
 Property type 6 (INPUT_PROP_ACCELEROMETER)
Testing ... (interrupt to exit)
Event: time 1582031396.661029, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value -1350762296
Event: time 1582031396.661029, type 3 (EV_ABS), code 3 (ABS_RX), value -14
Event: time 1582031396.661029, type 3 (EV_ABS), code 4 (ABS_RY), value 6
Event: time 1582031396.661029, type 3 (EV_ABS), code 5 (ABS_RZ), value -1
Event: time 1582031396.661029, type 3 (EV_ABS), code 1 (ABS_Y), value 1466
Event: time 1582031396.661029, type 3 (EV_ABS), code 2 (ABS_Z), value 3146
Event: time 1582031396.661029, -------------- SYN_REPORT ------------
Event: time 1582031396.661031, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value -1350757296
Event: time 1582031396.661031, type 3 (EV_ABS), code 5 (ABS_RZ), value -2
Event: time 1582031396.661031, type 3 (EV_ABS), code 0 (ABS_X), value 605
Event: time 1582031396.661031, type 3 (EV_ABS), code 1 (ABS_Y), value 1467
Event: time 1582031396.661031, type 3 (EV_ABS), code 2 (ABS_Z), value 3137
Event: time 1582031396.661031, -------------- SYN_REPORT ------------
Event: time 1582031396.661034, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value -1350752296
Event: time 1582031396.661034, type 3 (EV_ABS), code 3 (ABS_RX), value -15
Event: time 1582031396.661034, type 3 (EV_ABS), code 4 (ABS_RY), value 4
Event: time 1582031396.661034, type 3 (EV_ABS), code 5 (ABS_RZ), value -3
Event: time 1582031396.661034, type 3 (EV_ABS), code 0 (ABS_X), value 611
Event: time 1582031396.661034, type 3 (EV_ABS), code 1 (ABS_Y), value 1469
Event: time 1582031396.661034, type 3 (EV_ABS), code 2 (ABS_Z), value 3130
Event: time 1582031396.661034, -------------- SYN_REPORT ------------
Event: time 1582031396.677031, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value -1350747296
Event: time 1582031396.677031, type 3 (EV_ABS), code 3 (ABS_RX), value -9
Event: time 1582031396.677031, type 3 (EV_ABS), code 4 (ABS_RY), value 6
... Continued data stream


Driver via modinfo hid_nintendo:
filename:       /lib/modules/5.5.4-arch1-3-custom/kernel/drivers/hid/hid-nintendo.ko.xz
description:    Driver for Nintendo Switch Controllers
author:         Daniel J. Ogorchock <djogorchock@gmail.com>
license:        GPL
srcversion:     053B2F951FC297C89D32683
alias:          hid:b0005g*v0000057Ep00002007
alias:          hid:b0005g*v0000057Ep00002006
alias:          hid:b0003g*v0000057Ep0000200E
alias:          hid:b0005g*v0000057Ep00002009
alias:          hid:b0003g*v0000057Ep00002009
depends:        hid,ff-memless
retpoline:      Y
intree:         Y
name:           hid_nintendo
vermagic:       5.5.4-arch1-3-custom SMP preempt mod_unload
sig_id:         PKCS#7
signer:         Build time autogenerated kernel key


So the issue I am having is attempting to custom configure the IMU device listed above as a gyro/accell input device. Don't know if this can be squashed or not as i'm not familiar with dolphin dev branches.

Just a thought as this appears like it will be the linux kernel driver for Nintendo Switch Pro controllers and Nintendo Switch Joycon controllers located here: https://patchwork.kernel.org/patch/11312567/
Find
Reply
02-19-2020, 10:03 AM
#2
Billiard26 Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 2,661
Threads: 8
Joined: Feb 2010
I'm not sure what your question is.
If evdev exposes the accelerometer and gyroscopes you should be able to map those inputs in the "Motion Input" tab of the emulated Wii Remote configuration.
Find
Reply
02-19-2020, 02:13 PM
#3
Grimish Offline
Junior Member
**
Posts: 5
Threads: 1
Joined: Feb 2020
(02-19-2020, 10:03 AM)Billiard26 Wrote: I'm not sure what your question is.
If evdev exposes the accelerometer and gyroscopes you should be able to map those inputs in the "Motion Input" tab of the emulated Wii Remote configuration.

Thanks for the reply,

I apologize as my question should have been made more clear and at the begining. Like I mentioned before there is a controller being populated as "/evdev/0/Nintendo Switch Pro Controller". I am not observing any fields that indicate a feed from that specific devices accel/gyro. There are currently no other controller inputs except for the mouse.

So to answer your reply, I see the controller listed but no motion input when trying to map it. As I mentioned before there is for sure motion input coming from the controller itself through the evtest. Have any other ideas of how I may map or hack the controller to get an input from its gyro/acell into dolphin-emu?
Find
Reply
02-19-2020, 02:37 PM
#4
Grimish Offline
Junior Member
**
Posts: 5
Threads: 1
Joined: Feb 2020
(02-19-2020, 10:03 AM)Billiard26 Wrote: I'm not sure what your question is.
If evdev exposes the accelerometer and gyroscopes you should be able to map those inputs in the "Motion Input" tab of the emulated Wii Remote configuration.

Again thanks for the reply - Think I may have found the issue as it appears the ACL's on the accell/gyro device may not have been set at all. Going to get those fixed and then retest.
Find
Reply
02-19-2020, 02:48 PM (This post was last modified: 02-19-2020, 04:10 PM by Shonumi. Edit Reason: Inline base64 images wouldn't display correctly (known issue with MyBB). Using attachments or image hosting sites is recommended )
#5
Grimish Offline
Junior Member
**
Posts: 5
Threads: 1
Joined: Feb 2020
(02-19-2020, 10:03 AM)Billiard26 Wrote: I'm not sure what your question is.
If evdev exposes the accelerometer and gyroscopes you should be able to map those inputs in the "Motion Input" tab of the emulated Wii Remote configuration.

Was a permission on the device. Seperate ACL on the gyro/accel.

[Image: fwkCjEW.png]

But as you can see it is populating. Thanks for having me look harder.
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode