Epson S1D13506 Technical Manual page 318

Color lcd/crt/tv controller
Table of Contents

Advertisement

Page 84
S1D13506
X25B-G-003-04
Example 15: Copy a 9 x 321 rectangle at the screen coordinates x = 100, y = 10 to
screen coordinates X = 200, Y = 20 using a 640x480 display at a color
depth of 16 bpp. Transparent color is blue.
1. Calculate the source and destination addresses (upper left corners of the source and
destination rectangles), using the formula:
SourceAddress
DestinationAddress = (Y × ScreenStride) + (X × BytesPerPixel)
where:
BytesPerPixel = 1 for 8 bpp
BytesPerPixel = 2 for 15/16 bpp
ScreenStride = DisplayWidthInPixels × BytesPerPixel = 1280 for 16 bpp
Program the BitBLT Source Start Address Registers. REG[106h] is set to 00h,
REG[105h] is set to 32h, and REG[104h] is set to C8h.
Program the BitBLT Destination Start Address Registers. REG[10Ah] is set to 00h,
REG[109h] is set to 65h, and REG[108h] is set to 90h.
2. Program the BitBLT Width Registers to 9 - 1. REG[111h] is set to 00h and
REG[110h] is set to 08h.
3. Program the BitBLT Height Registers to 321 - 1. REG[113h] is set to 01h and
REG[112h] is set to 40h (320 decimal).
4. Program the BitBLT Operation Register to select the Transparent Move Blit in Posi-
tive Direction. REG[103h] is set to 05h.
5. Program the BitBLT Background Color Registers to select blue as the transparent col-
or. 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
REG[10Dh] is set to 02h and REG[10Ch] is set to 80h.
= (y × ScreenStride) + (x × BytesPerPixel)
= (10 × (640 × 2)) + (100 × 2)
= 13000
= 32C8h
= (20 × (640 × 2)) + (200 × 2)
= 26000
= 6590h
= 640
= 280h
Epson Research and Development
Vancouver Design Center
Programming Notes and Examples
Issue Date: 02/03/21

Advertisement

Table of Contents
loading

Table of Contents