Page 1 of 1

Connecting Switches Directly

Posted: Sat Nov 26, 2022 10:40 pm
by HalleysCometMan
Hey ho everybody.

So I'm planning a bit of a Mister build, got my DE10-nano and on the lookout for an arcade cabinet with a CRT.
Eventually I would like to use Mistercade or something similar with JAMMA, but for the time being while I'm messing around, I'd like to try just hook up an arcade stick and a couple of buttons, mainly to test latency.

Right now with an LCD hooked up via HDMI and just a basic USB keyboard (also tested with a USB gamepad that's lying around), the latency is not great. I've read the wiki page on lag and understand where various sources of lag come from. I have Samsung TV in Game mode, vsync=2, fast usb polling is on etc. But if a try an old shooter like Halley's Comet / 1942 when I press e.g left... the plane goes left but there still noticeable lag.

So just to rules out controller lag, is there a way to maybe wire up physical microswitches in arcade sicks directly to the GPIO pins on the board?
Or is Mister input always through USB?

As I said, I really want something like MisterCade, but as those boards seem to be in a permanent out-of-stock state of unobtainium with no sign of when I might be able to get one, I've got some waiting time.

The USB and I/O boards end up being unrealistically expensive (after exchange rate and international shipping) for things I won't need when the project is finished.

thanks!

Re: Connecting Switches Directly

Posted: Sun Nov 27, 2022 9:19 am
by Koston
You could take a look at how the SNAC interface is wired up on the I/O board and replicate that?

Re: Connecting Switches Directly

Posted: Sun Nov 27, 2022 11:09 am
by macro
It's safer to make up a daemonbytes adapter, the Leonardo's needed are not that expensive (about £5 each) and they always seem to do well in the latency tests. (I think the mistercade uses a version of this as well)

Re: Connecting Switches Directly

Posted: Sun Nov 27, 2022 1:50 pm
by Koston
macro wrote: Sun Nov 27, 2022 11:09 am It's safer to make up a daemonbytes adapter, the Leonardo's needed are not that expensive (about £5 each) and they always seem to do well in the latency tests. (I think the mistercade uses a version of this as well)
Yeah, you're absolutely correct, a daemonbytes USB encoder is much more universally useful too. I have no idea how many arcade cores actually even support SNAC.

Re: Connecting Switches Directly

Posted: Mon Nov 28, 2022 7:08 am
by Maxriptide
My advice is the same as the above responders, just build a Daemonbite arcade adapter with an Arduino Pro Micro, here's a link:
https://github.com/MickGyver/DaemonBite-Arcade-Encoder

Anyway, as regards lag, your tv is probably the weaker ring in the chain, you may try to hook up a pc monitor, they usually have less lag than TVs or (much better in my opinion) get a CRT :-)