XL1200-EMU Symbolics XL1200 Emulator

XL1200 Boot PROM (prom/) & Custom IFEP Overlays

prom/ implements a clean-room, open-source Symbolics XL1200 Boot PROM (v1.1) and a sample dynamic IFEP 328 overlay (custom-diag.flod) written entirely in 40-bit Ivory Rev 4/4A assembly and assembled with tools/ivasm/.

The assembled firmware (prom/build/custom-rom.dump, 1,808 words / 9,090 bytes, plus split 64 KiB 115988-custom.bin and 115989-custom.bin EPROM images) is a standard checksummed IFEP promJ container. It loads through emu/src/loader.c and executes unmodified on emulated Merlin-II and WD33C93A SCSI hardware — allowing direct cold boot of user-supplied IFEP kernels from FEPFS hard disks (FEP7:–FEP13:) or ISO-9660 CD-ROMs (CART7:–CART13:) without proprietary Boot PROM dumps.

IMPORTANT

Clean-Room Scope: prom/ contains zero Symbolics binaries or proprietary firmware code. It boots user-supplied IFEP kernels (such as i328-kernel.fep on a FEPFS disk or I325_BOL.FEP on a Genera 8.3 distribution CD-ROM) using only documented Merlin-II, WD33C93A, SCN68562, FEPFS, and ISO-9660 hardware and on-disk interfaces.


1. Building the Boot PROM & Sample Overlay

Prerequisites

  • A supported Common Lisp runtime on PATH: SBCL (default), ECL, or GNU CLISP.
  • No C compiler or Quicklisp packages are required to assemble prom/.

Build Commands

# Build Boot PROM (combined + split 64 KiB EPROMs) and sample .flod overlay
make -C prom

# Build only the Boot PROM or only the overlay
make -C prom prom
make -C prom overlay

# Build and inspect section layout, entry VMA, and overlay command metadata
make -C prom inspect

# Use an alternate Common Lisp runtime (ecl or clisp)
IVASM_LISP=ecl make -C prom clean all

# Remove build artifacts
make -C prom clean

Build Outputs (prom/build/)

ArtifactSizeFormatPurpose
prom/build/custom-rom.dump9,090 BIFEP promJCombined Boot PROM container (0xF8007162..0xF8007872, 1,808 words)
prom/build/115988-custom.bin65,536 BLow 64 KiB EPROMPhysical low-half EPROM chip image (zero-padded to 64 KiB)
prom/build/115989-custom.bin65,536 BHigh 64 KiB EPROMPhysical high-half EPROM chip image (zero-padded to 64 KiB)
prom/build/custom-diag.flod494 BIFEP overlayH v1Dynamic IFEP 328 overlay adding Show Emulator Info at FEP Command:

2. Running with ivory-xl1200

Command-Line Usage

# Boot an XL1200 FEPFS hard disk (auto-boots FEP7: after the 3-second countdown)
./emu/build/ivory-xl1200 --rom prom/build/custom-rom.dump \
  --disk-overlay disks/genera83.raw --autostart

# Boot using the split 64 KiB EPROM pair (115988 auto-pairs 115989 beside it)
./emu/build/ivory-xl1200 --rom prom/build/115988-custom.bin \
  --disk-overlay disks/genera83.raw --autostart

# Attach multiple disks + Genera 8.3 CD-ROM and use the 3s interactive boot menu
./emu/build/ivory-xl1200 --rom prom/build/custom-rom.dump \
  --disk-overlay disks/genera83.raw \
  --scsi-disk 2:disks/backup-fep.raw:ro \
  --cdrom genera-8-3.iso --autostart

# Mirror PROM serial console output (SCN68562 Ch.B) to a host log file
./emu/build/ivory-xl1200 --headless --no-debug-sock \
  --rom prom/build/custom-rom.dump \
  --disk disks/genera83.raw \
  --serial-b file:/tmp/prom-boot.log --steps 75000000

GUI & xl1200.scm Configuration

  • GUI: Open Machine → Configure Machine... → Firmware & Memory, select prom/build/custom-rom.dump (leave Boot PROM high blank) or prom/build/115988-custom.bin (auto-fills 115989-custom.bin), attach your disk/CD-ROM under Disks & SCSI, and click Save & Power On.
  • xl1200.scm:
    (define-machine
      :rom "prom/build/custom-rom.dump"   ; or '("prom/build/115988-custom.bin" "prom/build/115989-custom.bin")
      :scsi '((0 :disk "disks/genera83.raw" :mode :overlay)
              (4 :cdrom "genera-8-3.iso"))
      ...)
    

3. Boot Flow & Architecture

flowchart TD
    RESET["Cold Reset: PC = 0xF8007162 (TRAP-MODE-FEP)"]
    INIT["1. Merlin-II Bring-Up (entry.lisp)\nLED 0x01/0x02, Cache Mode 2 (0x0A000004),\nVRAM BOW (0x4402C000), DUSCC Ch.A RX + Ch.B TX/RX,\nBoot Comm Area (0xFFFE0000) & BOOT-DATA-AREA"]
    SCSI["2. WD33C93A SCSI Reset (scsi-wd33c93a.lisp)\nLED 0x03, 32 KiB IO0 SRAM DMA Ring (0x40005000)"]
    COUNT["3. 3-Second Interruptible Prompt (boot-main.lisp)\nIVORY_REG_MICROSECOND_CLOCK (#o47): 3 2 1\nPolls SLB Keyboard (Ch.A) + Serial Ch.B"]
    SCAN["4. Full SCSI Bus Scan (IDs 0..6)\nProbe FEPFS Disks (LABL + FEPF) -> FEP7..13:\nProbe ISO-9660 CD-ROMs (LBA 17/16) -> CART7..13:"]
    MENU{"Key pressed\nduring 3s?"}
    PICK["Interactive Boot Device Menu\nLists all eligible SCSI IDs with [default]\nReads [0-6] or Enter/Esc"]
    AUTO["Auto-Select Default Target\nFEP7: (ID 0) -> any Disk -> CART11: (ID 4) -> any CD"]
    DISK["5A. FEPFS Disk Loader (LED 0x04)\nFlatten FEPF/FEPP extents, stream 1,280B pages"]
    CD["5B. ISO-9660 CD-ROM Loader (LED 0x05)\nStream 2,048B sectors, reblock 512 -> 320 u32 words"]
    FEP["6. Shared .fep Loader & Handoff (fep-loader.lisp)\nUnpack 20B tag-first chunks, apply FCA patches,\nverify 32-bit ones-comp checksum,\nwrite BOOT-FEP-KERNEL-DPN, LED 0x07 -> FEP-STARTUP"]
    HALT["Error Halt (LED 0x0F)"]

    RESET --> INIT --> SCSI --> COUNT --> SCAN --> MENU
    MENU -- "Yes" --> PICK
    MENU -- "No (timeout)" --> AUTO
    PICK --> DISK
    PICK --> CD
    AUTO --> DISK
    AUTO --> CD
    DISK --> FEP
    CD --> FEP
    SCAN -- "0 eligible devices" --> HALT
    FEP -- "Checksum/IO error" --> HALT

4. Console, Font & Interactive 3-Second Boot Menu

Dual Output: 1bpp Monochrome VRAM + Serial Ch.B

Every character written via console-putc (prom/src/console.lisp) is sent simultaneously to:

  1. SCN68562 DUSCC Serial Ch.B TXFIFO (PMA 0x44017030) as raw ASCII.
  2. 1bpp Monochrome Framebuffer (PMA 0x48000000, 1152×896, stride 64 words/row, VIDEO_CTRL = 0x02 Black-on-White, LSB = leftmost pixel):
    • Uses a clean-room 5×7-in-8×8 LSB-first bitmap font (prom/src/font8x8.lisp, ASCII 0x20..0x7E, 95 glyphs × 2 DTP-FIXNUM words = 190 words).
    • Starts text at x0 = 64 px (word column 2), y0 = 48 px, 12 px row pitch (116 columns × 54 rows), keeping all text cleanly visible inside both full (1152×896) and overscan-trimmed (1084×812) viewports.
    • Deposits each 8-bit glyph row directly into VRAM using Ivory's tag-agnostic physical read-modify-write instruction OP_P_DPB ((p-dpb (byte 8 0/8/16/24))), avoiding type traps on zero-initialized (DTP-NULL) cold VRAM words, and advances scanlines with (pointer-plus (imm 64)) to preserve DTP-PHYSICAL-ADDRESS.

Dual Input: XL1200 SLB Console Keyboard + Serial Ch.B

console-poll-key polls both UART channels non-blockingly via PMA-DUSCC-GSR (0x4401711B):

  • Serial Ch.B RX (GSR bit 4, RXFIFO 0x44017134): returns raw ASCII byte.
  • XL1200 SLB Console Keyboard on Ch.A RX (GSR bit 0, RXFIFO 0x44017114): parses 2-byte SLB_TYPE_KEY_DOWN (0xC0 + 7-bit SLB keycode) wire packets, ignores KEY_UP (0xD0) and pure Shift modifiers, and decodes digits '0'..'6', Return, Escape, and any other key (mapped to Space to interrupt the countdown).

3-Second Countdown & Interactive Menu Transcript

Timing uses IVORY_REG_MICROSECOND_CLOCK (#o47, read via (read-internal-register :microsecond-clock)) with wrap-safe (32-bit-difference (sp-pop)):

  • In interactive realtime GUI mode: exact 3.0 wall-clock seconds (3,000,000 µs = #x2DC6C0).
  • In deterministic headless --steps / --puppet mode: 12,000,000 instructions (1 µs per 4 instructions).

Example session when interrupted with two FEPFS disks (IDs 0 and 2) and a Genera 8.3 CD-ROM (ID 4) attached:

XL1200 Clean-Room SCSI/CD-ROM Boot PROM v1.1
Press any key within 3s to select SCSI boot device... 3
PROM: scanning SCSI bus (IDs 0..6)...
Eligible SCSI boot devices:
  [0] SCSI ID 0 -> FEP7:   (FEPFS Disk, dpn=232) [default]
  [2] SCSI ID 2 -> FEP9:   (FEPFS Disk, dpn=232)
  [4] SCSI ID 4 -> CART11: (ISO-9660 CD-ROM, lba=158514)
Select SCSI target ID [0-6] (Enter = default ID 0): 4
PROM: loading IFEP kernel from CART11: (ISO-9660)...
PROM: cache=2, handing off to FEP-STARTUP...
  • Pressing 0–6 selects that SCSI target if bootable (non-bootable IDs print Target <N> has no bootable media and re-prompt).
  • Pressing Enter or Escape boots the [default] target.
  • Default selection priority: Target 0 (FEP7:) → first bootable FEPFS disk (0..6) → Target 4 (CART11:) → first bootable ISO-9660 CD-ROM (0..6).

5. Storage Drivers & .fep Kernel Loader

WD33C93A SCSI Driver (prom/src/scsi-wd33c93a.lisp)

  • Drives the Merlin-II WD33C93A window (0x44015000 SCSI/DMA control, 0x44017800/0x44017900 WD33C93A registers, 0x4401A000 START_WRAP = 0x3D, 0x4401B800 DMA_COUNTER) and the 32 KiB IO0 SRAM DMA ring (0x40005000..0x40006FFF).
  • Supports TEST UNIT READY (0x00), REQUEST SENSE (0x03), INQUIRY (0x12), READ CAPACITY (0x25), and READ(10) (0x28), including multi-chunk Phase 0x45 continuations when transfers exceed 32 KiB.

Boot Path A: FEPFS Hard Disk (prom/src/fepfs-boot.lisp)

  1. fepfs-probe-target (tid): confirms INQUIRY peripheral device type 0x00, READ CAPACITY, sector 0 "LABL" magic (0x4C42414C LE), non-zero fep_dpn = LABL[53] & 0x07FFFFFF, and "FEPF" header (0x46455046 LE) at fep_dpn.
  2. fepfs-boot-target (tid fep-dpn): flattens direct extents and indirect FEPP blocks (bit 24 set) from the FEPF header into VMA-EXTENT-TBL (up to 512 extents), streams 1,280-byte pages through fep-load-and-verify-stream, and writes BOOT-FEP-KERNEL-DPN = ((7 + tid) << 27) | (fep_dpn & 0x07FFFFFF) to 0xF8040975.

Boot Path B: ISO-9660 CD-ROM (prom/src/iso9660-boot.lisp)

  1. iso9660-probe-target (tid): confirms INQUIRY peripheral device type 0x05 (CD-ROM) and READ CAPACITY.
    • Fast path (LBA 17 Boot Record): verifies type 0x00 + "CD00" and reads the 32-bit LE kernel starting LBA at bytes[72..75] (e.g., LBA 158514 → SYS/IFEP/I325_BOL.FEP;11).
    • PVD fallback (LBA 16): parses Root Directory extent (bytes[158..161]), walks SYS → IFEP (case-insensitive, stripping ;version), and locates I325_BOL.FEP or I328_KERNEL.FEP.
  2. iso9660-boot-target (tid kern-lba): streams 2,048-byte CD sectors (512 u32 words) through a word-aligned reblocker into 1,280-byte FEP pages (320 u32 words) for fep-load-and-verify-stream, then writes BOOT-FEP-KERNEL-DPN = ((7 + tid) << 27) | (kern_lba & 0x07FFFFFF) to 0xF8040975 (e.g. 0x58000000 | lba for CART11:).

Shared .fep Unpacker & Handoff (prom/src/fep-loader.lisp)

  • Unpacks 1,280-byte pages structured as 64 × 20-byte tag-first chunks (bytes[0..3] = 4 tag bytes, bytes[4..19] = 4 little-endian 32-bit data words).
  • Walks Page 0's 3-word descriptors starting at word 8 (target_vma, spec, source):
    • Page extents: streams pages into destination Zone 31 VMAs.
    • Inline patches (spec bit 24): writes FEP-COMMUNICATION-AREA fields including FEP-VERSION-NUMBER (0xF8041000) and (FUNCTION FEP-STARTUP) (0xF8041002).
  • Verifies the running 32-bit ones-complement end-around-carry checksum against Page 0 word 5, sets Merlin-II Cache Mode 2 (0x0A000004 = 2) preserved from early init, sets LED 0x07, and invokes (FUNCTION FEP-STARTUP) at 0xF8041002 via START-CALL / FINISH-CALL-N :effect 0.

6. Hardware & Memory Reference Tables

Merlin-II Diagnostic LED Milestones (PMA 0x0A000000)

LED ValueStageMeaning
0x01Early POSTCold reset reached 0xF8007162
0x02Cache InitMerlin-II Main-Board Cache Mode 2 enabled (0x0A000004 ← 0x02)
0x03SCSI & MenuWD33C93A reset, 3s countdown prompt, SCSI 0..6 scan, and interactive menu
0x04Disk LoadLoading IFEP kernel from FEPFS hard disk (FEP<7+tid>:)
0x05CD-ROM LoadLoading IFEP kernel from ISO-9660 CD-ROM (CART<7+tid>:)
0x07HandoffChecksum verified; transferring control to (FUNCTION FEP-STARTUP)
0x0FFatal HaltNo bootable SCSI device found or kernel load/checksum failure (HALT)

Zone 31 PROM Memory & Scratch Map

VMA RangeSizePurpose
0xF8000000..0xF8000BFF3,072 WCold-reset Ivory control stack (FP=0xF8000000)
0xF8007162..0xF80078721,808 WBoot PROM v1.1 executable code, string tables, and font8x8-table
0xF8008000..0xF800801421 WPROM runtime globals (active target, block size, stream state, FB cursor, SLB parser state, default target, eligible count)
0xF8008040..0xF800805B28 WVMA-SCSI-SCAN-TBL: 7 SCSI targets × 4 words (kind, boot_loc, blksize, flags)
0xF8008100..0xF80082FF512 WVMA-CD-SECTOR-BUF: 2,048-byte CD-ROM sector / FEPF header buffer
0xF8008400..0xF800853F320 WVMA-RAW-PAGE-BUF: 1,280-byte raw LABL / FEPP / .fep page buffer
0xF8008600..0xF80086FF256 WVMA-FEP-PAGE0-BUF: unpacked 40-bit .fep Page 0 descriptor table
0xF8008800..0xF8008BFF1,024 WVMA-EXTENT-TBL: up to 512 flattened (dpn, npages) disk extents
0xF804096E..0xF804097811 WBOOT-DATA-AREA (CRASH-ACTION = 2, BOOT-FEP-KERNEL-DPN at 0xF8040975)
0xF8041000..0xF80410023 WFEP-COMMUNICATION-AREA (FEP-VERSION-NUMBER, (FUNCTION FEP-STARTUP))
0xFFFE0000..0xFFFE003F64 WWired Boot Comm Area (*BOOT-SPY-PC*, *BOOT-SPY-BLOCK-ADDRESS*, etc.)

Source Inventory (prom/)

FileRole
prom/MakefileAssembles custom-rom.dump, split 115988/115989 EPROMs, and custom-diag.flod
prom/src/boot-prom.lispTop-level :ifep-prom module (:entry boot-entry, :vma #xF8007162)
prom/src/hw-defs.lispMerlin-II PMA constants, DUSCC Ch.A/B, WD33C93A regs, Zone 31 globals & buffers
prom/src/entry.lispReset vector, Cache Mode 2, video/DUSCC init, Boot Comm & Spy block init, fatal halt
prom/src/console.lisp1bpp VRAM text renderer (OP_P_DPB), Serial Ch.B TX/RX, SLB Ch.A keyboard decoder, read-us-clock
prom/src/font8x8.lispClean-room 5×7-in-8×8 LSB-first ASCII bitmap font (0x20..0x7E)
prom/src/scsi-wd33c93a.lispWD33C93A + 32 KiB SRAM DMA ring driver (INQUIRY, READ CAPACITY, READ(10))
prom/src/fep-loader.lispShared .fep Page 0 parser, 20-byte tag-first unpacker, ones-complement checksum
prom/src/fepfs-boot.lispMulti-target LABL/FEPF/FEPP probe and FEP<7+tid>: disk loader
prom/src/iso9660-boot.lispMulti-target ISO-9660 LBA 17/16 probe and CART<7+tid>: 2,048B → 1,280B reblocker
prom/src/boot-main.lisp3s countdown, SCSI 0..6 scanner, interactive selection menu, FEP-STARTUP handoff
prom/overlays/ifep328-sdk.lispIFEP 328 Kernel UID, resident service indirect cells, and hardware PMA constants
prom/overlays/hello-overlay.lispSample dynamic .flod overlay implementing Show Emulator Info

7. Custom IFEP 328 Overlays (.flod)

prom/overlays/hello-overlay.lisp demonstrates writing and loading a new interactive command into an authentic running i328-kernel.fep session:

  1. Assemble the overlay:
    make -C prom overlay
    # -> prom/build/custom-diag.flod (Kernel UID 5c3931aef3e75a93, command "Show Emulator Info")
    
  2. Inject it into an XL1200 FEPFS disk image (use a writable copy):
    ./emu/build/ivory-fep-convert --inject disks/my-fep.raw prom/build/custom-diag.flod custom-diag.flod
    
  3. Scan and execute at FEP Command::
    FEP Command: Scan FEP7:>custom-diag.flod.1
    FEP Command: Show Emulator Info
    XL1200 Clean-Room Emulator Overlay: IFEP 328, Merlin-II Cache=2, Boot Unit=7 DPN=232
      Merlin-II VideoCtrl=2 LEDs=0x4 (assembled with portable CL ivasm)
    

For the full IFEP 328 overlay ABI, Kernel Build UID matching, resident service entry points (FORMAT, default command dispatch, symbol addresses), and 0xF8001100 overlay window details, see docs/fep-internals-and-overlays.md.

Related Chip Datasheets (3)All Component Datasheets →