
Epson Research and Development
Page 59
Vancouver Design Center
Programming Notes and Examples
S1D13706
Issue Date: 01/02/23
X31B-G-003-03
6. Determine the sub-window line address offset.
number of dwords per line
= image width
÷
(32
÷
bpp)
= 120
÷
(32
÷
4)
= 15
= 0Fh
Program the Sub-window Line Address Offset. REG[80h] is set to 0Fh, and
REG[81h] is set to 00h.
7. Determine the value for the sub-window X and Y start and end position registers.
Let the top left corner of the sub-window be (x1, y1), and let x2 = x1 + width, y2 = y1
+ height.
The X position registers sets the vertical coordinates of the sub-window top right and
bottom left corner. Program the X Start Position registers = panel width - y2. Program
the X End Position registers = panel width - y1 - 1.
The Y position registers sets the horizontal coordinates of the sub-window top right
and bottom left corner. Program the Y Start Position registers = x1
÷
(32
÷
bpp). Pro-
gram the Y End Position registers = x2
÷
(32
÷
bpp) - 1.
X start position registers
= 320 - (80 + 160)
= 80
= 50h
Y start position registers
= 64
÷
(32
÷
4)
= 08h
X end position registers
= 320 - 80 - 1
= 239
= EFh
Y end position registers
= (64 + 120)
÷
(32
÷
4) - 1
= 22
= 16h
Program the Sub-window X Start Position registers. REG[84h] is set to 50h, and
REG[85h] is set to 00h.
Program the Sub-window Y Start Position registers. REG[88h] is set to 08h, and
REG[89h] is set to 00h.
Program the Sub-window X End Position registers. REG[8Ch] is set to EFh, and
REG[8Dh] is set to 00h.
Program the Sub-window Y End Position registers. REG[90h] is set to 16h, and
REG[91h] is set to 00h.
8. Enable the sub-window.
Program the Sub-window Enable bit. REG[71h] bit 4 is set to 1.