[UPDATE!]
http://www.tolysz.net/dualshock.diff
After looong night it is working :P
as for now over USB and possibly BT [?]
Every thing handled by professional drivers, I just have added a wrapper to them. Hence if you got 2 BT dongles then have a go with 14 DS3 :).
THIS DOES NOT SUPPORT LEDs [yet?]
THIS DOES NOT SUPPORT RUMBLE [yet?]
THIS DOES NOT SUPPORT DYNAMIC RECONFIGURATIONS [yet?]
How to apply this patch
Code: Select all
cd vanila-2.6.28
wget http://www.tolysz.net/dualshock.diff
patch -p1 < dualshock.diff
BTW. 2.6.28 is buggy :), however I do not tested it with previous versions.
and test it with jscalibrator, but after you compile it, and reboot :).
Actually, this was the first patch I ever made, it was so cool to add "less than zero" to Linux kernel :).
However, this just made me started :), I wanted to write an USB driver for DualShock, but I looked at what is already done. and decided not to.
DualShock works fine with Linux as a HID device,
modulo "reporting" [done] not by me :)
[0] modulo "broken report descriptor in DS3" [done] by me :)
+[1] some minor patches to be able to change this descriptor to arbitrary one. [done]
+[2]some minor patches to fix other drivers broken by [1] [done]
+[3]some changes to HID to allow values > 255 as inputs: needed for accelerometers as they have range 0-1024 [done] no change needed :) fixed in [0]
-----------
+[4] to allow reconfiguration on runtime :) [possible] just need someone who knows "firmware" class as I need to be able load files into kernel on runtime.
+[5] a nice tool to be able to modify HID device report description easily [possible] this will allow to tweak all HID devices so it would be extra cool.
USB works just fine :) time to start testing BT I need to recompile my kernel :P
oops: take2 recompile again :) I have missed to patch hidp :P
more issues with BT.
And as I can change this descriptor (and is already made working) my question is how shall I assign buttons and axes and motions for you?
http://ps3.jim.sh/sixaxis/usb/ btw. I axed nothings as it was bogus hid description
to description from:
http://www.usb.org/developers/hidpage/
Some possibilities:
Code: Select all
30 X
31 Y
32 Z
33 Rx
34 Ry
35 Rz
36 Slider
37 Dial
38 Wheel
39 Hat switch
3A Counted Buffer
3B Byte Count
3C Motion Wakeup
3D Start
3E Select
40 Vx
41 Vy
42 Vz
43 Vbrx
44 Vbry
45 Vbrz
46 Vno
90 D-pad Up
91 D-pad Down
92 D-pad Right
93 D-pad Left
And if someone could post report description for SIXAXIS :) That I could check if stock DUALSHOCK got the same?
[UPDATE] I have checked are the same :)
So far:
OK, I made few decisions:
Code: Select all
Button 00 = Cross
Button 01 = Circle
Button 03 = Square
Button 04 = Triangle
Button 04 = R1
Button 05 = L1
Button 06 = R2
Button 07 = L2
Kayboard keys
[a] = Left
[s] = Down
[d] = Right
[w] = Up
Button 08 = R3
Button 09 = L3
Button 10 = Start
Button 11 = Select
Button 12 = Sixaxis
Analog:?
Code: Select all
Analog 00 = Joy Left X
Analog 01 = Joy Left Y
Analog 02 = Joy Right X
Analog 03 = Joy Right Y
Analog 04 = Roll ( -X / +X )
Analog 05 = Pitch ( -Y / +Y )
Analog 06 = Gyro ( -Z / +Z )
Analog 07 = Gyro ?
(+1).reverse:{
Analog 07 = Square
Analog 08 = Cross
Analog 09 = Circle
Analog 10 = Triangle
Analog 11 = R1
Analog 12 = L1
Analog 13 = R2
Analog 14 = L2
Analog 15 = Left
Analog 16 = Down
Analog 17 = Right
Analog 18 = Up
}