How Amiga 1000 Handles Palette Changes in Vertical Blank
The Commodore Amiga 1000 manages palette changes during the vertical blank interval primarily through its custom Copper co-processor, allowing developers to update color registers safely without visual artifacts. This process leverages the brief period when the electron beam returns to the top of the screen, ensuring that memory access does not conflict with the display logic. By utilizing VBLANK interrupts or Copper lists, the system synchronizes hardware writes to maintain smooth transitions between frames.
During the vertical blanking interval, the video beam is repositioned from the bottom of the display to the top, meaning the Denise video chip is not actively fetching pixel data for the visible screen. This window provides a safe opportunity for the CPU or the Copper to access chip memory and modify the color lookup tables. If palette changes were attempted during the active display period, it could result in color tearing or flickering as the beam draws lines with inconsistent color data.
The Copper co-processor is specifically designed to handle these synchronized hardware changes efficiently. Programmers construct a Copper list containing instructions that wait for a specific vertical beam position before executing write commands to the COLOR registers. Once the beam enters the vertical blank zone, the Copper automatically updates the palette values defined in the list. This method offloads the timing responsibility from the main CPU, ensuring precise execution without requiring constant processor intervention.
Alternatively, software can rely on the VBLANK interrupt to handle palette updates directly through the CPU. When the vertical blank starts, the hardware triggers an interrupt that pauses the current program execution to run a specific service routine. Within this routine, the software writes new values to the color registers before the next frame begins drawing. While this method offers flexibility, it consumes more CPU cycles than the Copper-driven approach, which is why the Copper is often preferred for complex demos and games on the Amiga 1000.
Understanding this mechanism is crucial for maximizing the graphical potential of the Amiga hardware. By strictly adhering to the timing of the vertical blank, developers can achieve dynamic lighting effects, smooth fades, and palette cycling animations. The architecture ensures that all changes are latched correctly before the visible scanlines begin, preserving the integrity of the displayed image throughout the refresh cycle.