Wednesday, August 3, 2016

The Tandy 1000 Digital Joystick Adapter

IBM PCs and compatibles had an analog joystick interface.  The Tandy Color Computer and clones like the Dragon 32/64 computers also had an analog joystick interface.  Inside an PC or CoCo joystick were a pair of potentiometers.  The chief difference between the two interfaces is how the potentiometers were connected.  PC sticks used the potentiometers as variable resistors, wiring two of the three terminals, one of which to +5v and the middle would be connected to the interface's input.  CoCo sticks used the potentiometers as voltage dividers, where all three terminals would be connected, one outer terminal to +5v, one outer terminal to ground and the middle terminal would be connected to the interface's input.

In the early days of home computers, a joystick could be used for more than just playing games.  It could function as a cursor controller like a mouse, which was useful for drawing programs.  It could also be used for flight simulators, where the analog control could be appreciated.  Most home computer games from the 1980s that support a joystick were ported or derived or inspired by the popular home console and arcade games of the time.  Games like Pac-Man, Pitfall and Space Invaders did not really need an analog stick, they usually used digital joysticks.  When platforming games like Super Mario Bros and Prince of Persia became popular, they often or exclusively used digital gamepads.

Even in systems with an analog interface, most games did not take advantage of it.  To these games, pushing the stick past a certain point, relative to the center, would register a movement in that direction.  After the threshold, it did not matter how far you moved the stick, your player would not move any faster.  Eventually, a PC peripheral making company called Advanced Gravis Computer Technology released a Nintendo-style gamepad, the Gravis PC Gamepad, that was the ideal controller for games with this "digital" style of handling joystick input.

The Tandy 1000 adopted the CoCo joysticks to allow for a level of peripheral compatibility across otherwise incompatible computer lines.  One joystick or mouse can be used with both kinds of computers.  However, the Tandy CoCo and 1000s use a DIN-6 connector for its joysticks (mini-DIN 6 with 1000 RLX-B), the IBM PC use a DA-15 connector.  Even with an adapter, an PC stick won't work inside a CoCo or 1000 and vice versa.

Unfortunately, Gravis released its PC Gamepad in 1991, when the Tandy 1000 was being discontinued.  They would have had to release a Tandy 1000 version in order for it to work with a Tandy 1000, but it did not happen for obvious reasons.  Although there has been little expressed interest in using an adapter in a Tandy 1000 as opposed to a Tandy CoCo or Dragon, I saw no reason why it would not work.  This is my proof that it does.

The interest in a digital joystick interface for the Tandy CoCo was not new.  Wico made an adapter, the Wico Command Control Joystick Adaptor for use with Radio Shack TRS80 Color Computers, which allowed you to use an Atari 2600 or compatible joystick with your CoCo.  The adapter only supports one fire button, because the CoCo 1 and 2 only supported one button, as do the Dragon computers.  The CoCo 3 supports a second button (the black button on the Tandy Deluxe Joystick), as does the Tandy 1000s.

There was also an old article which described how a user could make an adapter, which you can read here :  However, the schematic given in figure 2 has an error, so I would advise against using it without referencing the schematic below.

Very recently, a guy named Neil Blanchard is selling a more modern version of this box, which he calls the SEGA Joypad Adapter.  This is intended for Sega Genesis and Sega Master System gamepads, which are Atari 2600 compatible and support 2 or more buttons for $52 shipped domestically :

An ebay seller named silverfox0786 is also selling an adapter,

Both products are rather pricey given the simplicity of the circuit and cheapness of the parts.  Unfortunately, I did not know about them before I decided to build my own adapter, by the time I finished I probably spent close to the amount they were selling theirs for.  I ordered all the parts from Jameco.  Unfortunately, my first board simply would not give all four directionals properly.  I had hacked it up, used a dremel to try to eliminate bridges, but I could not get it to work.  At best only one set of directionals would work.

I threw the mess of a board away, but eventually I found the will to try again with a new board.  One really helpful thing I did the second time around was to have the chip straddle the two rows of holes going down the long side of the board.  I designated one row as +5v and the other row as GND and this made it easy to make all the connections I needed.  I also used 1/4 watt resistors instead of the larger 1/2 watt resistors, this made it easier to mount the resistors on the small space I had on the board.

Parts list :

1 Male DIN-6 Connector or Commodore 64 IEC Cable
1 Male DE-9 Serial to 10 Pin Motherboard Header or Sega gamepad extension cable
8 x 100K Ohm resistors 1/4 watt
1 x 4066 IC CMOS Quad Bilateral Switch
1 x DIP-14 Socket (optional but highly recommended)
1 x Solder Board, like this :
Solder, patch wire and soldering iron.

If you go with the ready-made cables, you will need a multimeter to figure out which pin goes where. Figuring out how to wire the connectors was perhaps the most frustrating part of this project.  The DE-9 Male Atari connector pin assignments are as follows :

Pin 1 - Up
Pin 2 - Down
Pin 3 - Left
Pin 4 - Right
Pin 5 - +5v
Pin 6 - Fire 1/B
Pin 7 - Select (wire to +5v)
Pin 8 - Ground
Pin 9 - Fire 2/C

The DIN-6 Male CoCo/1000 connector pin assignments are as follows :

Pin 1 - X Axis
Pin 2 - Y Axis
Pin 3 - Ground
Pin 4 - Fire 1
Pin 5 - +5v
Pin 6 - Fire 2

Female pin assignments are mirror images of male pin assignments, but since you are soldering wires from the male connectors to the prototyping board, the male assignments make it easier to figure out which wires go where.

There are at least four schematics online for this adapter.  Two are usable, two have errors.  These two are usable :

The first one is what I ended up using because it only requires one kind of resistor.  It is the same schematic as the one given in the old article linked above, but includes a necessary fix.  For either schematic, connect pin 9 on the Atari connector to pin 6 on the Tandy connector for the second fire button.

This schematic should not be used :

The second working schematic is a fixed and improved version of this schematic.  Ironically, only this schematic shows how to connect the second joystick button.  

Here is my finished board :

If I had to do it over again, I would definitely use premade cables instead of soldering them to the hand-soldered DIN-6 plug and the ribbon motherboard DE-9 cable.  I find the fit of the DE-9 cable a bit loose.

In order to test joysticks, I use a pair of calibration programs.  The first is my friend Trixter's JOYCALIB :

This is excellent for calibrating your stick to find a good center reading.  However, if your interface is not registering, the program may hang.  Another program, called JOYREAD, will give you raw timing values whether the interface is working or not.  This can help diagnose problems.  Press M to change the reading method to a software timing loop, the Tandy 1000s do not support the BIOS interrupt method of reading the joysticks.  It is located on this page :

For the Tandy 1000s, the later machines can disable the built-in Tandy joystick adapter and allow you to use a standard gameport on an I/O expansion or Sound Card.  The TLs and SLs have 4-5 expansion slots, so they usually have room for a standard gameport.  However, the RL and RLX only have one expansion slot, so this adapter may become useful.  The pre TL and SL machines had no software way to disable the joystick ports, so this adapter is essential if you want to play arcade-like games with the best control possible.

No comments: