The eternal battle of needing an adapter for an old game controller I've collected - but retail ones are only available from the US for $toomuch, and hobby-grade versions for half that on eBay... then buying a handful of the connectors on AliExpress and resolving to make my own instead.

I mean, the NES controller looks trivial to read from, you just blip one pin and read from another: https://www.allaboutcircuits.com/projects/nes-controller-interface-with-an-arduino-uno/

The hard part is making a PCB to match. Sounds like another #SimpleBreakouts project!

Part of what makes these slightly hard to find, I think, is the rarity of the sockets. The NES is now over forty years old and I doubt anyone's caused a factory to produce more parts for them since at least the year 2000, so anyone making commercial adapters will be doing so in very small quantities.

Mayflash, for example, seem to have given up on that approach entirely, and their adapter uses a 9-pin connector and (I suspect) a butchered extension cable to make it work: https://www.mayflash.com/product/PC053.html

PC053

Connect your SNES/SFC or NES/FC controller to your PC Windows or PS3

A thing I'm noticing though is that the older and simpler a piece of technology is, the easier it is to replicate at home with currently tech. It's trivial to make an Arduino behave like an XInput device, for example, which means you could build a completely custom XBox controller if you liked. We can clone complex shapes like modern gamepads by 3D scanning and printing. And the NES gamepad socket might be simple enough that you can replicate it today with a 3D printer and some bent wire.

So, the goal for this mini project will be an Arduino 32U4-based adapter with a couple of 3D printed NES controller sockets on it. That could be replicated for well under AU$10 by someone with the right machinery and skills if someone (I'm the someone!) wants to burn some spare time in making a design that will work, and most of that cost is in the Arduino-compatible board - the rest is cents of plastic.

Worst case, I'll build a few with the official sockets, and make those available too.

It'll be weeks before I have any electronic parts to play with, but for now I have a 3D printed socket that perfectly fits the plug on one of my NES controllers. A 0.4mm nozzle isn't fine enough to print walls between the pin shrouds in the connector, so my version will look open like this.

Do you have a 3D printer, a NES controller and half an hour to kill? DM me, I'd love to test this part on other printers and with other random controllers people have in the cupboard.

#3DPrinting

Today's research reveals there are differences with the controllers between PAL and NTSC NESes - some PAL systems require PAL controllers with specific pull-up resistors in them, but NTSC systems can use either. My adapter will be "NTSC-like" and not include the extra diodes in a PAL-E system, so it should work with all controllers, but it does mean, thanks to the existence of PAL-E Four Scores, it's not possible to make a universally compatible adapter for every possible controller combination.
Another tidbit is that two of the pins in the NES 7-pin connector are unused in standard controllers, but are extra data pins for things like a light gun; to my understanding those only work on a CRT, and I have no idea what you'd need to do to get that working through an emulator, but I'll connect those lines in my adapter and leave them usable in case someone wants to hack some kind of accessory support in there.

I think, with a 32U4 Pro Micro clone, I can support up to four controllers with all pins wired up. That's clock, latch and 3x data lines per controller, which is 20 in total, but I think I can make the latch pin common to all ports - that's the one that causes controllers to reload their states into their shift registers for reading.

I think the MVP for my adapter will be two ports - both the Advantage joystick and Four Score adapters have two plugs - but a four port variant should be possible.

Reading from a NES Four Score looks trivial.

For a regular controller, which is basically an 8-bit shift register, after strobing the latch pin, strobing the clock pin 8x will reveal its D-pad and button states, and you do the same again on the second port for the second controller.

The Four Score appears like a 16-bit register, so you flick the clock eight times to read player 1's pad, then another 8x to read 3. Then you do the same to port 2 to get players 2 and 4. https://www.nesdev.org/wiki/Four_player_adapters

Four player adapters

Four player adapters are devices that plug into controller or expansion ports and provide additional ports. These ports can be used as alternatives to hardwired controllers or for multiplayer with more than 2 simultaneous players. Contemporary adapters allow some consoles to interface with up to 8 controllers...

NESdev Wiki

The Hori 4 Players adapter (15-pin "Famicom Expansion" plug) looks identical to the Four Score in terms of protocol, and while nobody appears to have documented exactly what the NES Satellite does, I'd be very surprised if it did anything differently at all.

Satellites are also not particularly difficult or expensive to get, either. I foresee a new mini collection brewing... but I'll force myself to wait and validate my NES MAX pad working with my adapter before I start acquiring more hardware.

Raphnet's 4nes4snes board combines the clock and latch signals for all four controller ports, so that's proof that's doable - four controllers readable with just six pins, or 14 if I want to hook up the extra data ports too (which I do). A Pro Micro has 18 digital I/O pins available, https://www.raphnet-tech.com/products/4nes4snes/4nes4snes_controllers.png

Here's my vision for the NES socket: a #3DPrinting frame for wires bent at a 90 degree angle to be pushed into, with one end pointing out into the socket for a plug to slide onto, the other out of the frame to go through holes in a PCB to be soldered down.

I will also make some sort of jig for precisely bending... some sort of wire. I know not to use anything galvanised as the fumes from soldering it is toxic, so my first attempt will be with 1mm copper jewellery wire - any other suggestions?

That settles it - the pins in a #NES controller socket are of 1mm thickness. This validates my measurement from the photo I saw.

This is with the current reproduction socket, of course; there is still the guy who measured his at 1.2mm (method unknown), and the other guy who made his own controller using sockets that took 1.3mm pins. It's possible the original hardware used thicker pins, but the 1mm jeweller's wire I bought on a whim seems to make a solid connection in this OG controller plug.

The pins in the socket itself are on a 4x4mm pitch, the two rows of pins that go to a circuit board seem to be intended to be 3mm apart.

The spring clips seem to need a 4mm hole. The centre line between the two clips seems to be 10mm from the centre of the nearest row of pins, and the clips themselves seem to be 20mm centre to centre.

Reverse-engineering stuff made to metric measurements is so much more pleasing than those made in old money. Japanese hardware just hits different.

#Fritzing has never felt *completely* comfortable to me - it somehow feels both overcomplicated and underpowered for making simple boards like this - but it remains the only PCB design tool I've ever been able to open and just make a thing in without poring over documentation about vias and footprints. You drag and drop stuff, you fettle with the exact positions of things by slightly changing numbers, and you can export everything to a file PCB makers understand - and that works for me.

It didn't escape me that 1mm pins are thicker than what I'm used to - if you buy typical 0.1" header pins, you'll get ~0.6mm square pins that perfectly fit the apparently-default 1mm through-holes.

I'm *fairly* confident 1mm round pins will fit into 1.1mm PCB holes, but I know for sure they'll fit the next size up in software which is 1.5mm. I can also set the holes to whatever diameter I want.

I need to order a board that's just different pin pitches and hole sizes to test parts on my desk.

And that's it - another Very Specific Adult Fingerpainting Adventure (or so it feels) on its way to manufacturing.

I've heard submarine warfare being described as weeks of sheer boredom punctuated by moments of extreme terror. Hobbyist electronics is similar - hours of hyperfocusing, interspersed by weeks of "aww, still in Memphis".

A quick test print with holes that are 1.0, 1.1, 1.2, 1.4 (because I can't count) and 1.5mm in width. The goal is to find a sweet spot I can push a 1mm pin through - when you 3D print a circle, it's not exactly the width of the geometry; it'll shrink a little bit, so a 1.0mm hole won't actually admit a 1.0mm pin through it.

It looks like I nearly under-estimated it - 1.5mm seems like the goldilocks zone, anything lower would require significant force and it just needs to sit/hold.

#3DPrinting

Okay, I think that's it for now.

The next major step is to validate the PCB I designed with the sockets from AliExpress, and use that to make sure I can actually make a working NES adapter (and breakout board) of any kind - that board is a couple of weeks away.

I've also ordered some 1mm PCB pins that should be the right size for my 3D printed sockets - with those I can design my own custom NES socket breakout and everything.

Time to box this project up for another couple of weeks. 🌛

The pins have arrived! They look a bit wobbly, but the 3D printed socket's job is to align the plug, not hold the pins in place - that'll be the job of the PCB I'll design later this month to solder to them.

Here's a thought - once I'm up to the point of plugging a NES controller into an logic analyser and an Arduino to take a look at its communication and programming something to read it, would anyone be interested in watching a livestream of that happening (or even the recording after the fact)?

Would a video of the process of reading basic stuff from an analyser and using that to write a program to talk to a thing be of interest to folks here?

Pleased to announce I am apparently competent at operating calipers and Fritzing. These aftermarket NES sockets from AliExpress appear to fit perfectly with my boards, and I should now be able to start talking to NES controllers.

Don't ask why there's no D1 or D2 pin - the pinout on nesdev.org shows D0, D3 and D4 for this connector: https://www.nesdev.org/wiki/Controller_port_pinout

Controller port pinout

The 15-pin connector is a subset of the standard Famicom expansion port.

NESdev Wiki

There are days I look at the crap spread over my desk and think, man, I really have no idea what I'm doing in this hobby.

Then there are days I look at the tiny spiky hovercraft sculpture I've just willed and soldered into being, and think, man, I really have no idea what I'm doing, but this looks kinda pretty.

@timixretroplays I suppose LAT and CLK could be considered D1 and D2… it would be odd, but the numbers fit.

Looks like a nice project!

@timixretroplays a recording would be very useful to many, many people who don't even know how/where to start. I say do it!
@timixretroplays a recording probably would be, for reference
@timixretroplays That sounds really interesting to me!
@timixretroplays might vary by filament, and even by age as the filament changes and/or absorbs moisture.
Might even want to look at giving the holes spring sides.
@joncruz It will definitely vary - I'm not counting on this value being correct for other people, or even for my own printer and filament in future. Mostly I'm aiming for "just big enough" to ensure success in most situations, the socket I print will be secured to either the PCB or the overall housing of the adapter so I won't worry too much about it sliding off the pins (it may even melt closer to them during soldering).
@timixretroplays pfft, 1.0mm hole, use a blowtorch to help get the wire in. It definitely won’t come out again, and will withstand the plug insertion force

@jpm building a custom little rig/jig to hot-insert them would actually be very Tim of me, but I've settled on the thought that I'm making stuff to learn and have fun, not to Manufacture Product, so I'm wary of wilder ideas like this. 😜

(I know you're mostly joking but I'm mostly not)

@timixretroplays the “withstand plug insertion force” part isn’t a joke - think through the forces involved with it. Any extra grip you can give the pins will help.
@jpm that's fair. I do have plans for mitigating this - comments and suggestions welcome as things develop though, you've been a pretty sage source of advice in my weird makings of shit so far!

@timixretroplays

The undersize of small holes depends on hole diameter and layer swell in the outer perimeter, and exact calibrated flow (depending on filament diameter and roundness deviation, so its about cross-sectional area of the not always round filament).

Smaller holes get more undersized because arc tesselation, the little straight lines to form a bigger arc cannot become infinitely smaller, there are limits in printers resolution and ability of the printer electronics in executing maximum of lines per second.

Maybe you get extruded volumes perfect right, and correct the xy paths of outer perimeter the right amount inwards (its about the surface roughness, the high spots point out about 30% of layer height).

Then you could calibrate to one hole size, but i would *not* do it to this small size because you get worse on other things if you try.

Compensate shrinking at cooldown after print to.

@timixretroplays

You see its complicated and no "works everytime" thing.

I recomment:
Calibrate printer to real axis movement like 100mm gcode teavel results in real 100mm movement
Scale your model about material shrinkage percentage (~100,5% for PLA, ~101,5% for ABS)
Compensate for perimeter Highspots (xy compensation -0,08mm at 0,2mm layer high)
Measure filament in few places in dirrect directions (and calibrate extruder steps) and put the numbers in the slicer material setting to compensate for (or calculate flow% settings over cross-sectional area ratio)

Get good overall dimension results but undersizes on little holes.
Drill the little holes to size after print, or use reamers. Hole roundness and inside+surface are way better than rough printed ones, especially the shitty tiny ones below 3mm.

Much less headscratching than trying go calibrate little holes that never get perfect

@timixretroplays you’ll need to match the wire diameter to the diameter the other end of the plug is expecting. You’ll probably go through a couple of different partial-mm diameter wires to find the right fit that the plug grabs on to nicely. Too thin and the plug will come out too easily (or even not make contact at all), too thick and you’ll push the wires out the back of the socket. Speaking of which, you may want to put some kind of bracing at the back of the wires so they don’t push out…

Also, bend radius is a thing. The larger the bend radius the less prone to breaking…

@jpm I'm fairly sure the original uses 1mm thick pins based on some high resolution photos, but I won't know until one actually arrives (and I've never owned a NES myself).

I have some ideas for better securing my pins in the socket. I might end up with a two-part design. And I have some thoughts about trying something with stainless rods if copper wire ends up too weak.

I couldn't find any projects by anyone else silly enough to try 3D printing a socket like this, so I'm working in the dark.

@timixretroplays @jpm i happen to have a NES and some calipers, gimme a minute

@timixretroplays oh hm, they're harder to get to than i thought. unsure if i can get one out of its hole without damaging anything

1mm looks about right just holding calipers up in front of it though, not that that's any better than what you had already

@emily @timixretroplays yep this is what I’m wondering - is it closer to 1.2mm than 1.0mm?
@jpm @emily so far I've found one guy measured a pin from a NES and got 1.2mm. Another 3D printed his own controller-side plug and used crimp sockets, the data sheet for which said it matches 1.3mm pins. I'm thinking 1.2mm is probably the go.
@timixretroplays I have made an Amiga DB23 but straight through. You can buy pins at Mouser/Digikey, I would try those and attach another pin to the for 90 degrees, crimp then solder. I think any copper will be too soft and will bend.

@aeberbach @jpm huh, looks like I should just be able to buy a pack of pins like this and solder them to my own little PCB that sits at the back of the connector: https://www.aliexpress.com/item/1005001305126722.html

I'll confirm the pin width as best I can before buying anything. A guy 12 years ago measured one at 1.2mm: https://forums.nesdev.org/viewtopic.php?t=10503

I got a measurement of exactly 1mm from some high-res photos and my own knowledge about the socket.

I have some sockets coming from AliExpress already that I can measure directly.

100Pcs 9.5 14.5 15 MM Printed Circuit Male PCB Pins Press-Fit Tip 1 1.3 2 MM Diameter Single Brass Plated Gold 1u Tin Connector - AliExpress

Smarter Shopping, Better Living! Aliexpress.com

aliexpress.
@timixretroplays the Max did look really cool, we've never tried one... in the 90s we were able to snag three Advantages when Toys R Us found a bunch of new-old stock and put them on sale cheap, we were really pleased about that, thought we were set for life. alas they were in our house fire in 2012.
@ireneista I was really keen to try out the MAX - I'm very picky with my gamepad D-pads, and I really think what they did with the MAX was a super cool idea. I was a bit bummed to find mine didn't work, and it'll be a long while before I have the time to try fixing it (or desire to buy another that says it's tested-working).
@timixretroplays ahh for sure. for whatever it's worth, if it's the silicone bits that wore out, those are relatively easy to cast at home
@timixretroplays surprisingly, for some games the light guns do work on LCDs, because they weren't coded to rely on sub-frame timing even though they reasonably could have

@ireneista oh, that's interesting. Do you know what games those might have been?

I do plan to pick up a light gun at some point just to test detecting its inputs using those extra pins. If there's a game I could try on an emulator, that'd be an awesome proof-of-concept for my adapter.

@timixretroplays unfortunately we heard about this in a youtube video and don't remember enough details to find it again (we did just try)

@timixretroplays based on our watch history there's a fair chance it was a passing mention in https://www.youtube.com/watch?v=keyDD-Eqom0

we sure wish youtube's transcripts were searchable, or even skimmable

The Ultimate Guide to NES Light Guns

YouTube