Symbolics XL1200 IFEP 328/325 Internals & Dynamic Overlay (.flod) Guide
Architectural reference for the Symbolics XL1200 (Merlin-II / Ivory Rev 4/4A) Boot PROM handoff contract,
.fepkernel container format, and.floddynamic overlay ABI. Every register, address, bitfield, and protocol below was verified directly against authentic hardware execution onivory-xl1200and our portable Common Lisp assembler (tools/ivasm/).
1. Zone 31 Physical Memory Map & Handoff Contract
On cold power-on reset, emu/src/loader.c maps the Boot PROM (IFEP promJ, combined rom.dump or sequential 64 KiB split EPROM pair 115988 low + 115989 high) into Zone 31 (direct-mapped physical memory: VMA 0xF8000000 + offset -> PMA offset) and begins execution at the PROM's declared entry VMA (0xF8007162).
Before handing off control to the IFEP kernel (i328-kernel.fep on FEP7: SCSI disks or i325-bol.fep on CART11: ISO-9660 CD-ROMs), the Boot PROM establishes the following architectural state:
| Address (VMA / PMA) | Type / Region | Required State Before Handoff |
|---|---|---|
PMA 0x0A000000 | Merlin-II Diagnostic LEDs | Diagnostic hex code (0x07 before handoff; IFEP transitions to 0x04 at FEP Command:) |
PMA 0x0A000004 | Merlin-II Cache Control | 2 (L1/Merlin-II cache enabled) |
PMA 0x4402C000 | Merlin-II Video Control | 2 (1bpp framebuffer BOW enabled, 1152x896, stride 64 words/row at PMA 0x48000000) |
PMA 0x4401702F | Signetics SCN68562 DUSCC CCR | Ch.B TX enabled (0x02) & RX enabled (0x42) |
VMA 0xF8040940 | *BOOT-SPY-BLOCK-ADDRESS* | Boot spy block base pointer stored at 0xFFFE0007 (DTP-LOCATIVE) |
VMA 0xF804096E..6F | Boot flags | DTP-FIXNUM 0 |
VMA 0xF8040970 | CRASH-ACTION | DTP-FIXNUM 2 |
VMA 0xF8040971..74, 76..78 | Boot spy string/option slots | DTP-NIL 0xF8041200 |
VMA 0xF8040975 | BOOT-FEP-KERNEL-DPN | DTP-FIXNUM ((unit << 27) | dpn) — unit=7 (0x38000000 | fep_dpn) for FEP7: SCSI Target 0; unit=11 (0x58000000 | lba) for CART11: SCSI Target 4 CD-ROM |
VMA 0xF8041000 | FEP-COMMUNICATION-AREA + 0 | IFEP version (DTP-FIXNUM 328 or 325), patched by .fep Page 0 |
VMA 0xF8041002 | FEP-COMMUNICATION-AREA + 2 | (FUNCTION FEP-STARTUP) (DTP-COMPILED-FUNCTION), patched by .fep Page 0 |
VMA 0xFFFE0000..0A | BOOT-COMMUNICATION-AREA | Standard Ivory/Merlin boot comm words (+0=NIL, +1=0x209, +2=0xF8000000, +3=0xC00, +4=EVEN-PC 0xFFFE0010, +7=LOCATIVE 0xF8040940, +A=330) |
Kernel Invocation Sequence
Once .fep Page 0 descriptors (both page extents and inline FEP-COMMUNICATION-AREA patches) are applied and the 32-bit ones-complement checksum matches Page 0 word 5, the Boot PROM transfers control via standard Ivory call transfer:
(gvar-get #xF8041002) ; raw-read (FUNCTION FEP-STARTUP) (DTP-COMPILED-FUNCTION)
(start-call (sp-pop)) ; open call frame for FEP-STARTUP
(finish-call-n :effect 0) ; invoke with 0 Lisp arguments
2. .fep Kernel Container Format (1,280-Byte Pages)
Both i328-kernel.fep (193 pages, 247,040 bytes) and i325-bol.fep (305 pages, 390,400 bytes) share the exact same 1,280-byte page format:
- Page geometry: 1,280 bytes = 64 × 20-byte chunks = 256 × 40-bit Ivory words.
- 20-byte chunk layout (tag-first):
bytes[0..3]: 4 × 8-bit tag bytes[tag0, tag1, tag2, tag3]wheretag = (cdr_code << 6) | dtp.bytes[4..19]: 4 × 32-bit little-endian data payload words[data0, data1, data2, data3].
- Page 0 header words:
w[0]: Magic data0x00410040(stored with header tag0x48).w[1]: Descriptor countN(typically5; note its stored header tag is0x49 = DTP-SMALL-RATIO, so Ivory guest loaders must coerce with(set-tag (imm 8))before fixnum arithmetic).w[4]: Build identifier.w[5]: 32-bit ones-complement (end-around-carry) sum of all 32-bit little-endian words across pages1 .. total_pages - 1.w[7]: Build digest / UID word.
- Page 0 descriptors (
d = 0 .. N-1, starting atw[8 + 3*d]):target_vma = w[8 + 3*d]spec = w[9 + 3*d]source = w[10 + 3*d](full 40-bit Ivory word)- If bit 24 of
specis 0: loadspecwords (spec / 256pages) sequentially from the.fepstream starting at file pagesourceintotarget_vma, accumulating all raw 32-bit words into the ones-complement checksum. - If bit 24 of
specis 1 (e.g.,spec = 0x01000001): inline single-word patch — write the full 40-bitsourceword (including its exact tag and CDR bits) directly intotarget_vma(this is how0xF8041000version and0xF8041002(FUNCTION FEP-STARTUP)are installed).
3. Storage Media Boot Layouts
3.1 FEPFS SCSI Disk (FEP7:, Target 0, 1,280-Byte Sectors)
- Block 0 (
LABL): 1,280-byte raw disk label.w[0] == 0x4C41424C("LABL"in little-endian bytes4C 42 41 4C).w[53](fep_dpn): physical block number of the kernel'sFEPFfile header block (not raw.fepPage 0).
FEPFfile header block:w[0] == 0x46455046("FEPF").w[51..319]: extent descriptor list (terminated by0). Each entry packs(count << 25) | (indirect << 24) | dpn:- When
indirect == 0: contiguous run ofcountblocks starting atdpn. - When
indirect == 1:dpnpoints to aFEPP(0x46455050) indirect extent block whose wordsw[1..319]list child extents.
- When
3.2 ISO-9660 CD-ROM (CART11:, Target 4, 2,048-Byte Sectors)
- Fast Path — ISO-9660 Boot Record (LBA 17):
byte[0] == 0x00(Boot Record Volume Descriptor),bytes[1..5] == "CD001",byte[6] == 0x01.bytes[72..75](32-bit LE): starting 2,048-byte LBA of the bootable.fepkernel (e.g.,SYS/IFEP/I325_BOL.FEP;11on Genera 8.3 distribution media).
- Fallback Path — Primary Volume Descriptor (LBA 16):
byte[0] == 0x01,bytes[1..5] == "CD001", Root Directory Extent LBA atbytes[158..161]LE.- Walks
SYS->IFEP->I325_BOL.FEP(orI328_KERNEL.FEP), matching case-insensitively and stripping;versionsuffixes.
- 2,048-Byte to 1,280-Byte Reblocking:
- Since
2048 = 512 * 4and1280 = 320 * 4, word-aligned 32-bit reblocking seamlessly spans 20-byte.fepchunks crossing 2,048-byte sector boundaries.
- Since
4. IFEP 328 Dynamic Overlay (.flod) Binary Format
Dynamic FEP commands (such as i328-info.flod, i328-loaders.flod, and user-built overlays like prom/build/custom-diag.flod) use the "IFEP overlayH" container format:
Offset Size Field
0 13 ASCII magic: "IFEP overlayH"
13 1 Format version (1)
14 2 Header pad bytes (0x00, 0x00)
16 8 Kernel Build UID (8 bytes; for IFEP 328: 5c 39 31 ae f3 e7 5a 93)
24 var Command directory entries (repeated until name_len == 0):
u8 name_len
char name[name_len] (e.g. "Show Emulator Info")
u8 doc_len
char doc[doc_len] (one-line command help text)
u32 entry_vma (LE) (VMA of command compiled-function entry)
1 0x00 directory terminator
var Checksummed Ivory word sections (same framing as IFEP prom):
u32 vma_base (LE) (typically 0xF8001100)
u32 word_count (LE)
u8 payload[word_count * 5] (5 bytes LE per 40-bit word: data[0..3], tag)
u32 checksum (LE) (wrapping u32 sum of payload bytes)
8 End-of-sections sentinel: 0xFFFFFFFF, 0xFFFFFFFF
- Kernel UID matching: IFEP refuses to load an overlay whose 8-byte Kernel Build UID does not match the running kernel (
5c3931aef3e75a93for IFEP 328). - On-demand loading:
Scan FEP7:><name>.flod.<ver>parses only the command directory and registers each command's name, documentation, and entry VMA. When the user invokes a command atFEP Command:, IFEP loads the overlay's sections into the overlay window (0xF8001100) and invokesentry_vma.
5. IFEP 328 Resident ABI for Custom .flod Commands
The following resident addresses are defined as symbolic constants in prom/overlays/ifep328-sdk.lisp:
| Constant | VMA / PMA | Role |
|---|---|---|
IFEP328-OVERLAY-BASE | 0xF8001100 | Standard overlay code/data load base |
IFEP328-SYM-EXECUTE | 0xF900018C | :EXECUTE message selector passed in FP+2 |
IFEP328-FN-DEFAULT-CMD | 0xF80130BA | Default command handler cell (handles :PARSE-ARGUMENTS, :DOCUMENTATION, etc.) |
IFEP328-FN-FORMAT | 0xF8016448 | Resident FORMAT indirect function cell |
IFEP328-FN-CHECK-NO-ARGS | 0xF80157F5 | Resident zero-argument validator cell |
IFEP328-FN-STRING-LENGTH | 0xF8015C68 | Resident string length helper (accepts both DTP-STRING and DTP-STRING-INSTANCE) |
IFEP328-VAR-TERMINAL-IO | 0xF800C088 | *terminal-io* stream cell |
IFEP328-VAR-STRING-POOL | 0xF800C099 | Active overlay compressed-string Huffman pool pointer |
IFEP328-VAR-BOOT-DPN | 0xF8040975 | BOOT-FEP-KERNEL-DPN ((unit << 27) | dpn) |
IFEP328-VAR-KERNEL-VERSION | 0xF8041000 | Resident IFEP kernel version (DTP-FIXNUM 328) |
5.1 Command Entry & Message Dispatch Protocol
Every .flod command entry point is a compiled function preceded by a 2-word Ivory compiled-function header:
(word :cdr :next :dtp :header-i :data #x00040000)
(word :cdr :nil :dtp :compiled-function :data my-cmd)
(:label my-cmd)
(:word :cdr :jump :even (entry-rest-accepted 3) :odd (car (fp 3)))
(:word :cdr :jump :even (zerop (imm 1)) :odd (no-op)) ; entry+1: push NIL for empty &rest in LP+0
Critical Ivory
entry-rest-acceptedinvariant: When invoked with 0&restarguments (nargs == max), Ivory advances toentry + 1so the callee initializesLP+0toNIL. When invoked with>= 1&restarguments (or viaAPPLY), Ivory packages the&restlist intoLP+0and jumps directly toentry + 2. Always place the 1-wordpush NIL((zerop (imm 1))) atentry + 1.
At entry + 2:
FP+2holds the operation selector symbol;LP+0holds the&restargument list.- Compare
FP+2(EQ) againstIFEP328-SYM-EXECUTE(0xF900018C):- If not equal: delegate metadata/parsing queries cleanly by tail-calling
IFEP328-FN-DEFAULT-CMD:(call-indirect IFEP328-FN-DEFAULT-CMD) (push (fp 2)) (push (lp 0)) (finish-call-n-apply (imm #x203)) ; :return disposition, apply 2 args - If equal: run the command body, call
FORMAT(IFEP328-FN-FORMAT) for console output, and returnNILvia(return-single :constant-nil).
- If not equal: delegate metadata/parsing queries cleanly by tail-calling
5.2 Uncompressed DTP-STRING Output via Resident FORMAT
Although stock Symbolics overlays use Huffman-compressed DTP-STRING-INSTANCE (0o23) tokens, IFEP 328's resident FORMAT (0xF8016448) and STRING-LENGTH (0xF8015C68) natively accept standard uncompressed Ivory 8-bit DTP-STRING (0o27) objects embedded directly in the overlay:
- Header word:
(word :cdr :nil :dtp :header-i :data (logior #x50000000 len))(header_type=ARRAY,element_type=CHARACTER(1),byte_packing=8-bit(2),short_length=len). - Payload words:
ceil(len / 4)×(word :cdr :nil :dtp :fixnum :data <4 LE ASCII bytes>). - Generated automatically by
(def-ivory-string label "format ~D~%")intools/ivasm/.
6. Building, Injecting & Running a Custom .flod Overlay
# 1. Assemble both the clean-room Boot PROM and the sample diagnostic overlay
make -C prom all inspect
# 2. Copy a bootable XL1200 FEPFS disk image (never modify your master image in place)
cp --reflink=auto emu/disks/xl1200_clean_fep0.raw /tmp/test_overlay.raw
# 3. Inject custom-diag.flod into the FEPFS disk directory (updates DIRB, FEPF, FEPB)
./emu/build/ivory-fep-convert --inject /tmp/test_overlay.raw \
prom/build/custom-diag.flod CUSTOM-DIAG FLOD 1
# 4. Boot with the clean-room Boot PROM and run the custom command at FEP Command:
./emu/build/ivory-xl1200 --rom prom/build/custom-rom.dump --disk /tmp/test_overlay.raw
# At "FEP Command:", type:
# Scan FEP7:>custom-diag.flod.1
# Show Emulator Info
- Signetics SCN68562 / SCN26562 —
signetics_1991_IC019_data_comm_SCN68562.pdf(mirror)