AA (Advanced Amiga) Graphics Features¶
V39 (Workbench 3.0) introduced the AA chip set (aka AGA), which redefined Amiga graphics capabilities: 24-bit color, new display modes, palette sharing, and RTG-compatible APIs. This article covers what changed and how to use the new features.
What AA brings¶
- Up to 24-bit color — 8 bits per gun, 16.8 million colors.
SetRGB32()takes 32-bit per-gun values (upper 8 bits used). - New display modes — DblNTSC, DblPAL (flicker-free), plus higher-resolution ECS-compatible modes.
- Palette sharing — multiple apps share a limited set of hardware color registers via
ObtainPen()/ReleasePen(). - Interleaved bitmaps —
BMF_INTERLEAVEDflag for faster bitmap access. - Mode promotion — interlaced screens automatically promoted to flicker-free modes when a multiscan monitor is available.
- Retargettable graphics (RTG) — RastPort functions designed to work with future non-Amiga graphics hardware.
The critical design goal per the source: "no features have been added to the new graphics system which cannot be kept for the future." Parameters like bits-per-pixel, resolution, and color palette size are variable or very large — code should not assume 4-bit-per-gun or 4096-color limits.
Color management on AA¶
void SetRGB32(struct ViewPort *vp, ULONG n, ULONG r, ULONG g, ULONG b);
LONG ObtainPen(struct ColorMap *cm, ULONG pen, ULONG r, ULONG g, ULONG b, ...);
void ReleasePen(struct ColorMap *cm, ULONG pen);
ULONG ObtainBestPens(struct ColorMap *cm, ...);
Pens are shared resources. Without ObtainPen(), another application can change your colors. Always ReleasePen() when done. On a non-AA system, only 32 or 64 pens exist; on AA, up to 256.
New screen tags (V39)¶
| Tag | Purpose |
|---|---|
SA_Colors32 |
32-bit-per-gun color array (replaces SA_Colors) |
SA_Pens |
Pen array for pen sharing |
SA_SharePens |
Allow other screens to share pens |
SA_Exclusive |
Exclusive screen mode |
SA_Interleaved |
Use interleaved bitplanes |
SA_DClip |
Custom display clip |
SA_BackFill |
Backfill hook for background painting |
SA_AutoScroll |
Enable auto-scroll when mouse hits screen edge |
Mode promotion and coercion¶
Mode promotion: if the user has installed a DblNTSC or DblPAL monitor driver (in DEVS:Monitors/) and has a multiscan monitor, interlaced screens are automatically displayed using double-height non-interlaced modes — flicker-free. Enabled via IControl Prefs (on by default in 3.1).
Coercion (programmatic mode control):
ULONG CoerceMode(struct Screen *screen, ULONG modeID, ULONG flags);
ULONG BestModeIDA(struct TagItem *tags); /* find best mode for criteria */
BestModeIDA() tags: BIDTAG_DesiredWidth, BIDTAG_DesiredHeight, BIDTAG_Depth, BIDTAG_MonitorID.
Color wheel and gradient slider (V39 BOOPSI classes)¶
Two new BOOPSI gadget classes for color selection:
/* Color wheel — HSB-based color selection */
APTR wheel = NewObjectA(NULL, "colorwheel.gclass", tags);
SetAttrs(wheel, WHEEL_Hue, hue, WHEEL_Saturation, sat, TAG_DONE);
GetAttr(WHEEL_RGB, wheel, &rgb); /* get RGB result */
/* Gradient slider — select along a gradient */
APTR gs = NewObjectA(NULL, "gradientslider.gclass", tags);
The color wheel works in HSB (hue, saturation, brightness) space but converts to/from RGB. See Extras/BOOPSI/ and NDK_3.1/Examples1/colorwheel/ for examples.
Double buffering¶
struct ScreenBuffer *AllocScreenBuffer(struct Screen *screen, struct BitMap *bm, ULONG flags);
ULONG ChangeScreenBuffer(struct Screen *screen, struct ScreenBuffer *sb);
void FreeScreenBuffer(struct ScreenBuffer *sb);
Enables flicker-free animation by swapping between two screen bitmaps synchronized to vertical blank.
Compatibility gotcha¶
The AA chips are register level compatible with old/ECS at boot up time. However, when new AA modes are enabled and displayed, and a game then takes over the screen display without informing the OS, some registers may be in incompatible settings.
This reinforces the programming philosophy: use the OS, don't bang hardware. Games that bypass the OS for screen display may fail on AA hardware.
See Also¶
Sources: Commodore-Amiga, Inc., "Overview of V39 Graphics" and "Intuition 3.0" and "Color Wheel and Gradient Slider" tutorials (1991-1993).
Raw: raw/tutorials/v39-aa-features.md
Updated: 2026-08-04