Epson S1D13506 Technical Manual page 308

Color lcd/crt/tv controller
Table of Contents

Advertisement

Page 74
S1D13506
X25B-G-003-04
where:
SourceStride
2. Calculate the destination address (upper left corner of the screen blit rectangle) using
the following formula.
DestinationAddress = (Y × ScreenStride) + (X × BytesPerPixel)
where:
BytesPerPixel = 1 for 8 bpp
BytesPerPixel = 2 for 15/16 bpp
ScreenStride = DisplayWidthInPixels × BytesPerPixel = 640 for 8 bpp
Program the BitBLT Destination Start Address Registers. REG[10Ah] is set to 00h,
REG[109h] is set to 4Bh, and REG[108h] is set to 14h.
3. Program the BitBLT Width Registers to 12 - 1. REG[111h] is set to 00h, REG[110h]
is set to 0Bh (11 decimal).
4. Program the BitBLT Height Registers to 18 - 1. REG[113h] is set to 00h, REG[112h]
is set to 11h (17 decimal).
5. Program the Source Phase in the BitBLT Source Start Address Register. In this exam-
ple the source address equals A + 661 (odd), so REG[104h] is set to 1.
Since only bit 0 flags the source phase, more efficient code would simply write the
low byte of the SourceAddress into REG[104h] directly -- not needing to test for an
odd/even address. Note that in 15/16 bpp color depths the Source address is guaran-
teed to be even.
6. Program the BitBLT Operation Register to select the Color Expand Blit. REG[103h]
is set to 08h.
7. Program the Color Expansion Register. The formula for this example is as follows.
Reg[102h]
REG[102h] is set to 02h.
8. Program the Background Color Registers to the background color. REG[115h] is set
to 00h and REG[114h] is set to 7Ch (124 decimal).
Note that for 15/16 bpp color depths, REG[115h] and REG[114h] are both required
and programmed directly with the value of the background color.
= (BitmapWidth + 15) ÷ 16
= (300 + 15) ÷ 16
= 19 WORDS per line
= 38 BYTES per line
= (30 × 640) + (20 × 1)
= 19220
= 4B14h
= 7 - (Sx MOD 8)
= 7 - (125 MOD 8)
= 7 - 5
= 2
Epson Research and Development
Vancouver Design Center
Programming Notes and Examples
Issue Date: 02/03/21

Advertisement

Table of Contents
loading

Table of Contents