
10: 2D BITBLT ENGINE
S1D13806 SERIES PROGRAMMING NOTES
EPSON
2-75
AND EXAMPLES (X28B-G-003-01)
4. Program the BitBLT Operation Register to select the Transparent Move BitBLT in Positive
Direction. REG[103h] is set to 05h.
5. Program the BitBLT Background Color Registers to select blue as the transparent color.
REG[115h] is set to 00h and REG[114h] is set to 1Fh (Full intensity blue in 16 bpp is 001Fh).
6. Program the BitBLT Color Format Register to select 16 bpp operations. REG[101h] is set to
01h.
7. Program the BitBLT Memory Offset Registers to the ScreenStride in WORDS.
BltMemoryOffset
= ScreenStride
÷ 2
= 640
= 280h
REG[10Dh] is set to 02h and REG[10Ch] is set to 80h.
8. Program the BitBLT Destination/Source Linear Select bits for a rectangular BitBLT (BitBLT
Destination Linear Select = 0, BitBLT Source Linear Select = 0).
Start the BitBLT operation. REG[100h] is set to 80h.
9. Once the BitBLT operation is finished, read one word from offset 0 in the BitBLT memory area
to shutdown the BitBLT engine.
Note: The order of register initialization is irrelevant as long as all relevant registers are programmed before
the BitBLT is initiated.
10.2.9 Pattern Fill BitBLT with ROP
The Pattern Fill BitBLT with ROP fills a specified rectangular area of the display buffer with a pat-
tern. The fill pattern is an array of pixels stored in off-screen display buffer. The fill pattern is lim-
ited to an eight by eight pixel array and must be loaded to off-screen memory prior to the BitBLT
starting. The pattern can be logically combined with the destination using all 16 ROP codes, but typ-
ically the copy pattern ROP is used (ROP code 0Ch).
The pattern itself must be stored in a consecutive array of pixels. As a pattern is defined to be 8
× 8
pixels, this results in 64 consecutive bytes for 8 bpp color depths and 128bytes for 16 bpp color
depths. For 8 bpp color depths the pattern must begin on a 64byte boundary, for 16 bpp color depths
the pattern must begin on a 128byte boundary.
To fill an area using the pattern BitBLT, the BitBLT engine requires the location of the pattern, the
destination rectangle position and size, and the ROP code. The BitBLT engine also needs to know
which pixel from the pattern is the first pixel in the destination rectangle (the pattern start phase).
This allows seamless redrawing of any part of the screen using the pattern fill.