Intel® 815 Chipset: Graphics Controller PRM, Rev 1.0

R

6.3.BLT Programming Examples

6.3.1.Pattern Fill -- A Very Simple BLT

In this example, a rectangular area on the screen is to be filled with a color pattern stored as pattern data in off-screen memory. The screen has a resolution of 1024x768 and the graphics system has been set to a color depth of 8 bits per pixel.

Figure 19. On-Screen Destination for Example Pattern Fill BLT

 

 

63

128, 128

0

 

 

 

 

 

 

 

 

 

 

(0, 0)

(1023, 0)

 

 

20080h

 

 

 

 

 

 

128, 128

191, 128

 

 

20088h

 

 

 

20090h

On

 

 

 

 

 

 

 

 

20098h

 

 

 

 

128th

 

 

 

 

200A0h

Scan

Rectangular

 

 

 

200A8h

Line

Area to be Filled

Scan Lines 128 Through 191

 

 

200B0h

 

(Destination)

 

 

200B8h

 

 

 

 

 

 

 

 

 

(191, 128)

 

 

128, 191

191, 191

 

(128, 191)

 

 

 

 

 

 

 

 

 

 

 

2FC80h

 

 

 

 

 

2FC88h

 

 

 

 

 

2FC90h

On

 

 

 

 

2FC98h

 

 

 

 

191th

 

 

 

 

2FCA0h

Scan

Note: Drawing is not to scale

 

 

2FCA8h

Line

 

 

2FCB0h

 

 

 

 

 

 

(0, 767)

(1023, 767)

 

 

2FCB8h

 

 

 

 

 

 

 

 

(191, 191)

 

 

 

 

 

 

b_blt20.vsd

As shown in the figure above, the rectangular area to be filled has its upper left-hand corner at coordinates (128, 128) and its lower right-hand corner at coordinates (191, 191). These coordinates define a rectangle covering 64 scan lines, each scan line’s worth of which is 64 pixels in length — in other words, an array of 64x64 pixels. Presuming that the pixel at coordinates (0, 0) corresponds to the byte at address 00h in the frame buffer memory, the pixel at (128, 128) corresponds to the byte at address 20080h.

63

Page 63
Image 63
Intel 815 manual BLT Programming Examples, Pattern Fill -- a Very Simple BLT