Got bored today so I'd thought I'd have a go at making something interesting, which was using my Raspberry Pi's GPIO pins to interface with the SNES controller port. Because I'm skint I'm using whatever I have lying around, which is the Retropie GPIO adapter. Normally, these are used to connect a SNES controller to a Raspberry Pi but I'm thinking it should work just as well the other way round. The ultimate aim is to have something I can playback TAS runs onto real hardware, but for now I'm just going to see if I can get the start button to work ;-)
One issue that popped up quickly was the speed at which I'd need to poll the GPIO pins, which according to this helpful document is ~12us, according to what I've read here the library I'm using (wiringPi) should be ok (83Khz vs ~7Mhz).
Couple of questions:
Q1.
I read here that the controllers are happy with anything from 3V-7V, does anyone know if the console itself will function with 3.3v inputs on the data line? I'm guessing a quick read of the schematics and relevant datasheet will help me here. I only ask this as it appears the RetroPie GPIO adapter only outputs 3.3v and I'm wondering if that's going to be a show stopper.
Q2.
Am I insane? Wouldn't it be a lot easier to use a microcontroller and interface the Pi to that?
p.s Some shoddy source code is up here,
https://github.com/SonnyJim/snesbot
One issue that popped up quickly was the speed at which I'd need to poll the GPIO pins, which according to this helpful document is ~12us, according to what I've read here the library I'm using (wiringPi) should be ok (83Khz vs ~7Mhz).
Couple of questions:
Q1.
I read here that the controllers are happy with anything from 3V-7V, does anyone know if the console itself will function with 3.3v inputs on the data line? I'm guessing a quick read of the schematics and relevant datasheet will help me here. I only ask this as it appears the RetroPie GPIO adapter only outputs 3.3v and I'm wondering if that's going to be a show stopper.
Q2.
Am I insane? Wouldn't it be a lot easier to use a microcontroller and interface the Pi to that?
p.s Some shoddy source code is up here,
https://github.com/SonnyJim/snesbot

![[IMG]](https://web.archive.org/web/2im_/http://homepages.inf.ed.ac.uk/group/sli_archive/slip0809_c/s0569996/img/snes_timing.gif)

