[Coco] ps2 mouse on coco
David Roper
ebonhand09 at gmail.com
Mon Jan 9 21:45:34 EST 2012
Hi Robert,
I'm in the process of building a ps/2 mouse -> relative coco joystick
device using an arduino board
Basically, my goal is to translate the mouse motion to joystick movement
e.g.
mouse not moving = joystick values of 31, 31
mouse moving slowly left = joystick horizontal value slightly less than 31
(say, 25)
mouse moving quickly left = joystick horizontal value of 0
I imagine it would be handy for games such as shanghai (and Lemmings,
should I ever finish it!), and should require no special programming on the
coco side
- David
On 10 January 2012 12:43, Robert Hermanek <rhermanek at centurytel.net> wrote:
> 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
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
More information about the Coco
mailing list