Epson S1D13506 Technical Manual page 307

Color lcd/crt/tv controller
Table of Contents

Advertisement

Epson Research and Development
Vancouver Design Center
Programming Notes and Examples
Issue Date: 02/03/21
Source Address = 0
Start Bit Position = 0
Blit Width = 3
The following bits are expanded.
Word Sent To BitBLT Engine
15
7
High Byte
All subsequent WORDS in one blit line are then serially expanded starting at bit 7 of the
low byte until the end of the blit line. All unused bits in the last WORD are discarded. It is
extremely important that the exact number of WORDS is provided to the blit engine. The
number of WORDS is calculated from the following formula. This formula is valid for all
color depths (8/15/16 bpp).
nWords = ((Sx MOD 16 + BltWidth + 15) ÷ 16) × BltHeight
where:
Sx is the X coordinate of the starting pixel in a word aligned monochrome bitmap.
Monochrome Bitmap
Byte 1
Sx =
0
1
2
3
4
5
Example 10: Color expand a rectangle of 12 x 18 starting at the coordinates Sx =
125, Sy = 17 using a 640x480 display at a color depth of 8 bpp.
This example assumes a monochrome, WORD aligned bitmap of dimensions 300 x 600
with the origin at an address A. The color expanded rectangle will be displayed at the screen
coordinates X = 20, Y = 30. The foreground color corresponds to the LUT entry at index
134, the background color to index 124.
1. First we need to calculate the address of the WORD within the monochrome bitmap
containing the pixel x = 125,y = 17.
SourceAddress
8
7
0
7
Low Byte
Byte 2
6
7
8
9
10
11
12
13
= BitmapOrigin + (y × SourceStride) + (x ÷ 8)
= A + (Sy × SourceStride) + (Sx ÷ 8)
= A + (17 × 38) + (125 ÷ 8)
= A + 646 + 15
= A + 661
0
0
15
14
Page 73
S1D13506
X25B-G-003-04

Advertisement

Table of Contents
loading

Table of Contents