From: dnwangus@flash.LakeheadU.Ca (Dave Angus)
Newsgroups: comp.sys.ibm.pc.hardware
Subject: Re: atari joystick -> ibm gameport?
Date: 4 Jan 1993 10:56:37 GMT
Organization: Lakehead University, Thunder Bay, Ont., Canada

> esaffle@gmuvax2.gmu.edu (Ed Saffle) writes:
>
>  After having completely cleaned up my storage closet I found an old
>joystick that I used with the atari 2600 and the Commodore 64/128
>when I was younger.  The stick is in REALLY good shape, and I don't have
>one for my 386.  Now the quesiton is, can I build an adapter that will
>make this possible?  Being realistic about all this, it should be possible,
>but I have no idea how to do it, and I *have* heard rumors that such a thing
>exists.  Anyone know how?
>
>Ed


It can be done.  However, it is easiest to modify the joystick itself,
rather than building an external adaptor.  Basically, all you have to
do is fix the joystick so that in the three possible positions the
stick generates three different resistances.  Fortunately one of
these resistances is zero ohms, but to generate a higher resistance
than the center position requires switching in additional resistance.
This can be done by using a small 5 volt relay.

The October 1988 issue of the Computer Shopper had an article on how
to do this on page 79.  I modified one of the "deluxe" microswitch
joysticks from Radio Shark using this article as a guideline; it
works very nicely.  For many games the switch type joystick is 
much easier to control.  Back when I used an Apple II clone I
modified another pistolgrip type stick for it.  The Apple joystick
port is wired slightly differently than the PC port, so that no
relay was necessary.

I'm not much good at drawing schematics in ASCII, but here's the
schematic (more or less) from the Computer Shopper article.
The article was written by George Toft.  Any errors or mistakes
are mine.

9 pin DB connector wiring:

pin 1     +5 volts
pin 2     Button 0
pin 3     Input 1
pin 4     Ground
pin 6     Input 0
pin 7     Button 1

I think Input 0 is left/right, but be prepared to swap wires if it isn't.

Parts List:

1 x 15 pin DB connector.

1 x Hood for the connector.

4 x 1/4 watt resistors, 47k or 100k or something in between.
    As long as they are all the same value.  47k may be better 
    for fast computers without special game cards.

2 x Radio Shack 275-240 miniature relays, 5 volt coil, SPDT or 
    equivalent.


Glue the relays to the phenolic circuit board somewhere where
they won't interfere with anything.

You'll need to cut some traces on the circuit board to isolate
the switches.  This is not a step-by-step how-to guide.  The
Comp Shopper article is; it has pretty clear pictures of what
to cut on an Atari stick.  If you're using a different stick,
like the deluxe microswitch ones, then the article won't help
you much.

Anyway, the fire button switches are wired between the ground
(pin 4) and pins 2 and 7 respectively.   I think the IBM PC
Technical reference manual has a clear diagram of the PC joystick
if you want to confirm how it all works.

In the following diagram, contacts are represented as --||--
for normally open, and as ---|/|--- for normally closed.
This applies to both the switch contacts and the relay contacts.

Resistors are represented by  ---\/\/---

Components are labelled for the horizontal axis.  Values for
the vertical axis are in square brackets [].


pin 1  (+5 volts) ---------------------------------------
		     |        |                         |
		     |        |                         |
		     |        \                        ---  Right switch
		     |        /                        ---  [Down]
    Left switch     ---       \                         |
    [Up]            ---       /                         |
                     |        |                         |
		     |        |--------               (   ) Relay Coil
		     |        |       |                 |   for left/right
		     |        \       |                 |   [up/down]
		     |        /      ---                |
		     |        \       /    N/C relay    | 
		     |        /      ---   contact      |
		     |        |       |                 |
		     |        |       |                 |
pin 6  (Input 0) ----------------------                 |
[pin 3 (Input 1)]                                       |
							|
							|
pin 4 (ground)  ----------------------------------------


You can reuse the original cord with its strain relief; it has 
enough conductors.  I used wirewrap wire for the internal wiring
from the relays to the pcboard.  Double check everything; it is
really easy to get confused with six different switches and
two relays.  Use a program like MSD to test the joystick.  With 
a bit of luck the resting position of the stick will be dead
center, and you'll get full left/right and up/down action.
If you don't get the right positions, try different resistor
values or swap in trimpots.


If anyone with way too much money is reading this, you may
be interested in knowing that the ultimate analog joystick
is made by Measurement Systems, Inc.  (203) 838-5561
Expect to spend around $2500.
--
Dave Angus                                   "Kundalini wants his hand back"
Newsgroups: comp.sys.ibm.pc.hardware