                               Mouse Scaler

                               Version 2.06

               For RISC OS 2.00, 3.10 and 3.50 to 4.XX and 5.0X

                          Nick Jarman 1991-1994,2002


***************************************************************************
****   If Mouse Scaler doesn't work on your machine, perhaps you can   ****
****      help... see the section 'Users of unsupported machines'      ****
****                   near the end of this file.                      ****
***************************************************************************


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.

When I started using RISC OS 2, I thought, 'Surely the next release of the
operating system will have variable mouse scaling...'. When RISC OS 3
appeared I was surprised to find it didn't. I was slightly less surprised
that it's still missing from RISC OS 3.5, nearly three years after my first
release of Mouse Scaler.

The Mouse Scaler module implements variable mouse scaling under the three
versions of RISC OS I have used over the years:

 - RISC OS 2.00
 - RISC OS 3.10   (It may work with 3.11 and 3.12 as well, but no guarantees)
 - RISC OS 3.50
 - RISC OS 3.60   (Untested)
 - RISC OS 3.70   (Untested)
 - RISC OS 4.0X
 - RISC OS 4.XX   Select 1 & 2
 - RISC OS 5.0X   Iyonix

The version of RISC OS is detected automatically. If it is not one of those
listed above, Mouse Scaler will complain and shut itself down.


How to run it
-------------

To run Mouse Scaler, just double-click on it. If you want it to load as part
of your boot sequence, put a command to run the !Scaler application in it.
Alternatively, to save space (and make the boot sequence a bit faster), take
the MouseScale file out of the !Scaler application and run that directly!
(but if you give a copy of Mouse Scaler to anyone else, remember to give
them the entire application)

You may find the pointer just moves too fast at first. If this is the case,
use the Configure application supplied with your machine to set the mouse
to the slowest or second slowest speed possible. My preference is the
slowest, which makes the mouse comfortble to use in displays between 640x256
and 1600x1200 pixels... which should be adequete for most situations!

Mouse Scaler does not provide any additional * commands; it starts working as
soon as it's loaded. The only way to disable it is to kill the module - press
F12 and type:

     *RMKill MouseScaler

That's all there is to it - it's loaded on my machine all the time, because I
find the mouse almost unusable without it. You may find that it upsets some
games which read and then reset the mouse position. If this happens, kill the
Mouse Scaler module before running the game and reload it afterwards. During
the thousands of hours I've used it I have never experienced any hardware or
software clashes which could have been caused by the use of Mouse Scaler, so
you can be confident that it is relatively bug-free!


Serial mouse support
--------------------

I have not yet been able to test Mouse Scaler with a serial mouse connected
to a Risc PC (or any other machine) yet, so I have no idea what will happen
in this instance. I would be interested to hear from anyone who is able to
confirm that it does or does not work!


History (and technical bits)
----------------------------

v1.00 (Sun,27 Oct 1991)
     Mouse Scaler module for RISC OS 2.00 - very basic, because I thought it
     was just a temporary fix until the next version of RISC OS was released.
v2.01 (Mon,16 Mar 1992) - Modified by Roger Spooner
     Difference in mouse position is now squared for faster acelleration.
     Also runs on Vsync and recognises screen size. RISC OS 2.00 only.
<Unnamed versions> (Not released)
     Based on v1.00 and modified to work with RISC OS 3.00 only.
v2.02 (Wed,13 Jul 1994)
     Based v2.01 and modified for RISC OS 3.50 only. Minor bug fixes to
     initialisation and finalisation code.
v2.03 (Sat,13 Aug 1994)
     A (nearly) complete rewrite of v2.02:
     - Instead of restricting mouse to an area the size of the screen, the
       currently defined mouse rectangle is used. The effect of this can be
       seen when an error message window is displayed - the pointer used to
       'bounce' off the edge of the window if it was moved very fast.
     - The Mouse OS Word call is intercepted so that when the position is
       changed, the resulting movement isn't scaled. Before this was done,
       any manual setting of the mouse position was translated to something
       meaningless, and where the pointer ended up was anyone's guess!
     - Finally, parts of the code were changed so as not to store any
       variables within the module, 'cos it's bad practice :-)
     For RISC OS 3.50 only.
v2.04 (Fri,19 Aug 1994)
     An update of version 2.03. This works on RISC OS 2.00, 3.10 and 3.50
     (and possibly 3.11 and 3.12). The operating system version is detected
     automatically, making the module 'plug-in-and-play'.
v2.05 (Mon,27-Jan-2003)
     Updated to run on RISC OS 3.6 to 4.XX and 5.0X by David J. Ruck


Testing
-------

Mouse Scaler has been tested with the following machine/operating system
combinations:

     Machine     OS
     R140        RISC OS 2.00
     A400/1      RISC OS 3.10
     Risc PC     RISC OS 3.50
     Risc PC     RISC OS 4.33 Select 2i3
     Iyonix      RISC OS 5.01


Further development
-------------------

At least one more release of Mouse Scaler is planned, in which I hope to
support all versions of RISC OS since version 2.00. I can't do this without
some help though, so read on...


Users of unsupported machines
-----------------------------

This section is for hackers/techies who want the version of RISC OS they use
to be supported by Mouse Scaler...

If Mouse Scaler reports that it cannot initialise because it's not compatible
with your version of RISC OS, I would be grateful if you could attempt to
find the location of the mouse pointer information. It's usually somewhere
between &5A0 and &5C0. I need to know where the following pieces of
information are kept:

     Mouse X position
     Mouse Y position

     Mouse rectangle minimum X co-ordinate
     Mouse rectangle minimum Y co-ordinate
     Mouse rectangle maximum X co-ordinate
     Mouse rectangle maximum Y co-ordinate

They are likely to be in two chunks, as shown above.

Mouse X and Y are easy to find - just set the mouse position to a known value
(eg: MOUSE TO 640,512) and then search for two adjacent words in memory
containing those values. Obviously, don't move the mouse while you're
searching, and don't use a memory viewer that resets the mouse position!

To find the rectangle co-ordinates, try something like:

     MOUSE RECTANGLE 200,200,200,200

then search for four adjacent words containing 200,200,400,400.

Finally, I need to know which version of RISC OS you have, and the number
returned by:

     PRINT INKEY-256

Thanks!


Acknowledgement
---------------

The calculations for scaling mouse movements are from Roger Spooner's updated
version of the original Mouse Scaler - they were better than anything I could
come up with!


Mouse Sclaer is distributed under the Acorn User PD Scheme
----------------------------------------------------------

The application may not be copied or distributed to any third party until
three months after publication of this issue of Acorn User, i.e. until
6th January 1995. After that rights to the program revert to the author,
and the program may be distributed subject to the following conditions:

This application may be freely distributed as long as it is not altered in
any way, and no profit is made doing so. If you use Mouse Scaler, you do so
entirely at your own risk.

If you intend to distribute Mouse Scaler through a public domain software
library, please obtain my permission first. This way I can ensure you have
the latest version of the software, and that you are kept up to date
regarding any significant changes.


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

Comments and suggestions are welcome. Send them to this address:

      Nick Jarman
      7 Cadet Way
      Church Crookham
      FLEET
      Hants
      GU13 0UG
      UK
