Skip navigation
NintendoAge
Welcome, Guest! Please Login or Join
Loading...

Tech Talk SNES Controller: All Buttons Firing At Once?! Using the 2 x 4021 IC Schematic; Very Odd Behavior

Jun 14 at 5:23:54 PM
HeadcolorsTV (0)
avatar
(Tommy Osborne) < Tourian Tourist >
Posts: 30 - Joined: 06/23/2018
New York
Profile
Hello,

So I'm designing a circuit based on this schematic, attempting a SNES/NES dual-purpose controller, basically. I have everything wired up correcty on my breadboard (after quadruple-checking, trust me!), and yet after every troubleshoot, the same thing keeps happening.

The test cart: SMB World. The intro, within seconds, goes to the game select screen on its own; sometimes it selects a game and then selects 1 or 2 player, sometimes it goes to player select and then back, sometimes the selection cursor moves on its own. Obviously buttons are firing on their own. There is a very brief time window in which I can give an input command on my own, and the correct buttons do the correct things.

Map screen: I'll explain what happens in 2-player mode, as more buttons are utilized in the map. The map screen won't be on for one second after fade-in before a button command fires on its own. Sometimes it's B to start the level I'm on; sometimes it's Select to bring up the player switch menu; sometimes it's Down; and sometimes it's Start to bring up the map view mode. Inputting any direction will simultaneously fire Start.

Gameplay: This is where all hell really breaks loose. More often than not, the level will begin with Mario/Weegee crouched down. He'll remain crouched for about 5 seconds, and no buttons or directional inputs will work during this time. Atter that, there will be a very brief time window (1-5 seconds? it varies) in which I can input button commands, and they all seem to work, from what I can tell after numerous test cycles. Then what happens is what I can only presume is several/all buttons firing at once, usually Start and Select firing first in a split-second "one-two" manner, which pauses and immediately exits the level; this will happen on its own, even if I press no buttons. The process then repeats over and over from the map screen. 

I tested all leads, the ICs and even the breadboard rows, and even tried swapping in new ICs. I've tried swapping the yellow (CLK) and red (DATA) wires, thinking maybe the colors were switched. I've tried disconnecting leads, one by one--even the +5V rail, and the only thing that seems to have an effect is disconnecting DATA (which results in no input commands fired and no response from any buttons) and disconnecting pin 8 of the first IC (the top one in the schematic) from GND (B still works, and pressing any of the directions will fire other simultaneous commands, but no other button seemed to work). I also tried removing the resistor networks. None of these methods seemed to identify a clear problem nor get me any closer to a solution.

What would cause this behavior? The common pattern seems to be [Down for 5 seconds with input disabled...input enabled for a very brief moment...multiple buttons firing at once, starting with Start and Select...repeat].


P.S.: For some of you reading this right now: yes, this means exactly what you think it means.  

Jun 14 at 9:59:52 PM
HeadcolorsTV (0)
avatar
(Tommy Osborne) < Tourian Tourist >
Posts: 30 - Joined: 06/23/2018
New York
Profile
I just posted a quick video to YouTube for reference. During the disagree, I didn't touch any of the buttons; I just let it go on its own and observed what happened.




Jun 15 at 2:04:55 AM
CZroe (31)
avatar
(Julian Emmett Turner II) < Bowser >
Posts: 6522 - Joined: 08/25/2014
Georgia
Profile
This seems really similar to what happens with the first version of the Old Skool TurboGrafx-16 controller if you connect it to a TurboTap. It was caused by having 330 ohm resistors where the original schematic called for 47k ohm. That wasn't the only problem though: After replacing the resistors, turbo was also glitched and didn't work at full speed. It was also too fast at low speed. I solved that by adding a bypass capacitor to the 74HC157.

If you double-check and all your component values are correct I would add a bypass capacitor to both of the 4021 chips. That just means adding a small capacitor between power and ground on each chip. They each need to be as close as possible to their respective chips.

Here is where I added a 0.1uF bypass capacitor to a TG16 controller:

https://i.imgur.com/ty4Dord.jpg...

I got that value from a schematic I found online that was supposedly made from an original TG16 controller but it seems that many other logic chips often use a smaller 0.01uF bypass capacitor. Not sure what's more appropriate for this but I imagine 0.1uF couldn't hurt.

They work as little power reservoirs so that one digital logic chip switching on and off as it should it doesn't cause the power to dip so much that the other is switching off inadvertently (and vice versa).

Jun 15 at 11:35:41 AM
HeadcolorsTV (0)
avatar
(Tommy Osborne) < Tourian Tourist >
Posts: 30 - Joined: 06/23/2018
New York
Profile
Thank you. I tried something different with how the resistors connected to the voltage rail on the breadboard, and it worked!

Thankfully, I was already using 47kOhm arrays for this project, so I reinstalled them but differently. Forgive the 30-second iPhone finger drawing [LMAO]. Instead of putting the voltage lead of the array in the same row as the VCC and pin 16, I connected the array directly to VCC and connected pin 16 to the rail separately. Did the same with the second array and the second 4021.

Lo and behold, it works now! I'm not even sure this is the solution, I'm just sharing what I did; for all I know, there was a bad connection somewhere on the board originally.

And NOW a follow-up question: does resistance level matter when it comes to the buttons' responsiveness? Like, is there a worthwhile difference between 47kOhm pull-ups and 10kOhm, and which way? This is eventually going to be an arcade stick, so responsiveness is important to me.   Thanks again!