From: Walter Roberson on
Michael Purdy wrote:
> I didn't really specify in the last post the actual problems I am
> encountering.
> First, I do not know how to 'make available' the PS/2 port so that it is
> visible to MatLab. Since there is no legitimate hardware attached to
> the port I cannot connect to it. The PS/2 port is not visible in the
> Device Manager even when I show hidden devices. If if was visible, is
> there some way that I can find it's address and use this to open it in
> MatLab?

http://www.ardent-tool.org.uk/ohland/mouse.html

"The PS/2 mouse port is IRQ 12 and I/O Port Addresses 60h and 64h. "

"The PS/2 mouse interface is a TTL-style interface, which uses 0 - +2 VDC as
logical "0" and +3 - +5 VDC as logical "1". "


http://bochs.sourceforge.net/techspec/PORTS.LST

shows what all the various bits of the I/O ports mean. Note that in that list,
PS/2 refers to the PS/2 model, and what you need to search for is mouse. It
appears the sequence to access the mouse functions is to send D4h to 64h and
then to send a hex command to 60h and then if necessary, send a further byte
to 60h or read from 60h. On the other hand, that list seems to indicate that
possibly the 64h functions apply only to MCA's BIOS, and I see that in that
BIOS, 63h allows you to write to the mouse output buffer. For the other
BIOS's, I do not see any clear way to write to the device.

It appears that the control of the mouse is via the keyboard controller, and
that there is no dedicated I/O port for the PS/2-style mouse. Matlab is
probably going to be reluctant to give you write access to a port that is
shared for multiple purposes.

It appears you would probably need to MEX something into place to have any
control, and it is not clear to me at the moment that pin-level control of the
mouse is supported by the hardware.