Hacker News new | past | comments | ask | show | jobs | submit login
Nintendo Controller Teardown (fictiv.com)
152 points by fictivmade on Nov 19, 2015 | hide | past | favorite | 43 comments



I'm biased since I'm an EE, but to me the real magic in game controllers is the mechanical/materials/manufacturing engineering that goes into making the buttons feel right and have consistent responsiveness. This is what most third-party controller manufacturers seem to get wrong, even (or perhaps especially) when they clone the basic shape and layout of a well-known controller.

That said, one of the cool things about how they designed the NES and SNES pads electrically/logically is that an SNES pad will actually work with an NES if you make an adapter for the different connectors, since it's the same protocol with a different number of data bits clocked. But the best part is that they didn't simply add X, Y, L, and R at the end of the bit stream for the SNES pad; instead they transposed it so that SNES Y is NES B and SNES B is NES A, which translates the common idioms used in action games on the two systems.


Couldn't agree with you more! I am amazed at the precision of modern controllers considering how complex they are. The fact I can pick up any Dual Shock or Xbox 360 controller and it feel just like every other one is pretty mind blowing. Sure over time they develop their own little habits but out of the box they are almost clones (with the exception of ones that should have failed QA but somehow shipped).


"The fact I can pick up any Dual Shock or Xbox 360 controller and it feel just like every other one is pretty mind blowing."

I totally agree with the gist of your statement but as someone who has an absurd amount of Xbox 360 controllers I'm positive that they changed the components at least twice in the standard controllers (not including the obvious redesign of the gray special D-pad controller or all the various special editions) in ways (weight distribution, outer materials) that you can totally feel without taking the controller apart.

I haven't researched this to know if this was due to changes over time or different factories or what but of the 9 or 10 controllers I had over the years (used on both the actual Xbox 360 and a PC) there were 3 distinct different types of feel that were subtle but obvious if A/B testing.


This actually drives me nuts, when i used to play MLG Halo3, my buddies always had these abused controllers, the fact that it was not EXACTLY like my controller I had at home made me play worse.

It was the right analog controller that was 'loose'


Absolutely. A big pet peeve of mine is a mushy D-pad and the lack of mechanical separation of each direction on the D-pad. The OEM SNES D-pad and Playstation Dual Shock D-pads get this right; the standard XBox/360 gamepad completely miffed this, making playing throwback/retro 2D games that used the D-pad for control a total drag.


Part of the reason a lot of D-pads sucked is because Nintendo had a patent on it, it expired in 2005.

https://www.google.com/patents/US4687200


maybe they should "mickey mouse"that shit

..


This is patents, you are referencing copyright.


ha...youre probably right...but actually i was referencing a bad joke / metaphor...think mickey might be a trademark though

EDIT : eh...stupid question anyway

..


> instead they transposed it so that SNES Y is NES B and SNES B is NES A

That confuses the development process; they likely were using NES controllers during the development of the SNES hardware for some time, before creating a SNES controller. (Similar things can be observed in more modern Nintendo SDKs: before the Wii U GamePad was finalized, for example, the Wii U SDK console unit just exposed a Wiimote extension port, and expected a Wii Classic Controller to be plugged into it. You could then treat this in software—at least for HID purposes—as if it was the GamePad.)

So it was more that for a while they had two face buttons, A and B, and then when they decided to add two more, the A and B buttons got re-labelled "B" and "Y" on the controller and in the SDK. (You can observe many games released early in the SNES lifecycle that were programmed under the assumption of only two face-buttons; these games either leave the "A" and "X" buttons functionless, or just mirror the functions between "X"<->"Y" and "A"<->"B".)

---

As an aside, I like to look at the Nintendo controller bitplane as existing in a sort of "order of complexity" for the development of arcade hardware—which Nintendo has always targeted their platform to alongside home consoles[1].

For example, the first button in the bitplane—0x1—is always "Select". This makes very little sense (hell, what game even uses that button?[2]) until you realize that, in arcade machines, this is the "button" triggered by inserting a coin![3] After that, you get A and B, because some games just need button inputs and nothing more. Then, the directional inputs, because the next level of complexity up is an arcade cabinet with a joystick. And then the rest of the buttons, in an arbitrary order.

In more recent SDKs, you'll sometimes see L and R inserted early on in the bitplane, earlier even than the directional inputs. Why? Because those buttons are for a simpler kind of arcade machine: they're flipper-signals for pinball machines! (I'm kind of surprised Nintendo cares about pinball machines, given that pinball isn't really a thing in Japan and pachinko—which is—doesn't use flippers. My guess at this point is that Nintendo IRD has a tradition of writing quick one-off pinball prototypes to test their hardware.)

---

[1] Nintendo VS., Ultra 64, Triforce, etc. Nintendo loves arcades! Though they seem to get more subdued about this fact over time; their newer arcade platforms are effectively white-labelled embedded-hardware SDKs for third-parties to use, rather than a side-effect of the creation of first-party cabinets.

[2] The Nintendo SRD "lotcheck" and Nintendo QA "burn-in test" ROMs for each console use Select and Start as their only functional buttons. (I would bet that, in the earliest console generations, before they had millions of mass-manufactured controllers laying about, the hardware developers would just have a breadboard with two resistors for Select and Start, with leads going through the 74LS165 and then over to the console. You'd just tap some wires together to simulate a button-press. Note that if all you need is Select, you don't even need the 74LS165; it doesn't matter if you're sending 0x11111111 if the console is only looking for (i & 0x1). You can accomplish that by just sticking wires directly into the console.)

[3] Run any arcade-platform ROM in an emulator; you'll have to press Select to get it going.


Hmm, I am not 100% sure, but I recall the NES gamepad uses an 8 bit shift register not a microcontroller.


Yes, its Genesis 6 button Pads that used microcontroller.

Sega Master system had basically an atari standard port, Genesis 3 button pads added select signal for swapping two pages (alternating between a/b c/start), finally 6 button controller added third page, but to trigger it you needed to pulse select line 3 times, and this was deemed to complex for discrete logic, hence microcontroller in 6 button pads.


Yup! It's a humble 4021N.


Yes! Also goes by part number 74LS165 (edit: actually they are just similar) [1]. Here's how to use it in your game code: http://wiki.nesdev.com/w/index.php/Standard_controller

Basically you write high voltage to the "strobe" line of the shift register in the controller, putting it in a state where it continuously updates to reflect current button presses. Once you remove the high voltage, it "freezes" its 8-bit state representing whatever combination of the eight buttons were last depressed, and then you make 8 successive reads from the shift register's serial line, reading off the state 1 bit at a time. It's up to the game software to be robust against bouncing, as well as against a tricky hardware bug where the DMC module of the NES's audio processing unit conflicts with the latching mechanism used by the controller's serial line. Needless to say, this must all be emulated by accurate NES emulators, too :)

[1] http://www.datasheetcatalog.com/info_redirect/datasheet/phil...


Look closely, the '165 is a little different, both in functionality and pinout. You'll not be able to swap in one for the other. -- But yes, both are parallel in, serial in/out shift registers.

http://www.nxp.com/documents/data_sheet/HEF4021B.pdf http://www.nxp.com/documents/data_sheet/74HC_HCT165.pdf (pinout for LS is the same)


The 4021 and 74LS165 are similar, inasmuch as they're both PISO shift registers, but they're not the same part. Here's representative datasheets for both parts from TI:

http://www.ti.com/lit/ds/symlink/cd4021b.pdf

http://www.ti.com/lit/ds/symlink/sn74ls165a.pdf

I don't think the differences are relevant in this application, though.


Maybe relevant, a while ago wrote a post about using an Arduino to interface a NES gamepad as HID device.

http://eskerda.com/arduino-nes-gamepad/

Repo with full instructions: https://github.com/eskerda/arduines


Bouncing isn't an issue if you poll the button state once a frame, because almost all switches will finish bouncing within 16ms.


Humble indeed, I find it really clever


Dave from Fictiv here -

Thanks for the contribution and wiki article -- will update the post accordingly and welcome any other feedback/suggestions. Teardowns are all about learning + community input so keep the comments coming :)


SNES is a 12 bit shift register, as well.


Technically a 16-bit register if I'm not mistaken (but that's just splitting hairs; it only uses 12 bits).

Here's a short article on the configuration: http://www.gamefaqs.com/snes/916396-super-nintendo/faqs/5395


Couldn't help but notice this. The next page down, in the image, they get it right. And are similarly loose with their terminology throughout the article.


The 16 pin "microcontroller" in the NES controller is actually an 8 bit parallel-in/serial-out shift register.


By the way, the SNES controller also uses a shift register, not a microcontroller.


Here's a blog post I wrote about how the joystick of the Nintendo 64 works, electrically speaking: http://dpedu.io/article/2015-03-11/nintendo-64-joystick-pino...


It's pretty impressive to look at and consider the differences in the complexity of the circuit boards in successive generations.

It would be very interesting if someone had a chart of BOM costs for the various controllers and systems, to see if the budget for controllers has changed since the NES/Famicon days.

Also of course, if Nintendo really wanted to make a killing, putting the original NES in a controller and selling that with an HDMI port on the end would be sweet. I'd pay $50 for a low-hassle, no-legal-ambiguities way to play NES games with my kid.


The Classic Controllers on the Wii (and WiiU, I suppose) aren't bad. Good, precise dpad, quick switching between face buttons. A kind of updated classic feel. You can buy quite a few NES games for those systems, among others.

The main place you'll encounter problems playing legally on new equipment is with games where licensing issue have cropped up—we'll possibly never see a re-release of Goldeneye for the N64, for example, and some newer versions of games have been stripped of their original soundtracks (Crazy Taxi).


Incidental to the article, I know, but there's a wrinkle in Crazy Taxi's soundtrack story: for whatever reasons, whilst the console ports feature a new soundtrack, the iOS and Android versions retain the original.


I love the fact that the NES controller's PCB has free-flowing, curvy copper tracks!


Beautiful, isn't it? Although I don't regret that things have gotten smaller and more efficient, there's something wonderful about being able to take in the whole PCB layout in a glance - and have it be actually nice-looking as well!


good article, except none of the chips in any of the controls are microcontrollers. looks like the author is confusing IC with microcontroller. he even correctly points out that the NES one is a shift register.


In his defence, most people starting with tinkering nowadays start off with something like an Arduino (8-bit or even 32-bit micro) and there's not much besides the micro on those boards... which easily explains the confusion about the nomenclature, mixing up the subset (µC) with the superset (IC).


Little known fact: with the exception of select/start, NES and Game Boy buttons are interchangeable. If you want a nice tight game boy control, replace the D-pad with an NES one. If you want the best-feeling NES buttons ever, replace the concave A/B buttons with the Game Boy's convex ones.

(Source: I took apart every nintendo console I own for sport/boredom when I was a kid.)


A both loving and detailed look into the internals of controllers. Fun read!


Interesting how Nintendo went with that IR setup for their analog joystick when everyone else (MS and Sony to 3rd party controller manufacturers) went with two potentiometers.

Maybe Nintendo's famous insularity is showing in their hardware designs as well as software?


I think they just implemented the mechanism that was nearly universal at the time for a computer mouse. It's not like they had a lot of precedent to follow for compact joysticks.


> The benefit of [the SNES bumper] button design vs a standard push button is that it has a much longer life and it also gives a soft, yet very tactile button feel.

Contrary anecdote: the bumpers on my SNES controller lost their resiliency before the face buttons.


I have an good/odd memory of that great rubbery feel and push the SNES bumpers had. It's cool to see the inside of it, although I'm surprised I never did having thrown said controller against the wall so many times because of how hard Super Star Wars was to beat.


Nice to see inside the SNES controller. I've had the same two for some 25 years or so and they work (as far as I can tell) as well as they did out of the box. The console too, though it's missing a big chunk off the chassis in the back.


Can we add a "(part 1)" to the title? And when the next instalment hits HN, let it come with a "(part 2)" in the title as well.


A microcontroller seems like an overkill for a NES controller...


As some other commenters (and the photo, contrary to body text) have pointed out, it's actually a shift register.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: