Physical Address Space |
 |
The physical frame buffer is addressed as 2048×1024
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.
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 (1023×2048+1279).
The HP Visualize-FX2
frame buffer has three banks of 8 planes each. The HP Visualize-FX4
and HP Visualize-FX6
frame buffers have six banks of 8 planes (two 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 data directly from the frame
buffer. 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 24 bits per
pixel in a 32-bit word. The Z-buffers for the HP Visualize-FX
devices are 23 bits deep, and their 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), as
shown in the following figure.
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 HP Visualize-FX2
selects the Z-buffer for reads or writes. Using wbank=6
in the bank_switch
command on the HP Visualize-FX4
and HP Visualize-FX6
selects the Z-buffer for reads or writes.
The 24 bits of the Z-buffer reside in the lower 24 bits of
the word that is used by block_read
and block_write.
Unlike the frame buffer, the Z-buffer data is contiguous.
The HP Visualize-FX device's Z-buffers are always
1280×1024 where word 1280 is the leftmost word of the second
scanline. For the HP Visualize-FX family of devices,
the Z-buffer is the size of the window. For example, if the window
is 400×400, 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.
Table 4-2 Supported
Frame Buffer Configurations
Device | Number of Planes | Supported Configurations |
|---|
HP Visualize-FX2,
HP Visualize-FX4,
HP Visualize-FX6 | 8, 8/8 | CMAP_NORMAL,
CMAP_FULL, CMAP_MONOTONIC |
HP Visualize-FX2 | 12, 12/12, 24 | CMAP_FULL |
HP Visualize-FX4,
HP Visualize-FX6 | 24, 24/24 | CMAP_FULL |
Since Starbase supports double-buffering per window, it is
better to request double-buffering with a depth of 24 when in CMAP_FULL
mode on HP Visualize-FX4
and HP Visualize-FX6
devices, or with a depth of 12 when in CMAP_FULL
mode on a HP Visualize-FX2.
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. Note that the 4/4 double-buffering
mentioned here does not use a depth 4 visual. The write_enable
and display_enable
masks are used to accomplish double-buffering with less than 8 planes.
Video tearing may occur, however, as this kind of double-buffering
is not synchronized to the video refresh.