home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1996 / ARCHIVE_96.iso / discs / utilities / utility_01 / tweaked / !CustomVDU / !Help < prev    next >
Text File  |  1992-04-06  |  15KB  |  329 lines

  1. NOTE: This Help-file has not been completed as yet. ThCh wants to put this on
  2.       Cryton now, so it will at least be better than nothing. I haven't got
  3.       the time to write much, so It'll be brief.
  4.  
  5.  
  6.                        Help file for CustomVDU v. 1.24
  7.                        -------------------------------
  8.  
  9. CustomVDU was written when I eventually got tired of seeing 14 mode-modules
  10. being loaded at boot, not being able to center them by software, and making
  11. myself a second VIDC clock. That's why it provides (almost) complete control
  12. over the VIDC. Giving absolute freedom to control a rather versatile chip
  13. like this one unfortunately makes it almost impossible to restrict the
  14. possibilities to the useful ones. Therefore, it's very easy to obtain a lot
  15. of useless results, and you're advised to read the last section of this text
  16. (Hints) if you don't know video signals or the VIDC too well.
  17.  
  18. CustomVDU consists of an application and a module. To avoid confusion, I'll
  19. violate my own rules and call the application '!CustomVDU' in this text.
  20.  
  21.  
  22.  
  23.                      First time installation of CustomVDU
  24.                      ------------------------------------
  25.  
  26. When !CustomVDU starts, it will scan all modules for modes, so if you want
  27. to collect all your mode-modules in CustomVDU, make sure to load them
  28. beforehand.
  29.   Run !CustomVDU. This will load the CustomVDU module and start the
  30. application. You may see a brief hourglass, depending on the speed of your
  31. machine :-)
  32.   Click on the icon, and the main window will open.
  33.  
  34. ...
  35.  
  36.                                 'Modes' Window
  37.                                 --------------
  38.  
  39.   Initially the module will be empty, containing no mode-definitions.
  40.   In the main window, the white modes are undefined, the grey/blue ones are
  41. defined, and the darkgrey/green ones are both defined and will be included
  42. in the module you're making.
  43.  
  44.   You've probably got several mode-modules already, and if you want to
  45. include them, do the following:
  46.   Run all of them.
  47.   Start !CustomVDU, or if it's already running, select 'Update info' from
  48. the main menu.
  49.   Make sure that the info in 'Info' corresponds to your system.
  50.   Click on all the modes you want to include, so they're green.
  51.   Select 'Make module', and a save box will appear.
  52.   OK or Return will save the module in your System:Modules directory,
  53. otherwise drag the icon somewhere else.
  54.   Now you can forget about all the mode-modules and simply load CustomVDU at
  55. boot.
  56.  
  57.   Note1: If any of the modules were supposed to turn on an enhancer, you
  58. must tell CustomVDU to do likewise by editing the appropriate mode and
  59. selecting the proper vidc frequency (see below).
  60.   Note2: If you're booting a module to control the enhancer already, this
  61. will have to be killed. ('There Can Be Only One!')
  62.  
  63. ----
  64.  
  65.   If you press menu over a defined mode, the 'Mode xxx' submenu can be
  66. reached. Firstly 'Info':
  67.   It's a rather large window containing (almost) all information about the
  68. selected mode. Nothing can be edited here, but the window looks similar to
  69. the editable one, so it may be a good idea first to look at the info about
  70. some well-known modes before attempting to edit or make one yourself.
  71.   The info is not self-explanatory unless you know about video signals, but
  72. I'll make a complete explanation in this file, later.
  73.  
  74.   The 'Clone' submenu obviously makes a copy of the selected mode.
  75.   'Default' is only available for modes 0-21 & 23-28 and will simply reset
  76. the mode to the default design.
  77.   'Easy setup' was meant to become a quick way of setting up a mode, but I
  78. haven't implemented that yet.
  79.   'Single Mdl' will make a module containing the selected mode only. This is
  80. useful for including custom-modes into your own work etc., and later the
  81. application will be able to extract the mode-parametres from these modules.
  82.  
  83.  
  84.                                Editing a mode
  85.                                --------------
  86.  
  87.   Clicking Adjust on a mode will open the edit-window. This window contains
  88. all information about the mode, and may look a bit confusing at first. You'll
  89. get used to it when you learn where the relevant info is. I'll take it from
  90. the top.
  91.  The 'Mode xxx' is the mode number and cannot be changed.
  92.  The Pixel rate is the pixel rate i.e. the number of pixels per second. The
  93. possible pixel rates are calculated when you enter the enhancer frequency in
  94. the 'System Info' box. You can change it with the arrows.
  95.   (I'm not going to write that 50 times from now on, so you might as well
  96. hear it now: The arrows will increase and decrease the corresponding value
  97. unless it would become illegal and/or damage your monitor, in which case it
  98. will stay where it is.)
  99.   The left part of the window is the physical info which is sent to the
  100. VIDC.
  101.   The right part are the logical values, which Risc-Os knows about.
  102.   In most cases these parts will reflect similar values, but it's sometimes
  103. useful for them to differ (e.g. double-pixel modes, character enlargement/
  104. reduction etc.) Because of this, the 'Get from physical' button is very
  105. important and often used. It will read the physical values, assume a lot of
  106. things, and generate some logical ones. Because of the assumptions, it might
  107. not be what you wanted, but usually it will.
  108.   Below is the actual VIDC register values. Most of these corresponds to one
  109. or more of the values above and both will change when you alter one. Use of
  110. these obviously requires knowledge about the VIDC, I can't give you that now,
  111. but here's a list of the abbreviations:
  112.  
  113.    HCR: Horizontal Cycle Reg.
  114.   HSWR: Horizontal Sync Width Reg.
  115.   HBSR: Horizontal Border Start Reg.
  116.   HDSR: Horizontal Display Start Reg.
  117.   HDER: Horizontal Display End Reg.
  118.   HBER: Horizontal Border End Reg.
  119.    HIR: Horizontal Interlace Reg.
  120.    VCR: Vertical Cycle Reg.
  121.   VSWR: Vertical Sync Width Reg.
  122.   VBSR: Vertical Border Start Reg.
  123.   VDSR: Vertical Display Start Reg.
  124.   VDER: Vertical Display End Reg.
  125.   VBER: Vertical Border End Reg.
  126.     CR: Control Reg.
  127.       DMA: DMA request delay
  128.       Bpp: Bits per pixel
  129.      Rate: Clock division selection
  130.  
  131.   The 'Store' button will store the current values and you must remember to
  132. click here at least when you're finished, if you want to keep your edited
  133. mode.
  134.   The 'Undo' button is not a proper undo, it just recalls the last values
  135. stored. I.e. only press Store, when you've got some reasonable values.
  136.   The 'Instant effect' button requires a certain amount of knowlegde about
  137. what you're doing, if you don't want to end up with an even worse result.
  138. When this option is active, the display will change instantly when you alter
  139. a value. You'll get a totally garbled display if you alter anything
  140. important like the number of colours, but this feature is marvelous when it
  141. comes to centering the display etc. So use it with care. If you should end
  142. up with nothing usable on the screen, Escape will act like Undo, i.e. reset
  143. to the last values Stored. So press 'Store' when you've got a readable
  144. display only.
  145.   Note1: The instant effect uses a temporary mode (127), so don't change
  146. mode by any other means while it's active.
  147.   Note2: The width and height buttons resize the display and border
  148. symmetrically around the center with a step of 4 and 2 pixels. The vidc can
  149. do one half of this, and to get those values, alter the vidc registers
  150. yourself (HBSR,HDSR,HDER,HBER,VBSR,VDSR,VDER,VBER, see above). When the
  151. border would have gone beneath the display or on top of the syncs, the value
  152. won't change. This can be annoying if the display isn't centered yet, so if
  153. it happens, use the vidc-registers again.
  154.  
  155. A few Hints...
  156.  
  157.   The monitor-protection is only relevant for some multisync monitors. I've
  158. got a Philips CM8873, and it simply won't die. Most multisyncs should be
  159. able to cope with Hsync widths of 2 ╡s and above, so this is the default
  160. value. If you've got a normal monitor, a vga monitor or the CM8873 you can
  161. simply turn it off, otherwise the 'trial and scream' method is not exactly
  162. good, but the only one, as the critical values are almost never documented.
  163.  
  164.   Some astoundingly ugly displays can be generated from eg. mode 9 by
  165. setting 'Xcoords/pixel' and 'Ycoords/pixel' to 1. Might even be useful for
  166. some.
  167.  
  168.   When you're editing a mode, the following method is almost fool-proof
  169. (it's how I do it :-)
  170.  
  171.   1. Click 'Store'.
  172.   2. Repeat this:
  173.   3.   Adjust one or two parametres.
  174.   4.   Click 'Get from physical'
  175.   5.   Click 'Instant effect' on.
  176.   6.   Observe the incredible useless display.
  177.   7.   Click 'Instant effect' off.
  178.   8.   Click 'Store' if the display was readable.
  179.   9. Until you're satisfied.
  180.  
  181. When you're getting used to how the program behaves you may be able to hit
  182. the opposite button to the one that made the display fall over. Practice
  183. makes perfect.
  184.  
  185.   If your otherwise perfect mode appears shifted one or more chars to the
  186. left, try adjusting the DMA bits.
  187.  
  188.   If you want to use the desktop in a mode, ensure that the number of x-
  189. pixels is a multiple of 8. If the CLI or other VDU4 activity is going to
  190. work, the y-resolution must also be a multiple of 8.
  191.  
  192. --------------------------------------------------------------------------
  193.  
  194. Thanks to:
  195.   ThCh for useful reports and comments of use (!)
  196.   Brian (Brain) for additional tech hints and research.
  197.  
  198. --------------------------------------------------------------------------
  199.  
  200. This is PD, spread at will. I've got the copyright of the application and
  201. the modules generated though you're free to include the modules in a product
  202. of your own.
  203.  
  204. Please report any problems or comments through FidoNet to Thomas Olsson
  205. (2:231/86.1).
  206.  
  207.   All this software is provided "as is"; Thomas Olsson makes no warranty,
  208. express or implied, of the merchantability of this software or its fitness
  209. for any  particular purpose. In no circumstances shall Thomas Olsson be
  210. liable for any damage, loss of profits, or any indirect or consequential
  211. loss arising out of the use of this software or inability to use this
  212. software, even if Thomas Olsson has been advised of the possibility of such
  213. loss.
  214.  
  215. --------------------------------------------------------------------------
  216.  
  217.  
  218.                              Technical details
  219.                              -----------------
  220.                          
  221. The main program is written in Basic and is rather big, about 80K. In order
  222. to reduce dload time, disk space, load time, program memory, variable space
  223. and execution time, it's crunched. However, if you want to look at the
  224. program, perhaps for reasons of customising it even further, the source will
  225. be available from me, and probably soon from your nearest BBS too. I can't
  226. spread the cruncher as it's copyrighted, so if you've made major improvements
  227. to the program, please return it to me, and I'll release a new crunched
  228. version.
  229.  
  230. The technical info about the application which is not given above is too
  231. extensive to be included here, but the source is fairly readable (I think
  232. :-), nice long variables and routine-names (again an advantage in crunching)
  233. so if you usually feel good about reading other peoples programs, you'll
  234. have a fair chance here.
  235.  
  236. The module can do a few other things as well as providing your favourite
  237. modes. Commands and swi's follows; for further details you can find the
  238. module-source in the application sourcecode.
  239.  
  240. *WimpMode <mode>    will set the wimpmode to <mode> by issuing the
  241.                     SWI "Wimp_SetMode" with R0=<mode>
  242.                     There seem to exist a convention regarding that whoever
  243.                     is controlling the enhancer, has the responsibility to
  244.                     provide a 'WimpMode' command, so here it is.
  245.  
  246. *CustomOff          will remove all mode-grabbing activity etc. It's almost
  247.                     the same as killing the module, but you've still got
  248.                     the WimpMode command, and you can always use:
  249.  
  250. *CustomOn           which will wake the module up, and start controlling the
  251.                     vdu again.
  252.  
  253. Software interrupts.
  254. SWI base is &C1500, which is chosen at random among the user-swi's.
  255.  
  256. -----------------------------
  257.   SWI &C1500, "CV_WannaAlter"
  258.  
  259.   On entry:  R0 = Mode
  260.   
  261.   On exit:   R0 = -1 or 0  (Yes or No)
  262.              R1 corrupted
  263.              R3 = Pointer to VIDC list if Yes
  264.              R4 = Pointer to ModeVars if Yes
  265.              R5 = Enhancer status if Yes, otherwise corrupted
  266.              
  267.   This SWI is used to ask CustomVDU whether it is planning to modify the
  268.   mode given on entry by any means. If it is, the parametres which will be
  269.   given to the OS at the modechange service call are returned, along with
  270.   the on/off flag for the enhancer (0=Off).
  271.   If CustomVDU has been disabled using *CustomOff, this SWI will always
  272.   return 'No' in R0.         
  273.   Note: The enhancer flag has nothing to do with the actual value stored in
  274.   LatchB; the polarity and position of this bit is constant, and set at
  275.   assembly time from the 'Info' window.
  276.   
  277. ---------------------------  
  278.   SWI &C1501, "CV_TestMode"
  279.   
  280.   On entry: R0 = Mode to react upon (or -1 to disable testmode)
  281.             R1 = Pointer to VIDC list to use
  282.             R2 = Pointer to ModeVar list to use
  283.             R3 = Enhancer status to use
  284.             
  285.   On exit:  All registers preserved
  286.   
  287.   This SWI is used to (temporarily) set up a mode, usually for test
  288.   purposes. It is used by !CustomVDU when 'Instant effect' has been
  289.   activated, but can also be used by other programs as an easy way of
  290.   setting up a non-standard mode. The mode number can be anything from 0 to
  291.   127, or -1 to stop grabbing the mode.
  292.   The lists pointed to by R1 and R2 and the flag in R3 is copied into
  293.   CustomVDU's workspace, and thus need not to be preserved until the
  294.   modechange occurs.
  295.   No checks are made on the values in the lists, so you must be careful.
  296.   A useful way of doing this is by issuing "CV_WannaAlter" first to get a
  297.   proper list, and then modifying the appropriate values only.
  298.   
  299. ---------------------------
  300.   SWI &C1502, "CV_Enhancer"
  301.   
  302.   On entry: R0 = Status (-1=On, 0=Off)
  303.   
  304.   On exit:  All registers preserved
  305.   
  306.   This SWI will 'manually' turn the enhancer on or off.
  307.   
  308. --------------------------
  309.   SWI &C1503, "CV_SysInfo"
  310.   
  311.   On entry: R0-R5 = Whatever values you want thrown away
  312.   
  313.   On exit:  R0 = Pointer to 0-terminated monitor name
  314.             R1 = Protection level in ╡s
  315.             R2 = Enhancer presence (-1 or 0)
  316.             R3 = Enhancer frequency in MHz, fixed point before bit 16
  317.             R4 = LatchB mask
  318.             R5 = Bit polarity for turning the enchancer on
  319.             
  320.   This SWI returns some info about the system for which the module was
  321.   generated. It is exactly the same as given in the 'Info' window before
  322.   assembly. The number in R3 is fixed point, so if the frequency for example
  323.   is 33.5 MHz, R3 would become 33.5*&10000 or &00218000.
  324.   The enhancer mask is 1 in all bits except the one that controls the
  325.   enhancer.
  326.   The enhancer bit polarity is a sign (-1 or 0), if it's -1, the enhancer is
  327.   turned on by writing a 1 in the appropriate bit in LatchB.
  328.   
  329.