Move Bitblt In Negative Direction With Rop - Epson S1D13506 Technical Manual

Color lcd/crt/tv controller
Table of Contents

Advertisement

Epson Research and Development
Vancouver Design Center
Note

10.2.6 Move BitBLT in Negative Direction with ROP

Note
Programming Notes and Examples
Issue Date: 02/03/21
5. Program the BitBLT ROP Code Register to select Destination = Source. REG[102h]
is set to 0Ch.
6. Program the BitBLT Color Format Select bit for 16 bpp operations. REG[101h] is set
to 01h.
7. Program the BitBLT Memory Offset Registers to the ScreenStride in WORDS.
BltMemoryOffset = ScreenStride ÷ 2
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 blit (Bit-
BLT Destination Linear Select = 0, BitBLT Source Linear Select = 0).
Start the blit operation. REG[100h] is set to 80h.
The order of register initialization is irrelevant as long as all relevant registers are pro-
grammed before the BitBLT is initiated.
The Move BitBLT in Negative Direction with ROP is very similar to the Move BitBLT in
Positive direction and must be used when the source and destination blit areas overlap and
the destination address is greater then the source address.
For the Move BitBLT in Negative Direction it is necessary to calculate the addresses of
the last pixel as opposed to the first pixel. This means calculating the addresses of the
lower right corners as opposed to the upper left corners.
Example 13: Copy a 9 x 321 rectangle at the screen coordinates x = 100, y = 10 to
screen coordinates X = 105, Y = 20 using a 640x480 display at a color
depth of 16 bpp.
In the following example, the coordinates of the source and destination rectangles inten-
tionally overlap.
1. Calculate the source and destination addresses (lower right corners of the source and
destination rectangles) using the following formula.
SourceAddress
= ((y + Height - 1) × ScreenStride) + ((x + Width - 1) × BytesPerPixel)
= ((10 + 321 - 1) × (640 × 2)) + ((100 + 9 - 1) × 2)
= 422616
= 672D8h
= 640
= 280h
Page 79
S1D13506
X25B-G-003-04

Advertisement

Table of Contents
loading

Table of Contents