[Coco] A way to use a serial mouse? (was: Mouse (Bill))
Andrew
keeper63 at cox.net
Thu Mar 26 11:27:25 EDT 2009
I read this message, and no, there isn't a way to simply "re-wire" a
serial mouse to hook up to the coco, short of via an RS-232 pak and some
OS-9 drivers (and even then, IIRC there were issues?)...
But...
What about this (and maybe I should try it out, although I don't have
the time, I have all the hardware - hmm): Connect a serial/ps-2 mouse up
to an Arduino (or any other favorite microcontroller that has the right
ports, etc), then hook the Arduino up to the joystick port. The Arduino
would then have code to read the serial data then convert it using its
internal commands into the voltage level outputs on other pins which
feed into the CoCo.
It would be real simple then to do some other funky things, such as
"mouse macros", as well as create a form of hi-res interface (if you
connected to the cassette port). I could also see this thing interfaced
to the bit-banger serial port...
This should be VERY simple to build - the difficult part would be the
code (maybe). On an Arduino, you could even (in theory) interface to a
USB mouse. It has enough commands for the serial input (though you might
need a level shifter?). Hmm - I am also seeing code on the site to read
a PS/2 keyboard (maybe a way to hook a PS/2 keyboard to the CoCo?):
http://arduino.cc/en/Reference/Libraries
But for PS/2 or RS-232 mouse - you might be on your own writing code,
but I bet somebody else has already done it. I could see even
interfacing something like a Playstation joypad to the CoCo with
something like this (although it would probably be single player only -
you would need to use both joystick ports likely unless you did some
form of multiplexing).
Hmm - here's some PS/2 mouse stuff:
http://www.arduino.cc/playground/ComponentLib/Ps2mouse
Ok - for the voltage output you just use PWM commands (and you might
need a cap for smoothing - not sure how the coco would react):
http://principialabs.com/arduino-pulse-width-modulation/
Hmm - actually, this project is now looking pretty simple...I wish I had
fewer projects, more time, and a host of other things...
-- Andrew L. Ayers, Glendale, Arizona
More information about the Coco
mailing list