The Current operation command address register (COPR) represents the command table address currently being processed. It 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 that is fetching the parameter currently being processed by 8H is written to this register.
You can know the address of the command table currently being processed. The address value is constantly updated during command processing.
In the case of fetching the drawing end command or forcibly ending drawing, the value of the updated address at that time is saved as it is until the frame change or the start of drawing by the plot trigger.
When fetching the drawing end command, it is the address (/ 8H) of the drawing end command table. In the case of forced termination of drawing, it is the address (/ 8H) of the command table that was forcibly terminated.
Since the boundary of the table address 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 end within one frame, the drawing is forcibly terminated in the middle, and the drawing is divided into two or more using pseudo drawing continuation.
Follow the procedure below to continue pseudo 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 drawing start (PTM = 01B) at the time of writing.
It draws to the range that can be drawn in the time within one frame, and at that point the CPU forcibly terminates (interrupts) drawing. Next, the jump destination in the first command table on VRAM is rewritten from the CPU to the command table address at the time of forced termination, and drawing is started immediately (PTM = 01B) in plot trigger mode. In this way, it is possible to make a pseudo drawing continuation. However, if the command table address at the time of forced termination is in the subroutine, drawing cannot be continued. In this case, set the drawing time required to transfer each pixel data to the frame buffer so that it is shorter than the time to the frame end.
If semi-transparent color calculation is performed at the time of forced termination of drawing, if drawing connection is performed by the above method, there is a possibility that dots that are translucently processed twice (double color calculation is performed) may occur. there is. It is necessary to forcibly terminate drawing when semi-transparent color calculation is not performed.