Nintendo (NES) Controller – Electronics

In a previous video, we examined the
ergonomics of two controllers for the Nintendo Entertainment System – the
original rectangular controller and the “Dogbone” redesign. In this video, we will
focus on the electronics of those controllers, the circuit components, and
the signals that go in and out of the control ports on the system. I can recall
looking at the plug for the Atari 2600 joystick in the 1980s and counting the
pins. There were nine. Swapping a joystick and a paddle controller is pretty
standard fare when it comes to the Atari. I thought that the four directions and
one button of the joystick must each get a pin – so five total – and that maybe the
rest of them were used for the paddle? I figured controllers must need one pin
per signal to deliver presses to the Atari. I wasn’t too far off in this case.
When the Nintendo came along, I was confused this controller has four
directions plus four buttons – eight total things you could press, but only seven
pins? How does this work? Let’s talk about it. With all of the
plastic pieces and rubber membranes removed, we can examine the circuit board,
components on that board, and the wires connected to it. This side of the board
is the side that faces us when we use the controller. When we press a button,
the contacts on the rubber membrane bridge neighboring areas of the PCB to
indicate a button is being pressed. Let’s look at the back. The wires connect in
the top-left corner. You can see that the colors for the wires of the controller
have matching labels on the board to indicate where each wire should go. The
colors of the wires match the abbreviations on the labels written to
the left of each hole. At the bottom, you see the label for the corresponding
system the Nintendo Entertainment System in our case. You no doubt have also
noticed the second set of colors and system with each label in parenthesis.
This color scheme is for the wires of a Famicom along with “HVC,” which stands for
home video computer. Wire colors aren’t universal, and this helps anyone that is
assembling this controller by hand to know where each wire is supposed to go.
The key component we see here is this chip with a label HD14021BP. As you may have surmised, this chip is an important component for
taking signals input by us and providing them to the Nintendo. It is an 8-bit
shift register, and we are going to learn how it works. Let’s return to the side
where the button presses happen. I’ll talk you through the bright
lines called “traces,” and explain the various signals. For reference and
convenience here is a single socket on the control deck. The control pad only
uses five of these connections. The first two signals to talk about are power and
ground. The Nintendo supplies five volts for power. I will sometimes refer to
power and ground as “high” and “low” respectively throughout this explanation.
Let’s trace the ground signal first. Ground goes to each of the buttons as
well as the d-pad on the board. While you may not consider the d-pad to be buttons,
it is, in essence, a set of four buttons. Therefore, ground goes to each of the
eight buttons on the board as well as to the shift register. The legs of that chip
are soldered to the board right here. Sixteen pins total. Ground connects to pins 8
and 11. So now we have our ground path. Notice that each of the buttons has
ground in common. As for power, the power signal travels to the shift register as
well as to one side of each of these black areas on the board. Each of these
areas is a carbon printed resistor. More on that later. On the opposite side of
each resistor is a trace that leads to its own pin on the shift register as
well as to one side of each of the buttons. We have a pretty good layout of
the traces to the sides of each button. When a button is pressed, the side
connected to the pin on the shift register is bridged to the side
connected directly to ground – therefore grounding the signal. In other words, the
signal is pulled low. So connecting the appropriate pin to ground is what lets
the shift register know which button or buttons are being pressed. A fair
question here might be “why do you need power and these carbon printed resistors?
Why not just tie the pin directly to one side of the button, have ground on the
other side like it is already, and then when you press the button, it connects it
to ground and activates the signal?” The answer is – the pin needs to know at any
given time if it is high or low. When you tie it to ground, it is low. If you don’t
tie it to anything at all, then what is it? The pin is floating. It needs to be
told what to be. These resistors are used to pull each pin high by default. The
resistors are called “pull-up resistors” as they give the pins their default
state. By pulling them high, we use the power signal as our indicator of high.
The resistor between each signal and power is important, because we
would otherwise tie power directly to ground whenever we press a button. If
this happened, it would be bad. Don’t cross the streams. We are set up quite well to tell each button that they aren’t being pressed until they are tied
to ground. With the path set for both power and ground, what about the
remaining three signals? The names of these signals are different depending on
where you do your reading. I am electing to use the terms “Latch,” “Clock,” and “Data.”
Latch and Clock are used to ask the shift register for the state of the
buttons, and the Data line is used to communicate the state of those buttons
to the Nintendo. The shift register can be placed in parallel mode or serial
mode. This is controlled by the Latch pin. When it comes time to get the state of
the buttons, the Nintendo sends a pulse down the latch wire to tell the shift
register to “latch” the state of all the buttons. You might think of it as taking
a photo of what buttons are pressed at that exact moment in time. The latch
pulse goes high to put the shift register in parallel mode to gather the
state of the buttons hooked up to each pin, and then goes low to put the shift
register in serial mode so it can send the state of the buttons out the data
line in a particular order. The shift register *always* lines up the state of
each button in the same order for serial output – A, B, Select, Start, Up, Down, Left,
Right. Eight states, always in the same order – either high if they aren’t being
pressed, or low if they are. Data, specifically the state of the “A” button
as it is first in line, is immediately output on the data line. To advance to
the next button state, a pulse is sent down our last wire – the Clock – to the
controller. The clock pulses each time it wants to get the next button in line. So
think of the Nintendo as saying, “Next!” each time it sends a clock pulse. Seven
pulses plus a trailing pulse are sent down the clock line for a single
controller read. After the final clock pulse, the single controller read has
been completed for the current frame of video. With a basic idea of how a
controller read operates for the Nintendo, let’s build our own controller
and examine the signals using an oscilloscope.
We’ll hook it up to an early 90’s redesign of the Nintendo: a top-loading,
AV Famicom. Since the point of this controller is to allow us to press
buttons and see what happens on the scope, I’m going to substitute switches
in place of the buttons when building my own controller. This will let me activate
and hold the button but still have my hands-free. I picked up a plastic
container from a home-improvement store for a dollar and some change. This will
serve as an enclosure for the switches. I created a drilling template using a
paint program, printed it out, and cut it to fit the bottom of the container. Just
like our gamepad, each button – or switch in our case – will have the appropriate
signal wire and a ground wire connected to it. I daisy-chained the ground wire
from switch to switch and ran it as well as the signal wire for each switch out
the side of the controller. Now I can build the rest of the controller outside
the enclosure. I used 22 gauge solid core wire for all
of the switch hookups. The reason for this is so I can strip the opposite end of
the wire and feed it into this – a breadboard. Breadboards are used for
prototyping circuits without the need for continuous soldering and desoldering.
Makes things easier to change throughout the design. All of the holes on this top
row X are connected together, and all of the holes on this bottom row Y are also
connected. Likewise, each column of five holes is connected on either side of
this trough. This just makes it easier to join separate wires to the same signal.
Let’s build the controller. First up is the shift register. It cost me about
$0.50. It will straddle the trough like so. The carbon printed, pull-up resistors
from the gamepad are represented here by these 39k film resistors. Each button-related input
needs a pull-up resistor with the opposite side connected to
power, and each pin receives one. Both the X and Y rows carry power, so they are
bridged to share the signal. Power is also routed to pin 16 of our chip. Ground routes the pins 8 and 11 ground signals meet at column 23 over here. Now
the controller cable. The wires have been extended using 22 gauge solid core wire.
The colors are different than a stock cable. Ground, Power, Latch, Clock and Data
are now connected. Now all of the switch signal wires to their appropriate pin.
Cable connects to the control deck. Launch control this is Houston,
we are go for launch. The switches are oriented opposite a light switch –
therefore, the down position means on and the up position means off. All switches
are off to start. I oriented it this way so my brain thinks “switch down” means the
same as “press down” on a controller button. Thanks to the shared columns on
the breadboard, I can connect the oscilloscope probes to Latch, Clock, and
Data, and we can take a peek at what is happening as the controller and the
console communicate. Here is a screen on an oscilloscope. This lets us view
electrical signals over a period of time. We are going to break down a controller
read operation for Super Mario Bros. Let’s put a signal on the screen. OK. This line from left to right is the Latch signal. We’ll talk about the
specifics in just a bit. This line is basically a signal’s timeline. Time is
moving forward as you move from the left side of the screen to the right side of
the screen. I have set up the scope to always show the latch pulse right here
on the screen. If I let the footage roll, you can see the activity. We actually
have tons of latch pulses occurring as time is moving forward, but each one
keeps landing in the same exact spot for convenience. Otherwise, they would just
keep flying by really fast, and we couldn’t really see anything. All you
need to note when viewing a signal is when it is low or high. See how the latch
signal stays low and then goes up and back down in a very short period of time?
That is what the Nintendo does to signal the 8-bit shift register to get the
state of the buttons. I’ll add the data signal to the mix. The data signal is
high when a button is not pressed and low when it is. None of the buttons are
activated right now, so data remains high for the duration of all eight button
states. Remember that the state of each button is output one at a time, and the
Nintendo sends a clock pulse each time it wants the next button state.
Let’s add the clock pulses. The clock line is high. Each time it goes low, we
pass the state of the next button on the data line. Remember the order of buttons
I mentioned earlier? I’ll place their order on the oscilloscope so things are
easier to follow. With all three signals on the screen,
let’s review. Latch switches the shift register to parallel mode and then
quickly back to serial mode effectively saying “Let’s go. Gimme “A.” Let’s let the
footage roll, and I’ll flip the switch for “A.” Now that A is active, the data
output is low during A’s output time. I can now walk the line by activating B,
Select, Start, Up, Down, Left, Right. Now all buttons are active, so data remains low
during the entire controller read. Note that this is an impossible state on a
real gamepad as it would require you to press Up Down Left Right at the same
time. Now let’s turn off the d-pad presses. Turn off B and A. Turn off Select. And
now Start is the only button being pressed and held. Watch the yellow data
line, and I’ll show you several states of button presses. No buttons are pressed. All buttons are pressed. Only Start is pressed. All buttons except Up and Down
are pressed. The entire controller read occurs over the same period of time. The
Nintendo sends the latch pulse and the clock pulses, we step through the same
order of button states each time, and those states are fed in order across the
data line. That’s it. Of course in the computing world, time is important and
very relevant in computer operations. Let’s take a look at Nekketsu Hockey’s
controller read. We are zoomed out a bit on this one aren’t we? The same rules
apply for a controller read. Latch, Clock, Data. But I am also monitoring a fourth
signal – a signal that you already know if you have watched other videos on this
channel. The intro to this game rolls through a few scenes and then hits the
mostly white Technos screen. This was the screen being
displayed when I captured this controller read, so… Boom! The composite
video signal from the Nintendo. You are most likely already familiar with what
is here. We have the last few scanlines from the previous frame, the vertical
sync and blanking period, and the start of visible scanlines for the current
frame. It appears that the latch signal fires the controller read while the end
of the sixth scan line is being drawn across the CRT screen. Zooming in on the
controller read area shows that the controller read takes about two and a
half scanlines to complete. This puts time into perspective – not only does it
take almost three scanlines to capture a controller state at the requested time,
that capture window is a small fraction inside a single frame. If you haven’t
watched the 525-line analog video and Luma videos yet, I recommend you do so
as they will help define a few of the terms I use – vertical blanking, sync
pulses, and more. If we examine the read as a percentage of a graphical frame, it
occurs roughly inside this window when hockey is rolling through its attract
screens. Super Mario Bros. has its controller read a bit earlier during
gameplay inside the vertical blanking interval – very close to vertical sync.
Following the read, the remaining time for drawing the current screen is
typically used to process the results from the controller read to set up the
next frame. The vertical blanking period before the next frame is used to send
the new frame’s graphics to the graphics processor. It is this new frame that is
the earliest moment in time where the results of the previous frame’s captured
controller press can be seen on screen. Let’s talk loosely about input lag. We
know that the controller capture window happens right here. If you press a button
beneath that window of time, that action won’t be seen by the Nintendo until the
controller captured during the following frame picks it up. The input captured on
the next frame is processed, and the results won’t be seen until the frame
after that. This is by design. Whether or not you consider this a form of input
lag is a subject for another video. Concerning the time between controller
reads and the location of those reads – it can vary from game to game or even game
function to gain function when Nekketsu Hockey is waiting on the Start screen, the controller is polled at the start of each frame as we
saw earlier. When the game is underway, however, player one is only pulled once
every four frames. I assume this is by design to
accommodate four players. Now for a bit of trivia. The audio processing unit in
the Nintendo has five channels, including a delta modulation channel that can be
used to play DPCM samples. Mario 3 uses the DMC for drum samples like the drums used with
the dancing palm trees in World 2. Super C uses it for drums and
Orchestra hits. Unfortunately there is a bug in the NTSC NES and Famicom where if sampled data is retrieved from memory at the same time as a controller read, a
conflict could occur that corrupts the data read from the controller. This
results in the system thinking a button was pressed when in actuality it was not.
This is typically a right press – the last bit of a controller read. To compensate
for this, games that use DPCM like Super Mario Bros. 3 perform two consecutive
reads of controller data. Both reads are compared to each other to make sure they
are equal before acting upon user input. Super C reads the controllers in a
similar fashion. This bug was fixed with the PAL CPU revision. Finally, as a bit of
an addendum, I wanted to show you two PCBs from later controllers. The Dogbone
NES-039 controller I have with a PCB from July 1993 has the same size or
package type for its shift register as the original controller, but also has two
extra components on the board – a pair of resistors. One between Power
and Latch, and the other between Power and Clock. An original rectangular
controller for an NTSC NES is incompatible with the PAL control deck.
You can add two resistors to the controller in the same places that are
built into the Dogbone controller in order to add compatibility with PAL and
it will still work on your NTSC console. It appears they added this compatibility
to the Dogbone controllers for the redesigned NTSC consoles. There is a much
larger story on controller compatibility for various international consoles –
especially in Europe – however I do not own any of those consoles. A second Dogbone
controller, HVC-102, has a PCB with a later date – September 1993 and used a
smaller chip for the shift register. Well! I imagine we could go even further with
controllers, but I think that is enough for this video. I hope you enjoyed this
examination of the electronics of the standard controller for the Nintendo
Entertainment System. I value your feedback, and would love a thumbs up if
you enjoy content like this. Thanks for watching.

100 comments on “Nintendo (NES) Controller – Electronics”

  1. tian feng says:

    Great easy to understand breakdown man. Next do PC engine controllers.

  2. Emmett Turner says:

    I've actually found these with bad shift registers and replaced them. The FC dogbone also has a much shorter cord. I had a very late model one that also had the SMD shift register when I used to buy junk ones for repair. FYI: junk ones are often simply unplugged inside. They share components like buttons and rubber membranes with SNES and Game Boy controls. 😉 It was parts-bin engineering in order to keep costs low.

  3. daniel jimenez says:

    It's important to note that the latch pulse doesn't just mean 'gimme the sate of A'. The timing of the latch pulse defines the sample time for all buttons, the latch pulse says 'capture the state of all buttons right now and output A in the data pin'. The clock pulses then shift the output to the next button, but these clock pulses don't define when the buttons are sampled. Many snes games clock out slower than nes games did, because of the use of a hardware feature that automatically reads controllers, so they are 'more laggy' in that sense.

  4. T_W00 says:

    Well said all around! I really like the visual aid of the scope.

  5. charvelgtrs says:

    Dogbone would have been perfect if it had original NES in line face button layout or the opposite angle like a SNES Y B layout.

  6. Jamie Bainbridge says:

    Absolutely beautiful. Some of us learn the theory and code a microcontroller to use a real controller. You attack the same problem from the entire other direction and make an entire pretend controller to interact with a real console, then view it on a scope. Not having either an oscilloscope or the experience to use one, this sort of low-level investigation was thoroughly enjoyable. Well done and thanks as always for your videos!

  7. Steve Anderson says:

    You could build a controller with two shift registers and up to 16 buttons, and it could be read without any change to the console hardware. I also suspect it might be possible to read NES controllers from a Commodore 64, with a plug adapter, and setting the port's data direction register properly.

  8. MiSTer Walrus FPGA says:

    Thanks; I learned a lot from this video. Well-explained and great visual presentation for the information shared.
    Can't ask for more than that!

  9. dlang6487 says:

    I love your videos! Keep the great content coming!

  10. Mark Christian says:

    Great video; thanks for making it! This finally made shift registers click for me.

  11. iCach0 says:

    Amazing! You do a great job at explaining technical stuff in a way that anyone can understand and find interesting.

  12. ImperatorScab says:

    Excellent video! I enjoy this technical, "deep in the weeds" type of stuff. Watching this and seeing how the old NES controller works got me thinking about something. How did the controllers with turbo buttons work?

  13. Sentinela says:

    Good job dude, wonderful class, I really like your videos I know it should be a bitch job, but here in Brazil I watching and enjoying.

  14. Derf Jagged says:

    Man, I really could have used this video at the beginning of the year. I ended up learning all of this via online documentation and looking at an oscope, very fun stuff! Love that SNES has the same exact protocol, just a bigger shift register, ended up using those and figuring out Genesis as well for a project of mine.
    Google "retroconnect Github" and see if it's something you might be interested in helping out with or ping pong ideas with me. Would love to have a dialog!

  15. CoolDudeClem says:

    For a long time, I thought the NES used the same 9 pin game connector as the Atari, Master System and many other computers and consoles of the time. 8 "buttons", 9 pins, one pin being the "common" pin, makes sense right? Never having played a real NES, but seeing that 9 pin connector on famiclones also made me think that.

  16. Kippykip says:

    I thought I was the only one that thought the NES pins didn't make sense with the amount of buttons on there.
    This makes way more sense now

  17. WhiteManCan'tJumpCancel 95 says:

    Pretty interesting content, dude. Would love to see a video like this for modern controllers. Keep up!

  18. cosmicrdt says:

    Would love to see more videos with electronics. Great stuff 👍

  19. etansivad says:

    As someone who just bought his first breadboard this week, this video was really helpful in understanding the fundamentals with a controller I grew up using 😀

  20. Morahman7vnNo2 says:

    I wish my electronics teacher would show this video in class. It would have made us appreciate Latches and Shift Registers that much more.

  21. Richard Samuelson says:

    7:50 …Breadboards aren't for bread…?

  22. Joseph K. Garrahan says:

    Great video! Could you make a video comparing the tech to the NES CLASSIC controller, as well as the official NES BLUETOOTH controllers (switch ver.). NES CLASSIC controllers feel the same and board looks similar. NES bluetooth is way different with tons of chips, and triggers diagonals too easily (I had to tape over the contacts to minimize this). I would love to know why this is the case…

  23. Michirin says:

    How have I only just found this channel? It's awesome!
    I'm subscribing now!

  24. Ernies Deck says:

    I'm a new subscriber to your channel.
    I've been looking for a while for a channel just like this where things get explained on a technical level. I've been taking electronics apart since my parents VCR when I was 10. So I know my way. I'm happy I found this channel keep up the great videos.

  25. Meta Ze Gr8 says:

    Very well-made and informative video. Keep up the good work.

  26. Kill You With Fire says:

    Gotta love the 80’s music XD

  27. Cole Stunden says:

    New favorite channel! Love the topics you cover like sound preservation or the history/explanation of television signals. On a binge now. This channel deserves more eyes from the gaming community. I found the channel on a algorythm reccommendation, hope others do too.

  28. Pridetoons aka Afro Lion says:

    More videos like this please! Can you do a video for the SNES, Genesis, PS1, and N64 controller! Please

  29. RealYoti says:


  30. Screen Apple says:

    Hi, Displaced Gamers.
    I have old SNES and Amazon Fire TV. I'm using SNES antenna plug. Amazon TV does channel scan.
    No luck. Help !!!!

  31. intel386DX says:

    15:57 very interesting to know about this BUG, what about NOACs or Clone CPUs? did they have it too 🙂 And are all games using DPCM have workaround this like contra and mario 3 :)?

  32. intel386DX says:

    16:58 in PAL NESes you have a diodes on controller imputes to prevent controllers without resistors (NTSC or clone ones) to work on the PAL console

  33. Gabe Morales says:

    this video definitely earned a subscribe

  34. Terminusest says:

    Don’t cross the streams

  35. BigSkylar says:

    The two styles of the NES controller to go with the two versions of the NES itself.

  36. TehDrewsus says:

    Is this RGT 85 doing voice over? It's actually pretty good

  37. mr. MetereX says:

    Bro, yel, red, ora, nes

  38. r0b0m1r0 says:

    Thumbs all the way up!-)

  39. enzo gabriel says:

    Impressive amount of knowledge. What a great channel.

  40. Jesse Wilcox says:

    Hey bro I've watched a few of your videos now and they're all really well done. I wanted to encourage you to keep making videos, and suggest you put a few more out there. You're a little bit older than me but I was playing DOS games from the time I was a young child, so I really appreciate not only your expertise but your perspective. I was super stoked to see a video on Jill of the Jungle! I think you should do more opinion/retrospective content about what makes old games continually compelling, maybe touch on how the technical limits affected developer creativity in producing such a diverse range of games as was enjoyed in that era. Your videos on dithering were outstanding in giving a glimpse into this, and in general I think your videos stand out relative to other YouTubers on the topic, my only complaint being that most of your videos are too short and there's not enough of them. I'd really strongly encourage you to make more videos and a couple of deep dives into gaming history sometime. I'm sure this is easier said than done in terms of time, but I felt compelled to say I think your videos are not only really informative but really engaging. You're able to present the content really well too, and it's very endearing to see such an authentic passion for this era of gaming presented by an authentic person. I was pretty surprised to find out after I watched the first video of yours I saw that this channel wasn't huge. It's great stuff man, keep it up.

  41. Sleeping Cocoon says:

    ha, i remember the original release of Rockman 4 MI (fantastic hack!) had the DPCM bug, i had no clue what the hell was going on until a new hardware compatible build was rolled out

    again, incredible work on the videos

  42. Cortex Auth says:

    I binged your videos and heard you saying you love to see comments and talk. What about a discord server? It would be cool for all of people here who have this common interest in retro/low-level tech too!

  43. Stryde says:

    Your channel is awesome, dude!

  44. Moon Moon says:

    Thanks for this deep dive. I'm very new to electronics, so don't know much. But if I can ask – what is latch synchronized to? I get that the clock pulse can be derived from the latch pulse, and it just walks the line, but what is latch tied to? I'm guessing it would be to an RF frame on the TV, because it'd probably be easy to derive highly precise timings from the signal being generated, because analog TV requires highly precise timings in the MHz band (I think? I need to refresh myself on this.) FWIR there things like the front and back porch which the tuner has to latch on to to produce a stable image. It's why you'd get a rolling image when the tune isn't quite right. It's also why chrominance and luminance are a thing, because luminance is essentially drawn on top of black and white inside a colour burst for compatibility reasons. This is all from memory and I don't remember much, so I'm open to correction. Either way, this'd be plenty fast enough for the controller. I'm sure you would have said this, but I'm not known for being all that bright. Thanks.

    EDIT: I am s'dumbs. If I actually bothered to watch the whole thing, I'd have known. Don't mind me! If you're curious as to how digital TV works, it's completely different, which is why analog and digital transmission and tuners are wholly incompatible. I don't know the first thing about how digital TV works, but what I do know is that it's an MPEG2 transport stream that may or may not be sent by way of UHF FM, hence it's a completely digital signal wrapped inside of an FM carrier in the UHF band – I *think*. No front/back porch, no chrominance/luminance, nothing. It's pure ones and zeros. Don't quote me, though. I really don't know anything about how it works.

  45. Kylefassbinderful says:

    The SNES controller is just adding another 8 bit shift register. There's a pin on the register that will shift the data into the next register allowing for 4 more buttons to be pressed X, Y, L, R. I believe they used 16 bit registers instead of two 8 bit registers. This is why you can use a snes controller on a nes if you just wire the correct for plug. Thb Shift Registers are my fav components.

  46. Shamoa Krasieski says:

    Amazing video. The attention to detail is unsurpassed.

  47. Spider Mcgavenport says:

    NES MAX is my go-to for original Nintendo.

  48. ً says:

    So, After LGR, and other channel that cover up this type of content ( I forgot the channel name ), your video got into my Recommendation..
    Finally I can watch more content like this while doing my Fanmade project..
    Thanks for making me stay up and not get bored :3

  49. Carl Willows says:

    Amazing detail

  50. Gustavo Valdiviesso says:

    Great video. Very instructive!

  51. Benjamin Brady says:

    I just found this channel and I just needed to say how amazing it is!!

  52. Sdudyoy says:

    Makes you appreciate the engineers who built these sorts of devices in the first place. Don't get me wrong, breaking this stuff down in an easy to digest way is complicated, but imagine having to design a controller before one existed. I think we take for granted just how complicated our every day devices are.

  53. Cadency says:

    I doubt you will see this but how would one go about figuring out which cables are ground clock etc in a knock off nes controller when you cant find a pinout?

  54. Robeight says:

    Have you done pal 60?

  55. Derkainer Sledgehammer Productions says:

    Instead of a shift registry could they have used voltage levels to indicate what buttons are being pressed? Power ground and data. A being 5kohms or so and B being 4kohm… etc etc. Kinda like how some cars handle door lock input

  56. Amateur Programmer says:

    When I clicked on this video I was wondering "how on Earth is he going to talk for 16 minutes about a shift register? An explanation of how those work is 3 minutes tops!"

    Answer: he is going to talk as slow as he possibly can and spend a solid 30 seconds on every single component and trace on the board and gets five minutes in before he even tells you what the shift register does.

    And when he DOES explain it, his explanation is going to be both confusing to the average viewer and technically incorrect.

    I will give you credit though for breaking out the oscilloscope and explaining it that way. Not a lot of people take the time to do that right.

  57. Juan Mena says:

    What kind of feedback do you want from me?
    My brain is a chimp's brain with electronics.

  58. Zach the Sports Guy says:

    12:20 how do you hit left and right at the same time?

  59. mirqjejq says:

    Would love to see similar video regarding dualshock 2.

  60. Zeldagamer9000 says:

    Dang! Where was this video a year ago when I was building my own custom controller? This will be incredibly helpful with finishing that project!

  61. Roberto Licardie says:

    Amazing content as always

  62. NeoCortex says:

    Who would think controller could be that interesting.
    Loved it.

  63. Oluja do Tokija says:

    Youtube recommended some of your videos yesterday and I'm not going to lie. I have been subbed and watching your videos since then.

  64. Eesa says:

    just recently started learning electronics in college, cool to recognise the stuff ive learned in class while screwing around on youtube

  65. scriptless says:

    This was either the 3rd or 4th video I have seen from this channel. The quality of your videos seems to be impressive so I went ahead and subscribed. Keep up the great work, I really enjoyed watching these videos.

  66. SupaSimon says:

    You are massively under-subbed my friend. Awesome video quality!

  67. Roberto Martínez says:

    quality content.

  68. KryptekDragon says:

    Your videos are amazing. Thank you

  69. Linus Nafziger says:

    If anyone’s wondering, the extra pins on the port are for the zapper gun.

  70. Dallas Dal says:

    Intellivision had 15 buttons plus 16 directions on the disc for a total of 31 different connections or what you could technically call buttons since the controller is digital.

  71. Dallas Dal says:

    Careful, Nintendo might sue you for making a unauthorized controller that you did not pay them the IP Rights.

  72. hacked2123 says:

    Any idea how to convert your breadboard controller into a "wireless" controller? I'd love to make a universal controller transimitter for all systems, plug in a controller and it beams it back to a dongle connected to the device.

  73. AsilarWindsailor says:

    Nicely done! I think this explanation might even be better than the one given by The 8-Bit Guy

  74. Armando René Cantú says:

    Me, unaware on what the video is about: "I have no idea whats going on but I love it."
    * watched till the very end *
    Me, now wiser and well lectured on electronics: "What the hell? I have an actual understanding on what's going on."

  75. Alakazam2047 says:

    This is a super well done video and does a great job explaining how it works. If possible, when you get to the SNES controller can you compare the improvements from the NES controller? As Sdudyoy pointed out, it's really remarkable how they decided to go the route they did in designing this. Even though this controller is decades old, the stuff in it is still the material that I learned about in university.

  76. Daniel Turner says:

    Wow! This video is incredible. I’ve learned so much in just one video. I feel like everything should have just flown over my head, but I was able to grasp a lot more than I’d expect due to the excellent teaching leaving in even what feels like some of the more basic information so someone like me can “catch up”. Subscribed.

  77. Crazy Ivan says:

    Didn't underestand 😀 did enjoy 😀 greetings from Poland 🙂

  78. Karl D says:

    How likely are the shift register chips to go bad? I have a few original controllers that no longer work. I assumed the wires were broken near the controllers case as I naively used to wrap them as a kid, but never found any breaks in the wires of the one I took apart and stripped. Solder joints looked good to me too. I assumed it was a problem with this chip tho I never knew what it actually was or called to this point.

  79. Rod Trendy says:

    I got lost when you rushed into data and pulse lines. You should have explained that part a little bit more.

  80. Tobias Link says:

    Awesome explanation! Thanks!

  81. smartflyerbrushless says:

    I played sonic on my sega megadrive with the joystick controller from the atari 2600..🤣 It worked like a charm.. The connector is the same.. Just plug and play

  82. Paolo Pomes says:

    Wowza! Fantastic writing!

  83. Andrei2000PC says:

    College level education. Learning more than I did at TCU!

  84. Joe Mac says:

    Great video, this was really interesting. But, can you do the Konami code with your switch controller?

  85. Wedge W says:

    Very good stuff. Just found your channel yesterday. New subscriber.

  86. DickBurns says:

    Do a follow up with the SNES controller 🙂 It just uses the same shift register right? Maybe they added a 2nd one for the extra buttons? can't remember…

  87. k says:

    Damn, i tip my hat to those engineers who made the system. That's badass! Thank you for exploring this breakdown, as the pint glass is raised to you

  88. Steven Nelson says:

    I learnt so much. Mind blown. Thanks

  89. skykingjwc says:

    That’s one noisy scope.

  90. Alex Rawson says:

    I'm trying to make a Wiimote driver right now, humorous how all the abstractions (bluetooth, motion, extensions, etc.) have little effect on the format: buttons are still sent as 2 bytes, one bit per button.
    Great video!

  91. Xxyz 260 says:

    1:22 The wire that's literally labelled "BRO"

  92. Juan Gutiérrez says:

    Your channel is something my subconscious had been craving for quite a while. Congratulations and keep up the amazing work.

  93. Fagner Luan says:

    Fantastic video! Congrats

  94. Sophie Grey says:

    bro (bro)

  95. Lorem Ipsum says:

    I like the simplicity of old tech: just send a 1 down the line 8 times and check what comes out on the next line. USB is awesome but it makes electronics a good deal more complicated.

  96. MyLittleWalrus says:

    This video and the Luma video are really well done. I'd love to see more like this.

  97. TrollingAround says:


  98. Komagb says:

    This is the most in-depth analysis of the NES controller I've ever seen. Kudos!

  99. KuraIthys says:

    Ah, The good old atari joystick port.

    As used by Atari, Commodore, Sega and a ton of other companies…

    Sometimes with incompatibilities, and later on with very strange workarounds…

    I'm most familiar with it on the 800XL…

    Where it has so many functions mapped to the same pins it's kinda crazy.

    The basics are obvious enough;
    5 'buttons', ground, an unconnected pin (technically held at +5 volts), and two analogue input pins.

    The buttons map to the standard controller, and the analogue pins are used for the paddles…
    But also for a mouse, if you use one (never officially had one, but you can use both Amiga and Atari ST mice with the system if you do the programming correctly), and the atari drawing tablet.
    You can also use the analogue pins as extra buttons if you build a controller a certain way and program the software the right way.

    So, is that everything? Actually, no it isn't.
    See, the 4 'button' pins that the joystick directions map to are technically a serial port.
    If you write to appropriate registers you can set the communications direction.
    By default they're all set as input pins (understandable), but you can also write to them and use them as outputs.
    And thus we got things like an electronics lab, a modem, and an 80 column text display device that all connected to the controller ports.

    This observation also means you can, with some basic conversion circuitry, wire up an NES or SNES controller and communicate with it properly as long as you write a custom program to do so.

    The NES approach is certainly interesting though. It's very flexible but also quite expandable, and uses quite simple circuitry (shift registers are very basic generic parts)

    The proof of this is that the SNES is electrically compatible with the NES, and the SNES contains internal logic to read controllers the way the NES does.
    The SNES controller simply has a larger shift register, hence more buttons.

    The Sega Master system (and turbographx in fact – which uses the same circuitry) as well as the 3 button mega drive controller also use a fairly simple bit of circuitry – a multiplexer chip, which takes an input line and a set of output lines to 'select' which set of buttons you can read at once.
    This is a fairly clever solution, but it doesn't scale easily with simple circuitry.
    Hence the 6 button Mega Drive controller contains a microprocessor and some fairly complicated timing logic to give the extra buttons without adding more lines to the connector…

    The SNES meanwhile would really only have to change the controller access programming to increase the buttons even further. (also there's a FLASH memory storage device that attaches to controller port 2. RPG maker uses it to let you save your work on something other than the RPG maker cartridge.)

  100. Jake Dooley says:

    Excellent video! My only question is, what made you go with 39K resistors in the mock-up controller, and how does the value of this resistor affect the behavior?

Leave a Reply

Your email address will not be published. Required fields are marked *