
5 ADVANCED TECHNIQUES
SID13705 PROGRAMMING NOTES
EPSON
C-2-15
AND EXAMPLES
5
ADVANCED TECHNIQUES
This section contains programming suggestions for the following:
virtual display
panning and scrolling
split screen display
5.1 Virtual Display
Virtual display refers to the situation where the image to be viewed is larger than the physical
display. The difference can be in the horizontal, vertical or both dimensions. To view the image,
the display is used as a window into the display buffer. At any given time only a portion of the
image is visible. Panning and scrolling are used to view the full image.
The Memory Address Offset register determines the number of horizontal pixels in the virtual
image. The offset register can be used to specify from 0 to 255 additional words for each scan line.
At 1 bpp, 255 words span an additional 4,080 pixels. At 8 bpp, 255 words span an additional 510
pixels.
The maximum vertical size of the virtual image is the result of dividing 40,960 bytes of display
memory by the number of bytes on each line (i.e. at 1 bpp with a 320
× 240 panel set for a virtual
width of 640
× 480 there is enough memory for 512 lines).
Figure 5-1 “Viewport Inside a Virtual Display,” depicts a typical use of a virtual display. The
display panel is 320
× 240 pixels, an image of 640 × 480 pixels can be viewed by navigating a 320
× 240 pixel viewport around the image using panning and scrolling.
Figure 5-1 Viewport Inside a Virtual Display
Registers
Memory Address Offset Register
REG[11h] forms an 8-bit value called the Memory Address Offset. This offset is the number of
additional words on each line of the display. If the offset is set to zero there is no virtual width.
This value does not represent the number of words to be shown on the display. The display width
is set in the Horizontal Display Width register.
Note: This value does not represent the number of words to be shown on the display. The display
width is set in the Horizontal Display Width register.
REG[11h] Memory Address Offset Register
Memory
Address Offset
Bit 7
Memory
Address Offset
Bit 6
Memory
Address Offset
Bit 5
Memory
Address Offset
Bit 4
Memory
Address Offset
Bit 3
Memory
Address Offset
Bit 2
Memory
Address Offset
Bit 1
Memory
Address Offset
Bit 0
320
× 240
Viewport
640
× 480
“Virtual” Display