Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Starbase Device Drivers Manual - Vol1: HP 9000 Series 700 Computers > Chapter 3 The HCRX Family of Device Drivers

The Frame Buffer

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Physical Address Space

The physical frame buffer is addressed as 2048x1024 bytes. The last 768 bytes of each line of the address space (those to the right of the screen) are not displayed and no memory exists in those areas.

Figure 3-1 Physical Address Space

Physical Address Space

To Access the Frame Buffer Directly

When using the R_GET_FRAME_BUFFER gescape for direct user access to the frame buffer, correct access can only be assured by using the R_LOCK_DEVICE and R_UNLOCK_DEVICE gescapes.

  1. Use R_LOCK_DEVICE just prior to direct frame buffer access.

  2. Use R_UNLOCK_DEVICE directly after the frame buffer access and before any other Starbase commands.

CAUTION: Do not read from or write to the offscreen addresses. Such operations will cause errors.

Frame Buffer Address Mapping

The frame buffer is organized as a single one-dimensional array of pixel values. The first byte (byte 0) of the frame buffer represents the upper left corner pixel of the screen. Byte 1 is immediately to its right. Byte 1279 is the last (right-most) displayable pixel on the top line. The next 768 bytes are not displayable. Byte 2048 is the first (left-most) pixel on the second line from the top. The last (lower right corner) pixel on the screen is byte number 2,096,383 (1023x2048+1279).

Figure 3-2 Frame Buffer Mapping in Memory

Frame Buffer Mapping in Memory

The frame buffer organization is essentially the same for all of the HCRX family of graphics devices except for the number of banks. The HCRX-8 and HCRX-8Z have two banks of 8 planes (one for each buffer), and the HCRX-24 and HCRX-24Z have three banks of 8 planes (one for each color). Only one bank can be accessed at a time. Use the bank_switch call to select a bank to read or write. For information on the bank_switch command read the section "Changes to bank_switch()" in Chapter 1.

For block_read and block_write operations to the image planes, the data is in all eight bits of each byte. The default for reading the Z-buffer is always 32-bits per pixel. The Z-buffers for the HCRX-8Z and HCRX-24Z are 23-bits deep, and this Z-buffer data is left justified in the lower 24 bits of the 32-bit word (that is, the 23-bit Z-buffer data is shifted left one bit from the least-significant bit). For the HCRX-8 and HCRX-24 with PowerShade, the Z-buffer is 16-bits deep, and this Z-buffer data is left justified in the 32-bit word. The raw parameter to block_read and block_write must be set to true in order to read from or write to the Z-buffer. Using wbank=3 in the bank_switch command on the HCRX-24 and HCRX-24Z, or wbank=2 on the HCRX-8 and HCRX-8Z, selects the Z-buffer for reads or writes.

Unlike the frame buffer, the Z-buffer data is contiguous. The HCRX-8Z and HCRX-24Z Z-buffers are always 1280x1024 where word 1280 is the leftmost word of the second scanline. For either the HCRX-8 or the HCRX-24, the Z-buffer is the size of the window. For example, if the window is 400x400, word 400 is the leftmost Z-buffer value for the second scan line.

Frame Buffer Configurations

The following table shows which color map modes are supported for different frame buffer configurations. No entry (i.e. blank) indicates no support.

Table 3-2 Supported Frame Buffer Configurations

Number of Planes

HCRX-8 and HCRX-8Z

HCRX-24 and HCRX-24Z

8/8

CMAP_NORMAL CMAP_FULL CMAP_MONOTONIC

CMAP_NORMAL CMAP_FULL CMAP_MONOTONIC

12/12

CMAP_FULL

24

CMAP_FULL

 

Since Starbase supports double-buffering per window, it is better to request double-buffering with a depth of eight on an HCRX-8 or HCRX-8Z, or a depth of 12 when in CMAP_FULL mode on an HCRX-24 or HCRX-24Z. Double-buffering with less than 8 planes (4/4, 3/3, 2/2, 1/1) is supported in depth-8 windows for compatibility with previous devices, however, it is not recommended. The write_enable and display_enable masks are used to accomplish double-buffering with less than 8 planes. Flashing may occur, however, as this kind of double-buffering is not done on a per window basis.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1989 - 1995 Hewlett-Packard Development Company, L.P.