Working on a driver for a SNES USB gamepad

2 issues

1. I disabled the uhid module from kernel to test my driver. Emulators will recognize my driver if I create a symbolic link from my driver to /dev/uhid0. Is there a way I can get applications to recognize my driver without doing this?

2. The emulators will recognize only certain buttons. I can't figure out if this is an issue with my driver code or the uhid report descriptor table that I got from this file:
http://lxr.linux.no/linux+v3.7.7/drivers/hid/hid-dr.c


the code is here:
https://github.com/lispandtrees/dragon_rise_driver/blob/master/snes_usb.c
 
Please keep us posted! I have a USB adapter for an actual SNES controller but the driver appears to be responding too quickly, which means emulators can't be properly calibrated and the entire setup is pretty much unusable. It would be great if I could properly play those old SNES games on FreeBSD using a proper SNES controller.
 
I'll definitely try and keep you guys updated! I didn't think anyone else would be interested in this. Thanks for the support.
 
I don't have the controller and probably never will, but it's great to see people writing drivers. That contributes to the code base and makes it easier for the next person who wants to do something similar.
 
I also prefer emulators/zsnes. It's the most convenient one to use and appears to be more tolerant of not-entirely-perfect ROMs than emulators/snes9x.

For what it's worth: both emulators work fine with your average modern USB gamepad meant for PCs. But of course an actual SNES controller just gives that little bit of extra playability. Most games can be played with a standard USB gamepad, but particularly with beat-'em-up games such as Killer Instinct and the Street Fighter and Mortal Kombat series I'm inclined to say that it does make a difference when you have an actual Nintendo controller in your hands.
 
Turns out there isn't a lag issue. I did a bit of Googling and found out that it's just a problem inherent to the controller itself. People had the same issue on Windows/Linux. Also, I'm running FreeBSD as a virtualized guest so that only exacerbates the latency.

I think I'm done with this. I've accomplished my goal and had a lot of fun in the process. The only issue now is finding out why it's not working with snes9x but :P
 
I'm proofreading the blog right now and I'm editing it to be more readable. I initially just copied and pasted my log info without really looking at it. I believe there was even profanity in some of the posts :O. I apologize for that but I'm working on it. Check back in a couple of days for the revision.
 
This is truly embarrassing but it turns out that the latest release of FreeBSD does in fact support my gamepad out of the box. I originally started working on this driver for the 8.2 release and there wasn't any support then. I can't say this was all for nothing though because it was a great learning experience. And let this be a lesson to us all about doing our research. :r
 
Back
Top