PS3 controller dev - how to send PS button?

Technical discussion on the newly released and hard to find PS3.

Moderators: cheriff, emoon

Post Reply
maxxxpower
Posts: 3
Joined: Tue Dec 30, 2008 4:25 am

PS3 controller dev - how to send PS button?

Post by maxxxpower »

I'm working on custom firmware for a USB gamepad that's compatible with the PS3. It is a standard HID class device. I mapped out which controller button ID's correspond to which buttons on the PS3, and it works great, but I have one problem.

I can't figure out how to send the PS button... In my testing I tried every button ID from 1-24 and found every button BUT that one, which makes me believe its not mapped as an ordinary button...

I'm guessing I need to do something special to send this button signal? Anyone know what needs to happen?
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

From what I mapped out (a couple years ago) the PS button is #16.
http://ps3.jim.sh/sixaxis/usb/
maxxxpower
Posts: 3
Joined: Tue Dec 30, 2008 4:25 am

Post by maxxxpower »

Interesting page there... but the info on it doesn't match up at all with what I observed... I'm wondering if the PS3 is looking for something in the report descriptor that tells the PS3 the controller is PS3 compatible...

How did you come up with your mappings? Here is my mapping of how the PS3 interprets an HID class PC gamepad... it appears to be the inverse of what you observed...

http://maxxxpower.simcup.net/PS3/PS3controllerinfo.html
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

My mapping were from plugging the PS3 controller into a Linux PC and just looking at the "jstest" output. The PS3 might use other information in the HID descriptor, as you mentioned... for example it might try to match up axes and buttons based on ID, or something.(remember that all sixaxis buttons are analog). Have you tried just duplicating the Sixaxis descriptor exactly, or is that something you can't do with your hw?
maxxxpower
Posts: 3
Joined: Tue Dec 30, 2008 4:25 am

Post by maxxxpower »

My hardware can make the descriptor look however it wants, but I'm trying to keep it clean, as its as much a pc joystick as a ps3 joystick. For instance, when I open it in windows control panel, i dont' want buttons or axis that aren't functional.

I did some more digging around and found a guy who developed a universal gamepad pcb that has a functioning PS button. He also released the source code... http://forums.shoryuken.com/showthread.php?t=131230

I'm going to have to look deep into it, but the PS3usb.h file explains his report descriptor (even though that's not where it is...) that appears to compare a sixaxis controller descriptor and one by pelican... but at least I have something to compare to now.
Post Reply