Denise: The Amiga's Display Engine
Playfields, sprites, and HAM mode magic
Denise transformed raw bitplane data into stunning visuals with dual playfields, eight hardware sprites, and the famous Hold-And-Modify mode.
Overview
Denise handled the final stage of Amiga graphics: converting bitplane data into colour values and mixing in sprites. While Agnus fetched the data, Denise determined what appeared on screen. Its flexibility allowed programmers to create effects impossible on contemporary hardware.
Fast facts
- Function: display generation, sprite output, collision detection.
- Versions: 8362 (OCS), 8373 (ECS), Lisa (AGA).
- Palette: 32 colours from 4096 (OCS/ECS), 256 from 16.7M (AGA).
- Resolutions: 320×200 to 1280×200 (interlaced doubles vertical).
Display modes
| Mode | Colours | Resolution | Bitplanes |
|---|---|---|---|
| Lowres | 32 | 320×200 | 5 |
| Hires | 16 | 640×200 | 4 |
| HAM | 4096 | 320×200 | 6 |
| EHB | 64 | 320×200 | 6 |
| SuperHires | 4 | 1280×200 | 2 |
Bitplane architecture
The Amiga uses planar graphics:
- Each bit of a pixel comes from a different bitplane.
- 5 bitplanes = 32 colours (2^5).
- Bitplanes can be toggled independently.
- Different depths suit different needs.
Colour calculation
Pixel colour = (BPL5 × 16) + (BPL4 × 8) + (BPL3 × 4) + (BPL2 × 2) + BPL1
Dual playfield mode
Two independent scrolling layers:
| Playfield | Bitplanes | Colours |
|---|---|---|
| Odd | 1, 3, 5 | 8 (including transparent) |
| Even | 2, 4, 6 | 8 (including transparent) |
Each playfield scrolls independently—perfect for parallax effects.
Hardware sprites
Denise provides 8 hardware sprites:
| Feature | Specification |
|---|---|
| Width | 16 pixels (lowres) |
| Height | unlimited (beam-following) |
| Colours | 3 + transparent each |
| Attachment | pairs combine for 15 colours |
Sprite registers
| Sprite | Position | Data |
|---|---|---|
| 0 | SPR0POS | SPR0DATA |
| 1 | SPR1POS | SPR1DATA |
| … | … | … |
| 7 | SPR7POS | SPR7DATA |
Sprite multiplexing
The Copper can reposition sprites mid-frame:
- Wait for sprite’s last scanline.
- Update position registers.
- Load new data.
- Sprite appears at new location.
This technique multiplies effective sprite count.
HAM mode
Hold-And-Modify displays 4096 colours:
| Bits 5-4 | Action |
|---|---|
| 00 | Set pixel from palette (16 base colours) |
| 01 | Hold R & G, modify B |
| 10 | Hold R & B, modify G |
| 11 | Hold G & B, modify R |
HAM limitations
- Colour changes ripple horizontally.
- Fast horizontal colour transitions cause fringing.
- Best for photographs and gradients.
Collision detection
Denise detects sprite and playfield collisions in hardware:
| Register | Detects |
|---|---|
| CLXDAT | Sprite-sprite, sprite-playfield collisions |
Bit flags indicate which objects overlap—no CPU calculation needed.
Key registers
| Register | Address | Purpose |
|---|---|---|
| BPLCON0 | $DFF100 | Bitplane control (depth, modes) |
| BPLCON1 | $DFF102 | Scroll delays |
| BPLCON2 | $DFF104 | Sprite priority |
| BPL1DAT | $DFF110 | Bitplane 1 data |
| COLOR00 | $DFF180 | Background colour |
| COLOR01-31 | $DFF182+ | Palette entries |
| SPR0POS | $DFF140 | Sprite 0 position |