The current operation command address register (COPR) indicates the command table address currently being processed. This is a read-only 16-bit register located at address 100014H.
COPR 100014H (R)
bit15
bit14
bit13
bit12
bit11
bit10
bit9
bit8
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
Current processing table address/8H
0
0
Current processing table address: bit15~0
The value obtained by dividing the command table address containing the parameter currently being processed by 8H is written to this register.
You can know the address of the command table currently being processed. Address values are constantly updated during command processing.
In the case of fetching the drawing end command or forcefully stopping drawing, the updated address value will be saved as is until drawing starts due to a frame change or plot trigger.
When fetching the drawing end command, it is the address of the drawing end command table (/8H). In the case of forced termination of drawing, this is the address (/8H) of the command table where the drawing was forcibly terminated.
Since the table address boundary is 20HByte, the lower 2 bits of the register are fixed to 00B.
●Pseudo drawing continuation
If the amount of data to be drawn is large and the drawing does not finish within one frame, force the drawing to end in the middle and use pseudo-drawing continuation to divide it into two or more parts.
Follow the steps below to create a pseudo-continuation of drawing. Force drawing to end, rewrite the first command to jump to the processing interruption table address at that time, and set the plot trigger mode to start drawing at the time of writing (PTM=01B).
Draws to the extent that can be drawn within one frame, and at that point the CPU forcibly terminates (interrupts) the drawing. Next, rewrite the jump destination in the first command table on VRAM from the CPU to the command table address at the time of forced termination, and immediately start drawing in plot trigger mode (PTM=01B). In this way, you can create a pseudo-continuation of drawing. However, if the command table address at the time of forced termination is within a subroutine, drawing cannot be continued. In this case, set the drawing time required to transfer each pixel data to the frame buffer to be shorter than the time until the end of each frame.
If semi-transparent color calculations are being performed when drawing is forcibly terminated, if you connect the drawings using the above method, there is a possibility that dots will be processed twice (color calculations will be performed twice). there is. It is necessary to forcefully terminate drawing when not performing translucent color calculations.