Snes -> USB (Not another newb)

Started by Lizard2033, January 18, 2004, 03:18:00 AM

Previous topic - Next topic



First off Im just going to start by saying that I know you cant hardwire a snes controller to a usb cable  :P .

Im planning on using a PIC16C745 Usb controller, I already have the chips (and obviously a programmer).

Now I was wondering if anyone had any insight as to the code that needs to be written as far as the usb side goes, I know the snes aspect. Im planning on doing this in C because I dont know assmebly, however I can only find similar code in assembly.

Any help is greatly appreciated.



I'm looking at doing somthing similar, only I wat to support a ton more interfaces :)

I can't recall all the specifics of the protocol, but the SNES controller uses a serial protocol. It gets polled about 60 times a secong IIRC and it spits back a 12 bit stram with each bit representing the state of a button. Decoding these should be a piece of cake. On the USB side, I personally was going to try and make the OS belive my interface is a USB HID device, a 8 button gamepad. That way drivers aren't an issue. I don't have any code to supply (I actually haven't dealt with that chip, I'll have to look into it now :) ) but I would hope you could find a HID example for your particular PIC.


I've already finished NES/SNES to USB code. I'm planning on releasing it open source, and I'm hoping that others can add to the project. I'm planning on it supporting as many controllers as I can fit code, and it uses HID. For that reason, I'm coding in assembly. I'm using the PIC16C745. Microchip has some examples for USB gamepads using HID. I'm in communication with them so that I don't break any of their licenses since I'm using some of their code in my adapter. I'm also working on getting a USB certified ID through Microchip. That way any adapter that uses my code, can have the USB logo on it legally. If you're still wanting to do this yourself, I'd reccommend using Microchips USB code, and just calling their functions, as it takes tons of work out of it and others have failed at writing their own. They have it in both assembly and C! My Webpage. I hope there's some useful info there. I should have some schematics up soon.