Short:    Bus Mouse wheel support
Author:   rdc@cyberlan.mtu-net.ru
Uploader: rdc@cyberlan.mtu-net.ru
Version:  1.4
Type:     util/mouse

At this moment (June 2001) there was only one software wheel mice
driver on Ami - NewMouse.  This driver works only with serial mice,
that have two serious disadvantages - them allocates serial port
(useful for modem) and them have VERY SLOW update rate, with bad
flickering of mouse pointer as result (typical 40fps for 2button and
25fps for 3button mice).

There are simple solution to adapt PC mice for Ami, as described in
many documents - you can simply remove mouse chip and replace it with
Schmitt-trigger, and mouse will be Amiga-like.  Unfortunately, this
solution forced you to lose wheel and other mouse features... up to
this moment. :)

Now you can add two Schmitt-trigger elements and connect wheel
optopairs to joystick port pins 1 and 3.  Amiga has two similar pairs
of mouse counters, and second pair will be used for mouse wheel.
This driver reads second counter every vertical blank and generates
NewMouse-standard input events.  It is fully NewMouse compatible, you
can use it with any NewMouse aware applications like DirOpusMagellan.

If your mouse has two wheels, you can connect second wheel through
another two Schmitt-trigger elements to joystick port pins 2 and 4.

If your mouse has only one wheel, but you want have horizontal
scrolling, you can select qualifier for scrolling direction change.
It may be any keyboard control key, and any button on joystick/mice
ports.  You can even simultaneously use several qualifiers - for
example, you can do horizontal scrolling by pressing any Shift key.

If you mouse has additional button(s), you can connect them to
joystick fire(s).  Any of them (fire0 and fire1) can generate
NewMouse-compatible fourth-button event.  Unfortunately, NewMouse
standard does not describe fifth button - but you can use even two
additional buttons: one as fourth and another for temporary X-Y
scroll direction change.

If you don't want to modify mouse, you can solder my PS/2 controller
(aminet:hard/hack/ps2m.lha) and use WBM with it.  This controller
fully simulates quadrature wheel signals.  Or you even can connect
second mouse and use it as a scroller :-)

Please don't ask me how to modify mouse, what is a Schmitt-trigger.
If you don't know this, you anyway can't modify mouse.

Full C source code included.  Installation is very simple - add
following string in you startup-sequence or user-startup:

c:wbm

If you want to remove copyright message:

c:wbm quiet

If you want to reverse wheel action:

c:wbm reverse

If you want to reverse only horizontal scrolling:

c:wbm rx

If you want any Shift for horizontal scrolling:

c:wbm lshift rshift

If you want that 4th/5th buttons work as system-wide 4th mouse button:

c:wbm lfb rfb

Additional parameter - priority (0 by default):

c:wbm priority=10

Priority will be important in cases when you have continuous working
program (for example, archiver) with priority higher than WBM.  WBM
priority is recommended to be higher than priority of any continuous
task.

Of course, you can mix options in any way.  See "wbm ?"
and history for full list of options in current version.

Driver may be terminated by break signal on WheelBusMouse process.


History:

  History:

1.4
- my email was changed - now it is rdc@cyberlan.mtu-net.ru
- added support of 4th button event
  CLI options: LFOURTHBUTTON=LFB/S,RFOURTHBUTTON=RFB/S

1.3 [absent - for version synchronize with ps2m]

1.2
- added two wheels support
- added reverse of concrete wheel direction: RX and RY
- added qualifiers for scrolling direction change as
  CLI options: LMB/S,MMB/S,RMB/S,JOYFIRE0=JF0/S,JOYFIRE1=JF1/S,
               JOYFIRE2=JF2/S,CTRL/S,LSHIFT=LSH/S,RSHIFT=RSH/S,
               LALT/S,RALT/S,LCOMMAND=LCMD/S,RCOMMAND=RCMD/S

1.1
- you don't need c:run for wbm startup anymore
- driver eats less CPU time (WaitTOF() instead of Delay())
- added CLI options: REVERSE/S,PRIORITY/N,QUIET/S

1.0
- initial Aminet release


Have fun!
