•  Back 
  •  Hardware 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-File
                               Video Hardware


Video Resolutions

Atari computers support a wide range of video resolutions as shown in the
following tables:

    Computer System         Modes             Possible Colors
                    (width x height x colors)

        ST,               320x200x 16              512
        Mega ST           640x200x  4
                          640x400x  2

        STe,              320x200x 16             4096
        Mega STe          640x200x  4
                          640x400x  2

        STacy             640x400x  2              N/A

        TT030             320x200x256             4096
                          640x200x  4
                          640x400x  2
                          320x480x256
                          640x480x 16
                         1240x960x  2

        Falcon030 The Falcon030 is capable of producing
a wide variety of video modes.
The table represents those accessible
from the Desktop only.
       See below.           262,144

Falcon030 Video Modes

The Falcon030 is equipped with a much more flexible video controller than
earlier Atari computers. The display area may be output on a standard
television, an Atari color or monochrome monitor, or a VGA monitor.
Overscan is supported with all monitor configurations with the exception
of VGA. Also, hardware support for NTSC and PAL monitors is software
configurable.

The Falcon030 supports graphic modes of 40 or 80 columns (320 or 640
pixels across) containing 1, 2, 4, 8, or 16 bits per pixel resulting in 2,
4, 16, 256, or 262,144 colors respectively. All modes except the 16 bit
per pixel mode supply the video shifter with palette indexes. The 16 bit
per pixel mode is a 'true-color' mode where each 16 bit value determines
the color rather than being an index into a palette. Each 16 bit WORD
value is arranged as follows:

index=1001
The R, G, and B, represent the red, green, and blue components of the color. Because red and blue are each allocated five bits, they can represent a color range of 0-31. The green component is allocated six bits so it can represent a color range of 0-63. The Falcon030 also supports an overlay mode ( see VsetMask() ) where certain colors can be defined as transparent to a connected Genlock (or similar) device. In this mode, the least signifigant green bit (Bit #5) is treated as the transparent flag bit and the resolution of the green color component is slightly reduced. If the transparent flag bit of a pixel is set, that pixel will display video from the Falcon030's video shifter, otherwise the external video source will be responsible for its display. Another feature of the Falcon030's video shifter is an optional interlace/double-line mode. When operating on a VGA monitor, this mode doubles the pixel height effectively reducing the vertical screen resolution by half. On any other video display, this mode engages interlacing which increases the video resolution. The operating system calls VsetMode() or VsetScreen() can be used to manipulate the operating mode of the Falcon030's video shifter. These calls do not, however, do any checking to ensure the selected video mode is actually attainable on the connected monitor or that the mode is legal. In particular, you should not attempt to set the video shifter to either 40 column mode with only one bit per pixel or 80 column VGA mode with 16 bits per pixel. Video Memory Most of the available video modes are palette-based. The number of bits required per pixel depends on the number of palette entries as shown in the table below. The Falcon030 also offers a true color video mode which requires 16 bits per pixel. Palette Bits per entries pixel 2 1 4 2 16 4 256 8 Directly accessing video memory is normally not recommended because it may create compatibility problems with future machines and wreak havoc with other system applications. The VDI provides a rich set of function calls which should be used when outputting to the screen. The function call vr_trnfm(), for instance, can be useful in transforming video images into a pattern compatible with the current video shifter. Certain software, however, does need exclusive access to video memory. With the exception of the 16-bit true color mode of the Falcon030, all video images are stored in memory in WORD interleaved format. The video shifter grabs one at a time from each plane present as shown in the following diagram which represents a 16-color (four plane) screen layout:
index=1002
The Falcon030's 16-bit true color mode is pixel-packed so that WORD #0 in memory is the complete color WORD for the pixel at ( 0, 0 ), WORD #1 is the complete color WORD for the pixel at ( 1, 0 ), etc. Fine Scrolling All Atari computers except the original ST and Mega ST support both horizontal and vertical fine scrolling in hardware. To accomplish this, an application must place a special handler in the vertical blank vector (at 0x00000070) which resets the scroll registers and video base address as needed. The following registers are manipulated during the vertical-blank period to shift the screen across any number of virtual 'screens': Register Address Contents VBASEHI 0xFFFF8200 Low byte contains bits 23-16 of the video display base address. VBASEMID 0xFFFF8202 Low byte contains bits 15-8 of the video display base address. VBASELO 0xFFFF820C Low byte contains bits 7-0 of the video display base address. LINEWID 0xFFFF820E Number of extra WORDs per scanline (normally 0). HSCROLL 0xFFFF8264 Low four bits contain the bitwise offset (0-15) of the screen (normally 0 unless scrolling is in effect). VCOUNTHI 0xFFFF8204 Low byte contains bits 23-16 of the current video refresh address (use with care). VCOUNTMID 0xFFFF8206 Low byte contains bits 15-8 of the current video refresh address (use with care). VCOUNTLO 0xFFFF8208 Low byte contains bits 7-0 of the current video refresh address (use with care). To accommodate virtual screens wider than the display can show, set LINEWID to the number of extra WORDs per scanline. For instance, to create a virtual display two screens wide for a 320x200 16-color display, set LINEWID to 80. To scroll vertically, simply alter the video base address by adding or subtracting the number of WORDs per scanline for each line you wish to scroll during the vertical blank. To scroll horizontally, alter the video base address in WORD increments to move the physical screen left and right over the virtual screen. This by itself will cause the screen to skip in 16 pixel jumps. To scroll smoothly, use the HSCROLL register to shift the display accordingly. When HSCROLL is non-zero, subtract one from LINEWID for each plane. To illustrate this more clearly, imagine a physical screen of 320x200 (16 colors) which is laid out over 4 virtual screens in a 2x2 grid. The following diagram and table shows example values to move the physical screen to the desired virtual coordinates:
index=1003
Sample Values Virtual VBASE Coordinates Address LINEWID HSCROLL (0, 0) 0x80000 80 0 (16, 0) 0x80004 80 0 (0, 1) 0x80140 80 0 (1, 0) 0x80000 76 1 (0, 10) 0x80B40 80 0 (100, 100) 0x87BE4 76 4