EXOS 2.1 Video Driver Specification

2. Basic Control of Video Pages

As mentioned before, each video page is a separate channel. When a channel is opened to the video driver this implies that another video page is to be created. The video driver looks at EXOS variables wich specify the page size, page mode and colour mode. These variables must be set up by the user before opening a video channel. From these variables the video driver determines how much video RAM it needs and obtains that much with an EXOS function call (Allocate channel buffer).

The video driver maintains the line parameter table in a fixed place in its absolute device RAM area. The line parameter table always consists of 28 line parameter blocks of 9 scan lines each for the display area and various other ones to generate the frame sync and borders. The first line parameter block is reserved for the status line display which is a fixed area of RAM. The other 27 line parameter blocks can display any part of any page, so display is always in vertical units of 9 pixels. All 28 line parameter blocks are initially set up to be blank (ie. all border colour). The variable LP_POINTER in the EXOS variable area points to the start of the line parameter table.

2.1 Display Modes

The display mode is specified by an EXOS variable MODE_VID the allowed values of which are:

00 - Hardware text mode (up to 42 chars/line)
01 - High resolution pixel graphics
02 - Software text mode (up to 84 chars/line)
05 - Low resolution pixel graphics
15 - Attribute graphics

Any other value will produce an error (.VMODE) when an attempt is made to open a channel. The three graphics modes corresponds to the PIXEL, LPIXEL and ATTRIBUTE modes of the Nick chip (see separate Nick chip specification).

2.2 Colour Modes

As well as the display mode, each video page is of a particular colour mode. The colour mode is specified by an EXOS variable called COLR_VID. The allowed values for this variable are:

0 - Two colour mode
1 - Four colour mode
2 - Sixteen colour mode
3 - 256 colour mode

Any other values will be reduced modulo 4 and so no errors are produced. For text modes it is only useful to use two colour mode, unless the characters in the font are re­defined for doing some sort of block graphics. Also attribute mode must always be in two colour mode, although sixteen colours will actually be available on the page.

2.3 Page Size

Two EXOS variables, X_SIZ_VID and Y_SIZ_VID, define the size of the page to be created. The vertical size is specified in character rows. It can be any value from 1 to 255 although only 27 rows can be displayed on the screen at one time. The horizontal size is specified in low resolution character widths, and can be any number from 1 to 42. Invalid values will produce an error (.VSIZE) when a channel is opened.

A special function call is provided to return the size of a video page. It returns the number of lines and the number of characters per line. The number of lines will be the same as the Y_SIZ_VID EXOS variables when the channel was opened. The characters per line value returned is the actual number of characters per line so in the case of a software­text mode it will be double the value in X_SIZ_VID when the channel was opened.

The parameters for this call are:

    Parameters :  A channel number (1..255)
                  B @@SIZE (=2) (special function code)

    Returns    :  A status
                  B number of characters per row
                  C number of rows
                  D mode of page (0, 1, 2, 5 or 15)
                  E colour mode                        

2.4 Display Control

Video pages are not actually displayed on the screen until the user explicitly requests this. This request is done by a special function call to the channel. The parameters for this call are:

    Parameters :  A channel number (1..255)
                  B @@DISP (=1) (special function code)
                  C 1st row in page to display (1..size)
                  D number of rows to display (1..27)
                  E row on screen where first row should
                    appear (1..27)

    Returns    :  A status                      

The three row parameters are all given in character row units since the area of screen specified must be a whole number of line parameter blocks. The displayed page will replace anything which was displayed on that part of the screen before. If the channel is subsequently closed then any part of the screen which was displaying that channel will be made border colour (by bringing the margins in the relevant line parameter blocks right in).

A value of 1 for the first position on screen parameter (given in register E) refers to the line on the screen directly below the status line. Thus it is not possible to overlay the status line since zero will not be accepted.

If a value of zero is given for the position in the page parameter (register C) then the portion of the screen defined by the other two parameters will be blanked (ie. made entirely border colour).

If any of the parameters for the function call are invalid for any reason then an error (.VDISP) is returned.

Next Chapter: Video Modes and RAM Usage.

David Bouman. (dsbouma@cs.vu.nl)