home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
625.lha
/
mouse-switcher
/
mouse-switcher.doc
next >
Wrap
Text File
|
1991-12-31
|
4KB
|
60 lines
Have you ever gotten tired of yanking out your mouse to plug in a
joystick, then removing it & plugging your mouse back, later plugging the
joystick back in and so forth? One day it occured to me that there should
be an easy way to have both the mouse and joystick plugged in at the same
time with a way to activate the device you want to use. I have seen small
switch boxes that require you to turn a switch to select the device you want
to use, but that too seemed like a pain. Wouldn't it be nice to just press
the joystick fire button and *presto* have the joystick work? Or press the
mouse button and have it respond instead of the joystick? Well wait no
longer! With the simple circuit diagram included with this file, you can
build your own automatic mouse port switcher, with only a few common parts.
This project should also work on most Atari style 9-pin joystick
interfaces, including Amiga's, C64's, C128's, Atari ST's etc. It is good
for 2 player "take-turns" programs where each player has their own
"favorite" joystick. It will work with auto fire joysticks as well as
trackballs and mice.
The circuit itself is designed around a 74LS157 Quad 1 of 2 data
selector, with a 74LS00 two input NAND gate wired up as an S-R latch. Since
the amiga X & Y mouse inputs internally go through the same data selector
I.C., there are no compatibility problems with adding another data selector
of your own. The only signals that are driven by the mouse are the X & Y
quadrature signals, which coincide with the joysticks Up/Down & Left/Right
signals. So basically all you have to do is select between those four
signals, and wire everything else up in parallel. The data selector I.C.
is used to do the switching, while the S-R latch is connected to each ports'
fire (or left mouse) button. When one ports fire button is pressed, the
latch changes state to either high or low (depending on the port), and
sends a signal to the select pin on the data selector I.C.. This causes the
one set of inputs to become active and the other set inactive. The condition
will persist until the S-R latch changes state. The fire (or left mouse)
buttons are logically OR'd together with unused nand gate sections and
buffered with a diode to be active only when low.
Any construction techniques can be used. I put the circuit on a small piece
of perf board in a box with the two male DB-9's, and had a short length of
9 conductor cable run to the female DB-9 which plugged into the Amiga.
As always, be careful when wiring up the circuit. There is little chance
of damaging your computer, but prolonged short circuits can harm it or the
mouse-switcher. Good Luck!
There may be a minor incompatibility with certain commercial auto-fire
joysticks. Some depend on the computer's pull up resistors to power the
autofire circuit. If you are experiencing problems like this, use 4.7K
resistors wired from each of the four switched inputs on the two input ports
to the +5 volt supply. This will duplicate the type of port on the computer.
Optional LED indicators: You can wire two LEDs to the circuit as shown to
indicate the currently selected port. If you use small, efficient LEDs, the
gates should have no problem powering them. If your LEDs draw too much
current you may need to buffer them. If you need further help, hunt
down your local solder slinger. I'm sure they'll be happy to help (with the
appropriate bribes of course :-) .
This text file and picture can be redistributed as long as the credits
remain intact.
-Mark Spankus
(Mark @ Shorty.CS.wisc.edu)