This is the documentation about the PS/2 mouse connector of the SYMBiFACE II expansion card.
Ports
- #FD10 (read only) read mouse status. If no mouse is connected returns 0x0.
Usage
Status byte Bit 76543210 Use mmDDDDDD m: Mode D: Use-Data If read and... m = 00 -> no more data available, you can stop reading the status for a while m = 01 -> D = X offset (signed); you will receive positive values, if the user is moving the mouse to the right m = 10 -> D = Y offset (signed); you will receive positive values, if the user is moving the mouse upwards m = 11 -> D[bit5] = 0 -> D[bit0] = left button D[bit1] = right button D[bit2] = middle button D[bit3] = forward button D[bit4] = backward button D[bit5] = 1 -> D[bit0-4] = scroll wheel offset (signed)
If m was not 00, then you should read the port again until you receive m=00. If you don't receive a status for the mouse buttons, the last status is still valid.
Example:
Pressing left button only and releasing it will show &c1, one or more zeros and then &c0. If you press and hold down left button you will see &c1, and lots of zeros until you release then it shows &c0.
The hardware will only give you the actual data that has changed, so if only moving left you will only get X offset values and no Y offset or button values.