[comp.sys.amiga] Trackball Hack

jones@uv4.eglin.af.mil (Calvin Jones, III) (10/18/89)

Kjell-Ove Mickelsson <p88-kmn@sm.luth.se> writes:

>  I know that the trackball exists to a lot of other computers such as the
>Macintosh and pc, but so far i haven't seen it available to the Amiga.
>I've found an old 'Wico trackball' (joystick compatible) and i am thinking
>of rebuilding it to be compatible with the amiga-mouse.
>The Wico have those wheels with infra-red??? sensors similar to the
>mouse, but instead of giving the correct mouse vertical and mouse horisontal
>signals required, it gives out pulses to the joystick up-down resp.
>joystick left-right pins in the joystickport.
>If anyone knows exactly how the amiga-mouse works, which signals it gives
>out and on which pin's, then i would like to share your knowledge.

The following article describes the way to modify an "Atari" type 
trackball to simulate the Amiga mouse:
 
   --- Cal

   //  Cal Jones - Internet:  <Jones@UV4.Eglin.AF.Mil>   or
 \X/               BBS:  904-243-6219  1200-9600HST  340Meg, all Amiga
 ---------------------------------------------------------------------
  NW Florida's first Amiga BBS running on NW Florida's FIRST AMIGA!

------8<------ Cut here. Ask mommie for help if you need it. ----8<-----

                     Make a Trackball for the Amiga

                   How to convert the Atari TRAK-BALL
                            By John Locke


     Just what is a trackball and why would you want one?  The simplest way to
describe a trackball is to call it an upside down mouse.  You roll a ball 
inside a housing that allows the ball to rotate vertically and horizontally
on a set of rollers.  The big difference is that the housing is stationary
and does not move.  A trackball doesn't need as much deskspace as a mouse
since it doesn't have to move about.  The mouse usually needs a 8 by 10 inch
clear space on your desktop to move around in.  Trackballs need only as much
space as their case.  Trackballs allow unlimited motion in any direction
while a mouse has to be picked up, moved back and pushed again to continue 
motion in the same direction.  Being larger, a trackball is less likely to 
hide under manuals and paperwork.  Since it remains in the same spot on your
desk, it is easy to find anytime.  The cord can be routed permanently out of
the way on a trackball while a mouse requires a free length of cord in order
to run about.  Trackballs are also very handy to use with some games (Missile 
Command and Marble Madness are two examples).  If you've ever played either
game in the local arcade, you know how easy and instinctive a trackball is.

    The Atari TRAK-BALL is availible at many local toy stores at very high
discounts.  One store I know of is selling them for $13.99 plus tax.  In
stock form, the TRAK-BALL emulates a joystick in that it outputs left,right,
up, and down signals instead of the quadrature signals that the Amiga mouse
outputs.  Fortunately, the quadrature signals are available at test points
on the internal curcuit board.  By using the quadrature signals, we can
duplicate the same signals created by the mouse.  Furthermore, the Atari unit
has two pushbuttons built-in already.  It has large diameter shafts that ride
in ball bearings and optical sensing of the shaft rotation.  In short, it is 
well made and has a good feel to the ball.  Most of the work needed to 
convert the trackball consists of rewiring the output signals.

    You will need a #2 phillips head screwdriver, wirecutters, a soldering
iron, solder, a DB9 female connecter, and eight or nine conducter cable.
If you want to, a joystick extension cable from Radio Shack with the male
end cut off will work just fine.  Use an ohmmeter to determine which wire
goes to which pin.  You will be soldering four wires directly to the PCB 
inside the trackball and four other wires will be spliced to the existing
wiring inside the unit.

    To disassemble the trackball, first remove the four phillips head screws
on the underside of the unit.  Next, pry apart the top half from the bottom.
There are two plastic press fit pins which hold the unit togther.  They are 
located above and below the ball, so try to pull the case apart by rocking
the top from left to right as you pull up on it.  Remove the ball and both of 
the encoder shafts from their housings.  Be careful not to damage the encoder
wheels on the ends of the shaft or lose the ball bearings.  Remove the two 
phillips head screws holding the PCB to the bottom of the case and release
it from the case by pushing back the plastic clips.  Disconnect plug J1 from
the board.  Peel the wires at J1 pins 3,4,5, and 6 out of the connecter.  Cut
the orange wire at J1 pin 2 about two inches from the connecter.  Be sure to 
leave enough wire so you can splice it to the new cable wires.  Cut the black
wire at J1 pin 1 that leads back to the old cable about two inches from the 
connecter.  Leave the other black wires intact.  Again, be sure to leave
enough to let you splice it to the new cable.  Cut the red wire running from
the left switch to right switch at the left switch and cut the red wire 
running to the cable from the left switch about two inches from the switch.
Allow enough wire so you can splice it later.  Throw away the old cable.

    The pins on the DB9 female plug are marked like this:

                        5  4  3  2  1
                         9  8  7  6  

                viewed from the front of the plug.

    Connect the new cable as follows:

    DB9 plug               trackball                signal name
    --------               ---------                -----------
    pin 1                  TP 3                     Vertical Pulse
    pin 2                  TP 2                     Horizontal Pulse
    pin 3                  TP 4                     Vertical Quadrature
    pin 4                  TP 1                     Horizontal Quadrature
    pin 5                  no connection            Pushbutton 3
    pin 6                  left button (red wire)   Pushbutton 1
    pin 7                  J1 pin 2                 +5 VDC
    pin 8                  J1 pin 1                 Ground
    pin 9                  right button (red wire)  Pushbutton 2


     The test points TP1 though TP4 are located on the lower left edge of the
PCB.  They are plated through holes and are clearly marked.  Solder the wires
directly to the test points.  Splice the other wires to the wire ends you 
left when removing the original cable.  Make sure to cover the splices with 
insulation after soldering them.  Put the PCB back into the case and connect 
the J1 connecter to the board.  Be sure to screw the PCB down.  Put the
encoder shafts and bearings back in place.  Make sure that they spin freely
and no wires are rubbing on the wheels or shafts.  Friction on the wheels will
cause jerky or erratic movement of the cursor.  Put the ball back in and put
the case together.  Plug it into the mouse port and you're ready to go.
 
     You may find that the pushbuttons are too far away from the ball to push
easily while moving the ball.  If so, you can install two new buttons closer
to the ball.  Just wire them in parallel with the old switches.  I have two 
buttons located just to the left and right of the ball.