[net.micro] How the mouse for the Color Computer works

sdb@shark.UUCP (Steven Den Beste) (08/26/83)

The Radio Shack Color computer joystick interface is 5 wires:

   +5 volts (to the joystick)
   Ground (to the joystick)
   X coordinate (from the joystick)
   Y coordinate (from the joystick)
   Switch (from the joystick)

The Switch is the easiest: It reads either +5 or Ground based on whether
the button is depressed. The X and Y coordinates are pots with the ends
at +5 and Ground, and the floating lead read back - thus they return
a voltage between Ground and +5 depending on where the joystick is
placed.

Inside the Color Computer, this voltage is turned into a number from 0
to 63 by an A/D converter. (Actually, it is a 6-bit D/A, an analog
comparator and some software to do the hunt-and-match. The thing is
a masterpiece of efficiency: The 6-bit D/A is also used to generate
the frequencies for the cassette port, and can be routed to the
audio circuit of the modulator - thus appearing at the speaker of the
TV. There is available a phoneme-based speech synthesis package that
can run on a Coco without any further hardware - and reports say it
is not bad at all!)

The mouse fits into the same environment. Again, the switch either
provides +5 or Ground. The two pots, instead of being hooked to
a lever, have wheels on them which rest on the ball of the mouse.
They are multi-turn pots, so they are pretty high quality. When you
reach one end of the pot, the wheel stops turning, and if the user
tries to move the mouse further in that direction the wheel will rub
against the ball.

If you had a finer A/D you could certainly get more resolution out of
the mouse, but at a certain point noise would defeat you.
This could probably be helped by using a higher voltage than +5
(say +/- 12) for the swing. There seems to be nothing sacred about
the +5 supply - that was just convenient for them.

There is plenty of room in the mouse to add new buttons - but only
at the back next to the cable. If you wanted to mount new buttons
they would go at the back, and you would have to add a second cable.

The ball is over an inch across (looks smaller if you haven't taken
it apart).


I have a 3-D drawing package for my Coco that I got from Computerware,
and it used the joystick for its graphics input. They wanted better
than 64-64 resolution (the high-res graphics is 192*256), so they used
the joystick as a velocity vector on a moving point to designate a
position - and friends, it is a pain-in-the-ass to use.

I modified it to use the absolute position of the "joystick" instead,
sacrificing resolution of placement, and used the mouse on it. Boy,
was that an improvement!

   Steve Den Beste
   Tektronix
   [decvax|ucbvax]!tektronix!tekecs!shark!sdb