Classic Computer Magazine Archive CREATIVE COMPUTING VOL. 9, NO. 5 / MAY 1983 / PAGE 240

A joystick for the color computer. Ian Hodgson.

A Joystick For The Color Computer

One of the strong points of the TRS-80 Color Computer is its game playing ability. For many games, joysticks are essential. They come in two basic varieties: the proportional control type contains a pair of potentiometers, one for vertical and the other for horizontal control. This type of joystick normally works with an analog-to-digital converter and yields values from 1 to 63 (for the 6-bit converter on the Color Computer) with 31 at the center. The switch type of joystick contains four momentary contact switches and gives values of up, down, left, right and center, but no in-between states. These joysticks normally have a spring return to center.

The joysticks sold by Radio Shack for the Color Computer are of the proportional control type, and do not automatically return to center. They are well suited to controlling objects on the screen where the position of the object is controlled by the position of the joystick. Many arcade type games do not behave this way, however. Instead, the player moves or changes direction whenever the joystick is off center and stops moving or changing direction when center is reached. For such games the response is much better when a switch-type joystick is used. The most common of the switch-type joysticks are those sold by Atari and Commodore. Here you will learn how to connect these to your Color Computer.


The Atair joystick contains five small "oilcan' type switches for left, right, up, down and fire. (Note: if your joystick contains coil spring switches, you have an ancient model and I suggest you buy one of the newer ones.) All five have one side connected to a common ground return; the other sides are used to connect one of five input lines to ground. The original wiring is shown in Figure 1.

The Radio Shack joystick interface requires quite a different arrangement, which allows you to vary a voltage from about 0.25v to 4.75v on each of two input lines. This means that you must isolate the common connection from several of the switches. This is done by cutting two of the traces on the joystick printed circuit, and setting the voltages to the correct values with four resistors (the voltage is already supplied by the Color Computer). The final circuit wiring is shown in Figure 2.


To do the job, you will need: an Atari or Commodore joystick (they appear to be identical), a 5-pin, wide spaced (240 degree) DIN plug to match the joystick connector on the TRS-80; four 51K ohm, 1/4 watt resistors; some fine gauge wire (I used wire wrap wire); and a soldering iron, as well as ordinary electronic tools.

To begin, remove the bottom from the Atari joystick. It is held in place by four Philips head screws. Hold the joystick upside down while separating the halves of the case, and be careful not to lose the small spring in the fire button. Inside, you will see a small printed circuit board as shown in Figure 3a. (Since this article was originally written I have bought a second joystick and it is constructed differently in a much smaller case. The operation is identical, though, and its circuit board is shown in Figure 3b.) This board is covered with a transparent plastic tape and has five small circular switches held in place by the tape. Do not lift the tape and disturb them, as they must be accurately positioned. You must make some modifications to this board.

Six colored wires are attached to the board, as shown in Figure 3. They may be removed so that the board is easily accessible. Using a small X-acto knife, carefully cut small rectangles out of the tape in the six spots shown in Figure 4a for the older type or Figure 4b for the newer one. The point of the knife may be used to lift the bits of tape off the board.

At the two openings marked with an *, carefully cut through the copper traces on the board. To do this, firmly scribe two lines about 1mm apart, cutting completely through the copper trace. Then, with the point of the knife, pry out the small sliver of copper that has been freed. On this phenolic board material the copper should lift off quite easily. If it does not, you have probably not cut all the way through the trace. Check with a magnifying glass to make sure that there is no connection left at these points.

Install the four 51K ohm resistors (47K should work just as well and may be easier to fine) in the positions shown in Figure 5a or 5b. Trim and shape their leads before soldering, and use a small, hot iron and low temperature (63% tin) solder if you can get it. Temporarily replace the covers to make sure that the resistors don't interfere with the support posts; move the resistors if they do. There is nothing like a fast session with Space Invaders to break improperly mounted resistors. Install the two wire jumpers also shown in Figure 5. The new circuit diagram is shown in Figure 2.

Now you may replace the board in the holder and reconnect the wires using the color coding shown in Figure 5. Hold the assembly upside down and replace the bottom of the case making sure that no wires are trapped or interfere with the motion of the stick. Disassemble the DIN plug and note that the pins are numbered. If you can't read the numbers, refer to Figure 6. Cut off the DB-9 connector on the end of the Atari cable (if you leave a few inches of wire on it, you may be able to re-use it for something else later). Strip about 1/2 of insulation off the cable, and about 1/8 off the colored wires. Then solder the wires to the pins as follows:

Now you will probably discover that you have forgotten to slide the plug hood over the cable. If so, you will have to undo those nice solder connections and start over. Otherwise, assemble the DIN connector, and the job should be finished.

Testing and Operating

Connect the joystick to the right joystick connector, and type in the following program to test it:

10 CLS

20 A = JOYSTK(0)

30 B = JOYSTK(1)

40 F = PEEK(65280)

50 PRINT@0,A,B,F

60 GOTO 20

When you run this program, your screen should clear and show values of 31, 31 and either 127 or 255. Press the fire button. The 127 should change to a 126 (or the 255 to a 254). Push the stick left. This should change the first 31 to a 0. Push the stick right. This should change the first 31 to a 63. Similarly, up should change the second 31 to a 0 and down should change it to a 63. Congratulations! It works. Now, how do you use it?

Unlike the Radio Shack joysticks, which allow any value from 0 to 63 in both the vertical and horizontal directions, this conversion allows only values of 0, 31, and 63 in each direction. Most games that I have tried work perfectly with this arrangement. If you are writing your own programs, you will have to arrange a timing loop so that the position or speed of objects depends on how long the joystick returns a 0 or 63 rather than on its exact position.

You will be amazed by the control you now have over your favorite arcade games. The spring return to center instantly quadrupled my score on Gobbler (a Pac-Man type game). The entire job can be done in less than an hour for only about $12.


Photo: Figure 1. The original wiring of the Atari or Commodore joystick.

Photo: Figure 2. The joystick circuit must be modified as shown to work with the Color Computer. Four resistors and two circuit cuts are required to do this.

Photo: Figure 3. The circuit board of the Atari joystick. The wire colors represent the original connections. Figure 3a shows the larger type board, and Figure 3b shows the smaller type. Both perform identically.

Photo: Figure 4. The dark block represents areas where the insulating tape should be cut off the board as described in the text. Two places marked with open boxes and *'s should also have a cut made in the copper foil.

Photo: Figure 5. Four resistors and two wire jumps must be soldered to the circuit board. Place them as shown, and they should not interfere with any of the hardware. The new wire connections are shown with function, wire color, and DIN plug pin number.

Photo: Figure 6. The DIN 5-pin plug, viewed from the pin end. On most plugs the pin numbers are clearly marked. Slide the hood over the cable before soldering to the pins.