home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / utilities / utilsa / ctalldithr / info < prev   
Encoding:
Text File  |  1992-03-27  |  4.3 KB  |  111 lines

  1.                   RISC OS 3's ColourTrans (0.96)
  2.                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3.  
  4. This document describes:
  5.   How get ColourTrans 0.96 to dither in new programs
  6.   How to use the supplied fix to use dithering in old programs which don't
  7.   dither without modifying them
  8.   How to use ColourTrans 0.96 under RISC OS 2
  9.  
  10.  
  11. ColourTrans dithering
  12. ~~~~~~~~~~~~~~~~~~~~~
  13. The new version of ColourTrans can dither colours (mixing two colours on the
  14. screen by using small dots of each to give the impression of solid colour)
  15. to give a better approximation to the required colour. However, programs
  16. have to know about it to be able to use it.
  17.  
  18. All you have to do is set bit 8 of R3 before calling ColourTrans_SetGCOL or
  19. ColourTrans_SetOppGCOL, and as if by magic, your colour will be dithered.
  20.  
  21.  
  22. Getting old programs to use dithering
  23. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  24. It would be nice if older programs could use this new facility, but unless
  25. the program is written in BASIC, you can't change them. I have written a
  26. small 'patch' which intercepts (legally) all SetGCOL and SetOppGCOL calls
  27. and sets the relevant bit. To use it, just load the module 'ctAllDithr' by
  28. an RMLoad or double click. All applications will then use dithering. The
  29. module about 176 bytes long, and uses no workspace so you should be able to
  30. fit it in whatever machine you have.
  31.  
  32. However, it has limitations. Some colour selection boxes (like for fill
  33. colour in Draw) will not use dithering even if the patch is loaded. This is
  34. because these boxes use an alternative way of finding the colour which even
  35. the new version of ColourTrans cannot make to dither. However, you will
  36. usually find that the pictures drawn (eg draw files) will be dithered.
  37.  
  38. The effect of this patch is to make most graphics be dithered and some
  39. colour selection boxes.
  40.  
  41.  
  42. Using ColourTrans 0.92 under RISC OS 2
  43. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  44. It is possible to run the new version of ColourTrans under RISC OS 2 as long
  45. as the patch is used. First you must extract the module from a machine with
  46. RISC OS 3 (only A5000s at the moment). As I have no desire to break any
  47. copyright laws it is not supplied with this document - you will have to
  48. extract it for yourself.
  49.  
  50. To extract ColourTrans from ROM on an A5000 with RISC OS 3 (25 Sep 1991)
  51. (check this by typing 'fx 0' at the command line), type the following in at
  52. the command line to save the module to the current directory:
  53.  
  54. *Save Colours &038A5664 &038A8138
  55. *Settype Colours Module
  56.  
  57. This probably will not work with any other version of RISC OS 3 (ie the one
  58. for non-A5000s which hasn't been released yet). To extract the module, you
  59. will need to find the start and end addresses of the module. To do this, at
  60. the command line type 'modules'. You will get a list of the currently loaded
  61. modules.
  62.  
  63. The second column is the start position of the module in memory (the first
  64. number on the *save command above). The second number should be the start
  65. position of the NEXT module in the listing (NOT the number in the third
  66. column). As an example, here is part of the *modules listing:
  67.  
  68.  20 038A0E84 00000000  BASICTrans
  69.  21 038A4780 01803554  BufferManager
  70.  22 038A5664 01819CA4  ColourTrans        <<-- this is ColourTrans
  71.  23 038A8138 01803574  Debugger           <<-- and this is the next module
  72.  24 038AA548 01803764  DeviceFS
  73.  25 038AC29C 01803794  DragASprite
  74.       |        |         \- module name
  75.       |        \- ignore these numbers
  76.       \- these are the numbers you use
  77.  
  78. From this listing, you will get the *save command listed above.
  79.  
  80. If you do not understand the instructions above, get someone else who is a
  81. bit more familiar with RISC OS to do this for you.
  82.  
  83. Once you have an extracted copy of ColourTrans, load it into a RISC OS 2
  84. machine along with the patch, and you will get dithered colours. Load the
  85. patch AFTER the new ColourTrans.
  86.  
  87.  
  88. Disclaimer
  89. ~~~~~~~~~~
  90. I do not guarantee that either the patch or the extracted ColourTrans will
  91. work, and you use them at your own risk.
  92.  
  93. However, I have tested the patch thoroughly, and can see no reason why the
  94. new ColourTrans should not work. The patch has worked perfectly (bearing in
  95. mind the limitation described), and is so simple is it very unlikely it will
  96. go wrong.
  97.  
  98. Test the patch with all the applications which you will want to use it with
  99. before using it for real.
  100.  
  101.  
  102.  
  103.  
  104. Use and enjoy.
  105.  
  106.  
  107.  
  108. Ben Summers 27/2/92
  109.  
  110.  
  111.