Back to Technical Index

How to connect old-style (9-pin) Joysticks to PC-Gameport

Question: Why would someone want to connect C64-joysticks to the PC?

  1. RETRO-feeling!! Having to play emulators with PC controllers or keyboard just isn't the same
  2. DIGITAL!! There are hardly any digital joysticks for PC. Most are analog.
  3. PRICE!! C64-joysticks are rather cheap. Many computer freaks still have one or two buried in their cellar
If you compare the information about PC joysticks and C64 joysticks you will easily see two things: The first point will make our lives easier when building the adapter, the second point makes it harder.
There is no easy way to produce 0 Ohm when pushed one button, 100 kOhm when pushed the other button and 50 kOhm when no button is pushed. (Okay, it is easy, when you have a "closing" button and an "opening" button. But we only have two closing buttons.)
As you don't want to rebuild all your C64-joysticks, we have to use a different way, using diodes and transistors. Of course, this construction also needs the P5V power supply.
I started with the circuit from Tomi Engdahl (link) but I personally think it's rather chaotic, so I straightend it a bit.

I believe the most interesting component in that design is the transistor (BC557). The default form for this is a half-circle-like component. Sometimes it is very hard to find out which pin is Base, which pin is Collector and which pin is Emitter. Find out before you start to solder! It also doesn't hurt to write it down.
If you are lucky, you get the same pin functions as I have. The schemes in this document are for that pin functions:

I like to use "experimenting PCBs" with pre-drilled holes and complete connection lines as I think they can save you a lot of soldering. That's why my designs often fits those PCBs.

For adapting one axis you need three "stripes" (right next to each other, a board with an "empty" stripe - like top-left - won't do), so for a normal joystick you should calculate 6 to 7 stripes. You may also want to put the buttons on the board as well, so add one or two additional stripes. Still that won't use the whole board (the small ones I get from Electronic Conrad have about 19 to 20 stripes) so you can cut some stripes. I recently found out that you can break the board at the right line if you're careful, so that could save yourself using a saw.
For a really beautiful adapter you should get a small box. I decided to have the 9-pin-connector directly at the box (to plug in the joystick) and have some inches of cable at the other side with the PC connector at the end. Of course, that's your decision.
I also wanted to be able to connect the extra buttons, but I wanted to be able to disable them (in case the joystick has some other circuits producing problems). That's why I had to use two switches as well. (and of course drill some holes for them into the box)

Now, that's how you can connect one axis to two buttons (of course you need two of those for a complete joystick)

(the small descriptors are the same as in Tomi Engdahls design)

Note that all of the P5V lines have to be connected (I use wires for this). Even though there is no GND in this scheme, note that the buttons connect their contacts to GND when pressed.
The left contact is for the button that shall produce a 0 Ohm resistor value. This will be UP or LEFT.
The right contact is for the button that shall produce a 100 kOhm resistor value. This will be DOWN or RIGHT.

You might be interested in seeing how the resistor value changes when the buttons are pressed:

When soldered to the PCB, the construction looks like that:

If you are using that PCB-line-boards, be sure to break some connections. I use a special tool for this, although a simple cutter or knife can do.

Of course you have to do that twice (for both axis), connect all P5V to each other, then connect the 9-pin-Connector plus add the wires from the 15-pin-connector.

pinfunctionconnect to
1UPsolder to PCB at 0k-button for y-axis
2DOWNsolder to PCB as 100k-button for y-axis
3LEFTsolder to PCB as 0k-button for x-axis
4RIGHTsolder to PCB as 100k-button for y-axis
5extra buttondirectly to DSub15.7 or switchable
6Buttondirectly to DSub15.2
7P5Vsolder to PCB at one P5V connection point (you can also directly solder to DSub15.1)
8GNDdirectly to DSub15.4
9extra buttondirectly do DSub15.10 or switchable

pinfunctionconnect to
1 (+9)P5Vsolder to PCB at one P5V connection point
2Button 1directly to DSub9.6
3Axis 1 (X1)solder to PCB at output for x-axis
4 (+5)GNDdirectly to DSub9.8
5 (+4)GNDbridge to DSub15.4
6Axis 2 (Y1)solder to PCB at output for y-axis
7Button 2directly to DSub9.5 or switchable
8(P5V)Do not connect
9 (+1)P5Vbridge do DSub15.1
10Button 3directly to DSub9.9 or switchable
11Axis 3 (X2)Do not connect
12(GND)Do not connect
13AXIS 4 (Y2)Do not connect
14Button 4Do not connect
15(P5V)Do not connect

Of course you can connect non-used buttons by adding them to your box. You might also want to build a converter for two joysticks (then you need the whole converting line four times and cannot use the third extra button). I myself connected Button 4 (pin 14) to the cable but left it unconnected in the box. You never know when it might come in handy.
I think it is rather normal having cable chaos at that time.

Finishing and afterwords

Before you finish everything, connect the adapter (without C64-stick connected) to the PC, activate it as 4-button-gamepad or so and center the joystick on the screen by tunig the trimmers. You then should connect a C64-stick and see if it functions.
If you are sure that everything works, disconnect the converter from the PC. Now tighten all switches and screws, find a way for the DSub-15-cable, close the box and the DSub-15-shell.
The nice things about those boxes is that they hide all the cables so no one can see the chaos inside.

Unfortunately this converter can't really be tested with the Joystick tester described on that homepage. The resistor value always is very high (near 100 kOhm). It switches to about zero, when the left/up button is pressed, but it only changes very poorly when the right/down button is pressed. (Still you can see measure the difference). Of course the buttons work just fine.