Is Arduino real-time? I.e. is a 6 millisecond delay guaranteed to actually be 6 milliseconds?
Yes, it is real time, but due to interrupts you have to manage critical sections with cli() and sei() and your time base is a 16.000 MHz crystal. Most instructions for ATmega and ATtiny execute in 1 clock cycle so writing deterministic, time-critical code is straightforward.
Building a USB SNES Controller
91–100 of 101 posts
Re: Building a USB SNES Controller
#92I think the project is cool, but since a usb snes controller is, what 5$ on ebay (or more to have quality one), I find it too bad that you damage a working, vintage real snes controller that there will be less and less of.
Re: Building a USB SNES Controller
#93This is AWESOME. I set out to do exactly this like a decade ago and couldn't figure out how. I still have the two SNES controllers in my electronics box and dozens of Arduinos. Looks like I'll be making some USB SNES controllers this weekend.
Re: Building a USB SNES Controller
#94my very first electronics projects were classic controller to USB conversions. I remember struggling with PIC after just wrapping my head around BASIC Stamps, and trying to follow raphnet tutorials https://www.raphnet.net/electronique/multiuse_tiny1/index_en... going to show this article when people ask 'how do i get started with a fun electronics project' :)
Re: Building a USB SNES Controller
#95Looking at the described protocol it seems the SNES controller uses a simple 16-bit parallel-in-serial-out shift register - and a quick Google confirmed that. This means the timing is almost certainly quite loose, and there's a pretty decent chance you might even be able to poll it as the 1kHz "needed" for "serious" gaming. And it'd be pretty trivial to offload the readout to the MCU's SPI peripheral.
Re: Building a USB SNES Controller
#96This is really cool! One thing I'm wondering is how the SNES implemented its Multitap support[1] with such a simple "wire protocol". Could it be that the two missing wires and/or 4 unused slots in the polling cycle are used for some kind of adressing scheme when a multitap is plugged in? https://nintendo.fandom.com/wiki/Super_Multitap
[1] https://archive.org/details/SNESDevManual/book2/page/n385/mo...
[2] https://www.downtowndougbrown.com/2013/04/homebrew-snes-4-pl...
Re: Building a USB SNES Controller
#97Re: Building a USB SNES Controller
#98https://github.com/MickGyver/DaemonBite-Retro-Controllers-US...
It's how to build your own demon bite adapters using Arduino, for various console. These are super low lag.
If you Google demon bite you can find various sites selling premade adapters.
These are really popular with mister fpga users:
https://en.m.wikipedia.org/wiki/MiSTer
This is a bit of a rabbit hole, the mister is the best retro related thing I've bought / built.
Here's a useful listing of various usb adapters and their latency:
Re: Building a USB SNES Controller
#99Earlier quoted context omitted.
Yeah I too wondered why the author would target 60Hz at all. The fact that the SNES controller is polled at 60Hz is simply a consequence of the game reading the input at that rate. As mentioned in the other comment in this setup the polling of the controller is not in sync with the game reading the input at all. Thus even if you target a polling rate of 60Hz perfectly you'd actually have worse input latency than the…
I had a feeling the polling rate was probably to do with the frame rate of the SNES rather than some requirement of the controller. I'll try out a higher polling rate and see what happens.