home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 4 / AUCD4.iso / acornuser / 1998 / jul1998 / regulars / StarInfo / Thoukydide / ReadMe < prev   
Text File  |  1997-06-07  |  4KB  |  90 lines

  1. File        : ReadMe
  2. Date        : 07-Jun-97
  3. Author      : © A.Thoukydides, 1997
  4. Description : Information about Crazy Pointer.
  5.  
  6.  
  7. INTRODUCTION
  8.  
  9. This program is inspired by MouseP written by Andrew Bolt and published in
  10. the June 1997 *Info section of Acorn User; it consists of a relocatable
  11. module that gives the hardware pointer a similar appearance to Andrew's
  12. pointer.
  13.  
  14.  
  15. LOADING THE MODULE
  16.  
  17. To try the new look pointer simply double-click on the module in a filer
  18. window. The pointer should now turn to face the direction it is being moved
  19. in, and wobble for a while when the pointer stops moving. The caret pointer
  20. that is used when moving over some writable icons, and the popup menu
  21. pointer, have also been modified in a similar manner.
  22.  
  23. The new pointer may be installed more permanently by copying the module into
  24. either the !Boot.Choices.Boot.PreDesk or !Boot.Choices.Boot.Tasks
  25. directories. The module will then be loaded automatically every time that the
  26. computer is switched on or reset.
  27.  
  28.  
  29. CONFIGURATION
  30.  
  31. A single *command is provided to configure the pointer wobble:
  32.  
  33.     *CrazyPointerWobble [-nowobble] [[-friction] <value>]
  34.                         [[-spring] <value>] [[-force] <value>]
  35.  
  36. The possible arguments are:
  37.  
  38.     -nowobble           Disable the pointer wobble. This results in a pointer
  39.                         that just rotates to follow movements.
  40.     
  41.     -friction <value>   The amount of friction. Increasing this value stops
  42.                         any wobble quicker.
  43.     
  44.     -spring <value>     The strength of the spring restorative force.
  45.                         Increasing this value makes the pointer wobble faster.
  46.     
  47.     -force <value>      The scaling between mouse movements and the effect on
  48.                         the wobble. Increasing this value makes the wobble
  49.                         more sensitive to slow motions of the mouse.
  50.  
  51. The three numeric values are specified on a logarithmic scale in the range
  52. 0 to 10, with a value of 5 being the default.
  53.  
  54.  
  55. TECHNICAL DETAILS
  56.  
  57. The pointer shape is updated on every vertical sync event. This provides a
  58. smooth animation (a different image for every frame refresh), that even works
  59. outside the desktop and while applications are not multitasking. The
  60. alternative of using a WIMP task that updates the pointer on null events was
  61. considered, but not used because it would result in jerky movements and slow
  62. the desktop down more.
  63.  
  64. The disadvantage to updating the pointer from an interrupt routine is that
  65. the SWIs that can be used are limited; for example it isn't possible to 
  66. redirect output to a sprite and use VDU operations to draw the pointer shape.
  67. To overcome these problems a set of primitive graphics operations have been
  68. implemented, including a subroutine that can plot a general polygon in
  69. any colour (including dithered patterns) from a list of coordinates. The
  70. complete pointer is plotted using just two operations - the first fills the
  71. central dark blue area, and the second draws the cyan border using the same
  72. list of coordinates.
  73.  
  74. The desktop uses several different pointers in addition to the standard
  75. shape, such as the double-click pointer, a caret for writable icons, and a
  76. menu for pop-up menu buttons. The pointer shape can be redefined using two
  77. SWIs: OS_SpriteOp 36 sets the pointer shape from a sprite, and OS_Word 21,0
  78. sets the shape from a raw bit pattern. Both of these SWIs are intercepted by
  79. module, performed by claiming SpriteV and WordV. When OS_SpriteOp 36 is
  80. called, the sprite name is checked against a list of known pointer names; a
  81. match results in the standard pointer being replaced.
  82.  
  83. The final problem with implementing the wobbly pointer in assembler is the
  84. lack of floating point support. To overcome this problem, all sections of the
  85. code that require real numbers have been written using fixed point values,
  86. with each 32 bit value split into half with 16 bits of integer and 16 bits of
  87. fraction. However, high accuracy is not required for this application, so
  88. some of the calculations have been implemented for speed and simplicitly
  89. rather than for precision.
  90.