comparison.) The line number will never be greater than $FF The horizontal position has a maximum value of $E2. This means that the largest number that will ever appear in the comparison is $FFE2. When waiting for $FFE2, the line $FF will be reached, but the horizontal position $FE will never happen. Thus, the position will never reach $FFFE. You may be tempted to wait for horizontal position $FE (since it will never happen), and put a smaller number into the vertical position field. This will not lead to the desired result. The comparison operation is waiting for the beam position to become greater than or equal to the entered position.
If the vertical position is not $FF, then as soon as the line number becomes higher than he entered number, the comparison will evaluate to true and the wait will end. The following notes on horizontal and vertical beam position apply to both the WAIT instruction and o the SKIP instruction. The SKIP instruction is described below in the "Advanced Topics" section. HORIZONTAL BEAM POSITION The horizontal beam position has a value of $0 to $E2. The least significant bit is not used in the comparison, so there are 113 positions available for Copper operations. This corresponds to 4 pixels in low resolution and 8 pixels in high resolution. Horizontal blanking falls in the range of $0F to $35.
The standard screen (320 pixels wide) has an unused horizontal portion of $04 to $47 (during which only the background color is displayed). All lines are not the same length in NTSC. Every other line is a long line (228 color clocks, 0-$E3), with the others being 227 color clocks long. In PAL, they are all 227 long. The display sees all these lines as 227 1/2 color clocks long, while the copper sees alternating long & short lines. VERTICAL BEAM POSITION The vertical beam position can be resolved to one line, with a maximum value of 255. There are actually 262 NTSC (312 PAL) possible vertical positions.
Some minor complications can occur if you want something to happen within these last six or seven scan lines. Because there are only eight bits of resolution for vertical beam position (allowing 256 different positions), one of the simplest ways to handle this is shown below. - 18 Coprocessor Hardware -