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.
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/)
| Artifact | Size | Format | Purpose |
|---|---|---|---|
prom/build/custom-rom.dump | 9,090 B | IFEP promJ | Combined Boot PROM container (0xF8007162..0xF8007872, 1,808 words) |
prom/build/115988-custom.bin | 65,536 B | Low 64 KiB EPROM | Physical low-half EPROM chip image (zero-padded to 64 KiB) |
prom/build/115989-custom.bin | 65,536 B | High 64 KiB EPROM | Physical high-half EPROM chip image (zero-padded to 64 KiB) |
prom/build/custom-diag.flod | 494 B | IFEP overlayH v1 | Dynamic 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) orprom/build/115988-custom.bin(auto-fills115989-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" --> HALT4. 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:
- SCN68562 DUSCC Serial Ch.B TXFIFO (
PMA 0x44017030) as raw ASCII. - 1bpp Monochrome Framebuffer (
PMA 0x48000000,1152×896, stride64words/row,VIDEO_CTRL = 0x02Black-on-White, LSB = leftmost pixel):- Uses a clean-room 5×7-in-8×8 LSB-first bitmap font (
prom/src/font8x8.lisp, ASCII0x20..0x7E,95glyphs ×2DTP-FIXNUMwords =190words). - Starts text at
x0 = 64 px(word column2),y0 = 48 px,12 pxrow pitch (116columns ×54rows), 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 preserveDTP-PHYSICAL-ADDRESS.
- Uses a clean-room 5×7-in-8×8 LSB-first bitmap font (
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 (
GSRbit 4,RXFIFO 0x44017134): returns raw ASCII byte. - XL1200 SLB Console Keyboard on Ch.A RX (
GSRbit 0,RXFIFO 0x44017114): parses 2-byteSLB_TYPE_KEY_DOWN(0xC0+ 7-bit SLB keycode) wire packets, ignoresKEY_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/--puppetmode:12,000,000instructions (1 µsper 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–6selects that SCSI target if bootable (non-bootable IDs printTarget <N> has no bootable mediaand re-prompt). - Pressing
EnterorEscapeboots the[default]target. - Default selection priority: Target
0(FEP7:) → first bootable FEPFS disk (0..6) → Target4(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 (
0x44015000SCSI/DMA control,0x44017800/0x44017900WD33C93A registers,0x4401A000START_WRAP = 0x3D,0x4401B800DMA_COUNTER) and the 32 KiB IO0 SRAM DMA ring (0x40005000..0x40006FFF). - Supports
TEST UNIT READY(0x00),REQUEST SENSE(0x03),INQUIRY(0x12),READ CAPACITY(0x25), andREAD(10)(0x28), including multi-chunk Phase0x45continuations when transfers exceed 32 KiB.
Boot Path A: FEPFS Hard Disk (prom/src/fepfs-boot.lisp)
fepfs-probe-target (tid): confirmsINQUIRYperipheral device type0x00,READ CAPACITY, sector 0"LABL"magic (0x4C42414CLE), non-zerofep_dpn = LABL[53] & 0x07FFFFFF, and"FEPF"header (0x46455046LE) atfep_dpn.fepfs-boot-target (tid fep-dpn): flattens direct extents and indirectFEPPblocks (bit 24 set) from theFEPFheader intoVMA-EXTENT-TBL(up to 512 extents), streams 1,280-byte pages throughfep-load-and-verify-stream, and writesBOOT-FEP-KERNEL-DPN = ((7 + tid) << 27) | (fep_dpn & 0x07FFFFFF)to0xF8040975.
Boot Path B: ISO-9660 CD-ROM (prom/src/iso9660-boot.lisp)
iso9660-probe-target (tid): confirmsINQUIRYperipheral device type0x05(CD-ROM) andREAD CAPACITY.- Fast path (LBA 17 Boot Record): verifies type
0x00+"CD00"and reads the 32-bit LE kernel starting LBA atbytes[72..75](e.g., LBA158514→SYS/IFEP/I325_BOL.FEP;11). - PVD fallback (LBA 16): parses Root Directory extent (
bytes[158..161]), walksSYS→IFEP(case-insensitive, stripping;version), and locatesI325_BOL.FEPorI328_KERNEL.FEP.
- Fast path (LBA 17 Boot Record): verifies type
iso9660-boot-target (tid kern-lba): streams 2,048-byte CD sectors (512u32 words) through a word-aligned reblocker into 1,280-byte FEP pages (320u32 words) forfep-load-and-verify-stream, then writesBOOT-FEP-KERNEL-DPN = ((7 + tid) << 27) | (kern_lba & 0x07FFFFFF)to0xF8040975(e.g.0x58000000 | lbaforCART11:).
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 (
specbit 24): writesFEP-COMMUNICATION-AREAfields includingFEP-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 LED0x07, and invokes(FUNCTION FEP-STARTUP)at0xF8041002viaSTART-CALL/FINISH-CALL-N :effect 0.
6. Hardware & Memory Reference Tables
Merlin-II Diagnostic LED Milestones (PMA 0x0A000000)
| LED Value | Stage | Meaning |
|---|---|---|
0x01 | Early POST | Cold reset reached 0xF8007162 |
0x02 | Cache Init | Merlin-II Main-Board Cache Mode 2 enabled (0x0A000004 ← 0x02) |
0x03 | SCSI & Menu | WD33C93A reset, 3s countdown prompt, SCSI 0..6 scan, and interactive menu |
0x04 | Disk Load | Loading IFEP kernel from FEPFS hard disk (FEP<7+tid>:) |
0x05 | CD-ROM Load | Loading IFEP kernel from ISO-9660 CD-ROM (CART<7+tid>:) |
0x07 | Handoff | Checksum verified; transferring control to (FUNCTION FEP-STARTUP) |
0x0F | Fatal Halt | No bootable SCSI device found or kernel load/checksum failure (HALT) |
Zone 31 PROM Memory & Scratch Map
| VMA Range | Size | Purpose |
|---|---|---|
0xF8000000..0xF8000BFF | 3,072 W | Cold-reset Ivory control stack (FP=0xF8000000) |
0xF8007162..0xF8007872 | 1,808 W | Boot PROM v1.1 executable code, string tables, and font8x8-table |
0xF8008000..0xF8008014 | 21 W | PROM runtime globals (active target, block size, stream state, FB cursor, SLB parser state, default target, eligible count) |
0xF8008040..0xF800805B | 28 W | VMA-SCSI-SCAN-TBL: 7 SCSI targets × 4 words (kind, boot_loc, blksize, flags) |
0xF8008100..0xF80082FF | 512 W | VMA-CD-SECTOR-BUF: 2,048-byte CD-ROM sector / FEPF header buffer |
0xF8008400..0xF800853F | 320 W | VMA-RAW-PAGE-BUF: 1,280-byte raw LABL / FEPP / .fep page buffer |
0xF8008600..0xF80086FF | 256 W | VMA-FEP-PAGE0-BUF: unpacked 40-bit .fep Page 0 descriptor table |
0xF8008800..0xF8008BFF | 1,024 W | VMA-EXTENT-TBL: up to 512 flattened (dpn, npages) disk extents |
0xF804096E..0xF8040978 | 11 W | BOOT-DATA-AREA (CRASH-ACTION = 2, BOOT-FEP-KERNEL-DPN at 0xF8040975) |
0xF8041000..0xF8041002 | 3 W | FEP-COMMUNICATION-AREA (FEP-VERSION-NUMBER, (FUNCTION FEP-STARTUP)) |
0xFFFE0000..0xFFFE003F | 64 W | Wired Boot Comm Area (*BOOT-SPY-PC*, *BOOT-SPY-BLOCK-ADDRESS*, etc.) |
Source Inventory (prom/)
| File | Role |
|---|---|
prom/Makefile | Assembles custom-rom.dump, split 115988/115989 EPROMs, and custom-diag.flod |
prom/src/boot-prom.lisp | Top-level :ifep-prom module (:entry boot-entry, :vma #xF8007162) |
prom/src/hw-defs.lisp | Merlin-II PMA constants, DUSCC Ch.A/B, WD33C93A regs, Zone 31 globals & buffers |
prom/src/entry.lisp | Reset vector, Cache Mode 2, video/DUSCC init, Boot Comm & Spy block init, fatal halt |
prom/src/console.lisp | 1bpp VRAM text renderer (OP_P_DPB), Serial Ch.B TX/RX, SLB Ch.A keyboard decoder, read-us-clock |
prom/src/font8x8.lisp | Clean-room 5×7-in-8×8 LSB-first ASCII bitmap font (0x20..0x7E) |
prom/src/scsi-wd33c93a.lisp | WD33C93A + 32 KiB SRAM DMA ring driver (INQUIRY, READ CAPACITY, READ(10)) |
prom/src/fep-loader.lisp | Shared .fep Page 0 parser, 20-byte tag-first unpacker, ones-complement checksum |
prom/src/fepfs-boot.lisp | Multi-target LABL/FEPF/FEPP probe and FEP<7+tid>: disk loader |
prom/src/iso9660-boot.lisp | Multi-target ISO-9660 LBA 17/16 probe and CART<7+tid>: 2,048B → 1,280B reblocker |
prom/src/boot-main.lisp | 3s countdown, SCSI 0..6 scanner, interactive selection menu, FEP-STARTUP handoff |
prom/overlays/ifep328-sdk.lisp | IFEP 328 Kernel UID, resident service indirect cells, and hardware PMA constants |
prom/overlays/hello-overlay.lisp | Sample 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:
- Assemble the overlay:
make -C prom overlay # -> prom/build/custom-diag.flod (Kernel UID 5c3931aef3e75a93, command "Show Emulator Info") - 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 - 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.
- Signetics SCN68562 / SCN26562 —
signetics_1991_IC019_data_comm_SCN68562.pdf(mirror) - Western Digital WD33C93A —
wd_WD33C93A_datasheet_and_appnotes_1990.pdf(mirror) - Western Digital WD33C93A —
wd_WD33C93A_scsi_datasheet.pdf(mirror)