home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / u / unimode2 / !UniMode2 / Manuals / Hints < prev    next >
Encoding:
Text File  |  1994-06-09  |  12.7 KB  |  271 lines

  1.  Hints and Tips         (Programmer's Guide)
  2.  ==============
  3.  
  4. Below is a compilation of hints and notes that, we think,  may be of value.
  5.  
  6. As we were developing and experimenting with this package we gradually built
  7. this library of general knowledge and tips. They are in random order, added
  8. to the manual as we encountered them.
  9.  
  10. Some of the Hints and Tips have been updated for !UniMode2 and RISCOS 3.1
  11.  
  12. If not specified otherwise PixelRate is expressed in kHz
  13.  
  14. * When a MDF is loaded by UniMode the ID Text is automatically displayed.
  15.   This can be a nuisance if you have a *ModeLoad in a !Boot or !Run file. To
  16.   get around this use the following syntax (mind the spaces!):
  17.  
  18.         *ModeLoad <filename> <mode#> { > null: }
  19.  
  20.   This will redirect the output of the command towards the electronic
  21.   hunting fields.
  22.  
  23. * A Broadcast Standard Display Mode (BSDM) is specifically designed for
  24.   Standard50Hz monitors (MonitorType 0) and has the following
  25.   specifications:
  26.  
  27.         ¤ linefrequency       : 15625    Hz
  28.         ¤ rasterfrequency     :    50    Hz
  29.         ¤ line time           :    64   µs
  30.         ¤ HSYNC               :     4.5 µs
  31.         ¤ HorizontalBackPorch :     5.8 µs
  32.         ¤ HorizontalFrontPorch:     1.3 µs
  33.         ¤ VCR                 :   312    lines
  34.         ¤ VSYNC (=VSWR)       :     3    lines
  35.         ¤ VerticalBackPorch   :    15    lines
  36.         ¤ VerticalFrontPorch  :    10    lines
  37.  
  38.   Refer to the MDS 'DIY_BSDM' for an example of how to make your own BSDM.
  39.  
  40.   Other modes must obey the monitor's specs. Look for them in your manual.
  41.  
  42. * Both porches, front and back, are with respect to the SYNC-pulse. Thus
  43.   the frontporch is between the end of the border and the start of
  44.   the SYNC-pulse of the next line (flyback). The backporch is between the
  45.   end of the SYNC-pulse and the start of the border.
  46.  
  47. * All registers and variables must be correctly programmed, to obtain a
  48.   useable mode and all depend on each other.
  49.  
  50. * Normally a character is 8 by 8 pixels. This means that if you want
  51.   RISC OS to print readable characters, you should use multiples of 8
  52.   pixels and lines when defining the width and height of the active
  53.   display.
  54.  
  55. * Use the ID to give a short description of the mode, and the date you
  56.   made it.
  57.  
  58. * Linefrequency = the number of times a horizontal line is written by the
  59.   monitor per second.
  60.  
  61. * Rasterfrequency = the number of times a complete screen is written per
  62.   second.  It should at least equal 50Hz, otherwise the screen will become
  63.   flickery. There is a utility included: 'TimeRaster' to measure the
  64.   rasterfrequency of the current mode. You can also calculate it with this
  65.   formula:
  66.  
  67.               PixelRate * 1E3
  68.               --------------- = Rasterfrequency
  69.                  HCR * VCR
  70.  
  71.  
  72.  
  73. * A pixel is not necessarily part of the active display. To define the
  74.   H-registers, the unit pixel is also used. In this case only the time a
  75.   pixel takes is important. Only pixels part of the active display can be
  76.   given another colour (apart from the one-coloured border).
  77.  
  78. * The active display is that part of the entire screen that can be seen
  79.   and changed by other programs. It is the part you usually work on.
  80.  
  81. * For those of us who cannot afford a VidcEnhancer, there might be a
  82.   software solution: when the original mode has a pixelrate of 8000, 12000
  83.   or 16000 kHz you can 'turn on' your 'VidcEnhancer' by changing these
  84.   values to resp. 12000, 16000 or 24000. 12000 kHz modes can be changed to
  85.   16000 kHz, and so use a higher scanrate, but the the Enhancer-on-off-ratio
  86.   of 1.5 is not reached.
  87.  
  88. * [VCR]...[HCR] gives you a rectangle. Within this rectangle the actual
  89.   mode is programmed.
  90.  
  91. * When you are designing a new mode you can save yourself a lot of work
  92.   if you use the definition of an existing mode. Especially RISC OS modes
  93.   are very suitable. Simply take the definition of a mode that looks like
  94.   what you want and change the appropriate registers and/or variables.
  95.  
  96. * The HSWR is the register which is the most difficult to define. The
  97.   HSYNC must be long enough so that the DMA Address Generator in the MEMC
  98.   can reset the screen pointer. This takes 2125ns. You can therefore
  99.   calculate the minimum value that must be programmed into the HSWR with
  100.   the following formula:
  101.  
  102.               2125 * PixelRate
  103.       HSWR =  ----------------    (Round up to the next integer)
  104.                    1E6
  105.  
  106.   During the HorizontalBackPorch the Video FIFO needs to load at least
  107.   one word 4 pixel-times before the display starts. The length of the
  108.   HorizontalBackPorch can be calculated with:
  109.  
  110.               1437 * PR + 4000
  111.               ---------------- = HorizontalBackPorch
  112.                     1000           (Round up to the next integer)
  113.  
  114.   These values are needed to calculate the HBSR as follows:
  115.  
  116.       HBSR = HSWR + HorizontalBackPorch
  117.  
  118.   NOTE: IF your machine has a faster MEMC (i.e.> 8 MHz ) you might be able
  119.         to program the HSWR with a lower value without any problems. The
  120.         compiler will still give a warning and the MDF may not give a good
  121.         result on other machines. The minimum value suggested by the
  122.         compiler ensures that the MDF works on almost all machines. Keep
  123.         also in mind that the HSWR must be long enough for the monitor to
  124.         synchronize to it as well !!
  125.  
  126. * If you want UniMode to 'intelligently' switch the VidcEnhancer on
  127.   whenever you select the mode, make sure that the rasterfrequency of this
  128.   mode is less than 50Hz (with the VidcEnhancer switched off).
  129.   You can (sometimes!) do this by increasing the HCR and/or VCR. After
  130.   that you may have to re-align the display by changing the other
  131.   registers also. Remember, that this method is not guaranteed to work and
  132.   you may not like the result. Alternatively, try adjusting the <high> and
  133.   <low> threshold values with *Vidc Threshold (see the maual)
  134.  
  135. * 8 MHz; 1 bpp modes (with VidcOff) are not supported by the VIDC-chip.
  136.   Sometimes however you may be able to display them if you switch the
  137.   VidcEnhancer On and Off again.
  138.  
  139. * You can use ARMBE (the ARMBasicEditor) with your favourite mode if you
  140.   load the ModeDescriptionFile at modenumber 32. Then setup the ARMBE to
  141.   use mode 32. Make sure that you have enough ScreenMemory available and
  142.   that the MDF has been loaded prior to entering the BasicEditor or the
  143.   BasicEditor will re-configure the mode used to 0. This works because
  144.   mode 32 is not used by RISC OS. The ARMBE can only use RISC OS modes. To
  145.   ARMBE mode 32 is a RISC OS mode. This way you can fool ARMBE into using
  146.   a soft-mode without ARMBE knowing about it.
  147.  
  148. * When you save an MDS you drag the Textfile-icon to a directory-viewer.
  149.   Alternatively, you can drag the icon to an icon bar icon. If the
  150.   application (eg. !Edit) supports data-transfer via Wimp$Scrap the MDS
  151.   will be automatically loaded into the application.
  152.  
  153. * Usually Log2BPP and Log2BPC will contain the same value.
  154.  
  155. * It is our experience that people will try to define a mode which
  156.   takes their own monitor to it's very limits (Eg. The highest or lowest
  157.   rasterfrequency possible; or a very wide display that only just fits).
  158.   Although this is perfectly "legal" in your own case remember this:
  159.   Not all monitors have the same specs. And the MDF you created may not
  160.   work properly on other monitors.
  161.  
  162. * Do you see flickering pixels in the upper-left corner of the display?
  163.   Does the first display-line behave "strangely"?
  164.   These are the telltale signs of a (too) short HorizontalBackPorch. As
  165.   explained, the HorizontalBackPorch must be long enough to allow the
  166.   Video FIFO to load one word four pixel-times BEFORE the display starts.
  167.   If the HorizontalBackPorch is too short this word will not have been
  168.   loaded into the Video FIFO resulting in the first few pixels not being
  169.   displayed properly.
  170.  
  171. * While experimenting you may discover that your monitor can display modes
  172.   with a rasterfrequency higher than the specifications of your monitor
  173.   given by the manufacturer. Your monitor's manufacturer had a good reason
  174.   for those specifications, so stick to them. We can't tell what might
  175.   happen...
  176.  
  177. * What to do if the VidcEnhancer does not respond.
  178.   1. Check the *HardwareRevision set and adjust it to yours.
  179.   2. Check if there are any modules providing modes or controlling the
  180.      enhancer are loaded (except UniversalMode). *RMKill them, perhaps you
  181.      might like to Extract some modes from the modules first.
  182.   3. You may have a Watford VidcEnhancer. We don't know how to control it.
  183.      If you DO know how to do this let us know and we'll send you an update.
  184.   4. You may have a VidcEnhancer that we have never heard of. Let us know.
  185.  
  186. * On some monitors the colour white may appear to be somewhat yellowish.
  187.   You may want to improve the visual appearance of white. There is a trick
  188.   that is used in the paper-making industry to make paper appear more
  189.   white, the same trick is also used by many people when they do their
  190.   laundry. The trick is to add some blue to the whites. The visual
  191.   appearance of white with a teint of blue is: "Whiter than white" as they
  192.   say in washing-powder commercials. How do you implement this trick on
  193.   your desktop? It's easy:
  194.  
  195.       1. Click SELECT over the palette icon on the icon-bar.
  196.       2. Click SELECT over the colour white (colournumber 0)
  197.       3. Reduce the amount of red by one unit.
  198.       4. Reduce the amount of green by one unit.
  199.       5. Wait a few seconds for your eyes to adjust.
  200.  
  201.   You may want to save this palette to a convenient spot (the
  202.   Library-directory perhaps?) on your boot-disk and include the filename
  203.   into your !Boot file. Thus, these settings will be loaded whenever you
  204.   start your computer. NOTE, however, that this does not work on 256
  205.   colour modes because a different method of colour selection is used
  206.   here.
  207.  
  208. * It is possible to load an MDF on a RISC OS mode (= Overlay). However, you
  209.   can not change the BaseMode or the variables in the WorkspaceList. This
  210.   can be useful if you have to change your monitor's vertical and/or
  211.   horizontal adjust when you change modes or if a mode is displayed
  212.   unsteadily. You might want to increase the rasterfrequency to stabilise
  213.   the display. Or you could adjust some of the VIDC registers to center the
  214.   modes on the display, so that you never ever have to adjust your monitor
  215.   again.
  216.  
  217. * The Dutch ministry of "Sociale Zaken en Werkgelegenheid" has published some
  218.   tips and general knowledge about the (ergonomic) use of Video Display
  219.   Units (VDUs or monitors). We have enclosed some of these pointers below
  220.   and enhanced them a bit:
  221.   1. There is no danger in the radiation emitted from a VDU. People who
  222.      work with a VDU all day and sit at a distance of approximately 50 cm
  223.      from it, receive annually a dose of radiation hundreds of times less
  224.      than the amount of radiation they receive through natural causes.
  225.   2. Sound generated by a VDU usually has a frequency of about 15 kHz.
  226.      This tone can sometimes be very annoying and should therefore not
  227.      exceed 25 dB.
  228.   3. The display should not flicker. To achieve this a rasterfrequency of
  229.      at least 50 Hz is required for displays that have a light text on a
  230.      dark background. A rasterfrequency of at least 70 Hz is advised for
  231.      displays that have a dark text on a light background. The latter, by
  232.      the way, is the natural way our eyes and brains are used to reading
  233.      text, so you might want to consider changing the settings of your
  234.      text-editors to display black (7) text on a white (0) background.
  235.      However, if the lighting of the workplace comes below 100...200 lux
  236.      white text on a black background is advised.
  237.   4. Lighting of the workplace must be sufficient (Approximately 500 lux)
  238.   5. Shiny or light emitting objects should not be reflected in the
  239.      display. Position the display at right angles with any window(s) or
  240.      shield the window(s). Displays that use dark text on a light
  241.      background generally suffer less from reflections.
  242.  
  243. * If you discover any bugs or if you encounter difficulties which you
  244.   cannot solve or if you have any questions, the authors would greatly
  245.   appreciate hearing from you. It is our policy to give users all the
  246.   support that we can give. Keep in mind that more (clearer) information
  247.   supplied to us increases your chances of satisfaction. If you send us a
  248.   disc containing the offending MDF, MDS or utility and a clear
  249.   description (maybe even a log-file?) of the problem we will most
  250.   certainly try to solve your problem. Since we only have a low budget;
  251.   including some stamps (or cash to buy them) will guarantee you the
  252.   return of your disc.
  253.  
  254.   We can be reached at:
  255.  
  256.   Jean-Piërre Hendrix
  257.   Kanaalstraat 33
  258.   5104 AA Dongen
  259.   The Netherlands
  260.  
  261.   or
  262.  
  263.   Maurice Hendrix
  264.   Bergeijkstraat 17
  265.   5043 BD Tilburg
  266.   The Netherlands
  267.  
  268.   If you have acces to e-mail you can also reach us on the InterNET at:
  269.  
  270.                         MHE@gpa.fuji-ef.nl
  271.