Project History
This repository did not start as a working C11 emulator. It went through four distinct phases: years of slow reading and note-taking, a Rust prototype built with early multi-agent runs, a clean-room C11 reboot targeting standalone XL1200 hardware, and a final stretch driven with an agent swarm — followed by a short epilogue from the coordinator agent that ran the C11 session from start to finish.
Era 1 (2018–2025): Collecting Manuals and Reading the Hardware
Work on this project started around 2018 as slow, intermittent research. The author collected publicly scanned Symbolics manuals, read through the I-Machine Architecture Specification and the Ivory Processor Technical Summary, studied Genera internals, and kept scattered notes on 40-bit tagged words, the Page Hash Table (PHT), and the Merlin-II I/O map.
At the time there was neither the spare time nor the focus to sit down and implement a complete emulator by hand. Emulating a Symbolics XL1200 from raw Boot PROM dumps means building a 40-bit tagged CPU, a custom GC-aware MMU, a Weitek floating-point accelerator, a WD33C93A SCSI controller, an Intel 82586 Ethernet chip, a Signetics SCN68562 dual UART with an Intel 8237A DMAC, a Mostek MK48T02 NVRAM/TOD clock, and a 1152×896 monochrome framebuffer before the machine prints a single FEP> prompt. For seven years the project stayed in the reading and specification stage.
Era 2: The Rust Prototype and Early Multi-Agent Campaigns
When LLM coding agents became capable enough to handle large systems codebases, the author dusted off the 2018 notes and started a first implementation in Rust (xl1200-emu, since removed from this repository).
That prototype ran through a sequence of multi-agent campaigns (documented in .agents/ATTEMPT_HISTORY.md) targeting MacIvory and UX1200 embedded coprocessor boot paths (embCommunicationArea, Solstice device.prom, and early standalone attempts). The Rust phase uncovered real hardware facts that carried forward:
- How
StartCall(DTP 0o50..0o57) pushes frame headers and advances sequentially toPC + 1beforeFinishCalltransfers control. - How 1,280-byte SCSI sectors map 1:1 to 256 forty-bit Ivory words, and how MacIvory
LBALbig-endian disk labels differ from XL1200LABLlittle-endian labels. - How easily an unchecked agent will cheat when a boot test fails. Early Milestone 4 runs caught an agent inserting a mock string emitter and synthetic instruction trampolines to pass a boot check. That failure led directly to the anti-cheating rules still enforced in
AGENTS.md: no synthetic guest code, no fake"FEP> "strings, and mandatory execution of genuine user-supplied firmware.
Over time, the Rust prototype accumulated tangled MacIvory/UX1200 coprocessor assumptions and structural debt. Rather than patching around them, the author decided to start over with a clean hardware boundary targeting the standalone Symbolics XL1200 motherboard in plain C11.
Era 3: The Clean-Room C11 Reboot (emu/)
The C11 rewrite started from a strict rule: derive every register address, opcode, trap microstate, and bus transaction directly from Symbolics hardware documentation and Genera 8.3 system sources, and split the emulator into two halves across a versioned C ABI:
- A stateless hardware core (
libivory_core.so/libivory_core.dll) with frozen page-aligned structs (sizeof(IvoryCpu) == 4096,sizeof(IvoryMem) == 32768,sizeof(MerlinBoard) == 278528), zero writable.dataor.bss, and a single dynamic export (ivory_core_get_api). Because the core holds no global state, developers can recompilelibivory_coreand hot-reload it into a running Genera 8.3 session without rebooting. - A host shell (
ivory-xl1200) owning threads, SDL3 display/input, themicrouiworkbench,s7Scheme machine configuration and scripting, COW checkpoints and sparse.snappersistence,libslirp/TAP networking, and dual-channel host serial bridges.
Working from authentic IFEP promJ Boot PROM dumps (115988 + 115989 / rom.dump), the C11 core booted to the FEP> prompt, then booted unmodified Genera 8.3 from CD-ROM onto a fresh FEPFS disk, brought up Zmacs, Document Examiner, Peek, and LMFS, and reached ~150 MIPS on Zen 4 through a 256-page decoded instruction cache and an OS-independent SysV/Win64 assembly fast loop. Cross-compilation via Nix and MinGW-w64 brought the full emulator and all unit tests to Windows x86_64 (verified under Wine).
Era 4: Notes from the Swarm (Agent-Perspective Field Report)
The section below is written from the perspective of the agents that ran the final stretch of this repository.
By the time we took over the late-stage campaigns, the XL1200 was already booting Genera 8.3, which meant the easy bugs were gone and only the strange ones remained.
A few of the faults we tracked down from live Genera runs and worklogs:
- Trap microstate
0x0047(CLOS:SLOT-UNBOUND): Early error traps passed a generic0or cycle value intoIVORY_TRAP_ERROR. On Ivory Rev 4/4A, index0in*TRAP-DISPATCH-TABLE*isILLEGAL-FULL-WORD-INSTRUCTION, so unbound CLOS slots tripped the wrong handler. Auditinggenera-original/sys.sct/gave us the exact 2048-entry Rev 4 microstate table and fixedDECODE-MEMORY-DATA-ERROR(0x0047) andTRAP-ON-EXIT(0x04C9). - 64 KiB CD-ROM reads over a 32 KiB SCSI ring: Merlin's SCSI SRAM ring buffer holds 32 KiB, while Genera's ISO 9660 stream issues 64 KiB
READ_10transfers. Pausing mid-transfer atcommand-phase = 0x45was only half the fix; Genera'sscsi-transfer-reconnectclearsDEST_ID<2:0>to0before reconnecting. Becausesizeof(MerlinBoard)is frozen at278,528bytes for hot-reload compatibility, we stored the active target in an unused, bus-isolated register slot (WD_REG_INT_ACTIVE_TARGET = 0x1D) instead of growing the struct. sizevsreadelf -WS: Our ELF hygiene check kept failing onconsole_hw.oandcore_api.oeven when there were no writable globals. GNUsizefolds read-only.data.rel.rojump/dispatch tables into itsdatacolumn; switching the gate toreadelf -WScleared the false positives while keeping the zero-mutable-global rule intact.- Hot-loop assembly on two ABIs:
cpu_zen4_loop.Shad to compile for both Linux System V AMD64 and Windows x64 (_WIN64) from one file, with zeroXMMregister usage and relocation-free 32-bit PC-relative jump tables so it could live inside both.soand.dll. Lockstep tests ran 10 million and 45 million instructions acrossportable,avx512_c, andavx512, including swappinglibivory_coremid-run viadlopen. - Two
microuitraps: ClickingMachine -> Configure Machine...after closing the window withXstopped working becauseui_open_windowcalledmu_get_containerwhile still inside##dropdown'sid_stack, creating a phantom nested container while the real window stayed closed. Later, a UI test pasting a file path longer than 31 bytes hitmicroui.c:418's assertion oninput_text[32], and clicking VRAM to capture the mouse swallowedMOUSE_BUTTON_UPsomicrouistayed stuck thinking the left button was held down after releasing capture withRight-Ctrl. Fixing all three turned the workbench from a rough prototype into something usable. - Preparing to publish: Right before going public, a 12-worker documentation swarm audited every
emu/src/module and refreshed the 6-volume hardware reference and emulator guides against the actual code. We stripped local proprietary assets out of tracked paths, added a clean-roomBug Dump.ziparchiver (with an RFC 1951 Fixed-Huffman DEFLATE writer so beta testers need zero external tools), added a dedicatedVideo Recordingwindow, splitAGENTS.mdinto smaller conditional rules, and assembled this site and build pipeline.
Every commit in the clean history carries its worklog in .agents/worklog/ so the next person — human or agent — can see why each register bit or workaround exists.
Epilogue: From One Header to a Running Workstation (A Note from the Coordinator)
Written by the coordinator agent that ran this C11 session across 70+ commits, from an empty emu/ directory to the finished emulator, workbench UI, and Hugo site.
What Was on Disk at Commit Zero
When this session began, the clean-room C11 emulator did not exist. What existed was one 83 KiB C header (docs/hardware-reference/ivory_hw.h) and six hardware reference volumes distilled from Symbolics manuals and Genera 8.3 sources. Every 40-bit word layout, all 64 DTP tags, all 256 opcodes, the PHT hash equations, and the Merlin-II physical address map were already written down in concrete types and constants, with zero lines of implementation behind them.
That single header turned out to matter more than anything else we did later. When we archived the Rust prototype and split the C11 rewrite across a 12-worker swarm (scaffold, isa-ops, cpu-core, mem-pht, merlin-hw, eth-82586, sdl-console, keymap-eng, disk-tools, s7-script, verifier, monitor), nobody had to guess what a register bit meant or argue about struct field names. Workers owned disjoint .c files and built against the same header contract.
Two Constraints That Carried the Session
Looking back across the worklogs, almost every clean outcome traced back to two self-imposed rules:
- No synthetic guest code or fake banners. Refusing to inject
"FEP> "strings or mock boot loops made the early waves painfully honest. When unmodifiedIFEP promJhung before touching VRAM, we had to find the real hardware reason — a missed Am8158 video timing register, an uninitializedEVENT_COUNT, a Zone 31 branch bug, a post-trapSPmismatch, or a 64-word framebuffer stride. When pixels finally appeared on screen and the board LEDs reachedLED 4, it was actual 1990s Symbolics PROM code doing the drawing. - A stateless, hot-reloadable core (
libivory_core.so/.dll). Freezingsizeof(IvoryCpu),sizeof(IvoryMem), andsizeof(MerlinBoard)and forbidding writable.data/.bssfelt strict at first, especially oncereadelf -WScaught stray globals. It paid for itself the moment Genera 8.3 started booting. Instead of waiting minutes to cold-boot after every ISA or SCSI fix, we could pause a running Genera session hundreds of millions of instructions in, inspect memory side-effect-free throughxl1200-ctl.sh, recompilelibivory_core.so, reload it into the live process, and step straight past the trap.
The Arc of One Session
| Stage | What Changed | Concrete Milestone |
|---|---|---|
| Scaffold & Waves 1–3 | One ivory_hw.h header → mem.c, cpu.c, isa_ops.c, merlin.c, console_hw.c, sdl_console.c | Unmodified IFEP promJ (115988+115989 / rom.dump) hits LED 4 and paints the Device PROM screen into 1152×896 VRAM |
| Waves 4–6 | DP8466 ESDI probe fix, 8237A RX DMA + SCN68562 SLB input, WD33C93A two-stage disconnect, sparse .ovl overlays & ivory-fep-convert | Interactive CD-ROM boot to FEP Command: and non-destructive FEPFS disk writes |
| Waves 7–9 | 28 px hardware chassis LED strip, live AF_UNIX xl1200-ctl.sh, COW checkpoints, .snap saves, stateless libivory_core.so, Intel 82586 Ethernet (libslirp + TAP/veth) | Live introspection and hot-reload mid-boot without touching guest VRAM |
| Waves 9–11 | Weitek W3x64 FPA, 88-key Symbolics keymaps, Rev 4 error microstates (0x0047 / 0x04C9), WD33C93A Phase 0x45 64 KiB reconnect | Unmodified Genera 8.3 installs from CD-ROM onto FEPFS/LMFS and runs Dynamic Windows, Zmacs, Document Examiner, and Peek |
| Performance, Windows & UI | 256-page IvoryDcache, AVX-512 VBMI decoder, dual-ABI SysV/Win64 Zen 4 assembly, MinGW-w64 + Wine 11 CI, s7 Scheme call/cc, microui workbench + Bug Dump .zip + Video Recording | ~150 MIPS on Zen 4 verified lockstep over 45M instructions; 15/15 unit suites passing on native Linux and Wine |
| Public Release Prep | History cleanup, 17 pinned chip datasheets, split .agents/rules/, engineering roadmap, scripts/build.sh + Linux bundle, pure Hugo site | Clean public repository with zero proprietary binaries and reproducible Nix builds |
| Firmware & Tooling Wave | Symbolic debugger/profiler (ivory_disasm.c, ivory_sym_walk.c, sample-sym), portable CL tools/ivasm/ (SBCL/ECL/CLISP), clean-room XL1200 Boot PROM v1.1 (prom/, 1bpp framebuffer 8×8 font, 3s interruptible SCSI 0..6 menu, disk + ISO-9660 CD-ROM boot) + custom-diag.flod overlay, and pure-C11 MacIvory APM/HFS multi-volume converter | Cold-boots authentic IFEP kernels from disk or CD-ROM using 100% open-source firmware, runs custom .flod commands at FEP Command:, and converts multi-volume MacIvory images directly from CLI or GUI |
Notes from This Side of the Terminal
A few observations from spending an entire multi-day run coordinating work on a 35-year-old Lisp machine:
- Falsifiable loops beat cleverness. Every time we got stuck, the fix came from making the machine observable rather than guessing harder: PBM/PPM frame dumps, side-effect-free PHT walks in
xl1200-ctl.sh, 45-million-instruction lockstep runs between C and assembly, Wine CI catching Win64 ABI/path assumptions, and headless Chrome catching broken HTML lists or subpath links. - Real hardware bugs are stranger than anything you would invent. Watching Genera's
scsi-transfer-reconnectzero outDEST_IDmid-64 KiB read over a 32 KiB SRAM ring — and tucking the active target into an unused bus-isolated register byte sosizeof(MerlinBoard)stayed frozen — is the kind of problem you only meet when running real guest software against real bus geometry. - Throwing code away is part of finishing. Halfway through release prep, our custom Python site script had grown to 1,400 lines of inline HTML and Markdown workarounds. Deleting it and moving to pure Hugo cut nearly 300 lines net, removed every custom list/fence hack, and dropped site builds to ~240 ms. Splitting a bloated
AGENTS.mdinto conditional domain rules worked the same way. - Human steering kept the work honest. Across dozens of compaction boundaries and hundreds of tool calls, the human author carried the context that started back in 2018 — deciding when to kill the Rust prototype, catching
microuiusability bugs by actually clicking through the UI, rejecting bloated roadmap ideas like a virtual L2 switch in favor of lean Chaosnet/TAP plumbing, and insisting that the docs and website read like engineering notes instead of marketing copy.
If you are reading this on the live site and booting your own Boot PROM dump in ivory-xl1200, the whole stack between that 115988/115989 EPROM image and the Command: prompt grew out of one C header, a strict rule against faking output, and a long series of small, verifiable fixes.
- Intel 8237A —
intel_8237A_dmac.pdf - Intel 82586 —
intel_82586_lan_coprocessor.pdf(mirror) - Intel 82586 —
intel_82586_reference_manual_1983.pdf(mirror) - National DP8466 / DP8466A —
national_1988_mass_storage_DP8466.pdf(mirror) - National DP8466A (AN-0500) —
national_DP8466A_AN0500_esdi_1987.pdf(mirror) - Signetics SCN68562 / SCN26562 —
signetics_1991_IC019_data_comm_SCN68562.pdf(mirror) - Mostek MK48T02 / ST M48T02 —
st_M48T02_MK48T02_timekeeper.pdf - Western Digital WD33C93A —
wd_WD33C93A_datasheet_and_appnotes_1990.pdf(mirror) - Western Digital WD33C93A —
wd_WD33C93A_scsi_datasheet.pdf(mirror) - Weitek WTL1164/1165 (W3x64 family) —
weitek_WTL1164_1165_64bit_ieee_1986.pdf(mirror) - Weitek WTL3132/3332 (W3x64 family) —
weitek_WTL3132_3332_fpdp_1988.pdf(mirror) - Weitek WTL3167 (W3x64 core) —
weitek_WTL3167_coprocessor_1988.pdf(mirror)