INTRODUCTION

Below should be everything you need to know in order to make a KTRL 64 gamepad. It all comes down to these steps: Get the needed parts, prepare the gamepad case, solder the components, program the microprocessor* and finally, put it all together.

*) or get the microprosessor preprogrammed from me.

1. GET ALL THE PARTS

GAMEPAD CASE

I have designed the PCB to fit the cheap SNES style USB gamepads available on eBay and elsewhere. There are a few different models out there but the best ones I have found for this are the iNNEXT branded ones. They look like this:

This gamepad comes in black and gray. Search for "innext snes" on eBay and you should find several sellers selling these, usually in packs of two for about 7€ and up plus shipping.

THE CABLE

I have been using Sega Mega Drive gamepad extension cables for this, those have all 9 pins connected (all 9 are needed for this gamepad). I just cut the male connector off. These can also be found on eBay of course (and other places). Search for "sega genesis extension" on eBay and you should find several. The price can be as low as 2.20€/cable

THE PCBs

You can order the PCBs from me on Amibay.com. I sell the main PCB plus the PCB for the two button adapter as a package.

THE MICROPROCESSOR

The microprocessor used by the KTRL 64 is the Atmega328P-AU (TQFP-32 package). You can buy this from eBay, electronic component retailers or buy them preprogrammed from me on Amibay.com.

OTHER COMPONENTS

I also sell the other electronic components needed in the same Amibay.com thread as a set. Here is the list of other components if you want to get them from somewhere else:

0805 SMD components
2K2ohm (222,2201)1
10kohm (103,1002)1
100nF (104)1
Through hole components
47µF electrolytic cap 16V1
LED (red, 3mm, flat top)1
Other parts
Wire, red, ~6cm1
Wire, black, ~6cm1
Pin headers (2,54mm pitch)6
Shrink tube, dia: 4mm, length: 6mm1
For two button adapter
Wire, black, ~8cm1
9-pin DSUB connector, male1
9-pin DSUB connector, female2
Shrink tube, dia: 19mm, length: 20mm1
9-pin DSUB casing (3D printed in kit)1

STICKERS

The "KTRL 64" logo and cheat sheet stickers are included when you buy the PCBs in the Amibay.com thread.

USBASP PROGRAMMER (optional)

To program the Atmega you will a USBAsp programmer. These are very cheap and available readily on eBay. Search for "usbasp" and you should find them for less than 2€. For this you also need Dupont jumper wires (Female-Female). Search on eBay for "dupont male female". Note that if you buy the Atmega preprogrammed from me you don't necessarily need this but I might release updates to the firmware later.

2. PREPARE THE GAMEPAD CASE

Unscrew the five screws of the gamepad to open it and remove all the parts. You will need the small shoulder button PCBs connected to the main PCB so don't throw anything away just yet.

Optional but recommended: Drill a 3mm hole for the LED in the top part of the case according to the picture below. You don't need to install the LED but it helps with configuring the controller.

Optional: Remove the face button sticker (with the A,B,X,Y markings). I have found that the best way to do this is to use a hair dryer to heat up the sticker (for about 10-15 seconds, don't overdo it if you have a powerful hair dryer), then the sticker usually peels off without leaving any residue on the gamepad case.

Optional: Apply the stickers. The logo sticker can cover the "iNNEXT" logo entirely. The cheat sheet sticker goes to the back (in the recessed area).

3. SOLDER

THE PCB COMPONENTS

Solder the the PCB components according to the following layout (Click the picture to view a larger version). The only SMD capacitor is 100nF and in the kit it us unmarked and light brown in colour.

THE LED (optional but recommended)

1. Bend the legs of the LED 90° about 5mm from the actual LED and cut the legs about 5mm after the bend, leaving the longer leg about 1mm longer so you still know which leg is which.

2. Solder a red wire to the longer leg and a black wire to the shorter leg.

3. Use the heat shrink tube to cover the solder joints.

4. Solder the wires to the PCB, red to LED+ and black to LED-. The wires go to the back side of the PCB as seen in the picture below for the KTRL CD32. (The pins for the LEDs on the KTRL 64 are closer together.)

THE CABLE

Remove about 35mm of the sleeve of the cable, and remove a few millimeters of the sleeve of every wire. Use a multimeter to figure out which wire goes to which pin. The table below shows cable colors for cables acquired from eBay with codes 4N40011, AAJ104895001 and VG0006450. It's recommended that you double-check this using a multimeter.

Ensure the correct pin numbers (marked on the main PCB) when soldering the cable. Failing to do so could cause damage to the KTRL gamepad or your C64!

Pin4N40011, AAJ104895001, VG0006450
1RED
2BLACK
3GRAY
4ORANGE
5BROWN
6GREEN
7WHITE
8BLUE
9YELLOW

THE SHOULDER BUTTON PCBS

Desolder the small shoulder button PCBs from the main PCB and desolder and move the wires on one shoulder button PCB to the other side (see picture below).

The picture below shows how to install the shoulder button PCBs. Note the the wires should be on the top side, otherwise they may be hard to install (plastic in the way). wires can be connected any way, the polarisation doesn't matter.

THE TWO BUTTON ADAPTER

Follow the instructions in the picture below.

CLEAN AND INSPECT

When all components etc. are soldered, give the PCB a proper clean with rubbing alcohol, the flux residue can cause noise in the circuit. Check for any shorts between the legs of the Atmega 328. Verify the polarization of the electrolytic capacitor a final time.

THE DPAD

Depending on your taste, the diagonals of the DPAD might be too sensitive. You can add a small piece of duct tape to the PCB, between the pads of the DPAD, to elevate the center of the DPAD slightly. I prefer this, it makes the diagonals feel more balanced. See the picture below (KTRL CD32 version).

4. PROGRAM THE ATMEGA (if you didn't get a preprogrammed one from me)

INSTALL DRIVERS FOR USBASP (Windows)

Connect the USBAsp to USB port. Don't try to find a driver, cancel the automatic driver install if possible.

Download and run Zadig for easier driver installation: http://zadig.akeo.ie/

In Zadig, choose USBAsp in the drop-down list. If you can't see the device in the list, go to the Options menu and select List All Devices, be sure to select the correct device.

Select driver "libusbK (v3.0.7.0)" and click Install Driver (or Replace Driver). If you get a security alert, choose to install the driver anyway.

THE ACTUAL PROGRAMMING

Download the latest firmware and necessary files here (for Windows). If you use Mac OS or Linux you need to install AVRDude, there should be tutorials how to do this.

Connect the USBAsp to the KTRL 64 pin headers with the dupont wires according to to the pictures below (KTRL CD32 version, KTRL 64 has these pins concentrated). Then connect the USBAsp to a USB port of your computer.

You then need to run these commands in a command prompt / shell (from the folder where you extracted the firmware):

// Erase the chip (only needed if chip is not empty). This is done at a slower speed (-B 3)
avrdude.exe -p m328p -c usbasp -P usb -B 3 -e

// Set the fuses to set 8Mhz internal crystal etc. This is done at a slower speed (-B 3)
avrdude.exe -p m328p -c usbasp -P usb -B 3 -U lfuse:w:226:m -U hfuse:w:223:m -U efuse:w:5:m -U lock:w:63:m

// Write the firmware (should take a few seconds only)
avrdude.exe -p m328p -c usbasp -P usb -U flash:w:"KTRL_64_v100.hex":a

5. PUT IT ALL TOGETHER

Add all the face buttons + rubber (according to the KTRL 64 layout, see picture below), dpad + rubber and select/play buttons to the gamepad case and then install the PCB.

The LED goes through the hole in the case and the cable will hold the LED in place. See the picture below.

Position the PCB so it lies as straight as possible, there is some small margin of rotation possible.

Finally add the shoulder buttons and screw the case together.

6. USE IT!

Get the cheat sheet and play your favourite games!

CHEAT SHEET (PNG)