@@ -53,6 +53,26 @@ class RBDrumKitDevice
5353 static void Initialize ();
5454};
5555
56+ class BuzzDevice
57+ {
58+ public:
59+ virtual ~BuzzDevice () {}
60+ static USBDevice* CreateDevice (int port);
61+ static const TCHAR* Name ()
62+ {
63+ return TEXT (" Buzz Device" );
64+ }
65+ static const char * TypeName ()
66+ {
67+ return " buzz_device" ;
68+ }
69+ static std::list<std::string> ListAPIs ();
70+ static const TCHAR* LongAPIName (const std::string& name);
71+ static int Configure (int port, const std::string& api, void * data);
72+ static int Freeze (int mode, USBDevice* dev, void * data);
73+ static void Initialize ();
74+ };
75+
5676// Most likely as seen on https://github.com/matlo/GIMX
5777#define CMD_DOWNLOAD 0x00
5878#define CMD_DOWNLOAD_AND_PLAY 0x01
@@ -99,6 +119,7 @@ enum PS2WheelTypes {
99119 WT_DRIVING_FORCE_PRO_1102, // hw with buggy hid report?
100120 WT_GT_FORCE, // formula gp
101121 WT_ROCKBAND1_DRUMKIT,
122+ WT_BUZZ_CONTROLLER,
102123};
103124
104125inline int range_max (PS2WheelTypes type)
@@ -1034,6 +1055,105 @@ static const uint8_t rb1_hid_report_descriptor[] = {
10341055 // 137 bytes
10351056};
10361057
1058+ // ////////
1059+ // Buzz //
1060+ // ////////
1061+
1062+ static const uint8_t buzz_dev_descriptor[] = {
1063+ 0x12 , // bLength
1064+ 0x01 , // bDescriptorType (Device)
1065+ 0x00 , 0x02 , // bcdUSB 2.00
1066+ 0x00 , // bDeviceClass (Use class information in the Interface Descriptors)
1067+ 0x00 , // bDeviceSubClass
1068+ 0x00 , // bDeviceProtocol
1069+ 0x08 , // bMaxPacketSize0 8
1070+ 0x4C , 0x05 , // idVendor 0x054C
1071+ 0x02 , 0x00 , // idProduct 0x0002
1072+ 0xA1 , 0x05 , // bcdDevice 11.01
1073+ 0x03 , // iManufacturer (String Index)
1074+ 0x01 , // iProduct (String Index)
1075+ 0x00 , // iSerialNumber (String Index)
1076+ 0x01 , // bNumConfigurations 1
1077+ };
1078+
1079+ static const uint8_t buzz_config_descriptor[] = {
1080+ 0x09 , // bLength
1081+ 0x02 , // bDescriptorType (Configuration)
1082+ 0x22 , 0x00 , // wTotalLength 34
1083+ 0x01 , // bNumInterfaces 1
1084+ 0x01 , // bConfigurationValue
1085+ 0x00 , // iConfiguration (String Index)
1086+ 0x80 , // bmAttributes
1087+ 0x32 , // bMaxPower 100mA
1088+
1089+ 0x09 , // bLength
1090+ 0x04 , // bDescriptorType (Interface)
1091+ 0x00 , // bInterfaceNumber 0
1092+ 0x00 , // bAlternateSetting
1093+ 0x01 , // bNumEndpoints 1
1094+ 0x03 , // bInterfaceClass
1095+ 0x00 , // bInterfaceSubClass
1096+ 0x00 , // bInterfaceProtocol
1097+ 0x00 , // iInterface (String Index)
1098+
1099+ 0x09 , // bLength
1100+ 0x21 , // bDescriptorType (HID)
1101+ 0x11 , 0x01 , // bcdHID 1.11
1102+ 0x33 , // bCountryCode
1103+ 0x01 , // bNumDescriptors
1104+ 0x22 , // bDescriptorType[0] (HID)
1105+ 0x4E , 0x00 , // wDescriptorLength[0] 78
1106+
1107+ 0x07 , // bLength
1108+ 0x05 , // bDescriptorType (Endpoint)
1109+ 0x81 , // bEndpointAddress (IN/D2H)
1110+ 0x03 , // bmAttributes (Interrupt)
1111+ 0x08 , 0x00 , // wMaxPacketSize 8
1112+ 0x0A , // bInterval 10 (unit depends on device speed)
1113+ };
1114+
1115+ static const uint8_t buzz_hid_report_descriptor[] = {
1116+ 0x05 , 0x01 , // Usage Page (Generic Desktop Ctrls)
1117+ 0x09 , 0x04 , // Usage (Joystick)
1118+ 0xA1 , 0x01 , // Collection (Application)
1119+ 0xA1 , 0x02 , // Collection (Logical)
1120+ 0x75 , 0x08 , // Report Size (8)
1121+ 0x95 , 0x02 , // Report Count (2)
1122+ 0x15 , 0x00 , // Logical Minimum (0)
1123+ 0x26 , 0xFF , 0x00 , // Logical Maximum (255)
1124+ 0x35 , 0x00 , // Physical Minimum (0)
1125+ 0x46 , 0xFF , 0x00 , // Physical Maximum (255)
1126+ 0x09 , 0x30 , // Usage (X)
1127+ 0x09 , 0x31 , // Usage (Y)
1128+ 0x81 , 0x02 , // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
1129+ 0x75 , 0x01 , // Report Size (1)
1130+ 0x95 , 0x14 , // Report Count (20)
1131+ 0x25 , 0x01 , // Logical Maximum (1)
1132+ 0x45 , 0x01 , // Physical Maximum (1)
1133+ 0x05 , 0x09 , // Usage Page (Button)
1134+ 0x19 , 0x01 , // Usage Minimum (0x01)
1135+ 0x29 , 0x14 , // Usage Maximum (0x14)
1136+ 0x81 , 0x02 , // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
1137+ 0x06 , 0x00 , 0xFF , // Usage Page (Vendor Defined 0xFF00)
1138+ 0x75 , 0x01 , // Report Size (1)
1139+ 0x95 , 0x04 , // Report Count (4)
1140+ 0x25 , 0x01 , // Logical Maximum (1)
1141+ 0x45 , 0x01 , // Physical Maximum (1)
1142+ 0x09 , 0x01 , // Usage (0x01)
1143+ 0x81 , 0x02 , // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
1144+ 0xC0 , // End Collection
1145+ 0xA1 , 0x02 , // Collection (Logical)
1146+ 0x75 , 0x08 , // Report Size (8)
1147+ 0x95 , 0x07 , // Report Count (7)
1148+ 0x26 , 0xFF , 0x00 , // Logical Maximum (255)
1149+ 0x46 , 0xFF , 0x00 , // Physical Maximum (255)
1150+ 0x09 , 0x02 , // Usage (0x02)
1151+ 0x91 , 0x02 , // Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
1152+ 0xC0 , // End Collection
1153+ 0xC0 , // End Collection
1154+ // 78 bytes
1155+ };
1156+
10371157struct dfp_buttons_t
10381158{
10391159 uint16_t cross : 1 ;
0 commit comments