DDDR/2 - 8514/A Display Driver

The IBM 8514/A display driver shares its basic functionality with the 16-bit VGA display driver. See 16-Bit VGA Display Driver for details about privilege levels, graphics engine interface, graphics engine functions, dispatch tables, and debugging. For the most part, these topics, as covered in that chapter, apply also to the 8514/A display driver.

Overview
This chapter covers the differences between the 16-bit VGA display driver and the 8514/A display driver, followed by 8514/A device-specific programming information.

Operating Modes
The 8514/A graphics adapter operates in the following modes: Both modes of operation are selectable under program control.
 * Video-graphics array (VGA) This is the power-on mode; the functionality of the 16-bit VGA display driver is available.
 * Advanced-function This mode provides a programming interface for the adapter. The primary advantage of the 8514/A display driver over the 16-bit VGA display driver is that the advanced-mode adapter interface handles much of the hardware programming for you. Instead of programming directly into the bit-plane memory, the adapter provides an interface supporting most of the required display functions.

Macros for Utilizing Available Hardware Capabilities
The 8514/A display driver includes a set of macros to access the adapter interface. When called by the driver, through the entry points, the interface provides a set of functions to utilize the hardware capabilities of the display adapter. Each of the macros is addressed in detail in the sections that follow.

Tests an I/O port for a particular value, as follows: Waits for the 8514/A graphics adapter output queue to contain available data. Waits for the 8514/A graphics adapter input queue to be ready to accept data. Check for the underrun or overrun state after execution of a variable data command to the 8514/A graphics adapter. Waits for the 8514/A adapter input queue to have a minimum number of words of free space. The queue may contain up to eight words. The number of words still to be dequeued can be ascertained at any time. Outputs a word value to the 8514/A input queue. Outputs a byte value to the 8514/A input queue. This macro differs from outwQ in that it is assumed that only the low half of the AX register needs to be loaded. A slight saving in code size is achieved thereby.

Bit-Plane Model
The bit-plane memory in the adapter is arranged in planes of 1024 x 1024 bits. The displayed data is taken from the low 1024 x 768 or 640 x 480 bits. The undisplayed bit-plane memory is used by the adapter as auxiliary storage for functions, like area-fill working storage, as a cache for programmable character sets and marker drawing.

The number of planes available depends on the adapter mode and the amount of video RAM installed, up to a maximum of 32 planes. They are numbered from 0 to 31, with plane 0 associated with bit 0 of the color index. The 8514 display driver provides the following memory mapping for high-resolution mode: ++    |                                                        |     |                                                        |     |                   onscreen area                        | |                                                       |     |                                                        |     | (32x32)   64      128      196                         | | (40x40)  80      160      240                         | | (64x64) 128      256                                  | 768 ||    | ptr   | ptr   | ptr   | ptr   | work  |                | | and  | xor   | save  | color | area  | SaveScreenBits | | mask | mask  | area  | bitmp |       | area           | 848 ||    |                      Pattern Cache                     | 864 ||    |                                                        |     |                                                        |     |     Font storage area and 3-op BLT temporary space     | |                                                       |     |                                                        | 1023 ++