Skip to content

Case Study: x11r6.3-amix (Xzz9000)

isoriano1968/x11r6.3-amix is an independent X11R6.3 port to Amix, published 2026-07-03, whose server binary Xzz9000 drives the MNT ZZ9000 through the zz9000-amix kernel driver at /dev/zz9000 ✅. It is the generational successor to the X11R5 Xrtg work: a newer X release, a card-generic RTG DDX layer designed for more cards than the ZZ9000, and — the part with value far beyond graphics — the first public write-up of the native Amix shared-library ABI that any dynamically-linked Amix program must obey ✅.

Facts are ✅ from the repo source/READMEs at 43383c5 (brief §21). Runtime results are the author's reports (A3000UX + ZZ9000): the server builds with GCC 2.7.2.3, links, and starts at 16-bit modes including 1920×800, with dynamic xclock/xterm/twm as the validation targets ✅. This is explicitly development software; it installs under /usr/x11r6 and coexists with the stock X11R4/R5 ✅.

At a glance

Property Value Tag
Repo github.com/isoriano1968/x11r6.3-amix
X release X11R6.3 (the three official xc-{1,2,3}.tar.gz from x.org)
Server binary Xzz9000 (DIX + mfb + cfb + cfb16 + hw/amix DDX)
Visual TrueColor RGB565, 16-bit; software cursor
Modes 640×480 … 1920×800 (default), -mode flag / ZZ9K_MODE env
Kernel dependency zz9000-amix/dev/zz9000 (char 49)
Compiler native GCC 2.7.2.3 + GNU cpp at /usr/public/lib/gcc-cpp
Shared libraries native Amix model: gcc -fpic + ld -G -h, .sa stub archives
MIT-SHM disabled (HasShm NO) — author found it unsafe on Amix
Install root /usr/x11r6 (does not replace X11R4/R5)
Distribution overlay-only: install.sh fetches + SHA-256-verifies pristine X11R6.3, then applies overlay/xc
License X Consortium (X11R6.3) · UC/Sun/MIT notices (historical glue) · MIT (new code)

The overlay pattern

The repo was published as the Amix delta only, with no X Consortium source; since the 2026-07-07 commits (277087f, 564694f, 331d84e) the overlay also vendors seven full X Consortium/DEC core files (dix/dixfonts.c, lib/font/bitmap/pcfread.c, bitmapfunc.c, mfb/maskbits.h, mfb/mfbimage.c, mi/midispcur.c, mi/miglblt.c — about 5,000 lines, each keeping its inline DEC/X Consortium header; PORT-FILES.md records why each was taken whole) ✅ (re-read 2026-09-14 at HEAD cb61a21). install.sh still downloads the three official archives from the X.Org X11R6.3 archive, verifies them against a committed SOURCES.sha256, extracts one xc tree, and copies overlay/xc over it ✅:

git clone https://github.com/isoriano1968/x11r6.3-amix.git
cd x11r6.3-amix
sh install.sh /export/amix/x11r6.3      # → /export/amix/x11r6.3/xc
# copy or mount that tree as /usr/x11r6/xc on Amix

This is the same keep-upstream-out-of-the-repo licensing discipline this project uses for Amix media, applied to X11 ✅ — with the seven whole files above as the documented exception. The rest of the overlay is small: imake config, the hw/amix server directory, a few library Imakefiles, and compatibility shims for Amix's old cpp/make/lex ✅ (PORT-FILES.md).

Build configuration: amix.cf

config/cf/amix.cf defines the platform ✅: -DAMIX -Dm68k -DSVR4, SystemV4, OS name "Amiga UNIX System V Release 4.0" (vendor Commodore-Amiga), ProjectRoot /usr/x11r6. The load-bearing choices:

Setting Value Why ✅
HasGcc2 / CcCmd GCC 2.7.2.3, CppCmd /usr/public/lib/gcc-cpp the community-standard native toolchain (see toolchain)
HasShm NO MIT-SHM "is not safe on AMIX" — independent of the shared-lib choice
HasSharedLibraries YES, SunOS-4-style shared-code/shared-data (-DSHAREDCODE/-DSUNSHLIB, SharedDataSeparation YES, -fpic, load flags -G) deliberately matches the ABI the working Amix X11R5 libraries use
XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC Amix has no wctype.h/widec.h; use Xlib's internal wide-char helpers
Libraries -lsocket -lnsl everywhere; server adds -ldbm -lscreen SVR4 sockets + the Amix screen-manager library
BuildPex NO (only PEX deferred) same minimalism as the R5 build
BuildXKB YES — but the launcher passes -kb XKB libraries build; the XKB device path is unfinished

Server architecture: a card-generic RTG layer

Xzz9000 keeps the R6.3 DIX and adds an Amix DDX under programs/Xserver/hw/amix/ ✅. The input, keyboard, and console glue (amixInit.c, amixKbd.c, amixMouse.c, amixIo.c, …) carries 1987 Sun/UC-Regents copyright — the same Sun-derived DDX lineage as the stock Amix X server — and its GC/clip patterns are explicitly modelled on the TIGA DDX (dmi/tiggc.c), i.e. the historical A2410 server ✅. On top of that:

X clients
Xzz9000                       # X11R6.3: DIX + mfb/cfb/cfb16 + hw/amix DDX
hw/amix/                      # Sun-lineage Amix glue: input, keymap, cursor, init
hw/amix/rtg/                  # NEW generic RTG layer: rtgProbe/rtgCreate/rtgScreenInit
hw/amix/rtg/zz9000/           # card driver: Probe/InitHW/ScreenInit + drawing vector
/dev/zz9000  (char 49)        # SETMODE → GETFBINFO → mmap → CPU rendering

The rtg/ layer owns the per-screen record (rtgScreenRec: mmap base, geometry, pitch, depth) and the probe/create entry points wired into the DDX's amixFbData[] table; the card subdirectory owns everything ZZ9000-specific ✅. The header states the design intent: "Each card provides its own header … and installs its drawing functions into the ScreenRec directly. First supported card in this tree: MNT ZZ9000" ✅ — supporting another RTG card means adding a new subdirectory under rtg/, exactly the seam a future Z3660 RTG backend would use.

Drawing is pure CPU into the mmap()'d framebuffer: solid fills go to ZZ9000FillSpans/ZZ9000SolidRect, CopyArea to ZZ9000CopyArea; tile/stipple currently fall back to solid (marked TODO); lines, arcs, and text delegate to the mi layer ✅. The kernel driver's FILLRECT/COPYRECT ioctls are not used — the driver contract is PROBE → SETMODE (RGB565) → GETINFO/GETFBINFO → mmap → FILL (clear) → SETSWITCH RTG, and SETSWITCH CAPTURE + munmap on close ✅. servermd.h gains the m68k AMIX block (IMAGE_BYTE_ORDER/BITMAP_BIT_ORDER = MSBFirst, GLYPHPADBYTES 4) ✅. A commit-level fix worth knowing: the R6 pixmap-private storage had to be made correct for both 16-bit pixmaps and the depth-1 bitmaps used for fonts and cursors ✅.

Input: SIOCACTIVATE, not DisplayScreen() — the SIGHUP trap

Like Xrtg, input comes from the Amix screen manager: OpenScreen() returns an event fd, and SIOCSETINPUTMODE SIM_RAWKEY requests raw keycodes ✅. But the port documents a subtle and load-bearing refinement ✅:

  • DisplayScreen() is avoided. It would require NewBitmap (a chip-RAM native bitmap) and would take over the ECS display — and when the native console loses its screen, the screen manager sends SIGHUP to the X server.
  • SIOCACTIVATE instead selects the X screen as the event target only, leaving the native Amiga display untouched — no display switch, no spurious SIGHUP. (The ZZ9000 reads its own framebuffer, so nothing about the native display matters to RTG output.) The comment cross-checks this against Klaus Burkert's Xsvga, which drives its card the same way.

If OpenScreen() fails, the server starts display-only with a no-op wakeup handler — guarding against FD_ISSET(-1), which is undefined behaviour and crashes on m68k SVR4 ✅.

The Amix shared-library ABI

SHARED-LIBRARIES.md is the port's most broadly useful artifact: the native SVR4 shared-library ABI with split shared-code/shared-data, "validated on AMIX with GCC 2.7.2.3 and the native link editor" ✅. The rules — required for any dynamically-linked Xt client, and instructive for any Amix shared library:

  • Runtime images: libfoo.so.N is an ELF image built with the native linker:
ld -G -h libXt.so.6.0 -o libXt.so.6.0 <objects>   # BOTH -G and the -h SONAME

Compile the objects with gcc -fpic, but never link the image with gcc -G — GCC 2.7.2.3 silently adds executable startup objects, producing runtime errors about a missing main ✅. -Bsymbolic was tested and does not fix loader failures ✅. - Stub archives: libXt.sa and libXmu.sa are ordinary ar archives containing exactly sharedlib.o, supplying executable-resident entry points and data the shared-data ABI needs. Xaw has no .sa. A .sa must never be renamed to or used as libfoo.so ✅. - Link order is left-to-right and strict: each .sa immediately after its -l, providers after users ✅:

-lXaw -lXmu /path/libXmu.sa -lXt /path/libXt.sa -lSM -lICE -lXext -lX11 -lsocket -lnsl

Omitting libXt.sa fails with unresolved XtOpenApplication/XtToolkitInitialize ✅. - Do not use the stock SVR4 XawClientLibs expansion on Amix (SHARED-LIBRARIES.md, added 64299bd 2026-07-09): it can emit -lXaw -lXmu -lXt … without libXmu.sa and libXt.sa, which fails for Athena clients that call Xt entry points directly — xlogo and xmag among them ✅. - Hygiene: never mix static and PIC objects in one library, and never reuse a .so built while experimenting with link flags — a stale libICE.so.6.3 crashed every Xt client before main until relinked with ld -G -h ✅.

config/util/amix-shared-rebuild.sh automates the clean rebuild (modes libs / all / clients / shdata): it deletes old objects, rebuilds, validates each image with file + dump -Lv, checks the .sa contents, and relinks the test clients (xinit xsetroot xclock xterm twm) — all before Xzz9000 is ever started ✅.

Running it

cd /usr/x11r6/xc
sh config/util/amix-shared-rebuild.sh /usr/x11r6/xc libs >/tmp/x11r6-shared.log 2>&1
sh config/util/startXzz9000 :0        # 1920×800 twm + xterm + xclock session

A second driver script, amix-build-programs.sh (modes useful / common / all), builds the client programs after the libraries ✅. The launcher honours ZZ9K_MODE, ZZ9K_FONT_PATH, X11R6_TOP, and — since b703af3ZZ9K_XMODMAP (default Xmodmap.de, a German keymap) and ZZ9K_SHELL; it detaches the ZZ9000 console before the session and restores it after (ad2b43f, 49d1557), starts the server directly rather than through xinit (b1d3095), and ships a twmrc.zz9000 root menu with titlebar controls and a Mesa gears launcher that checks two install paths ✅. It passes -ac -kb -terminate — access control off and XKB bypassed for the local bring-up test; do not expose this server to an untrusted network ✅. Prerequisites: Amix 2.1/SVR4, GCC 2.7.2.3 (+GNU cpp), the ZZ9000 driver with /dev/zz9000, and the system libraries socket, nsl, dbm, screen ✅. GLX and Mesa are not part of this tree ✅ — Mesa lives in its own repo and is only launched from the twm menu. No binary release or tag exists; everything is built natively on the box with GCC 2.7.2.3 ✅ (state as of 2026-09-14, HEAD cb61a21, 19 commits).

See also

Sources

  • sources/research-brief.md §21 — isoriano1968/x11r6.3-amix @ 43383c5 (2026-07-03).
  • isoriano1968/x11r6.3-amixREADME.md, PORT-FILES.md, SHARED-LIBRARIES.md (the ABI), install.sh + SOURCES.sha256, overlay/xc/config/cf/amix.{cf,rules}, overlay/xc/programs/Xserver/Imakefile (the Xzz9000 target), hw/amix/ + hw/amix/rtg/ + hw/amix/rtg/zz9000/ source (rtgInit.c input/SIGHUP notes, zz9000hw.c driver contract), config/util/{amix-shared-rebuild.sh,startXzz9000,xinitrc.zz9000}.
  • X.Org X11R6.3 archive — the pristine upstream sources install.sh fetches.
  • asokero/xrtg-amix / asokero/va2000-amix — the X11R5/VA2000 predecessors the README credits.