[Coco] ps2 mouse on coco

Robert Hermanek rhermanek at centurytel.net
Mon Jan 9 20:43:04 EST 2012


So I have a color computer mouse, just had to have one... and it works well, within the limitation that it functions like a joystick, meaning I get values from 0-63 that reflect absolute position instead of relative motion.  Sort of expected that, still wanted to have one.

But a little research into ps/2 mice indicates that it is just a serial connection, the "protocol" of the data consists of a repeated 3 byte pattern, first is button status, next two are the X and Y change values.

I'm guessing with the right pin to pin conversion, and possibly adding some external power if the ps/2 style device expects it, it would be a pretty simple matter to write a little assembly routine that would sit on a timer interrupt, watch for incoming mouse data, and update a stored mouse cursor position with the most recent relative motion data.

That being said, thought I'd post this as a little converstaion starter, thought if anyone had already done this they could throw in their two cents.  About the only thing I didn't discover through casual googling was the baud rate/etc of the serial data (if that is what it really is) transmitted by ps/2 mice.  And of course it would probably be simpler with an actual serial mouse, but I don't think you can buy those anymore, and it wouldn't be optical anyway.

-Robert Hermanek


More information about the Coco mailing list