
Rev. 2.0, 09/02, page 342 of 366
Appendix H Example of Drawing Control
H.1
Example of Starting Drawing
HD64413A performs drawing on rendering coordinates and work coordinates based on
command groups called display lists. The drawing procedures are shown below:
1. Using SuperH, place LCOFS and SCLIP commands as a display list to UGM. This display
list is intended to set initial values of the local offset and system clip ranges of HD64413A.
2. To synchronize the frame change timing and draw start timing, place the VBKEM command
following the display list placed in 1 to UGM using SuperH or use the frame change function
specified by the DBM bit in the system control register (SYSR).
3. Following the display list placed in 2, place the display list using POLYGON4-series
commands and the like to UGM using SuperH to let HD64413A perform drawing.
4. Following the display list placed in 3, place the TRAP command to show the end of display
listing. At this moment, the display list preparation is finished.
5. After setting the rendering start address, set 1 to RS bit.
By this register setting, you can let HD64413A perform drawing.
H.2
Example of Frame Change by Internal Updating
An example of a frame change by internal updating is described below. In this case, a frame
change is performed by internal updating, while fixing the DBM bit at manual display change
mode and controlling display start addresses DSA0, DSA1, and RSAR by SuperH.
When using the suspend/resume function of drawing, method by which the draw start address
and display start address can be controlled is effective. In this case, first the DBF bit in status
register should be checked to judge which of DSA0 or DSA1 is the register that determines the
display start address. When DBF = 0, DSA0 is the register determining the display start address.
Likewise, when DBF = 1, DSA1 is the register determining the display start address.
Table H.1 shows the relationship of DBF, DSA0 and DSA1.
Table H.1
Relationship of DBF and Display Screen (FG)
DSA0
DSA1
DBF = 0
Display screen
Drawing screen
DBF = 1
Drawing screen
Display screen
As an example, control procedures 1 to 4 of DSA0 and DSA1 of a case DBF = 0 are shown
below: