The COPPER WAIT LINE instruction is an essential command. Unlike COPPER MOVE and
COPPER STORE, which are used to modify values in memory, the COPPER WAIT LINE instruction
does not directly modify anything. Its primary purpose is to pause execution until the
television's video brush reaches a specific position on the screen.
In other words, COPPER WAIT LINE is a synchronization instruction, necessary to avoid
flickering and visual artifacts: making hardware changes at the wrong time relative
to the video scan can cause corrupted or unstable images.
Waiting for a specific location allows you to change colors, shift registers, or
enable/disable hardware features exactly where and when needed, without the human eye
perceiving the change as a "jump."
It is therefore possible to define areas of the screen with different color palettes or
resolutions simply by waiting for the appropriate line with a WAIT LINE command and then
using a MOVE command to set the new parameters.
In short, COPPER WAIT LINE is the heart of synchronization, allowing complex and dynamic
changes on the display to be orchestrated in perfect harmony with the video signal flow,
enabling otherwise impossible graphical effects.
BEGIN COPPER
COPPER WAIT LINE 10
COPPER STORE &H2c8, RED AS BYTE
COPPER WAIT LINE 30
COPPER STORE &H2c8, BLUE AS BYTE
END COPPER
Join BASIC 10Liner Contest with ugBASIC!
An interesting competition is held at the beginning of each year: the
BASIC 10Liner Contest.
It is possible to use ugBASIC to participate in the next
"BASIC10Liner" competition, in the following categories:
COPPER WAIT LINE ↔ CopWtLn
If you have found a problem with this keyword, if you think there is a bug or, more
simply, you would like it to be improved, open an issue for this example on GitHub.
Thank you!
open an issue
BACK TO KEYWORDS