Denise decides what colour every pixel on an Amiga screen will be. It never reads memory: Agnus fetches the bitplane and sprite data and hands Denise the words, and Denise combines up to six bitplanes and eight sprites, works out which is in front, and sends out a 12-bit colour, four bits each of red, green and blue. Commodore’s glossary gives it three jobs: the colour palette, the sprites and the video output.
Most of what made Amiga games look the way they did happened here. Two scrolling layers that pass over each other, a player’s ship that moves without disturbing the background, a picture with thousands of colours on screen at once: each is a Denise mode, and each came with limits that shaped how games were drawn. The chip also keeps a few surprising extra jobs. It registers collisions between sprites and the background in hardware, and it counts the movement of the mouse: the counters for both controller ports, JOY0DAT and JOY1DAT, are Denise registers.
Fast facts
- Original Denise: 8362, in the Amiga 1000 and the A500.
- ECS Denise: 8373, in the A3000, A500 Plus and A600. Adds SuperHires and Productivity modes.
- Successor: Lisa (4203), in the AGA machines of 1992: the A1200 and A4000.
- Colours: 32 colour registers, each set from 4,096 colours (4 bits each of red, green and blue).
- Playfields: up to five bitplanes (32 colours) in low resolution and four (16 colours) in high resolution, or two independent playfields of up to three bitplanes each.
- Six-bitplane modes: hold-and-modify (HAM), up to 4,096 colours at once, and Extra Half-Brite (EHB), 64.
- Sprites: eight, each 16 pixels wide, any height, three colours plus transparent; pairs can be attached for 15 colours plus transparent.
- Collisions: between sprite pairs, sprites and either playfield, and the two playfields, reported in
CLXDAT.
Bitplanes: one bit of each pixel per plane
An Amiga picture is stored as bitplanes. Each plane holds one bit of every pixel, and Denise reads the same pixel from each plane to build a colour number. With five planes, bitplane 5 gives the most significant bit and bitplane 1 the least, so a pixel whose bits read 1, 0, 0, 1, 0 from plane 5 down to plane 1 uses COLOR18. More planes means more colours and more memory to fetch. Five planes give 32 colours in low resolution, four give 16 in high resolution, and the manual notes that the sixth plane “is used only in dual-playfield mode and in hold-and-modify mode”. The Extra Half-Brite mode, described below, gave it a third use.
The number of planes also sets what the display costs the rest of the machine, because Agnus has to fetch every one of them on every line. The Agnus entry shows the arithmetic: past four low-resolution planes, bitplane fetches start taking cycles from the processor.
Two playfields
Setting bit 10 of BPLCON0 splits the bitplanes into two separate screens. The odd planes (1, 3 and 5) form playfield 1 and the even planes (2, 4 and 6) form playfield 2. Each playfield has “up to seven plus transparent” colours from its own set of registers, and “they can be scrolled separately”. Bit 6 of BPLCON2 sets which one is in front. Where the front playfield is transparent, the other shows through.
That meant parallax scrolling with no drawing at all: the hardware slid two layers over each other at different speeds. The cost was colour. Dave Jones, explaining his Psygnosis shoot-’em-up Menace to Amiga Format readers in 1990, noted that “as Menace is a dual playfield game the maximum number of colours per block is 8, made up from 3 planes”. Andrew Braybrook agonised over the same trade in his Uridium 2 diary for The One in late 1992. He built a dual-playfield version of the game alongside the 32-colour one, then asked: “can anyone draw sensible graphics in seven colours, of which one must be black?” The next day he wrote that “two sets of three colours just doesn’t give the nice shading and one set of six colours looks like the TV isn’t working properly.”
Other games took the deal. Core Design’s Dan Scott told The One in 1993 that the Amiga Wonder Dog was “done in dual playfield, so there are two eight-colour playfields with the hardware sprites being used for the main character”. When Braybrook took apart other programmers’ tricks for the magazine in 1994, he explained that Psygnosis’s Agony got its three layers of parallax from two playfields plus a third made from a hardware sprite, repeated across the screen and shaded vertically.
Sprites
Denise has eight sprite channels. A sprite is “16 pixels wide and any number of lines high”, and each pixel can be “one of three colors or transparent”. The colours come from registers 16 to 31, shared: “the eight sprites are organized into pairs and each pair uses four of the color registers”. For more colour, a program can attach an odd-numbered sprite to the even one below it (1 to 0, 3 to 2, and so on). The two then act as one 16-pixel object with “fifteen possible color choices (plus transparent)”, at the cost of two channels.
Eight is not the limit on screen. Each sprite’s data list can hold several images down the screen, one after another, as long as “at least one video line” separates the bottom of one from the top of the next. Programs that needed more used a multiplexor, which Braybrook described in his Uridium 2 diary as “a routine which sorts the objects to be displayed into vertical position sequence and re-uses hardware sprites to show them”; see sprite multiplexing.
Sprites and playfields are stacked by priority, set in BPLCON2. Sprites are ranked in pairs, 0 and 1 in front, and each playfield can be placed anywhere in that order. The manual’s example puts a sprite between the two playfields, so it vanishes when it crosses an invisible boundary.
Because sprites cost no drawing time and leave the background untouched, games often kept them for the object that mattered most. The player’s ship in Menace is a hardware sprite, Dave Jones explained, and so is the main character in Wonder Dog. Menace’s aliens were drawn into the playfield with the blitter instead, as bobs.
Collisions in hardware
Denise compares objects pixel by pixel as it builds the picture. When two of them try to occupy the same pixel it sets a bit in CLXDAT: sprite pair against sprite pair, either set of bitplanes against a sprite pair, or odd planes against even planes. Reading the register clears it. CLXCON chooses which bitplanes take part and which value in each counts as a hit, so a program can register collisions only with “something green” or “something blue”, in the manual’s words.
Menace used this carefully. Its aliens were drawn into the back playfield, whose scenery filled planes 1 and 3; the aliens alone used plane 5. So Jones set the hardware to report the ship’s sprites touching plane 5 only, and got ship-to-alien collisions for free. The limits showed up elsewhere: “We cannot use the Amiga’s hardware detection for missiles to aliens as this only works with hardware sprites.” The missiles and the aliens were both drawn into bitplanes, so he tested them with the blitter instead.
Hold-and-modify
HAM is the mode behind the Amiga’s reputation for photographs. The manual says it “allows you to produce up to 4,096 colors on the screen at the same time”, and it does, but not by giving each pixel a free choice. Planes 5 and 6 tell Denise what to do with the four bits in planes 1 to 4:
| Plane 6 | Plane 5 | What the pixel does |
|---|---|---|
| 0 | 0 | Use one of colour registers 0-15 |
| 0 | 1 | Copy the pixel to the left, replace its blue with planes 4-1 |
| 1 | 0 | Copy the pixel to the left, replace its red with planes 4-1 |
| 1 | 1 | Copy the pixel to the left, replace its green with planes 4-1 |
A HAM pixel either picks one of 16 colours or edits its left-hand neighbour, changing one of three components. Changing all three takes three pixels, so a sharp edge between two unrelated colours smears across a few pixels. That fringing is the mode working as designed. The manual even points out that a HAM picture can be built from a single colour register, “COLOR0, the color of the background”, treating “the entire screen as a modification of that original color”.
HAM works only in low resolution and needs bit 11 of BPLCON0 set, bit 10 clear and five or six bitplanes. Page 95 of the 1991 manual says the mode “is in effect only if bit 10 of BPLCON0 = 1”; that is a misprint for bit 11, as page 87 and the dual-playfield section both make clear.
Fringing and the cost of six bitplanes kept HAM mostly to still pictures and paint programs. Games that tried it were news. The One reported in December 1988 that Mandarin’s Pioneer Plague, programmed by Bill Williams, was “the first game on the Amiga to make full use of its unique Hold and Modify (HAM) mode”.
Extra Half-Brite
The sixth bitplane has one more use. With six planes and neither HAM nor dual playfield switched on, Denise uses the first five planes to choose one of the 32 registers as usual and the sixth to halve its brightness. “This allows 64 colors to be displayed at one time instead of the usual 32”: 32 chosen colours and a darker copy of each. The mode was not in every Denise. ACE noted in 1988 that “a few very early A1000s do not have EHB”.
Games used it for richer backgrounds than 32 colours allowed. The One reported in January 1992 that each of the twelve dungeons in Raven Software’s Black Crypt was “rendered in 64-colour ‘extra half-brite’ graphics”.
Super Denise and Lisa
The Enhanced Chip Set’s Denise, the 8373, added two display modes. SuperHires has “a 35ns pixel display rate”, 1,280 pixels across, but at most two bitplanes, four colours, because two SuperHires planes use as much memory time as four high-resolution ones. Productivity mode gives “640 x 480, non-interlaced screens in up to four colors” on a multisync monitor. The 8373 also added genlock features and a register, DENISEID, that returns $FC in its low byte. The original 8362 “does not have this register”, so software can tell the two apart.
Many later A500s combined an ECS Agnus with the original 8362 Denise. The A500 Plus service manual lists the 8373 as one of only two changes to the custom chips, alongside the 2MB Agnus.
The AGA chip set of 1992 replaced Denise with Lisa, listed as part 4203 in the A4000 service manual. At the A1200’s launch, Amiga Format explained what it offered: a palette of 16,777,216 colours, 256 on screen rather than 32, and a new HAM mode “working on a 6-bit rather than 4-bit base” that gave 262,144 colours. The magazine also expected A1200 games to use “larger sprites”.
Registers
| Register | Address | Purpose |
|---|---|---|
JOY0DAT |
$DFF00A |
Mouse or joystick counters, port 1 |
CLXDAT |
$DFF00E |
Collision data, read and clear |
DENISEID |
$DFF07C |
Chip version (ECS and later) |
CLXCON |
$DFF098 |
Collision control |
BPLCON0 |
$DFF100 |
Bitplane count, high resolution, HAM, dual playfield |
BPLCON1 |
$DFF102 |
Horizontal scroll for each playfield |
BPLCON2 |
$DFF104 |
Playfield and sprite priority |
BPL1DAT |
$DFF110 |
Bitplane 1 data, loaded by DMA |
SPR0POS |
$DFF140 |
Sprite 0 position |
COLOR00-COLOR31 |
$DFF180-$DFF1BE |
Colour registers |
Sources
- AmigaWorld, volume 1 number 2, November/December 1985, p. 6: the Amiga’s debut on 23 July 1985.
- Amiga Hardware Reference Manual, 3rd edition (Commodore-Amiga, Addison-Wesley, 1991): bitplanes and colour selection (pp. 43-44, 48); dual playfields (pp. 67-72); HAM (pp. 86-87); HAM colour table, its bit-10 misprint, and EHB (p. 95); sprites (p. 97); sprite colours (p. 102); sprite reuse (p. 116); attached sprites (pp. 120-121); sprite and playfield priority (pp. 210-211); collision detection (pp. 213-215); controller port registers (p. 228); ECS Denise (pp. 295, 299-300); register lists (Appendices A and B); glossary entry for Denise.
- Amiga 1000 Service Manual (Commodore): parts list, 8362 Denise. A500 Service Manual, PN 314981-04 (Commodore, October 1990): Denise 8362. A500 Plus Service Manual (Commodore, October 1991): “the same custom chip set as the A500, except for the 8375 2Meg. FAT AGNUS and 8373 ECS Denise”. A3000 Service Manual (Commodore, March 1990): parts list, “8373 ECS DENISE”. A4000 Service Manual (Commodore): parts list, “4203, LISA”.
- Commodore Amiga A500/A2000 Technical Reference Manual (Commodore, 1987): video output from Denise, four bits each of red, green and blue.
- Amiga Format, issue 8, March 1990, pp. 63-64: Dave Jones, “Games programming” part two, the dual-playfield Menace scroll. Issue 12, July 1990, pp. 156-158: the same series on collision detection. Issue 41, December 1992, pp. 22-23: the A1200 and the AGA chip set.
- The One, issue 3, December 1988: Pioneer Plague and HAM. Issue 40, January 1992: Black Crypt preview. Issue 51, December 1992: Andrew Braybrook, Uridium 2 diary, part five, on the dual-playfield version and the sprite multiplexor. Issue 61, October 1993: Wonder Dog, Dan Scott. Issue 71, August 1994: “Great programming tricks of our time”, Andrew Braybrook on Agony.
- ACE, issue 14, November 1988: Mandarin’s Pioneer Plague and HAM (news); Amiga screen modes and early A1000s without EHB (p. 22). Issue 16, January 1989: Pioneer Plague programmer Bill Williams.
See also
- Agnus: the chip that fetches Denise’s data, and what the display costs.
- The Amiga custom chipset: how the chips fit together.
- Copper: changes Denise’s registers in step with the beam.
- Blitter and bob graphics: drawing objects into the playfield instead of using sprites.
- Sprite multiplexing, parallax scrolling and collision detection.
- Commodore Amiga.