Connecting Switches Directly

Discussion of keyboards, gamepads, joysticks and other input related peripherals.
HalleysCometMan
Posts: 9
Joined: Fri Nov 25, 2022 10:25 pm

Connecting Switches Directly

Unread post 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!
Koston
Posts: 80
Joined: Sat Feb 13, 2021 12:25 pm
Has thanked: 61 times
Been thanked: 52 times

Re: Connecting Switches Directly

Unread post by Koston »

You could take a look at how the SNAC interface is wired up on the I/O board and replicate that?
User avatar
macro
Core Developer
Posts: 141
Joined: Sun May 24, 2020 4:12 pm
Been thanked: 171 times

Re: Connecting Switches Directly

Unread post 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)
Did I do something useful?

buy me a coffee
Koston
Posts: 80
Joined: Sat Feb 13, 2021 12:25 pm
Has thanked: 61 times
Been thanked: 52 times

Re: Connecting Switches Directly

Unread post 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.
Maxriptide
Posts: 15
Joined: Sun Jul 19, 2020 11:50 am
Has thanked: 1 time
Been thanked: 7 times

Re: Connecting Switches Directly

Unread post 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 :-)
Post Reply