home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / Chip_2004-04_cd1.bin / tema / arachne / archn170.exe / SYSTEM / DEVDRVRS / PROTOCOL.TXT < prev    next >
Encoding:
Text File  |  2000-09-16  |  4.5 KB  |  109 lines

  1. Mouse reset:
  2. ------------
  3.   1: Set UART to 'broken line' state (set bit 6 of the LCR)
  4.   2: Clear the bits 0-1 of the MCR (clear RTS and DTR), wait a while
  5.   3: Reverse the bits again (set RTS and DTR)
  6.  
  7. Mouse detection (identification bytes before optional PNP data):
  8. ----------------------------------------------------------------
  9.   Microsoft mice send 'M' after dropping and raising RTS.
  10.   Logitech mice send 'M3' after dropping and raising RTS.
  11.   Microsoft Intellimouse/Wheel mice send 'MZ@',0,0,0 after
  12.     dropping and raising RTS.
  13.  
  14. ===========================================================================
  15. Microsoft mode: 1200 bps, 7 data bits, 1 stop bit, no parity
  16.  
  17.           1st byte        2nd byte      3rd byte
  18.      +---------------+ +---------------+ +---------------+
  19.      |0|1|L|R|Y|Y|X|X| |0|0|X|X|X|X|X|X| |0|0|Y|Y|Y|Y|Y|Y|
  20.      +---------------+ +---------------+ +---------------+
  21.           | | \ / \ /    \----+----/      \----+----/
  22.           | |  |   |         |               |
  23.           | |  +---|-------------|---------+       |
  24.           | |      +-----+         |           |       |
  25.           | |        / \ /----+----\   / \ /----+----\
  26.           | |       +---------------+ +---------------+
  27.           | |       | | | | | | | | | | | | | | | | | |
  28.  Left Button -+ |       +---------------+ +---------------+
  29. Right Button ---+          X increment    Y increment
  30.  (1 if pressed)
  31.  
  32. The X and Y increment values are in 2's compliment signed char format.
  33.  
  34. ===========================================================================
  35. Microsoft IntelliMouse: 1200 bps, 7 data bits, 1 stop bit, no parity
  36.  
  37.           1st byte        2nd byte      3rd byte        4th byte
  38.      +---------------+ +---------------+ +---------------+ +---------------+
  39.      |0|1|L|R|Y|Y|X|X| |0|0|X|X|X|X|X|X| |0|0|Y|Y|Y|Y|Y|Y| |0|0|0|M|0|0|0|0|
  40.      +---------------+ +---------------+ +---------------+ +---------------+
  41.           | | \ / \ /    \----+----/      \----+----/          | \--+--/
  42.           | |  |   |         |               |          |       |
  43.           | |  +---|-------------|---------+       |      Middle -+       |
  44.           | |      +-----+         |           |       |      Button       |
  45.           | |        / \ /----+----\   / \ /----+----\           |
  46.           | |       +---------------+ +---------------+           |
  47.           | |       | | | | | | | | | | | | | | | | | |         Wheel
  48.  Left Button -+ |       +---------------+ +---------------+        Movement
  49. Right Button ---+          X increment    Y increment
  50.  (1 if pressed)
  51.  
  52. The X and Y increment values are in 2's compliment signed char format.
  53.  
  54. ===========================================================================
  55. Logitech MouseMan mode: 1200 bps, 7 data bits, 1 stop bit, no parity
  56.  
  57.   3 bytes (left or right button is pressed):
  58.   ------------------------------------------
  59.  
  60.           1st byte        2nd byte      3rd byte
  61.      +---------------+ +---------------+ +---------------+
  62.      |0|1|L|R|Y|Y|X|X| |0|0|X|X|X|X|X|X| |0|0|Y|Y|Y|Y|Y|Y|
  63.      +---------------+ +---------------+ +---------------+
  64.           | | \ / \ /    \----+----/      \----+----/
  65.           | |  |   |         |               |
  66.           | |  +---|-------------|---------+       |
  67.           | |      +-----+         |           |       |
  68.           | |        / \ /----+----\   / \ /----+----\
  69.           | |       +---------------+ +---------------+
  70.           | |       | | | | | | | | | | | | | | | | | |
  71.  Left Button -+ |       +---------------+ +---------------+
  72. Right Button ---+          X increment    Y increment
  73.  (1 if pressed)
  74.  
  75.   The extra byte (when middle button is pressed):
  76.   -----------------------------------------------
  77.  
  78.                  4th byte
  79.             +---------------+
  80.             |0|0|M|0|0|0|0|0|
  81.             +---------------+
  82.                  |
  83.             Middle button
  84.  
  85. ===========================================================================
  86. Mouse Systems mode: 1200 bps, 8 data bits, 1 stop bit, no parity
  87.  
  88.          1st byte           2nd byte      3rd byte
  89.     +---------------+ +---------------+ +---------------+
  90.     |1|0|0|0|0|L|M|R| |X|X|X|X|X|X|X|X| |Y|Y|Y|Y|Y|Y|Y|Y|
  91.     +---------------+ +---------------+ +---------------+
  92.            | | |   \------+------/   \------+------/
  93.            | | |      |            |
  94.            | | |     Xa increment      Ya increment
  95.            | | |
  96.            | | |       4th byte      5th byte
  97.            | | |  +---------------+ +---------------+
  98.      Left Button --+ | |  |X|X|X|X|X|X|X|X| |Y|Y|Y|Y|Y|Y|Y|Y|
  99.    Middle Button ----+ |  +---------------+ +---------------+
  100.     Right Button ------+   \------+------/   \------+------/
  101.      (0 if pressed)          |            |
  102.                  Xb increment      Yb increment
  103.  
  104. Note: Mouse Systems mouse sends two independent bytes for each direction
  105. in each packet.
  106.  
  107. Xa/Ya - movement of the mouse since last packet (+ right/up)
  108. Xb/Yb - movement of the mouse since Xa/Ya
  109.