Difference between revisions of "SYMBiFACE II:PS/2 mouse"
From CPCWiki - THE Amstrad CPC encyclopedia!
| Line 31: | Line 31: | ||
If you don't receive a status for the mouse buttons, the last status is still | If you don't receive a status for the mouse buttons, the last status is still | ||
valid. | valid. | ||
| + | |||
| + | == See also == | ||
| + | |||
| + | * [[Programming:SYMBiFACE_II|SYMBiFACE II documentations]] | ||
Revision as of 08:28, 27 August 2006
This is the documentation about the PS/2 mouse connector of the SYMBiFACE II expansion card.
Ports
- #FD10 (read only) read mouse status
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.