BEGIN COPPER...END COPPER

The BEGIN COPPER and the END COPPER instructions are fundamental commands used in programming hardware that interacts directly with a TV's video signal. Their primary purpose is to isolate and delimit a block of instructions (called a "Copper list") that must be executed in close synchronization with the TV's video brush.

Think of the TV screen as a canvas on which a painter is drawing. This "painter" is the video brush, a beam of electrons that slides across the screen's surface to paint the image. This process occurs very quickly, line by line, from top to bottom and from left to right.

The BEGIN COPPER and END COPPER instructions allow you to delimit a list of operations that will be performed while the video brush is drawing a specific portion of the screen. When the program executes a list of instructions between BEGIN COPPER and END COPPER, it waits for the video brush to reach a specific position (specified within the list) before executing the next instruction. This allows you to "paint" graphic effects exactly at the desired time and location on the screen, avoiding flickering or visual artifacts.

Operations in a copper list can include doing nothing (COPPER NOP), waiting for a specific position (COPPER WAIT LINE), or modifying a specific memory location (COPPER MOVE).

The main advantage of this synchronization is the ability to create complex and fluid graphic effects that would be difficult or impossible to achieve with normal CPU programming, which is less precise in controlling video timing.

In summary, BEGIN COPPER and END COPPER are essential to fully exploit the capabilities of dedicated graphics hardware systems, enabling granular and timed control of the video generation process to achieve high-quality visual results.

SYNTAX

 BEGIN COPPER [name]
    ...
 END COPPER


Legend
  • id : identifier
  • type : datatype
  • v : value
  • "..." : string
  • [...] : optional

ABBREVIATION: BeCopEeCop

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:

  • PUR-120 - A game in 10 lines of max 120 characters (w/abbrev.)
  • EXTREME-256 - A game in 10 lines of max 256 characters (w/abbrev.)
  • SCHAU - Any program in 10 lines of max 256 characters (w/abbrev.)
In order to reduce space you can use this abbreviation for this instruction:

BEGIN COPPER...END COPPER ↔ BeCopEeCop

Any problem?

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