Skip to content

Case Study: zz9000-amix

isoriano1968/zz9000-amix is an Amix kernel framebuffer/mode driver for the MNT ZZ9000 graphics card, published 2026-07-03 (v0.1.0) by the hydra-amix author ✅. It exposes the card as /dev/zz9000 (char major 49, minor 0) with mode setting, mmap() framebuffer access, an ioctl API, and an optional kernel framebuffer console with an ANSI escape parser ✅. It is the hardware foundation the ZZ9000 X11R5 and X11R6.3 RTG servers sit on ✅.

Everything on this page is ✅ from the repository source and README at the initial release (75e2449; brief §21) unless tagged otherwise. Hardware results (target machine A3000UX, tested primary mode 1920×800 RGB565) are the author's reports on his own hardware — not yet reproduced on this project's bench.

At a glance

Property Value Tag
Repo github.com/isoriano1968/zz9000-amix
Card MNT ZZ9000, configured as Zorro II product 3 (mfr 0x6d6e)
Device /dev/zz9000, char major 49 minor 0
Discovery autocon(0x6d6e0003) + register sanity check; boot-time init_tbl[] probe
Framebuffer board + 0x10000; RGB565 primary (8/15/16/32-bit modes defined)
Tested mode 1920×800 RGB565 (author-reported, A3000UX)
Acceleration fill/copy ioctls are CPU loops; blitter code present but unwired in 0.1.0
Console optional 1920×800 ANSI framebuffer console, activated late via /etc/rc2.d/S99zz9000
Excluded ZZ9000 USB and ethernet (not in this release); Zorro III product 4 rejected
License MIT (source-only; builds in a licensed Amix /usr/sys tree)

Zorro II product 3 only — the Zorro III identity is rejected

Amix has no Zorro III bus support, so the driver only binds the ZZ9000's Zorro II identity: manufacturer 0x6d6e (MNT), product 3 ✅. If autocon() instead reports the Zorro III product 4 (0x6d6e0004), the driver logs the board as unsupported and tells you to reconfigure the card as Zorro II product 3 ✅. (The diagnostic tool still detects the Zorro III identity, so you can see what the card is currently configured as ✅.)

Probe order at zz9000init() (wired into init_tbl[]) ✅:

  1. autocon(0x6d6e0003, unit, &base, &size) — the standard bootinfo lookup (see Zorro II AUTOCONFIG).
  2. A presence sanity check on the mapped registers: the hardware-version register (0x00) and firmware-version register (0xc0) must not both read 0/0xffff.
  3. Attach; warn if firmware is older than 0x010d.

The board window

From zz9000.h ✅:

board + 0x0000 … 0x1FFF   registers (ZZ9K_REG_SIZE 0x2000)
board + 0x10000 …         framebuffer (ZZ9K_FB_OFFSET)
                          fb_size = board_size − 0x10000 − 0x20000
                          (0x20000 = reserved Zorro II tail)

Key registers: MODE 0x02 (packs mode | color_mode<<8 | scale_mode<<12), CONFIG 0x04, 32-bit pan at 0x0a/0x0c, VCAP_MODE 0x0e, VBLANK_STATUS 0x4c, FW_VERSION 0xc0; a blitter register block at 0x10–0x5e; the capture/CX block at 0x1000–0x1006 ✅. The mode table defines 18 mode IDs (0–17) from 640×400 up to 2560×1440p30; 1920x800 is ID 17 and the author's tested primary ✅. Color modes: 8-bit (0), RGB565 (1), 32-bit (2), 15-bit (3) ✅.

The driver API

A classic statically-linked SVR4 char driver (see the driver model): open, close, read/write (uiomove() across the whole board window), mmap (phystopfn(base + offset) — the same page-frame pattern as va2000), and an ioctl set in group 'Z'<<8 ✅:

ioctl # Purpose
ZZ9KIOC_GETINFO 1 Board info: base, sizes, hw/fw version, current geometry
ZZ9KIOC_SETMODE 2 Set mode by width/height + color mode (validates against fb_size)
ZZ9KIOC_SETPAN 3 Set the 32-bit display pan offset
ZZ9KIOC_SETSWITCH 4 RTG (1) vs native-video capture pass-through (0)
ZZ9KIOC_FILL 5 Byte-fill a framebuffer range (used by X to clear)
ZZ9KIOC_GETREG / SETREG 6/7 Raw 16-bit register peek/poke (offset < 0x2000, even)
ZZ9KIOC_GETAUTOCON 8 Dump the kernel's bootinfo.autocon[] table (16 entries)
ZZ9KIOC_PROBE 9 (Re)probe the board; ENXIO if absent
ZZ9KIOC_CONSOLE 10 Console control: enable / disable / redirect / test
ZZ9KIOC_GETFBINFO 11 Framebuffer geometry + stride + RGB masks/shifts (what the X DDX consumes)
ZZ9KIOC_FILLRECT / COPYRECT 12/13 Rectangle fill / overlap-safe copy — CPU loops, RGB565 only

SETSWITCH is how the single HDMI output is shared: capture (0) passes the native Amiga video through (restoring pan 0x00e00000), RTG (1) shows the ZZ9000 framebuffer ✅.

Acceleration status. The driver contains blitter code (zz9k_blit_fill/zz9k_blit_copy writing the 0x10–0x5e block), but in v0.1.0 no ioctl path calls itFILLRECT/COPYRECT are bounds-checked CPU loops, and the X11R6.3 server draws purely into the mmap()'d framebuffer anyway ✅. Hardware acceleration is scaffolded, not wired.

The framebuffer console — and why it activates late

The driver includes a kernel-mode color console on the ZZ9000: 1920×800 RGB565, with an ANSI/CSI escape parser (cursor movement A/B/C/D/H/f, clears J/K, SGR 0/1/7/30–37/40–47 over an 8-color RGB565 palette), rendered with Amix's own console font (builtinfont[0], magic 0x2a46 — the Makefile links amiga/console/sunfont.o into the driver) with a 5×7 built-in fallback ✅.

The safety model is the page's most instructive lesson ✅: earlier experiments that took over the console before the native Amix console was initialized could stop the machine before filesystems or networking came up. The supported design therefore never touches the boot console — redirect is activated after normal startup by a SysV init script:

# /etc/rc2.d/S99zz9000 — late console redirect (installed by `make install-rc`)
/etc/rc2.d/S99zz9000 start    # zz9k_test /dev/zz9000 redirect
/etc/rc2.d/S99zz9000 stop     # back to the native HDMI capture path

The optional kernel-side hook is two lines in c1write() (integration/c1-console.txt), gated on sp == displayedscreen — without that test, output from every Amix virtual terminal is funneled into the same framebuffer console ✅. For X11 use, neither the hook nor the init script is needed — the X server talks to /dev/zz9000 directly ✅.

Building and installing

The repo is an overlay: install-source.sh [prefix] copies the self-contained subtree to /usr/sys/amiga/driver/zz9000 without rewriting any Amix kernel file; the kernel integration is three small documented edits ✅ (integration/):

  1. master.d/kernel.cextern void zz9000init(); + zz9000init, in init_tbl[], extern decls, and a cdevsw[49] row (zz9000open,…,zz9000ioctl, zz9000mmap, …).
  2. amiga/driver/Makefile — add zz9000/exp to OBJ plus build/clean rules.
  3. (optional) amiga/console/c1.c — the displayed-VT console hook above.
sh install-source.sh                     # copy the subtree into /usr/sys
# apply the integration/ edits, then:
cd /usr/sys/amiga/driver/zz9000 && make  # gcc -O -traditional … ; ld -r → exp
cd /usr/sys && make force                # relink the kernel (see kernel-build)
sh /usr/sys/amiga/driver/zz9000/mkdev.sh # mknod /dev/zz9000 c 49 0
make install-tools                       # zz9k_test, colorls, … → /usr/amiga/bin
/usr/amiga/bin/zz9k_test /dev/zz9000 16 1920x800   # verify: mfr 0x6d6e, product 0x03

Major 49 is a convention of the author's tree, not a registry. His development kernel uses 47 hydra, 48 random, 49 zz9000, 50 sad — while this project's family puts z3660eth/zen0 at 51 ✅ (48 until 2026-07-30). Community drivers self-assign free cdevsw[] slots, so collisions between community trees are real; INSTALL.md itself says to verify 49 is free in your kernel.c before wiring it (see the device list).

The tools are worth a look: zz9k_test is the all-in-one diagnostic (board report, autocon dump, mode tests, blit, and the console subcommands console/consoletest/redirect/noconsole), and colorls is an LS_COLORS-driven color ls to show the ANSI console off ✅.

What this release does not do

  • No ZZ9000 ethernet — the card has one, but this release covers graphics + console only ✅. (For Amix networking today see hydra and the Z3660 ethernet driver.)
  • No USB ✅.
  • No Zorro III operation — by design, as above ✅.

See also

Sources

  • sources/research-brief.md §21 — isoriano1968/zz9000-amix @ 75e2449 (v0.1.0, 2026-07-03).
  • isoriano1968/zz9000-amixoverlay/usr/sys/amiga/driver/zz9000/zz9000.{c,h} (probe/attach, register map, ioctls, console, blitter scaffolding), integration/{kernel.c,amiga-driver-Makefile,c1-console}.txt, INSTALL.md, README.md (safety model, hardware scope), CHANGELOG.md, tools/, init/S99zz9000.
  • MNT ZZ9000 drivers & hardware definitions — the upstream register/mode reference cited by the companion x11r6.3-amix README (🟡 not independently cross-checked here).