this is my first post in this forum. I'm quite a beginner in using this great piece of hw/sw.
Some month before I found a USB gamepad implemenation based on V-usb and adapted it for my needs in building an arcade stick.
http://bencao74.blogspot.com/2009/09/lulu-source-released.html
It was easy and straight forward to adapt the source. I've extended the source to use 10 Buttons and a stick. Then I wanted to use my arcade stick on the Playstation 3. I observed that the home button is not working. Since this a important function for PS3 I tried to identify it in the pc usb gamepad implementation, but no success.
I found a project called UPCB http://forums.shoryuken.com/showthread.php?t=131230 that supports the PS3 on the basis of PIC18F4550.
I tracked down the source to the PS3 descriptors (http://www.marcuspost.com/downloads/upcb/UPCB_25.zip)
I mapped the descriptors to my v-usb controller implementation. The device is recognized, but winxp setuppi.log says that my device could not be started (error 10). Here're the descriptors of the UPCB project.
Code: Select all
rom const unsigned char PS3USB_Device_Descriptor[] = {
0x12, //size of this descriptor in bytes
DEVICE, //descriptor type = PS3USB_Device_Descriptor
0x10, 0x01, //USB Spec 2.0
0x00, //class code
0x00, //subclass code
0x00, //protocol code
0x40, //EPO buffer size
0xC4, 0x10, //vendor ID
0xC0, 0x82, //product ID
//0xC5, 0x11, //vendor ID
//0xC1, 0x83, //product ID
0x06, 0x00, //device release number
0x01, //manufacturer string index
0x02, //product string index
0x00, //device serial number string index
0x01 //# of possible configurations
rom const unsigned char PS3USB_Configuration_Descriptor[] = {
0x09, //size of this desc in bytes
CONFIGURATION, //type of desc
0x22, 0x00, //size of total descriptor
0x01, //# of interfaces
0x01, //index number of this config
0x00, //config string index
0x80, //attributes:Default
0x32, //power consumption * 2mA
//Interface portion
0x09, //size of this desc in bytes
INTERFACE, //type of desc
0x00, //interface number (ordinal)
0x00, //alternate setting number
0x01, //number of endpoints (not including EP0)
0x03, //Interface class - HID
0x00, //sublass
0x00, //protocol code - mouse
0x00, //interface string index
//HID portion
0x09, //size of this descriptor in bytes
HID, //type of descriptor: HID
0x11, 0x01, //HID spec release number
0x00, //country code (0x00 for not supported)
0x01, //number of class descriptors
REPORT, //Report descriptor type
0x70, 0x00, //size of report descriptor
//endpoint portion
0x07, //size of desc in bytes
ENDPOINT, //type od desc
0x81, //endpoint address EP1 IN
0x03, //transfer style: interrupt
0x40, 0x00, //max packet size : 64 bytes
0x0A, //interval: 10ms
};
//HID report from VSHG; need to double check.
rom const unsigned char PS3USB_Report_Descriptor[] = {
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x05, //Usage gamepad
0xA1, 0x01, // COLLECTION (Application)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1) --10
0x35, 0x00, // PHYSICAL_MINIMUM (0)
0x45, 0x01, // PHYSICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x0d, // REPORT_COUNT (13)
0x05, 0x09, // USAGE_PAGE (Button) --20
0x19, 0x01, // USAGE_MINIMUM (Button 1)
0x29, 0x0d, // USAGE_MAXIMUM (Button 13)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x95, 0x03, // REPORT_COUNT (3)
0x81, 0x01, //Input something or other --30
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x25, 0x07, // LOGICAL_MAXIMUM (7)
0x46, 0x3b, 0x01, //physical maximum 315
0x75, 0x04, //Report size 4 --39
0x95, 0x01, //Report count 1
0x65, 0x14, //unit: English angular position
0x09, 0x39, //usage: hat switch
0x81, 0x42, // Input something or other
0x65, 0x00, //Unit:none --49
0x95, 0x01, //report count 1
0x81, 0x01, //Input something or other
0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (255)
0x46, 0xff, 0x00, // PHYSICAL_MAXIMUM (255) --59
0x09, 0x30,
0x09, //--62
0x31, 0x09,
0x32, 0x09,
0x35, 0x75,
0x08, 0x95,
0x04, 0x81, //--72
0x02, 0x06,
0x00, 0xff,
0x09, 0x20,
0x09, 0x21,
0x09, 0x22, //82
0x09, 0x23,
0x09, 0x24,
0x09, 0x25,
0x09, 0x26, //90
0x09, 0x27,
0x09, 0x28,
0x09, 0x29,
0x09, 0x2a,
0x09, 0x2b, //100
0x95, 0x0c,
0x81, 0x02,
0x0a, 0x21,
0x26, 0x95,
0x08, 0xb1,
0x02, 0xc0 //--112 == 0x70
};
Now I'm getting out of ideas. What do you think about this approach? Does the v-usb cover the requirements that UPCB PS3 implementation needs? How can I get more infos to tackle this issue?
Bye,
Bencao