                              Mouse Scaler Module

                         Nick Jarman Sun, 27 Oct 1991

                     This software is in the public domain


About the Program
-----------------

Under Risc OS, the relationship between the position of the mouse and the
pointer on the screen is always the same. Moving the mouse a set distance
will always cause the pointer to move a set (and related) distance on the
screen. On other computer systems, such as the PC and Apple Mac, the
relationship between mouse and pointer movement varies with the speed at
which the mouse is moved. The faster the mouse is moved, the greater the
distance the pointer will move on the screen. This allows the pointer to be
moved from one side of the screen to the other with a quick flick of the
mouse, but pixel accuracy is maintained at low speeds.

The Mouse Scaler module implements variable mouse scaling under Risc OS. The
ideal time to load the module is in your Boot sequence, with the following
line:

        *RMLoad <Boot$Dir>.MouseScale

The module provides no additional * commands, and variable scaling is
effective from the moment it is loaded. To stop variable scaling, kill the
module with:

        *RMKill MouseScaler

I am sure this type of mouse hanlding will be included in Risc OS 3, so I
see this module as a stop-gap rather than a permament solution, and thus
there is little point in developing it further.

Settings
--------

The module checks the position of the mouse 10 times per second. If the
mouse has moved less than 15 OS-Units since the last time the position was
checked, no scaling is applied. If this is not the case, the distance by
which it has moved is doubled and added to, or subtracted from (depending on
which the direction the mouse has moved), the unscaled mouse position. This
calculation is performed individually for X and Y movement.

When used with MouseStep configured to 2 (and a new-style mouse), I found
the above settings most satisfactory. It is possible to move the pointer
from one side of the screen to the other (mine is 102 characters wide)
without lifting one's wrist off the surface. Window and file dragging
operations are not inhibited, and you'll soon wonder how you ever managed
without it!


A Confession
------------

The module obtains the mouse co-ordinates by looking directly at
undocumented (I think) memory locations. This is for reasons of speed - my
first attempt, which used calls to the operating system kept crashing the
machine. I can't guarantee it will work with any system - all I know is that
it runs well on mine and I haven't experienced any side-effects on any
applications (it even works with Lemmings :-) ).

The source code is included, and is copiously commented, so anyone who wants
to know how the module works can find out. If you find a better way of doing
it, or have any suggestions for improvements or reports of clashes, please
let me know. Details of how you can contact me are at the end of this
message.


Legal Stuff
-----------

Software refers to the source code of the Mouse Scaler module, the object
code of the Mouse Scaler module, and this message.

The Software is in the public domain, but I (Nick Jarman) hold the copyright
to the Software. You may copy and distribute the Software freely as long as:

   1) You do not charge for doing so, except to cover the cost of media

   2) You do not alter any part of the Software

   3) The Software is copied in its entireity

I accept no responsibility for any loss or damage arising from the use of
the Software.


The Author
----------

Snail mail: Nick Jarman
            Grizedale College
            Lancaster University
            Lancs
            LA1 4YU
            UK
            
     Janet: csc329@uk.ac.lancs.cent1