The Agnus chip is in overall control of the entire chipset's operation. All operations are synchronized to the position of the video beam. This includes access to the built-in
RAM, known as
chip RAM because the chipset has access to it. Both the central
68000 processor and other members of the chipset have to arbitrate for access to chip RAM via
Agnus. In computing architecture terms, this is
Direct Memory Access (DMA), where Agnus is the DMA Controller (DMAC). Agnus has a complex and priority-based memory access policy that attempts to best coordinate requests for memory access among competing resources. For example, bitplane data fetches are prioritized over blitter transfers as the immediate display of frame buffer data is considered more important than the processing of memory by the blitter. Agnus also attempts to order accesses in such a way so as to overlap CPU bus cycles with DMA cycles. As the original 68000 processor in Amigas tended only to access memory on every second available memory cycle, Agnus operates a system where "odd" memory access cycles are allocated first and as needed to time-critical custom chip DMA while any remaining cycles are available to the CPU, thus the CPU does not generally get locked out of memory access and does not appear to slow down. However, non-time-critical custom chip access, such as
blitter transfers, can use up any spare odd or even cycles and, if the "BLITHOG" (blitter hog) flag is set, Agnus can lock out the even cycles from the
CPU in deference to the
blitter. Agnus's timings are measured in "color clocks" of 280
ns. This is equivalent to two low resolution (140 ns) pixels or four high resolution (70 ns) pixels. Like Denise, these timings were designed for display on household
TVs, and can be synchronized to an external clock source.
Blitter The
blitter is a sub-component of Agnus. "Blit" is shorthand for "block image transfer" or
bit blit. The blitter is a highly parallel memory transfer and logic operation unit. It has three modes of operation: copying blocks of memory, filling blocks (e.g. polygon filling) and line drawing. The blitter allows rapid copying of video memory, meaning that the CPU can be freed for other tasks. The blitter was primarily used for drawing and redrawing graphics images on the screen, called "bobs", short for "blitter objects". The blitter's block copying mode takes zero to three data sources in memory, called A, B and C, performs a programmable
Boolean function on the data sources and writes the result to a destination area, D. Any of these four areas can overlap. The blitter runs either from the start of the block to the end, known as "ascending" mode, or in reverse, "descending" mode. This type of operation is known today as a
Bitwise ternary logic instruction. Blocks are "rectangular"; they have a "width" in multiples of 16 bits, a height measured in "lines", and a "stride" distance to move from the end of one line to the next. This allows the blitter to operate on any video resolution up to 1,024×1,024 pixels. The copy automatically performs a per-pixel logical operation. These operations are described generically using
minterms. This is most commonly used to do direct copies (D = A), or apply a pixel mask around blitted objects (D = (C AND B) OR A). The copy can also barrel shift each line by 0 to 15 pixels. This allows the blitter to draw at pixel offsets that are not exactly multiples of 16. These functions allow the Amiga to move GUI windows around the screen rapidly as each is represented in graphical memory space as a rectangular block of memory which may be shifted to any required screen memory location at will. The blitter's line mode draws single-pixel thick lines using
Bresenham's line algorithm. It can also apply a
16-bit repeating pattern to the line. The line mode can also be used to draw rotated bobs: each line of bob data is used as line pattern while the line mode draws the tilted bob line by line. The blitter's filling mode is used to fill per-line horizontal spans. On each span, it reads each pixel in turn from right to left. Whenever it reads a set pixel, it toggles filling mode on or off. When filling mode is on, it sets every pixel until filling mode is turned off or the line ends. Together, these modes allow the blitter to draw individual flat-shaded polygons. Later Amigas tended to use a combination of a faster CPU and blitter for many operations.
Copper The
Copper is another sub-component of Agnus; The name is short for "co-processor". The Copper is a programmable
finite-state machine that executes a programmed instruction stream, synchronized with the video hardware. When it is turned on, the Copper has three states; either reading an instruction, executing it, or waiting for a specific video beam position. The Copper runs a program called the
Copper list in parallel with the main
CPU. The Copper runs in sync with the video beam, and it can be used to perform various operations which require video synchronization. Most commonly it is used to control video output, but it can write to most of the chipset registers and thus can be used to initiate blits, set audio registers, or interrupt the CPU. The Copper list has three kinds of instructions, each one being a pair of two bytes, four bytes in total: • The MOVE instruction writes a 16-bit value into one of the chipset's hardware registers and is also used to strobe a new address into the Copper's instruction pointer. • The WAIT instruction halts Copper execution until a given beam position is reached, thus making possible to synchronize other instructions with respect to screen drawing. It can also wait for a blitter operation to finish. During a wait state the copper is off the bus and doesn't use DMA cycles. • The SKIP instruction will skip the following Copper instruction if a given beam position has already been reached. This can be used to create Copper list loops. The length of the Copper list program is limited by execution time. The Copper restarts executing the Copper list at the start of each new video frame. There is no explicit "end" instruction; instead, the WAIT instruction is used to wait for a location which is never reached.
Uses of the Copper • The Copper is most commonly used to set and reset the video hardware registers at the beginning of each frame. • It can be used to change video settings mid-frame. This allows the Amiga to change video configuration, including resolution, between
scanlines. This allows the Amiga to display different horizontal resolutions, different color depths, and entirely different frame buffers on the same screen. The
AmigaOS graphical user interface allows two or more programs to operate at different resolutions in different buffers, while all are visible on the screen simultaneously. A paint program might use this feature to allow users to draw directly on a low resolution
Hold-And-Modify (HAM) screen, while offering a high resolution toolbar at the top or bottom of the screen. • The Copper can also change color registers mid-frame, creating the "
raster bars" effect seen commonly in Amiga games. The Copper can go further than this and change the background color often enough to make a blocky graphics display without using any bitmap graphics at all. • The Copper allows "re-use" of sprites; after a sprite has been drawn at its programmed location, the Copper can then immediately move it to a new location and it will be drawn again, even on the same scanline. • The Copper can trigger an interrupt when the video beam reaches a precise location on the display. This is useful for synchronizing the CPU to the video beam. • The Copper can also be used to program and operate the blitter. This allows blitter operation and control to proceed independently of, and concurrently with, the CPU. With copper and blitter programming each other a text mode can be emulated. • The Copper can be used to produce "sliced
HAM", or S-HAM, this consists of building a Copper list that switches the palette on every scanline, improving the choice of base colors in
Hold-And-Modify mode graphics.
External video timing Under normal circumstances, the Amiga generates its own video timings, but Agnus also supports synchronizing the system to an external signal so as to achieve
genlocking with external video hardware. There is also a 1-bit output on this connector that indicates whether the Amiga is outputting background color or not, permitting easy overlaying of Amiga video onto external video. This made the Amiga particularly attractive as a character generator for titling videos and broadcast work, as it avoided the use and expense of
A/B roll and
chroma key units that would be required without the genlock support. The support of overscan, interlacing and genlocking capabilities, and the fact that the display timing was very close to broadcast standards (NTSC or PAL), made the Amiga the first ideal computer for video purposes, and indeed, it was used in many studios for digitizing video data (sometimes called frame-grabbing), subtitling and interactive video news. ==Denise==