Genesis/Mega Drive (CD) SNAC : phantom button presses

Discussion of keyboards, gamepads, joysticks and other input related peripherals.
bUd1oo
Posts: 9
Joined: Wed Dec 30, 2020 7:46 pm

Genesis/Mega Drive (CD) SNAC : phantom button presses

Unread post by bUd1oo »

I haven't used the SNAC much until now so I can't be sure if this problem is new or not. Other than this problem the controller works fine, each button does what is supposed to do. I used the 240p test suite to find out what's going on. Maybe this is even original behaviour but I can't test that.

What happens is this:
I hold B+C and then press any diagonal on the d-pad. When I do, additionally to what I am pressing, buttons A and Start are shown as pressed as well. Sometimes holding B+C and pressing left also shows right as being pressed, although that seemed to go away after I used another controller to test.

With an USB controller none of this happens.

I also tried the Master System core with "SMS Test Suite (PD) v.032" which also has a controller test, including Mega Drive controllers. That seems to behave normally.

Any ideas?

It happens far too often that I seem to press B+C+diagonal and the game pauses. Not cool!
User avatar
lamarax
Top Contributor
Posts: 472
Joined: Wed Nov 11, 2020 6:28 pm
Has thanked: 33 times
Been thanked: 199 times

Re: Genesis/Mega Drive (CD) SNAC : phantom button presses

Unread post by lamarax »

Which make of controller are you using? Only original controllers will work with SNAC (and I mean original; the 8bitdo wireless stuff is not, contrary to what is said). Were you using an SMS two button pad/joystick with the SMS core? Mega Drive controllers won't cut it there, even if they have the same DB9 connector.
bUd1oo
Posts: 9
Joined: Wed Dec 30, 2020 7:46 pm

Re: Genesis/Mega Drive (CD) SNAC : phantom button presses

Unread post by bUd1oo »

They are original Mega Drive controllers.

Don't know about MD pads in an SMS game really but there are 1 or 2 controller test roms that provide tests for SMS and MD (even 6 button) pads.
bUd1oo
Posts: 9
Joined: Wed Dec 30, 2020 7:46 pm

Re: Genesis/Mega Drive (CD) SNAC : phantom button presses

Unread post by bUd1oo »

To rule out any software problems, I setup another SD-card. Problem remains. Tried several versions of the Genesis core. Problem remains. My other SNAC adapters (NES, SNES) seem to work okay. Also my original SMS pad doesn't do anything weird, neither in the SMS nor the GEN core.
Furthermore I can now confirm that one of my MD controllers when pressing B+C+left also shows right as being pressed, the other one doesn't. They are "1650-50, Made in Malaysia", BTW and came with a PAL system.

Had a look at the pin layout of the controller and C/Start and B/A are each on the same pin. So that kind of explains (?) why Start and A come into play here pressing B+C. Is there anything I could check on the adapter maybe? I own a multimeter but I am otherwise clueless.
User avatar
lamarax
Top Contributor
Posts: 472
Joined: Wed Nov 11, 2020 6:28 pm
Has thanked: 33 times
Been thanked: 199 times

Re: Genesis/Mega Drive (CD) SNAC : phantom button presses

Unread post by lamarax »

Yeah, SD card has nothing to do with it. If it had, you wouldn't be able to boot the MiSTer in the first place.

There seems to be a recurrent issue with those MK.1650-50 MADE IN MALAYSIA three button MD pads; please refer to this thread.
dshadoff
Core Developer
Posts: 534
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 19 times
Been thanked: 141 times

Re: Genesis/Mega Drive (CD) SNAC : phantom button presses

Unread post by dshadoff »

I’m not sure what this is, but if I had to guess, I’d think that the 10K ohm pullups on the SNAC board are too weak on this device as well (similar to PC Engine). But it could be an ‘extension too long’ issue as well (i.e. voltage drop).
Best to check with an oscilloscope
bUd1oo
Posts: 9
Joined: Wed Dec 30, 2020 7:46 pm

Re: Genesis/Mega Drive (CD) SNAC : phantom button presses

Unread post by bUd1oo »

It's not the extension, I removed that first thing. And I don't have an oscilloscope unfortunately.
Could it really be that my particular version of controller doesn't work (well, it works, with a twist)? What would the difference be?
bUd1oo
Posts: 9
Joined: Wed Dec 30, 2020 7:46 pm

Re: Genesis/Mega Drive (CD) SNAC : phantom button presses

Unread post by bUd1oo »

Got myself another controller. This one just says 1650 and is Made in Taiwan. It has a white Start button, my other controllers have a red button. Still the symptom is the same. The search continues...
billythefisherman
Posts: 33
Joined: Sun Mar 07, 2021 7:10 pm
Has thanked: 1 time
Been thanked: 2 times

Re: Genesis/Mega Drive (CD) SNAC : phantom button presses

Unread post by billythefisherman »

I have a similar issue that I've posted here on this thread. viewtopic.php?p=35256#p35256
The only thing I've heard that might fix it is resoldering the snac port on the IO board. I don't have a soldering iron (or probably the skills) to try it out.
bUd1oo
Posts: 9
Joined: Wed Dec 30, 2020 7:46 pm

Re: Genesis/Mega Drive (CD) SNAC : phantom button presses

Unread post by bUd1oo »

An update of sorts: I got myself another MD SNAC adapter from a known good source (AKA https://misterfpga.co.uk). The ones I have I bought 2nd hand and didn't bother to ask who made them at the time.
Unfortunately that didn't change anything.

Although not MD-related I found out this: because I didn't own one before I also ordered the TG16 SNAC adapter. Again with the 240p test suite I did the controller test. As with the MD each button individually works fine. As soon as I press I and II at the same time I'm send back to the menu (which means Run+Left was pressed) and after that the controller is just dead. No more inputs are recognized. My TG16 controller is from a PAL system but I don't think that's relevant.

bUd1oo
Posts: 9
Joined: Wed Dec 30, 2020 7:46 pm

Re: Genesis/Mega Drive (CD) SNAC : phantom button presses

Unread post by bUd1oo »

dshadoff wrote: Sun Oct 03, 2021 4:51 pm I’d think that the 10K ohm pullups on the SNAC board are too weak on this device as well (similar to PC Engine).
Is what you meant here somehow related to what I just described?
dshadoff
Core Developer
Posts: 534
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 19 times
Been thanked: 141 times

Re: Genesis/Mega Drive (CD) SNAC : phantom button presses

Unread post by dshadoff »

NES / SNES send data serially, at a pretty slow rate (several microseconds per bit). MegaDrive and PC Engine send 4 bits at a time, and are read quite quickly after the signal transitions; PC Engine seems to be much faster in this regard - roughly 1 microsecond in some cases.

With SNAC, because it's open-collector, the signal transitions from low to high depending on a) how strong the pullup resistors are, and b) how the signal is 'driven' from the controller. With 10K ohm pullup resistors, as in the standard SNAC design, it takes over 1 microsecond to reach a 'high' level, which can mess up the second set of bits, showing a 'phantom' key press. Worse, on PC Engine, 6-button, mouse, and Memory Base 128 controllers use repeated reads, so it's not just one set of bits which can get messed up.

I found that changing the pullup resistors to 4.7K helped a little bit, but not enough. Anything more aggressive, and it was difficult to bring the signal to a logical 'low', so it would miss reads. I ended up designing a PCE-specific adapter which used the SNAC lines, but used standard logic to drive them, rather than try to keep the logic all open-collector. This works great for PC Engine, but having it plugged in with other cores may have bus conflicts. There are current-limiting resistors on the board (as well as inside the FPGA), but it's not a universal solution.

By the way, SNAC was never intended to be used for regular controllers; just the oddball controllers like lightguns and so on which don't have alternate interfaces.
Post Reply