Host Runtime, GUI Workbench, s7 Scripting, Live Debug IPC & Snapshots
This document covers the Host Shell subsystem of emu/: OS portability (emu_os.h, emu_io.h, emu_ipc.h/emu_ipc.c), the 2-thread coordinator (main.c), SDL3 console & LED strip (sdl_console.c, keymap.c), microui workbench (ui_workbench.c), s7 Scheme machine configuration and call/cc automation (emu_script.c), live debug/puppet IPC (debug_ctl.c, scripts/xl1200-ctl.sh), and COW checkpointing / time-travel / sparse .snap persistence (snapshot.c).
1. Host Runtime & Portability Layer
Strict 2-Thread Execution Model (emu/src/main.c)
Interactive GUI sessions (ivory-xl1200) and --puppet sessions run with two threads sharing an EmuRuntime coordinator (emu/src/main.c):
- Main Thread:
- Owns SDL3 window/renderer lifecycle (
sdl_console_poll_events,sdl_console_prepare_frame,sdl_console_flush_present) andmicrouiUI rendering. - Polls
debug_ctl_pollfor local socket/Named Pipe/TCP commands andserial_host_pollfor host UART I/O. - Drains
rt.pending_hooks(EMU_HOOK_BOOT,EMU_HOOK_HALT,EMU_HOOK_BREAK,EMU_HOOK_WATCH) and stepsemu_script_tick()on the main thread so Scheme callbacks can safely access UI, config, and debug controls. - Evaluates GUI
--scriptand--evalflags without holdingrt.state_mu, usingrt_lock_state/rt_unlock_stateonly around synchronous state access.
- Owns SDL3 window/renderer lifecycle (
- Emulation Thread (
emu_thread):- Sleeps on
rt.wake_cvwhiledbg.powered_off,dbg.paused,cpu->halted, or while the Main Thread signalsatomic_load(&rt.ctl_waiters) > 0. - Acquires
rt.state_muand executesIvoryCoreApistep chunks up tomin(slice, rt.script_step_ceiling - cpu->instr_count)instructions, pollingmerlin_step_timers, SCSI/Ethernet/console DMA, and auto-checkpoints (ivory_ckpt_maybe_auto). - Releases
rt.state_mucleanly between slices so Main Thread UI rendering, Scheme tasks, and IPC inspection never contend on fine-grained per-instruction locks.
- Sleeps on
Separate synchronous entry paths (--steps N without GUI, --puppet without --headless vs continuous) share debug_ctl_run_budget and emu_script_tick.
Powered-Off Startup vs --autostart
By design (main.c), interactive GUI launches start powered off (dbg.powered_off = true, dbg.paused = true): the SDL3 window, top menu bar, and Machine Setup (automatically opened when firmware/config is missing or incomplete) appear first, and firmware loads only when the user clicks Power On (or triggers power-on over debug IPC).
Automatic immediate boot happens when any of these are true:
--autostarton the CLI, or:autostart #tinside(define-machine ...)--headless,--puppet,--puppet-file,--puppet-stdio,--script,--eval, or--steps--load <file.snap>(restores a powered-on machine snapshot; stays paused in GUI unless--autostartor non-interactive flags are passed)
CLI Flag Reference (EmuCliConfig in emu/src/main.c)
| Category | Flags |
|---|---|
| Firmware & Config | --config <file.scm>, --script <file.scm> (repeatable), --eval <expr> (repeatable), --rom <path> (combined rom.dump or low chip 115988), --rom-hi <path> (high chip 115989), --kernel <file>, --nvram <file>, --load <file.snap>, --autostart |
| Memory & Clock | --ram-mw <8|16|32|64|127|256>, --clock <auto|realtime|deterministic>, --idle-yield / --no-idle-yield, --mlock-state, --core-so <path> |
| SCSI Storage (IDs 0–6) | --disk <img|spec> (RO), --disk-rw <path>, --disk-overlay <path>, --overlay-file <path>, --cdrom <iso>, --scsi-disk <id:path[:ro|rw|overlay]>, --scsi-cdrom <id:path>, --scsi-tape <id:path[:ro|rw]> |
| Ethernet & Serial | --eth-user, --eth-net <cidr>, --eth-hostfwd <proto:hostport:guestport>, --eth-tap <if>, --eth-veth <if> / --eth-packet <if>, --eth-mac <xx:xx:xx:xx:xx:xx>, --serial-a <spec>, --serial-b <spec> |
| Display & Capture | --headless, --overscan <trim|full>, --no-status-bar, --keymap <name> / --list-keymaps, --mouse-mode <capture|relative>, --record-y4m <path>, --dump-pbm <path>, --dump-panel-ppm <path> |
| Debug, Puppet & Snapshots | --steps <N>, --break <addr>, --trace, --puppet <cmds>, --puppet-file <path>, --puppet-stdio, --debug-sock <path> / --debug-pipe <path>, --debug-tcp <[host:]port>, --no-debug-sock / --no-debug-pipe, --ckpt-interval <N>, --ckpt-max <N>, --ckpt-ttl <N> |
POSIX & Win32 / MinGW-w64 Portability Layer
| Header | Purpose & Implementation Split |
|---|---|
| emu_os.h | Thread/sync (pthread on POSIX vs CRITICAL_SECTION, CONDITION_VARIABLE, _beginthreadex on _WIN32), monotonic clock (clock_gettime vs QueryPerformanceCounter), emu_aligned_alloc/free, emu_mlock/VirtualLock, dynamic core loader (dlopen/dlsym vs LoadLibraryA/GetProcAddress), emu_setenv, emu_unlink_file. |
| emu_io.h | Large-file >4 GiB offsets (emu_fseek64/ftell64/ftruncate64 -> fseeko/_fseeki64), thread-safe positional I/O (emu_pread/emu_pwrite -> POSIX pread/pwrite vs Win32 ReadFile/WriteFile with OVERLAPPED offset), atomic replacement (emu_atomic_replace -> rename vs MoveFileExA(..., MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH)), _O_BINARY stdio helpers. |
| emu_ipc.h + emu_ipc.c | Non-blocking EmuLocalServer (AF_UNIX SOCK_STREAM on POSIX vs overlapped Win32 Named Pipes \\.\pipe\ivory-xl1200-<pid>), dual-stack IPv4/IPv6 EmuTcpListener (IPV6_V6ONLY=0 on :: fallback to 0.0.0.0, Winsock2 WSAStartup on _WIN32), unified EmuEndpoint (>0 bytes, 0 would-block, -1 EOF/error). |
2. SDL3 Console, Overscan, LED Strip & Y4M Recorder
Implemented in sdl_console.c and keymap.c:
- Resizable Letterboxed Viewport: Renders the 1-bit monochrome XL1200 VRAM (
1152x896full raster,3632-bit words/line) as anSDL_PIXELFORMAT_ARGB8888streaming texture with aspect-ratio-preserving letterboxing below the28 pxtop menu bar (or full window height in fullscreenF11). - Overscan Modes (
:trimvs:full)::full: renders the full1152x896framebuffer (1152x924when the28 pxLED bezel is enabled).:trim: crops the Genera dark overscan border to the active1084x812console region (1084x840with LED bar). Toggleable live viaView -> Toggle Overscan Trimor:overscan/--overscan.
- Passive XL1200 Status LED Bezel (
XL1200_STATUS_BAR_HEIGHT = 28 px): Mirrors physical front-panel telemetry without interactive controls inside the bezel (render_status_bar_snapin sdl_console.c):- PWR:
PANEL PWR(green when powered on; amber when powered off) - MAIN CPU:
FAULT(red),RUN(green),U1,U0(Merlin-II diagnostic LEDs<3:0>) - I/O BOARD:
+12V(green when powered on),RCV(amber, serial/eth RX activity),CD(amber, carrier/net),XMT(amber, TX activity),SCSI(green, WD33C93 activity) - Right-Side Pills: CPU execution state (
POWER OFF,HALTED,PAUSED, orRUN),CAP/RELmouse mode, active keyboard mapping tag (KM:<badge>), andRECindicator while.y4mrecording is active.
- PWR:
- 1:1 Mouse Capture & Uncaptured Fallback:
- Clicking inside the active VRAM rectangle while powered on and running enters
SDL_SetWindowRelativeMouseMode(true)(CAP), forwarding relative(dx, dy)+ 3-button (L/M/R) packets directly toconsole_hw. - Pressing Right Ctrl (
R-Ctrl) releases capture cleanly without passing the modifier to the guest. - Pausing the CPU or opening a UI menu automatically releases relative mouse mode.
- Clicking inside the active VRAM rectangle while powered on and running enters
- Multi-Profile Keyboard Mapping Engine (ivory_keymap.h, keymap.c):
- Translates host SDL3 scancodes into physical Symbolics SLB press/release packets (
0..0127) across 9 selectable profiles (IVORY_KEYMAP_COUNT = 9):xl1200([XL]) — Symbolics XL1200 / Lisp Machine layoutnxp-default([NXP]) — Default X/Genera workstation mappingncd-n101([NCD]) — NCD N101 X terminalnds([NDS]) — NDS terminal mappingsun-type-4([SUN4]) — Sun Type 4 workstation keyboardsgi-iris([SGI]) — SGI IRIS keyboardpc-101([PC]) — Standard PC-101 layout (default modifier/bucky ergonomics on modern PCs)mac-ext([MAC]) — Apple Extended Keyboardnxp-ascii([ASC]) — ASCII key-sequence mode with one-shot bucky modifier arming (Shift/Ctrl/Meta/Super/Hyper/Symbol)
- Translates host SDL3 scancodes into physical Symbolics SLB press/release packets (
- Async YUV4MPEG2 (
.y4m) Video Recorder (Xl1200VideoRec):- Writes standard
YUV4MPEG2 W<w> H<h> F<fps>:1 Ip A1:1 C420mpeg2headers (fpsclamped to1..60, default15, including the LED bezel when enabled). - Double-buffered 2-slot VRAM snapshot ring (
VIDEO_REC_RING_SLOTS = 2) offloads ARGB -> BT.601 YUV420 planar conversion and disk writes to a dedicated worker thread so video capture never stalls CPU stepping or UI rendering.
- Writes standard
3. microui Workbench UI (ui_workbench.c, ivory_ui.h)
The immediate-mode overlay uses vendored rxi/microui v2.02 rendered into an SDL3 texture atlas with embedded antialiased proportional typography (15 px Normal and toggleable 18 px Large UI Font in emu/include/ui_font_atlas.h) via a 28 px (XL1200_TOP_MENUBAR_HEIGHT) top menu bar and 6 draggable, resizable floating windows:
Top Menu Bar (ui_draw_top_menubar, hidden in F11 Fullscreen)
- Menus:
Machine:Configure Machine...,Open Config (.scm)...,Save Config,Save Config As...,Power On/Pause / Resume,Send NMI (Drop to FEP),Warm VME Reset,Cold Power Reset,QuitMedia:Configure SCSI Disks...(opensMachine Setupon theDisks & SCSItab),Disk & Image Tools...,Insert / Swap CD (ID 4)...,Eject CD-ROM (ID 4),Insert Tape RW (ID 5)...,Insert Tape RO (ID 5)...,Create Blank Tape...,Eject Tape (ID 5)Net & Serial:Network & Serial...Actions: dynamic buttons for every(define-action ...)registered ins7(showing[hotkey]),Load Script (.scm)...,Cancel Running ActionsDebug:Debug & Snapshots...,s7 Lisp REPL...,Save Snapshot...,Load Snapshot...,Save Screenshot...,Video Recording...,Save Bug Dump (.zip)...,Hot-Reload CoreView:Toggle Fullscreen (F11),Toggle Overscan Trim,Toggle Status LED Bezel,Large UI Font (18px)toggle,Video Recording...,Keyboard Mapping...(opens the 9-profileTOP_MENU_KEYMAPpicker)
- Quick Controls:
| Stop Task(shown while Scheme coroutines are active), crimsonStop REC mm:ss(shown while.y4mvideo recording is active for one-click stop with live elapsed time),Bug Dump(one-click single-archive.zipbug report saver pre-populated withivory-bug-report-YYYYMMDD-HHMMSS.zip),Power On/Pause/Resumebutton,KM:<badge>quick keymap selector, and live status hint (Setup Machine to Boot,Powered off (Power On),Paused (Click Resume),Click screen to capture, or recent toast).
6 Floating Workbench Windows
Machine Setup— Three tabs (Open .scm...,Save,Save As...,Save & Power On):[Identity & NVRAM]: Machine name, Merlin Main/IO serials, IO part number, Main/IO revisions,Sony Monitortoggle, Symbolics MAC (08:00:05:..) withGen Symbolics MACbutton, NVRAM file picker (Browse...),Historical RTCyear override, andSave NVRAM Now.[Firmware & Memory]:Boot PROM low(115988or combinedrom.dump),Boot PROM high(115989),IFEP Kernel, RAM preset buttons (8 MW/16 MW/32 MW/64 MW),Realtime Microsecond Clock,CPU Idle-Yield Power Saving, andOverscan Trim (1084x812).[Disks & SCSI]: Targets 0–6 (FEP Units 7–13) SCSI image assignments (Empty/Disk/CD-ROM/Tape,RW/RO/Ovlmode, path textbox + nativeBrowse...+Clear, optional.ovloverlay file path,Apply Disk Changes Live, and 2-clickCommit Ovl/Reset Ovlfor active overlays).
Disk & Image Tools— Active attached SCSI summary with shortcut toMachine Setup -> Disks & SCSI, 2-click overlay commit/reset for active overlays, and the embedded FEPFS & Disk Image Toolkit (create initialized XL1200 FEPFS disk, create blank disk/tape, inspect image metadata including APM/HFS hidden volume inventories, and Convert MacIvory..., which automatically discovers and saves all MacIvory FEPFS volumes inside raw, Apple Partition Map, or Classic HFS images as<base>_<vol><ext>).Network & Serial— Network backend mode (None,User NAT (slirp),Linux TAP), CIDR, host port-forwarding rules, and Serial A/B (none,tcp-listen:<[a]:port>,tcp:<[a]:port>,pipe:<name_or_path>,file:<path>) for the Signetics SCN68562 DUSCC Ch.A & Ch.B attach/apply controls.Debug & Snapshots— 4-tab live symbolic debugger and checkpoint workbench:[Overview & Controls]: LivePC/SP/FP/LP/LED/instr_countreadout,Save Bug Dump (.zip)...,Save .snap.../Load .snap...,Video Recording.../Stop .y4m Rec,Screenshot...(.pbm/.ppm),Reload Core, COW checkpoint table (Take,Restore,Pin,Del, auto-interval/max/TTL,Rewind -1,Goto instr), and Breakpoints (0..7) + VMA/PMA Write Watchpoints (0..3).[Registers & State]: Full Ivory Rev 4 CPU registers, BAR0–3,US-CLK/PREEMPT,ZONE-OLD/EPH-OLD, W3x64 FPA status, and decoded active trap context (trap_mode, vector, handler, Rev 4 microstate).[Disassembly & Stack]: Live 40-bit disassembly aroundPC(or custom VMA) in human or canonical Lisp S-expression mode (ivory_disasm.c) alongside a symbolic control-stack backtrace (ivory_sym_walk.c) with resolved Genera function names.[Memory]: Side-effect-free VMA/PMA memory and Genera tagged object inspector.
Video Recording— Dedicated YUV4MPEG2 (.y4m) capture controls: live resolution/FPS/frame-count/duration telemetry, output path textbox +Browse...(pre-filled withivory-video-YYYYMMDD-HHMMSS.y4m, auto-appending.y4m), FPS preset buttons (10,15,24,30,60) + custom1..60FPS input, live capture geometry checkboxes (Trim Overscan Border,Include Status LED Bezel),Start Recording/Stop Recording+Save As & Start..., and anffmpegMP4 conversion hint.s7 Lisp REPL— Scrollable evaluation transcript, textbox withSDL_StartTextInputfocus,Ctrl+Vclipboard paste,Ctrl+Ccopy of current input, andUp/Downcommand history recall.
Single-Archive Beta Bug Report (ivory_bug_report.h, bug_report.c)
Clicking Bug Dump in the top menu bar (or Debug -> Save Bug Dump (.zip)..., Debug & Snapshots -> Save Bug Dump (.zip)..., or running bug-report [path.zip] over live debug IPC) writes a single standard DEFLATE-compressed .zip archive atomically with zero external CLI or compression library dependencies:
README.txt— manifest and privacy notice for beta testersreport.txt— UTC timestamp, host/build/CPU accel tier, full Ivory Rev 4 CPU & W3x64 FPA registers, decoded active trap context (mode, vector, handler, Rev 4 microstate), non-zero scratchpad, symbolic disassembly window aroundPC, control stack window with Genera object summaries & 16-frame symbolic backtrace, Merlin-II/PIT/SCSI/Ethernet/Console/VRAM/Serial/Checkpoint diagnosticsconfig.scm— privacy-sanitized machine configuration (local directory prefixes stripped to basenames)screen.ppm— XL1200 VRAM + front-panel LED strip screenshotnvram.bin— raw 2 KiB Mostek MK48T02 NVRAM dumpstate.snap— sparse binary machine snapshot (when powered on; load directly viaivory-xl1200 --load state.snap)
Input & Native File Dialog Safeguards
- Native SDL3 File Dialogs:
SDL_ShowOpenFileDialogandSDL_ShowSaveFileDialogrun asynchronously on SDL's worker thread and enqueue results thatui_drain_dialog_result()safely consumes on the Main Thread insideui_overlay_render(). - Text-Input Focus Gate:
SDL_StartTextInputactivates only when amicrouitextbox holds focus and hardware mouse capture is inactive, preventing desktop dead-keys or text events from bleeding into Lisp keyboard scancodes. - Dropdown Click-Through Guard: Clicking outside an open menu dropdown dismisses it (
last_click_dismissed_menu = true) and consumes that mouse-down event (ui_overlay_allow_mouse_capturereturnsfalse), so closing a menu never accidentally captures the mouse cursor into Genera.
4. s7 Scheme Config & Cooperative Workbench (emu_script.c, ivory_script.h)
(define-machine ...) S-Expression Schema
Machine configurations (see emu/xl1200.scm.example) are real s7 Scheme files loaded before emulation starts:
(define-machine
:name "Symbolics XL1200"
:serial 1042
:mfg-days 4520
:io-serial 2042
:io-part 1200
:io-rev '(2 1 0)
:monitor :philips
:mac "08:00:05:11:22:33"
:nvram "xl1200-nvram.bin"
:rtc-offset (emu/rtc-year 1993)
:ram-mw 8
:rom '("../ivory-fep-roms/fep330/115988-e.bin"
"../ivory-fep-roms/fep330/115989-e.bin")
:kernel #f
:snapshot #f
:clock :realtime
:idle-yield #t
:autostart #f
:overscan :trim
:keymap :pc-101
:mouse-mode :capture
:scsi '((0 :disk "genera-sys.dsk" :mode :overlay :overlay "genera-sys.ovl")
(4 :cdrom "genera-8-3.iso"))
:net '(:mode :user :cidr "10.0.2.0/24" :hostfwd ("tcp:2023:23"))
:serial-a "none"
:serial-b "none"
:debug-local #t
:debug-tcp #f
:ckpt '(:interval 0 :max 64 :ttl 0))
Supported :rom forms: a single string ("rom.dump" or "115988-e.bin" with automatic 115989 sibling probing), a 2-element list '("115988-e.bin" "115989-e.bin"), or #f. Optional :eco #x..., :kernel, :snapshot, and :autostart #t are also persisted when configured.
Surgical Byte-Span Save Config
When saving from the GUI (Machine -> Save Config / Machine Setup -> Save Config), emu_script_save_machine_config locates the exact top-level (define-machine ...) S-expression span in the original .scm file (find_top_level_define_machine_span), rewrites only that span atomically via .tmp + emu_atomic_replace, and preserves all surrounding comments, (define-action ...), (emu/on-boot ...), and custom Scheme helpers verbatim.
(define-action ...) & Pure-Scheme call/cc Cooperative Scheduler
User-defined macros in .scm files register GUI menu items + hotkeys in the Actions menu:
(define-action quick-checkpoint (:label "Take Checkpoint" :hotkey "F5")
(emu/cmd "ckpt take quick"))
Non-blocking automation uses pure Scheme first-class continuations (call/cc) in the g_s7_prelude (emu_script.c):
(emu/spawn label thunk)andemu/yield-untilsuspend tasks in*emu-tasks*and compute the earliest target instruction count (*emu-script-step-ceiling*) viaemu/%recompute-ceiling!.- In continuous GUI/runtime execution,
emu_threadruns uninterrupted up to that ceiling (rt.script_step_ceiling), thenmainticks ready tasks viaemu_script_tick(), resuming each continuation seamlessly without blocking SDL events or UI frames. - In
--steps/ synchronous runs (*emu-yield-esc*is#f),emu/yield-untilfalls back toemu/%run-sync-until!usingemu/%sync-step!. - Exposed primitives include:
- State, registers & symbolic inspection:
emu/state,emu/pc,emu/instr-count,emu/halted?,emu/paused?,emu/reg,emu/vma,emu/pma,emu/word,emu/disasm,emu/bt-sym,emu/inspect,emu/trap-info - Execution & resets:
emu/pause,emu/resume,with-paused-cpu,emu/nmi,emu/warm-reset,emu/power-reset,emu/nvram-save - Waits & automation:
emu/wait-steps,emu/wait-until,emu/wait-pc,emu/wait-leds,emu/wait-vram-change,emu/wait-vram-stable,emu/wait-genera-idle,emu/cancel-task! - Input & media:
emu/key,emu/type-line,emu/send-keys,emu/mouse,emu/serial-set,emu/overlay-commit,emu/overlay-reset,emu/fep-info,emu/fep-create,emu/rtc-year - Hooks & escape hatch:
emu/on-boot,emu/on-halt,emu/on-break,emu/on-watch,emu/cmd(dispatches anydebug_ctlline command synchronously)
- State, registers & symbolic inspection:
5. Live Debug IPC, Puppet Mode & Time-Travel Snapshots
Unified DebugCtlSink Transports (debug_ctl.c, scripts/xl1200-ctl.sh)
Every command handler writes into a unified DebugCtlSink spanning four frontends simultaneously:
- Local socket / pipe (enabled by default unless
--no-debug-sock/:debug-local #f):- POSIX:
AF_UNIXstream socket/tmp/ivory-xl1200-<pid>.sock(cleaned up on exit) - Windows: Win32 Named Pipe
\\.\pipe\ivory-xl1200-<pid>
- POSIX:
- Dual-stack TCP listener (
--debug-tcp [host:]portor:debug-tcp):0.0.0.0:port/[::]:portviaEmuTcpListener. - Puppet mode (
--puppet "<cmds>",--puppet-file,--puppet-stdio): semicolon/newline script execution against the exact same parser. s7bridge (emu/cmd "..."): direct in-process invocation without socket overhead.
Client convenience helpers: ./scripts/xl1200-ctl.sh [--list | --sock PATH] [COMMAND...] (POSIX shell) and python3 scripts/xl1200-ctl.py [--list | --sock PATH | --pipe NAME | --tcp HOST:PORT] [COMMAND...] (cross-platform Linux/macOS/Windows; see docs/TROUBLESHOOTING.md).
Live Debug Command Reference (debug_ctl.c help)
| Group | Commands |
|---|---|
| Execution & State | state / status, pause, cont / resume, step [N], wait-vram <max> [chunk], nmi, reset, power-reset, power-on, quit |
| Breakpoints & Watchpoints | break <hex> / del <hex> / clear / list (up to 8 VMA breakpoints); watch pma|vma <hex> / list / clear [idx] (up to 4 write watchpoints) |
| Symbolic Debug & Profiling | regs, disasm [--lisp] [vma] [count], bt [max_frames], bt-sym [max_frames], inspect <hex_vma>, trap-info, mem <hex_vma> [count], pma <hex_pma> [count], hw, sample [N] (top-16 hot PCs), sample-sym [samples] [step_k] [out.folded] (top-20 hot functions + flamegraph export), bug-report [path.zip], trace on|off |
| Hardware & Settings | clock [realtime|deterministic], idle-yield [on|off|status], keymap [status|list|set <name>], scsi ..., disk ..., serial ..., reload [path] |
| Input & Media Capture | type <text>, key <name>, keydown <name>, keyup <name>, mouse <dx> <dy> [btn], serial-rx <ch> <hex>, record start <path> [fps] | stop | status, dump <path.pbm>, dump-panel <path.ppm> |
Checkpoints & .snap | ckpt [take [lbl]|list|config|purge|pin|unpin|del|clear], rewind [id|-N], goto <instr>, save <path>, load <path> |
COW Checkpoints, Deterministic Replay & .snap Binary Format (snapshot.c, ivory_snapshot.h)
- 256-Word COW Dirty-Page Checkpoints (
IvoryCheckpointStore): Checkpoints deduplicate unmodified256-word Ivory pages across RAM/VRAM/ROM/SCSI overlays using page-hash refcounting, tracking unique page memory and eviction via--ckpt-max/--ckpt-ttl/pin. - Deterministic Input Replay (
rewind/goto): Keyboard packets, mouse deltas, serial RX bytes, NMI, and warm resets are logged againstcpu->instr_countinstore->input_log.goto <instr>locates the nearest preceding checkpoint and deterministically replays logged hardware inputs step-exact up to the requested instruction count. - Sparse
.snapBinary Format (IVORY_SNAP_MAGIC = 0x59525649,"IVRY", v1):24-byte header:[magic:u32, version:u32, payload_size:u64, fnv1a_64(payload):u64]- Payload: struct/size guard metadata -> host-pointer-sanitized
IvoryCpu,MerlinBoard,boot_comm,map_cache->io_sram&scsi_io_buf-> sparse non-zero256-word pages forboot_prom,ram, andvram-> per-target sparse SCSI overlays -> deterministicIvoryInputEventlog.
- 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)