## Graphics Adapter Device Driver Reference

[prev][next][parent][TOC]

### Graphics Hardware Interface (GHI)

The entry point and functions supported by a GRADD are referred to as the Graphics Hardware Interface (GHI). The differences between the VMAN protocol (VMI) and the protocol for the GRADDs GHI include the following:

The GHI is a subset of the VMI.
The ulFunction parameter value changes to the appropriate GHI_CMD_ function name.

Each GRADD has an exported function, called HWEntry, which is the same function type as VMIEntry in VMAN.

HWEntry receives all of the operations from VMAN.

In the GRADD model, the GRADDs are the only components that have direct access to the video hardware. GRADD code uses the accelerated features of a graphics adapter. By returning RC_SIMULATE for a graphics operation, the GRADD gives the SOFTDRAW component permission to draw directly to the video memory of the hardware. The serialization of video memory is handled by the Video Manager through the the GHI_CMD_REQUESTHW function.

Each GRADD must process the following GHI_CMD_ functions:

GHI_CMD_INIT
GHI_CMD_QUERYCAPS
GHI_CMD_QUERYMODES
GHI_CMD_SETMODE
GHI_CMD_PALETTE

* This function is mandatory only when a 256-color mode has been chosen.

The following GHI functions can return RC_SIMULATE and let VMAN handle the operations:

GHI_CMD_BANK
GHI_CMD_BITBLT
GHI_CMD_LINE
GHI_CMD_MOVEPTR
GHI_CMD_SETPTR
GHI_CMD_SHOWPTR
GHI_CMD_TEXT

The GHI function numbers are assigned in such a way that they can be used as a zero-based index into a function jump table.