home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_09 / EPGP092C.LZH / TOS2GEM / TOS2GEM.TXT < prev   
Text File  |  1995-09-10  |  20KB  |  428 lines

  1. Brief documentation for TOS2GEM dated 26.07.1995, position at 03.08.1995
  2. ========================================================================
  3.  
  4.  1. What is TOS2GEM?
  5.  -------------------
  6.  TOS2GEM is an Auto folder program which GEM applications can access in 
  7.  a flexible way to display the output from TOS and TTP programs as VDI 
  8.  text in a Console window.
  9.  TOS2GEM makes the ideal Console window for use with shells or alternative 
  10.  desktops and saves the programmer some effort!
  11.  
  12.  TOS2GEM was principally designed for use under Single TOS and although it 
  13.  runs fine under Geneva, MagiC and MultiTOS its use there is limited as 
  14.  under these systems TOS programs run in windows anyway (if they have been
  15.  started correctly).
  16.  
  17.  The most important TOS2GEM features at a glance:
  18.  - Gives prorammers a clean way of redirecting the output of TOS/TTP type 
  19.    programs into a GEM window.
  20.  - Simulates TOS screens of various sizes (not just boring 80x25) that may 
  21.    optionally be only partly visible.
  22.  - Works with all monospaced fonts irrespective of size.
  23.  - Optional output buffer allows faster output than with GEMDOS/BIOS (only
  24.    for SingleTOS/MagiC).
  25.  - Optional scroll-back buffer allows output to be reviewed.
  26.  - Offers almost complete VT52 emulation (colour sequences optional only)
  27.  
  28.  
  29.  2. Installation
  30.  ---------------
  31.  Copy TOS2GEM.PRG to the Auto folder of your boot partition. TOS2GEM 
  32.  installs a Cookie during booting which programmers can use to control 
  33.  some of TOS2GEM's functions. TOS2GEM.PRG can also be run from the desktop.
  34.  
  35.  
  36.  3. What is T2GRESET.PRG?
  37.  ------------------------
  38.  Programs must reserve TOS2GEM for themselves; until released other 
  39.  programs cannot make use of TOS2GEM.
  40.  If a program which had reserved TOS2GEM crashes or is exited without 
  41.  releasing TOS2GEM, you can use T2GRESET.PRG from the desktop to release 
  42.  TOS2GEM. It's not a good idea to run T2GRESET.PRG if an application 
  43.  which has reserved TOS2GEM is still running, as this inevitably causes 
  44.  serious complications.
  45.  Signs that a lock-up has taken place are if no program using TOS2GEM will
  46.  run, and a newly-started one reports that it cannot make a reservation.
  47.  
  48.  
  49. 4. What is T2G_INTR.PRG?
  50.  ------------------------
  51.  Since the beta-version dated 09.07.1995, TOS2GEM uses the vertical-blank 
  52.  interrupt during time-controlled buffering to trigger screen refreshes 
  53.  even when there has been no TOS-output for some time (previously checks 
  54.  for exceeding the given period were only made during output). If this 
  55.  should unexpectedly lead to problems (e.g. unexplained crashes while 
  56.  output redirection is active), one can use T2G_INTR.PRG to switch off the 
  57.  use of this interrupt (and to switch it on again, if desired, by running 
  58.  the program a second time). If one wishes or needs to disable the use of 
  59.  the VBL interrupt permanently, then T2G_INTR.PRG should be placed 
  60.  physically after TOS2GEM.PRG in the AUTO folder.
  61.  
  62.  Important: Those who have previously included the mini-package of TOS2GEM 
  63.  (see Section 9) with their programs mustn't overlook the fact that 
  64.  T2G_INTR.PRG has now been included in this package!
  65.  
  66.  
  67.  5. What are T2G_TEST.PRG and PRIME_NO.TOS? 
  68.  ------------------------------------------
  69.  (These have been renamed from the German T2G_BSP.PRG and PRIMZAHL.TOS so 
  70.  that the titles indicate their purpose better to English-speaking users).
  71.  Since it is difficult to visualise from the theoretical description of 
  72.  TOS2GEM operation what the program actually does, I wrote a small test 
  73.  program (namely T2G_TEST.PRG, meaning TOS2GEM-test). These two programs 
  74.  are incidentally not contained in the mini-package (see Section 9).
  75.  
  76.  After starting the test program (TOS2GEM must of course have been started 
  77.  first) a dialog box appears in which one can input the dimensions of the 
  78.  TOS screen that TOS2GEM is to simulate, and the maximum area that is to 
  79.  be visible. One can also choose here whether and how output buffering and 
  80.  colour support of TOS2GEM is to be used. Following this a corresponding 
  81.  window will be opened (already using the TOS2GEM redirection) into which 
  82.  the realised dimensions will be written.
  83.  
  84.  Immediately after this the PRIME_NO.TOS program (that has to be in the 
  85.  same directory) will be started; it can execute simple prime number 
  86.  calculations using the 'Sieve of Eratosthenes' method (one can also use 
  87.  any other TOS program, it just has to be re-named to PRIME_NO.TOS and 
  88.  placed in the correct directory). To use it, just follow the prompts; 
  89.  note that you have to type 'j' for 'Yes' (which in German is 'ja').
  90.  
  91.  After ending the prime number program one can move the window, into which 
  92.  the output was redirected cleanly, around the screen. Clicking on the 
  93.  Closer symbol at top left quits the program. A click inside the window 
  94.  area brings up an alert box offering three options: 'Resize' permits 
  95.  altering the TOS2GEM window area (with the same dialog that appeared at 
  96.  the start; during this the whole screen will be cleared if its total size 
  97.  is changed). With 'Rerun' one can start PRIME_NO.TOS again, while 
  98.  'Nothing' does just that...
  99.  
  100.  The test program has been kept simple deliberately, partly so one can see 
  101.  that TOS2GEM support is quite easy to realise. Not all the options of 
  102.  TOS2GEM are demonstrated (in particular, neither multiple fonts in 
  103.  various sizes are used nor is a scroll-back buffer implemented), but 
  104.  there should still be enough to illustrate the opportunities that TOS2GEM 
  105.  offers.
  106.  
  107.  Those who would like to have the source code in order to get a concrete 
  108.  picture of what TOS2GEM support involves should apply to me (see below).
  109.  Since the source has now been extensively commented (in German!) and a 
  110.  number of library functions have been included directly so that it can be 
  111.  compiled on its own, it has grown to a stately 46 kB in the meantime. 
  112.  However the portion needed only for TOS2GEM support is relatively small 
  113.  (not including the comments), so don't be frightened...
  114.  
  115.  
  116.  6. Where is the programmers documentation?
  117.  ------------------------------------------
  118.  It's still not quite complete at the moment. I have decided to release 
  119.  the hypertext with information (not only) for programmers in its still 
  120.  incomplete form, since it has now become at least half-way usable. 
  121.  To view it you need ST-Guide by Holger Weets, who I wish to thank once 
  122.  more here for this wonderful tool.
  123.  
  124.  In addition, those who understand German will find articles in 
  125.  ST-Computer magazine for 04/95 and 05/95 very helpful. Furthermore it is 
  126.  suggested that all programmers should take a look at the TOS2GEM library 
  127.  from Dirk Klemmt (klemmt@stud.uni-frankfurt.de) for Pure and Gnu C, 
  128.  since this makes the use of TOS2GEM childishly easy. A short overview of 
  129.  its capabilities can be obtained from ST-Computer 05/95. Those wanting to 
  130.  know more should approach Dirk, since I have had little or nothing to do 
  131.  with the library itself.
  132.  
  133.  
  134.  7. INSPECT.TTP
  135.  --------------
  136.  This tiny program serves as an aid for programmers who want to write 
  137.  applications with TOS2GEM support. You will find more about this in the 
  138.  text and hypertext files.
  139.  
  140.  
  141.  8. Disclaimer
  142.  -------------
  143.  Although TOS2GEM and the associated utilities have been carefully 
  144.  programmed and thoroughly tested I cannot guarantee that no bugs remain. 
  145.  Therefore I cannot guarantee either the fault-free operation of TOS2GEM, 
  146.  nor its fitness for any particular purpose. You use TOS2GEM at your own 
  147.  risk!
  148.  
  149.  I, Thomas Binder, do not accept any liability or responsibility for any 
  150.  direct or indirect damage that may arise, either financial, material or 
  151.  any other kind, from either the use or misuse of TOS2GEM and its 
  152.  associated applications, utilities and documentation.
  153.  
  154.  All trademarks mentioned in the TOS2GEM documentation are acknowledged 
  155.  and recognised.
  156.  
  157.  
  158.  9. Distribution of TOS2GEM
  159.  --------------------------
  160.  TOS2GEM is freeware and may be copied and used freely. However 
  161.  distribution may take place only in one of two variants, where all the 
  162.  named files have to be copied unchanged in each case (archiving is 
  163.  permitted):
  164.  
  165.  a) Complete package
  166.  Contains TOS2GEM.PRG, T2GRESET.PRG, T2G_INTR.PRG, TOS2GEM.H, TOS2GEM.TXT, 
  167.  T2G_TEST.PRG, PRIME_NO.TOS, INSPECT.TTP, TOS2GEM.HYP and TOS2GEM.REF. 
  168.  This package is mainly intended for distributing TOS2GEM on its own (when 
  169.  it is not included with another program).
  170.  
  171. b) Mini-package
  172.  Contains only TOS2GEM.PRG, T2GRESET.PRG, T2G_INTR.PRG and TOS2GEM.TXT. 
  173.  This variant should only be used when one wants TOS2GEM to accompany a 
  174.  program that requires it.
  175.  
  176.  Those who have developed their own programs that need or support TOS2GEM 
  177.  may include TOS2GEM in their program package (in one of the  above-
  178.  mentioned forms) under the following conditions:
  179.  
  180.    - TOS2GEM must be copied to its own folder
  181.    - The documentation or the program must contain instructions for 
  182.      using TOS2GEM
  183.    - It must be clear from the documentation that TOS2GEM is a separate, 
  184.      free-standing utility developed by me, and that it does not belong 
  185.      to the actual program.
  186.  
  187.  Furthermore I would be most grateful if you would send me a sample of the 
  188.  program.
  189.  
  190.  
  191.  10. Contact with the author
  192.  ---------------------------
  193.  For those who have found errors, would like the test program source code, 
  194.  need help with programming TOS2GEM applications, want to express praise, 
  195.  criticism or simply to chat, here are my details:
  196.  
  197.  Thomas Binder
  198.  Johann-Valentin-May-Strasse 7
  199.  64665 Alsbach-Haehnlein
  200.  Germany
  201.  
  202.  InterNet: binder@rbg.informatik.th-darmstadt.de
  203.  IRC: Gryf
  204.  
  205.  Please include a disk and SAE (Self Addressed Envelope) along with either 
  206.  an International Reply Coupon or a second disk, or be in a position to 
  207.  receive binaries via E-mail. You should also state whether you want the 
  208.  old or new source for T2G_BSP.TOS (renamed T2G_TEST.TOS in English). In 
  209.  the new version a somewhat more complicated, but multi-tasking friendly 
  210.  method is used for control, whereas the older version proceeds 
  211.  'conventionally'. The new version is recommended only for those that 
  212.  already have some experience with TOS2GEM! For beginners I recommend the 
  213.  older source code.
  214.  
  215.  TOS2GEM has taken a considerable amount of my free time to develop and 
  216.  if you'd like to contribute to ensure I continue to support the Atari 
  217.  platform please don't hesitate to do so! This is aimed particularly, but 
  218.  not exclusively, at those that want to support TOS2GEM in their own 
  219.  programs.
  220.  
  221.  My banking arrangements are:
  222.  Dresdner Bank AG Frankfurt am Main
  223.  Account No: 9 024 050 00
  224.  Sort code: 500 800 00
  225.  
  226.  Thanks a lot!
  227.  
  228.  
  229.  11.British support
  230.  -------------------
  231.  British support for the English-language version of TOS2GEM  is provided 
  232.  by Denesh Bhabuta at:
  233.  
  234.    CyberSTrider
  235.    203 Parr Lane
  236.    Unsworth
  237.    Bury
  238.    Lancashire
  239.    BL9 8JW
  240.    
  241.  He will be pleased to accept any contributions on behalf of the  TOS2GEM 
  242.  author gratefully,  sent by Sterling or Euro-cheque, International Money 
  243.  Order or Postal Order; a minimum of £6 is recommended.
  244.  
  245.  Denesh also supports other Freeware and Shareware,  much of it of recent 
  246.  German origin. He may be contacted by E-mail at:
  247.  
  248.    dbhabuta@cix.compulink.co.uk      or
  249.    danny@micros.hensa.ac.uk
  250.  
  251.  
  252.  12. What programs support TOS2GEM?
  253.  ---------------------------------
  254.  Currently three main programs use TOS2GEM as Console windows:
  255.  - POVSHELL v1.3 onwards, programmed by Dirk Klemmt:
  256.    Email: klemmt@stud.uni-frankfurt.de
  257.  - Thing alternative desktop, programmed by Arno Welzel:
  258.    Email: aw@zaphot.augusta.de
  259.  - The shell Easy-PGP by Manfred Ssykor:
  260.    Email: msy@lafp.tng.oche.de
  261.  
  262.  Other programmers are interested but until I'm 100% certain we'll leave 
  263.  it at that.
  264.  
  265.  At this time I would like to repeat an open call to all who have 
  266.  previously shown an interest: Let's hear from you! I would be glad of 
  267.  some more feedback so that I know whether and what things you are 
  268.  programming with TOS2GEM.
  269.  
  270.  
  271.  13. Credits and thanks
  272.  ----------------------
  273.  The following people either directly or indirectly took part in the 
  274.  development of TOS2GEM (in alphabetical order):
  275.  - Alexander Clauss
  276.  - Joe Connor
  277.  - Frank Danapfel
  278.  - Dirk Klemmt
  279.  - Harald Schönfeld
  280.  - Thomas Schulze
  281.  - Manfrd Ssykor
  282.  - Arno Welzel
  283.  
  284.  In addition I would like to thank all those who have been willing to send 
  285.  me a contribution for TOS2GEM.
  286.  
  287.  
  288.  14. Outloook for further development of TOS2GEM
  289.  -----------------------------------------------
  290.  Up to now there have been problems when one uses TOS2GEM and Gemini 
  291.  together (not fundamentally, but in certain situations - see hypertext). 
  292.  To overcome this will be the next step.
  293.  
  294.  Oh yes, sometime I should also finish writing the docs....
  295.  
  296.  
  297.  15. History
  298.  -----------
  299.  This history only contains the changes since the last pre-release 
  300.  beta-version of TOS2GEM, since otherwise it would be a bit long...
  301.  
  302.  TOS2GEM dated 26.07.1995:
  303.     - Stupidly the MiNT cookie was only interrogated when starting  
  304.       TOS2GEM, therefore TOS2GEM also used buffering under MiNT if it 
  305.       was started first (the recognition of input calls doesn't work with 
  306.       MiNT, therefore one must not buffer).
  307.     - The TOS2GEM test program now uses the option to reserve TOS2GEM 
  308.       really only when required. One can therefore start it repeatedly  
  309.       (with multi-tasking), as TOS2GEM is not permanently engaged.
  310.  
  311.     TOS2GEM-beta dated 09.07.1995:
  312.     - A number of errors and inadequacies with the 'stats' evaluation 
  313.       removed.
  314.     - With time-controlled buffering TOS2GEM now uses the VBL-interrupt, 
  315.       to trigger a screen refresh even when there has been no TOS-output 
  316.       for some time (previously checks for exceeding the set period were 
  317.       only made during output).
  318.     - New file 'T2G_INTR.PRG' that switches on and off the use of the 
  319.       interrupt in cases when problems arise.
  320.     - With buffering active TOS2GEM now also empties the buffer when the 
  321.       visible area is moved.
  322.  
  323.     TOS2GEM dated 21.06.1995:
  324.     - New 'stats' Cookie-element, in which the contents of several 
  325.       internal variables are stored when output redirection is not 
  326.       activated so that they can be read out later (more about this in the 
  327.       docs).
  328.  
  329.     TOS2GEM-beta dated 01.06.1995:
  330.     - During initialisation of the text buffer, setting of null-bytes for 
  331.       line-ends was left out (the source line seems to have got lost when 
  332.       colour support was added...)
  333.  
  334.     TOS2GEM-beta dated 11.05.1995
  335.     - Serious error under MiNT removed: Due to carelessness in the source,
  336.       buffering also took place under MiNT, though input recognition does 
  337.       not work in that case.
  338.     - TOS2GEM can now also use time-controlled output buffering; with 
  339.       this, screen refreshes take place at pre-set time intervals. This is 
  340.       achieved by negative values in the 'buffer_output' Cookie-element.
  341.     - Line redraw in colour mode has been converted to a 'flicker-free' 
  342.       method, which, though a little slower, is kinder on the eyes.
  343.  
  344.     TOS2GEM-beta dated 07.04.1995
  345.     - TOS2GEM can now also handle colour sequences (in which I also 
  346.       include those for inverted video)!  The new 'color' Cookie-element 
  347.       determines the type of colour support (compatible or VDI- 
  348.       conforming). More about this in the HYP doc, which has now been 
  349.       released.
  350.     - Under SingleTOS, TOS2GEM output buffering now also uses a timer 
  351.       triggering a refresh after 500 ms for Bconstat calls. Thanks to 
  352.       this, TOS programs that interrogate the keyboard via Bconstat/Bconin 
  353.       will work correctly (e.g. SYSOK). Under MagiC this is unnecessary, 
  354.       as there the buffer will be cleared at each Bconstat call anyway.
  355.  
  356.     TOS2GEM dated 24.03.1995
  357.     - Since I was informed in a bug report that the TOS2GEM Cookie was 
  358.       still present after a reset, TOS2GEM now also hooks into the reset 
  359.       vector to clear the Cookie pointer even when it only has to extend 
  360.       the Cookie-jar. I hope that this has removed the problem (I couldn't 
  361.       reproduce it).
  362.     - With output buffering active, a refresh is now also performed when 
  363.       the screen contents have (internally) moved by the window height. 
  364.       Thanks to this, no output will get lost completely.
  365.  
  366.     TOS2GEM-beta dated 02.02.1995
  367.     - Keyboard input is recognised now also under MagiC, so that buffering 
  368.       is also possible with this operating system. Unfortunately it 
  369.       doesn't work with MiNT/MultiTOS (though here one is likely to forego 
  370.       TOS2GEM in favour of TOSWIN/MINIWIN, which natutally also applies to 
  371.       VT52 under MagiC). 
  372.     - Buffering could be improved once more, so that output is more than  
  373.       twice as fast as without buffering (this is in part faster than the 
  374.       standard GEMDOS/BIOS output).
  375.  
  376.     TOS2GEM-beta dated 31.01.1995(?)
  377.     - With the new 'buffer_output' Cookie element one can achieve 
  378.       buffering of the output, which results in a marked increase in 
  379.       speed. Unfortunately this only works under SingleTOS, as only there 
  380.       can TOS2GEM recognise keyboard output correctly (it is necessary to 
  381.       clear the buffer in this case, so one can recogise what should be 
  382.       input).
  383.  
  384.     TOS2GEM dated 19.01.1995
  385.     - If TOS2GEM had to create or extend the Cookie-jar, this was lost 
  386.       when output redirection was first activated as it lay in the same 
  387.       memory region as the VDI array.
  388.  
  389.     TOS2GEM dated 03.01.1995
  390.     - In re-activating output redirection via 'switch_output', the 
  391.       Y-offset was not adapted correctly. Since this was not an 
  392.       insignificant error, it is advisable to use at least this version 
  393.       (note the 'date' Cookie-element!) in programs in which the size of 
  394.       the TOS2GEM window can be altered.
  395.     - TOS2GEM.PRG now has the memory protection flag 'global' once again 
  396.       (I forgot it the last time, because the Pure C linker unfortunately 
  397.       can't do this (at least that of PC 1.0)).
  398.     - The header file has been improved: The constant RESERVED_SIZE now 
  399.       exists for the reserved field of the Cookie, specifying the size of 
  400.       this field.
  401.  
  402.     TOS2GEM dated 12.12.1994:
  403.     - A small error occurred during calculation of two internal variables 
  404.       that resulted in faulty scrolling in some circumstances (if only 
  405.       the first pixel row of a line was visible).
  406.     - TOS2GEM test example included in the 'large' archive, so that one 
  407.       can see what the purpose of TOS2GEM is and how it works. I hadn't 
  408.       thought of this at first (thanks to Dirk Klemmt, who brought this 
  409.       omission to my attention).
  410.  
  411.     TOS2GEM dated 22.11.1994:
  412.     - First official version, unfortunately without ST-Guide documentation 
  413.       (I wanted to release TOS2GEM at the proTOS...)
  414.     - A problem under MagiC that switches on the 'real' cursor for an 
  415.       'Fread' call for the console and completely misplaces the one for 
  416.       TOS2GEM has now been circumvented. Though the solution was not a 
  417.       'clean' one (write access to the negative LineA variables), I could 
  418.       not find any other reliable method.
  419.     - TOS2GEM now has a 'Global' memory protection flag, so that no 
  420.       problems arise in this respect with Mint/MultiTOS.
  421.  
  422.  
  423.  15. English translation
  424.  -----------------------
  425.  English version of this document by Joe Connor, with additions and 
  426.  corrections in various files by Peter West (who is also responsible for 
  427.  the hypertext translation).
  428.