                    ---------------------------------
                     VMG-4000   ET4000 Setup Program
                    ---------------------------------
                      (c) 1994, 1995 Andreas Winter

1. Introduction
---------------

The  VMG-4000  is  the  next  generation  of  a (too) long series of videomode
generators  for  the  ET 4000 graphic processor, which I startet together with
Thilo  Gaul.  I  think  that  this  program  allows even beginners to generate
videomodes  on  their own, although experts to get the best out of monitor and
graphic  card.  I  tried  to manage, that errors quickly can be corrected, but
this means also an attentive use for you. I can't give you any warranty!


2. Starting
-----------

First  you should connect the Atari monitor and the graphic card to your Atari
computer.  If  you  have  setups for the graphic card and your monitor you can
start the program VMG-4000.PRG by using the graphic card.

Fasten your seat belts :-)

If  you  start  the  program  the  very  first  time it will give you an error
message  (VMG-4000.CFG  not  found). Then follows a message that the "Hardware
does  not  respond".  This  doesn't  matter. It's just a note that the program
hasn't any information of your system yet. You can change this in a minute.

If  the  graphic  card  is  missing or anything else is wrong the program will
give  you  a hint. Nevertheless you can continue with the program. There is no
need to say, that you can't use the graphic card.

Now  you should save the setup. I hope that you are familiar with the usage of
GEM-programs.  That's  why  the  structure  of  the  document  is based on the
structure of the menu.


3. Structure of Menu
--------------------

VMG-4000
    About ...
        A short information about program and author

File
    New
        Create a new NVDIVGA.INF file
    Open
        Open an existing NVDIVGA.INF file
    Close
        Close current NVDIVGA.INF file and save
    Abandon
        Close current NVDIVGA.INF file without saving
    Reopen
        Open again current NVDIVGA.INF file (means: global undo)
    Save
        Save current NVDIVGA.INF file
    Save as ...
        Save current NVDIVGA.INF file with a new name
    Quit
        Quit the current NVDIVG.IN.... oops: QUIT the program :-)

Edit
    Cut
        Move selected modes to the clipboard
    Copy
        Copy selected modes to the clipboard
    Paste
        Paste the modes saved in the clipboard at the position of the cursor
        in the toplevel window

Mode
    New
        Automatic generation of a new mode (explained in 4.2)
    Open
        Open selected modes
    Close
        Close current mode and save in NVIVGA.INF if necessary
    Abandon
        Close current mode without saving
    Reopen
        Open again the current mode (means: local undo)
    Test
        Test the current or the selected mode
    About
        Information about the current or the selected mode

Window
    Rotate
        Top the bottom window
    <window 1>
        Top this window
    <window 2>
        ...

Option
    Monitor ...
        Dialog for setting up the monitor
    Hardware ...
        Select your graphic card
    Save Options
        Save options



4. More about the Dialogs
-------------------------

4.1 List of Modes

In  this dialog the modes are listed. You can select them by clicking the left
mousebutton  once.  If  you  doubleclick this mode will be opened. By pressing
the Shift key during the selection you can select several modes at once.

With  the  cursor  keys  you  can  move a cursor which is indipendent from the
selections. With the space key you can toggle the mode at the cursorposition.

Control-A  selects  all  modes,  Shift-Control-A  deselects  all modes. Return
openes the selected modes. I count on your cleverness to find out the rest.


4.2 Automatic generation of a new mode

Here  you set the name, resolution and so on, all the program needs for a good
mode  generation.  The  region  of  frequency is the one, you entered for your
monitor,  also the polarity of synchronisation signal (the program gives you a
hint).


4.3 Information Dialog

This  dialog  shows you the most important of the selected mode. Also here you
can change the name of the mode.


4.4   Edit Dialog
4.4.1 Buttons

- Undo: The last 42 changes can be cancelled (undo key).
- all Undo: The same as "Reopen" from the menu.
- RAM-Page: Swap the display of this window to the RAM-page (discussed below).
- Register...: Openes a new window with all registers of the ET4000 (discussed
        below).
- Synctest:  If  you continuesly  press this  button the timing of the current
        mode  will be used. If you release this button a save setting for your
        monitor  will  be  transferred  to  the  ET4000.  This setting depends
        whether  you  startet the program by using the Atari monitor, then the
        ET4000  will be stopped. Otherwise the last setting will be used, it's
        the one you work with.
- Continuous test:  The  current  mode  and  all  further  changes   will   be
        transferred  to  the graphic processor. This mode will be cancelled if
        you  can  press this  button again. This sounds crazy, but try this if
        you're not using the Atari monitor...
- Testpicture:  The  current  mode and a test image will be displayed. You can
        interupt   the   generation   of   the   graphic by pressing the mouse
        button.  If  you're in the continuous test mode this graphic will stay
        on the  monitor until the next change. Otherwise the last setting will
        be displayed.
- Frameposition:  Usually  a grid-like  pattern will be displayed if you press
        the   left mouse button. If you now move the mouse with a pressed left
        mouse   button  the  position  of  this  pattern will change. You see?
        That's  the position of the region where all will be displayed further
        on.   If   you additionally press the right mouse button (and move the
        mouse) the pattern will be stretched or compressed.
        If  the  program  is  in  the  continuous test mode no pattern will be
        displayed.  The whole moving is only one action which can be cancelled
        with 'Undo'.
- Abort: ...
- Ok: no comment!

The  actions  discussed above usually are sufficiant for creating a good video
mode, but you can improve this mode in the following.


4.4.2 Main page (That's what you want to know...)

To understand the main page I should explain several terms.

The  dot  frequency  is  the  output frequency of dots. The horizontal and the
vertical  frequency  result  out of it. Look at your monitor manual for useful
dot frequencies or use a modus of the delivered library.

You  know what resoulution is? I hope so. If not... I think you would not have
read  this  manual  until this (.) point. But - do you know what black boulder
is?  Me neither... har har... No: look at the picture below. The monitor needs
some  time  for  the ray to move back from the right to the left (and from the
bottom  to  the  top).  This  pause,  in wich no dots are beeing displayed, is
called  black  boulder.  In this pause normally the sync starts. Also the sync
ends  normally within the black boulder. The length of the sync signal is less
important  than  the start. With the sync start the frame position changes. It
also forces the ray to move back (from the right to the left...)


        dots on the monitor               black boulder
  |.....................................|----------------|   picture

  |---------------------------------------+            +-|   sync signal
                                          |            |
                                          |            |
                                          +------------+
                                          : synclength :
                                syncstart :


                      syncstart  <  resolution + black boulder (must be!)

         syncstart + synclength  <  resolution + black boulder (should)


The  sync  start  manages  the frame position (as discussed above) which means
the  position  of  the  visible  region  on  your monitor. If you increase the
horizontal sync start, the visual region moves to the left.

The  proportion  between resoultion and black boulder determines the amount of
time  the  monitor  can lead back the ray (from...). The horizontal proportion
should  be  nearly  5:1, vertical 20:1. Single frequence monitors give you not
much room to hit the right setting.

                                        dot frequency
         horizontal frequency = ----------------------------
                                resolution_X + black boulder


                                    horizontal frequency
         vertical frequency   = ----------------------------
                                resolution_Y + black boulder


To  set  the  right  sync  signal polarisation (R)ead (T)he (F)ine (M)anual of
your  monitor.  Mostly  the  program  selects  the  (right)  standard  values.
Multisysnc  monitors  usually  work with the standard values, single frequency
monitors mostly work with both polarisations not negated.

What is left?
- Doublescan: Doubles the lines, which means the half of vertical resoultion
- Doublepixel: Doubles the columns... half of horizontal resolution
- Interlace: like TV the pictures generated in two halfs
- Dimension for the OS: This tells the Operating System the size of one single
     dot. This is important for only very few programs.

4.4.3 RAM-Page

You  will very seldom change the timing of your RAM chips, perhaps if you know
very  well  the context of your computer, graphic adapter and graphic card. If
you know about this, please let me know...

4.4.4 Register Window

Now  you  are in the deepest depths of your graphic card. Each register stands
for  various  things,  some  together,  others  divided to peaces in different
registers.  Have fun! Look at the register window when you make changes in the
main  page  AND  look  in the main page when you think you should have to make
changes in the register window.


4.5 Monitor Settings

This  is  the  dialog  I ment at the beginnig. Here you set the frequencies of
your  monitor.  The  only  thing I should add is, that if you set the range of
frequency  less  than  10kHz  the  program  behaves  like if you have a single
frequency  monitor.  This  means  that if you change e.g. the resolution or an
other parameter, the frequency will maintain constantly.


4.6 Hardware

I  hope you  will find your graphic card in this dialog. The VMG show for each 
selected card the table of default dotclocks. If you have a real PCcard inside
of your computer you shoud not trust the default values because there is a wide
spektrum of cards. With 'detect dotclocks' VMG tries all  possible frequencies
of the graphic card. VMG uses the last with 'Apply' or 'OK' validated Hardware
setup for  detection. The several  graphic cards differ in small  things, e.g.
the base address or the programming of the  CLUT. For such cases VMG shows the
Button 'more Options', i'm sure that the producer of the card can help you.


4.6.1 more Options

  If you select this button the table of dotclocks will disapear and more op-
  tions are provided on its place.
  
- The  16bit-I/O  should  be  setted  correctly,  because the  programm cannot
  change  back  to the initial desktop mode if you make mistake. Your computer
  will  hang  and  a  cold reboot will be necessary. This value explaines just
  the  graphic  processor  how  the  I/O-region  will  be  managed. In special
  combinations  of  adapters  and  680x0  this  may be important. Don't panic,
  programs  can  use  the video memory as usual. The system crash only happens
  if  you try to transfer a programmed mode to the ET4000. This doesn't fit if
  the  settings  are  wrong - and, as I told, the program can't change back to
  the  initial  desktop mode. Fortunately you don't have to change this option
  very often.
- With the CLUT/DAC-setting possibilities you have to describe the ability and
  the  programming  of  the  chip.  Unfortunately a lot of different Chips are
  used in different graphic cards, so you have to try the possibilities:
   8 Bit DACs: How many color bits does your  graphic card  have per pixel and
               per  color (R-G-B)?  Try it.  If you are wrong, the testpicture
               (256 colores) wont be displayed correctly.
   15 Bit Hicolor: Does your graphic card can display in 32k colores?
   16 Bit Hicolor: Does your graphic card can display in 64k colores?
   24 Bit Truecolor: Does your graphic card can display in 16M colores?
   Truecolor with RGB:  Does  your  graphic card  uses RGB or BGR as the basic
               system for  displaying  colores?  If  you have chosen the right
               switch, the run of  the colores in the  testpicture in  32k and
               16M colores is exactly the same. (Try this!)
   extended ET4000/W32 dotclocks:
                   With the ET4000/W32 a new register was documented by TSENG, 
                   to provide up to 32 dotclocks. Currently no card uses this.
- Baseaddresses: ask the producer of the card for it, if they aren't correct.                   
- The  four  values you can enter in the bottom of the dialog (hexadecimal) are
  equivalent  with  the CLUT/DAC register values, to program the mode you have
  entered.
  1st programming of 2..256 colores. Known values: 00, 02, FF
  2nd programming of 32K colores.    Known values: A0
  3rd programming of 64K colores.    Known values: E0, C0
  4th programming of 16M colores.    Known values: F0

  These  values  are  just  used  of  new  mode  files. So they are not active
  directly  after  the changing. If you want to try different values quickly I
  would  prefer  the  register  window in conjunction with the continuous test
  mode.  Needless  to say, that you should try this only if you use your Atari
  monitor as your work monitor.
  If you make a mistake, don't panic! You just see wrong or no colores.

Are you very shocked? I can give you a relief:
This  dialog  is just for non standard graphic cards. Normally the progam sets
the right values.


5. Tips and Tricks
------------------

If  you  want to change  the  keyboard handling of the menu or the Dialogs you 
can do this with a resource  editor.  So you can feel free to play around, but
please keep the original, ok?

If  you think that there is no way back in the continuous test mode it may be,
that  Control-W helps you. Then the program changes to another window and with
this  comes  another  mode.  Then  you  "just"  have to hit the button for the
continuous test mode again. This should be possible...

If  you  open  a  strange  mode file the dot frequencies and the CLUT register
will  be  setted  as  good  as possible. Also the consintence of the registers
will  be  checked.  But  this doesn't always fit the best. The modes which are
selected  are  not converted very well. Probably they are to be deleted. Other
modes  with  changes made are signed with an asterisk in the left of the name.
This  asterisk  always  appears  when  a  change has been made and is not been
saved.  Also  an  asterisk appears in the top of the window if a change is not
been  saved.  If  you  had  made changes which are not consistent they will be
corrected here.

If  it's  not possible for you to generate a mode wich fills your display, try
a  higher  resoulution  (double  x or double y or both) and switch in the main
dialog "Double scan" and/or "Double Pixel".

If a new mode generated by the program doesn't have a good quality, two points
may be reasonable:
  1st the polarity of the sync signal may be wrong.
  2nd the size of the black boulder may be wrong.
Try these things first if you modify the mode.

And why can't do the program this for me correctly? Sh...
The  sync  signals  may  be wrong because of two reasons. First it is possible
that  your  monitor may need special non-standard polarities. Second there are
some VGA cards which change these signals once more.
Wrong  values  for black boulder can be explained with the algorithm a mode is
be  generated.  The  program  tries  the  best value, but keeping the frontier
frequencies  has  the  higher priority. If you know a better algorithm, please
let me know.


6. Disclaimer
-------------

The  most important (for me) in the end of this documentation: If this program
causes  any  harm  to your computer system - it is always your fault! I cannot
give you any warranty! Anyway, I wish you happy working with VMG-4000.


7. Thank you
------------

... to all who helped me to improve this program. Special thanks to
Thilo Gaul       for the cooperating and hard discussions about GEM surfaces.
Gudrun Schneider for the ages I couldn't spend with her.
Stephan Skrodzki for steady grumbling, that several parts aren't right. He has
                 a magic hand to make  things behaving in a new fantastic way.
Matthias Strmer for  his  help  with  the  documentation  and  tips about the
                 surface.

Karlsruhe, 17.07.1994 Andreas Winter
