guncon2
guncon2 copied to clipboard
[Contribution] Add more guns
Hi, I have a gun that works well in pc, but I want to use your drivers in rpi. I think it works equal as guncon2, but because of vendor and product ids, it is not being detected by your drivers.
I will try to compile changing these values, but, how do you think about using a config file to set these values? Or using an array of vendor-poduct ids tuplas?
I'm not used to C language, but I think adding my devices ids to guncon2_table should work, isn't it?
Something like that:
static const struct usb_device_id guncon2_table[] = {
{USB_DEVICE(NAMCO_VENDOR_ID, GUNCON2_PRODUCT_ID)},
{USB_DEVICE(MY_VENDOR_ID, MY_PRODUCT_ID)},
{}};
Cheers
If the Prod/Vendor Ids are not the same is because in not a GCon2 compatible gun, so even if you add the proper Ids to the struct, the information expected by the driver (button bytes) won't match.
I can use it in my pc, as a joystick, the buttons works fine, but I don't know how the position is sent/read.
So, if i want to do it, I should debug it and change that bytes? Is there a way to debug the data sent by the gun?
I will try to investigate more about this.
Thanks!
If it works as a joystick on linux, it should just work as a gun input without any driver. For example, with a suitable adapter the Xbox Light gun will work in retroarch with the standard xbox controller kernel module.