home *** CD-ROM | disk | FTP | other *** search
/ Micro R&D 1 / MicroRD-CD-ROM-Vol1-1994.iso / hardware / drivr / optmouse.lzh / OptMouse12 / OptMouse.doc < prev    next >
Text File  |  1991-04-04  |  3KB  |  94 lines

  1.  * OptMouse.c
  2.  *
  3.  * Serial Port Optical Mouse Driver
  4.  *
  5.  * (c) Copyright 1989,1991 J. Edward Hanway
  6.  *                   149 Arborwood Crescent
  7.  *                    Rochester, NY 14615
  8.  * BIX, GEnie, PLink: jehanway
  9.  * Usenet: uunet!sisd!jeh or jeh@sisd.kodak.com
  10.  *
  11.  * This code may be freely redistributed for non-commercial purposes. There
  12.  * is NO WARRANTY on this program. The author assumes no responsibility for
  13.  * any damages resulting from use of this program. You know the drill.
  14.  *
  15.  
  16. Usage (from CLI only):
  17.     OptMouse [-a<thresh>,<accel>] [-m[iddle]] [device [unit]]
  18.     OptMouse [-k[ill]]
  19.  
  20. Examples:
  21.     OptMouse         Starts mouse driver (in the background) on
  22.                 serial.device, unit 0.
  23.  
  24.     OptMouse foo.device 1    Starts mouse driver using foo.device, unit 1.
  25.                 Unit is optional, but if you want a unit other
  26.                 than zero, you must specify the device, even
  27.                 if it's just serial.device.
  28.  
  29.     OptMouse -a5,2        Accellerate movements larger than 5 counts
  30.                 by a factor of 2.
  31.  
  32.     OptMouse -middle    Starts mouse driver. Translates middle button
  33.     OptMouse -moo        events into shift-left button events. 
  34.  
  35.     OptMouse -m foo.dev 1    You get the idea.
  36.  
  37.     OptMouse -kill        Stops mouse driver. (Frees serial port.)
  38.     OptMouse -kwack
  39.  
  40. Background:
  41.     The M3 (or M2) is a serial, optical mouse made by Mouse Systems
  42.     Corp. of Santa Clara, CA.  They are very nice, true optical mice (as 
  43.     in no-moving parts, not the "opto-mechanical" market-speak like
  44.     the Amiga mouse) and are (were? still?) used by Sun Microsystems
  45.     for their workstations.  According to the "Optical Mouse Technical
  46.     Reference Manual" the mice come with a variety of connectors, including
  47.     ones which have DB25 serial connectors and are powered by a separate
  48.     power pack, but    the one I got had an RJ11C (modular telephone)
  49.     connector, which I wired to get power from the Amiga 2000 serial port
  50.     as follows:
  51.  
  52.     DB25S                        RJ11C
  53.     to Amiga                    to mouse
  54.                   3+------+    
  55.     Pin 3 (Data) ----------|      |2
  56.                   1|      |------------- Pin 4 (Signal)
  57.     Pin 10 (-12V)----------| 1488 |        
  58.                  14|      |7
  59.               +----|      |----------------------------+
  60.               |    +------+                   |
  61.               |                       |
  62.               |   1+------+3               |
  63.     Pin 9 (+12V) -----+----| 7805 |----+-------- Pin 3 (+5V)   |
  64.               |    +---+--+    |               |
  65.            .01uF ===      2|      === .01uF           |    
  66.               |       |       |               |
  67.     Pin 7 (GND)  -----+--------+-------+---+---- Pin 2 (GND)   |
  68.                            |           |
  69.                            +-------------------+
  70.     
  71.     I managed to cram this circuit inside a DB25-to-modular adapter.
  72.  
  73. Caveats:
  74.     As far as I can tell, the events that this program generates are
  75.     identical to genuine mouse events, but Digi-Paint (version 1)
  76.     doesn't like me, and hangs when I use the optical mouse to try to
  77.     load a picture. I know of no other incompatibilies with "normal"
  78.     programs which read the mouse via Intuition. Games which take over
  79.     the machine and/or go straight to the hardware will obviously not
  80.     work.
  81.  
  82.     Gurus, which require you to click the left mouse button to continue,
  83.     apparently go straight to the hardware (what else can they do?) and,
  84.     thus, don't work.
  85.  
  86.     I have not tested this with any add-on serial port.
  87.  
  88.     Apparently these mice can be had for cheap at hamfests, etc. because
  89.     they're not strictly compatible with a PC, I guess. If you do find
  90.     one, make sure you get the reflective mouse pad with it!
  91.  
  92. Disclaimer:
  93.     Mouse Systems has nothing to do with this and has never heard of me.
  94.