Difference between revisions of "SYMBiFACE II:PS/2 mouse"

From CPCWiki - THE Amstrad CPC encyclopedia!
Jump to: navigation, search
(added category)
Line 35: Line 35:
  
 
* [[Programming:SYMBiFACE_II|SYMBiFACE II documentations]]
 
* [[Programming:SYMBiFACE_II|SYMBiFACE II documentations]]
 +
 +
[[Category:Programming]]

Revision as of 19:11, 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.

See also