XL1200 VME Paravirtual Board (IVPV) & Genera 8.3 Integration Plan
Status: Future / Proposed Design Plan (Tier 1.5 Idle Yield → Tier 2 Full PV) — Not yet implemented. Built on the shared Merlin-II VMEbus & VIC068 bridge in
docs/vme-bus-plan.md(coexisting cleanly withdocs/color-graphics-plan.md). Seedocs/ROADMAP.mdfor overall sequencing anddocs/emulator/README.mdfor the currently implemented C11 XL1200 emulator.Staged Delivery & Scope Alignment:
- Tier 1.5 (Early Standalone Milestone — Wave 1B): Implement the 1-register
IVPVIdle Yield Device (PV_REG_IDLE_YIELD) immediately on top ofvme_bus.cfor ~0% idle host CPU before full mouse/RPC/HOST:work begins.- Tier 2 (Full
IVPV): Seamless uncaptured mouse, bidirectional Solstice/UX-style RPC + External RPC Sidecar Proxy (Section 3.4b below, allowing external host programs to attach custom RPC modules or invoke guest RPCs), zero-copyHOST:filesystem, and clipboard.- Tier 3 (Lowest Priority — Decoupled Card
IVFB): Linear VME Color Framebuffers (0x1400_0000,screen_id = 1..4) are decoupled into a separate optional VME card (IVFB) registered independently onvme_bus.crather than bundled intoIVPV.
Scope: C11 ivory-xl1200 (emu/) + Genera 8.3 SCT System (emulator-pv)
1. Executive Summary & Architectural Guardrails
This plan specifies a synthetic Merlin-II VMEbus A32/D32 Paravirtual Board ("IVPV") and its companion Genera 8.3 loadable system (emulator-pv) for the from-scratch Symbolics XL1200 emulator (emu/).
Instead of spoofing a UX1200/MacIvory embedded machine via sys:*emb-communication-area*—which would flip (system-case (Embedded ...)) across Genera and break standalone Merlin-II SCSI, console, and Ethernet assumptions—the machine remains a 100% authentic standalone XL1200 with an optional expansion card plugged into a free VME slot:
- Deterministic Guest Idle Yield (
PV_REG_IDLE_YIELD): Immediate zero-overhead exit fromivory_cpu_run()(L_outer_reloadincpu.c) intopthread_cond_timedwait(&rt->wake_cv)bounded bymerlin_us_until_next_timer_irq(), dropping host idle CPU usage to ~0% with sub-millisecond input/network wake latency. - Multi-Head Seamless Uncaptured Host Mouse (
PV_REG_MOUSE_XY/PV_REG_MOUSE_BTN): Zero-capture host cursor tracking across the onboard 1-bpp monochrome console (screen_id = 0) and up to 15 future VME color framebuffers (screen_id = 1..15) across multiple SDL3 windows, using a two-half Genera driver (wired interrupt fast path +:fg 32screen-switch daemon). - Bidirectional Solstice/UX-Style RPC Channel (
PV-VME-TRANSPORT-AGENT) + UnifiedHOST:Filesystem: Reuses Genera 8.3's built-inRPC:STD-TRANSPORT-AGENT,RPC::LITTLE-ENDER-DATA(zero byte-swapping between Ivory and x86-64/ARM64), andSyntax: Lisp+Cstub generator (DEFINE-REMOTE-MODULE). Provides zero-copy DMAHOST:file access (fs:file-access-path), host clipboard/time integration, and typed Host \(\to\) Guest RPC control. - Multi-Head Linear VME Color Framebuffer Architecture (
screen_id = 1..4): Flat VME A32 linear VRAM apertures (8-bpppseudocolor CLUT and32-bpptruecolor) + hardware cursor sprite registers, enabling up to 4 simultaneous color heads alongside the onboard monochrome console.
Non-Negotiable Invariants for All Swarm Agents
libivory_core.soPurity & Hot-Reload ABI (Makefile, ivory_emu.h):- Files in
CORE_SRCS(mem.c,merlin.c,cpu.c,core_api.c, etc.) MUST remain pure ISO C11 with zero OS/POSIX/pthreads/SDL3/socket/filesystem headers and zero mutable.dataor.bssglobals (verified viareadelf -WS build/libivory_core.so). - All host OS operations (condvar sleep, SDL3 window coordinate mapping, host POSIX
open/pread/pwrite/readdir, RPC worker threads) MUST live inSHELL_SRCS(main.c,sdl_console.c,debug_ctl.c, and newpv_rpc_host.c), communicating withlibivory_core.sostrictly throughMerlinBoardstate fields and host callback pointers (same pattern aseth_82586_set_callbacksandconsole_hw_set_serial_callbacks).
- Files in
- Exact Page-Aligned Core Struct Sizes (ivory_emu.h:601-925):
sizeof(MerlinBoard) == 278528U(_reserved[1054]= 8,432 bytes available).sizeof(IvoryMem) == 32768U(_reserved[937]available).sizeof(IvoryCpu) == 4096U(_clk_pad[7]+_reserved[248]available).- Carve
IvoryPvBoard pvdirectly out ofMerlinBoard::_reservedand keep all three_Static_assertchecks exact!
- 29-Bit Positive Fixnum Register Rule:
- On Ivory, 32-bit integers with bit 31 (or bit 30 negative sign) allocate heap
DTP-BIGNUMs if touched with Lisp arithmetic, which is illegal insidesi:defwiredfun. AllIVPVmagic constants, status words, and packed coordinate fields read by wired Lisp MUST fit in unsigned 29-bit positive fixnums (0 .. #x1FFFFFFF).
- On Ivory, 32-bit integers with bit 31 (or bit 30 negative sign) allocate heap
- Anti-Cheating & Ground-Truth Verification (AGENTS.md § 6):
- Never synthesize guest instruction streams, mock bootloaders, or fake string buffers for integration verification. Unit tests in
emu/tests/may test MMIO register state machines directly; integration verification MUST boot genuineivory-fep-roms/fep330/rom.dumpand authentic Genera 8.3.ilodworlds.
- Never synthesize guest instruction streams, mock bootloaders, or fake string buffers for integration verification. Unit tests in
2. VME Hardware & Register Specification (IvoryPvBoard)
2.1 Bus Addressing & Interrupt Plumbing
On Merlin-II (XL1200), genera-original/sys.sct/i-sys/vme-bus.lisp (lines 325–343, cli:make-bus-address) encodes direct VME master addresses as DTP-PHYSICAL-ADDRESS words:
- Bits
<31:30>=#b11(0xC0000000direct VME master window). - Bit
<29>=0for VME A32 (1for A24/A16). - Bit
<28>=0for:shuffle :none(1for:32-bitbyte-swap). - Bits
<27:0>=vme_byte_addr >> 2.
We assign IVPV to VME A32 base #x10000000 (with optional linear color VRAM apertures starting at VME A32 #x14000000):
| Region | VME A32 Byte Range | Direct Ivory PMA (:shuffle :none) | Purpose |
|---|---|---|---|
IVPV Control MMIO | 0x1000_0000 .. 0x1000_03FF | 0xC400_0000 .. 0xC400_00FF (256 words) | Control, Idle, Multi-Head Mouse, RPC, Color Head Descriptors |
| Color Head 0 VRAM | 0x1400_0000 .. 0x147F_FFFF | 0xC500_0000 .. 0xC51F_FFFF (2 MW = 8 MiB) | Future Linear Color Framebuffer Head 1 (screen_id = 1) |
| Color Head 1 VRAM | 0x1480_0000 .. 0x14FF_FFFF | 0xC520_0000 .. 0xC53F_FFFF (2 MW = 8 MiB) | Future Linear Color Framebuffer Head 2 (screen_id = 2) |
| Color Head 2 VRAM | 0x1500_0000 .. 0x157F_FFFF | 0xC540_0000 .. 0xC55F_FFFF (2 MW = 8 MiB) | Future Linear Color Framebuffer Head 3 (screen_id = 3) |
| Color Head 3 VRAM | 0x1580_0000 .. 0x15FF_FFFF | 0xC560_0000 .. 0xC57F_FFFF (2 MW = 8 MiB) | Future Linear Color Framebuffer Head 4 (screen_id = 4) |
Routing Note: mem.c:119-134 (
is_merlin_mmio_pma) already routes allpma >= 0x60000000Utomerlin_io_read/merlin_io_write! No change tois_merlin_mmio_pmais needed for0xC4000000MMIO registers. (When Wave 4 adds Color VRAM,0xC5000000..0xC57FFFFFcan fast-path directly inmem.clike monochrome VRAM at0x48000000.)
Dual Access Support (Direct Master + Polled VME) & VIC068 Interrupts
In merlin.c, implement pv_mmio_read(board, offset) and pv_mmio_write(board, offset, val) and wire them to both:
- Direct VME Master Window:
pmain0xC4000000U .. 0xC40000FFU(offset = pma - 0xC4000000U) and:shuffle :32-bitalias0xD4000000U .. 0xD40000FFU(bswap32on payload). ReturnsIVORY_CDR_NEXT+DTP_FIXNUMon reads. - Polled VME Cycles (
cli:bus-read/cli:bus-write,genera-original/sys.sct/i-sys/vme-bus.lisplines 186–318):#x88000140: Latch VME Address Modifier + IA bit (board->vme_am_reg).#x88000080: VME Read/Write Data latch (board->vme_data_reg).#x880000C0: VME Write Request (vme_byte_addrwritten; ifIA == 1and0x10000000 .. 0x100003FC, callpv_mmio_write).#x88000100: VME Read / IACK Request:- If
(board->vme_am_reg & 1U) == 1U(normal VME read,IA=1) andvme_byte_addrin0x10000000 .. 0x100003FC, latchpv_mmio_readintoboard->vme_data_reg. - If
(board->vme_am_reg & 1U) == 0U(VME Interrupt Acknowledge cycle,IA=0, triggered bymerlin-ii-high-priority-vme-interruptatgenera-original/sys.sct/i-sys/interrupts.lisplines 1321–1339 writing IRQ level* 2=8for IRQ4 to#x88000100), latchboard->pv.irq_vector(default0x60, never0x5Fwhich is reserved forSolsticeslave trigger atinterrupts.lisp:1332) intoboard->vme_data_reg.
- If
- Interrupt Line:
pv_irq_pending = (board->pv.irq_status & board->pv.irq_mask) != 0 && (board->pv.ctrl & PV_CTRL_ENABLE) != 0.- Assert/deassert
MERLIN_IRQ_MII_VME_HIGH(1U << 3) inboard->irq_raw_statusinsidemerlin_refresh_irq_cache()(when VIC068 high-priority VME IRQ4 is enabled orpv.ctrl & PV_CTRL_IRQ_ENABLEis set). BecauseMERLIN_IRQ_MII_VME_HIGHis already inMERLIN_HIGH_PRIO_IRQ_MASK, Ivory takesIVORY_TRAP_HIGH_PRIO_SEQ_BREAK, runsmerlin-ii-high-priority-vme-interrupt, performs IACK, reads vector#x60, and calls the Lisp handler installed via(cli:install-bus-interrupt-handler ... #x60).
2.2 Complete IVPV Register Map (PMA = 0xC4000000 + word_offset)
All values read by wired Lisp fit in unsigned 29-bit positive fixnums (<= 0x1FFFFFFF).
| Word Offset | Constant Name | R/W | Reset Value | Bit Layout & Semantics |
|---|---|---|---|---|
0x00 | PV_REG_MAGIC | RO | 0x19565056 | Fixnum-safe magic (#x19565056, ASCII "VP" in low 16b). Unpatched emulator returns bus error or 0. |
0x01 | PV_REG_VERSION | RO | 0x00010000 | Major <23:16> = 1, Minor <15:0> = 0. |
0x02 | PV_REG_FEATURES | RO | Bitmask | <0> IDLE, <1> ABS_MOUSE, <2> RPC, <3> HOST_DMA, <4> COLOR_FB, <5> HW_CURSOR. |
0x03 | PV_REG_CTRL | RW | 0x00000000 | <0> ENABLE, <1> ABS_MOUSE_EN (suppresses relative console mouse deltas in sdl_console.c), <2> IDLE_EN, <3> RPC_EN, <4> IRQ_EN. Writing 0 resets pending IRQs and restores legacy relative mouse. |
0x04 | PV_REG_IRQ_STATUS | RW1C | 0x00000000 | Pending IRQ bits (Write-1-to-Clear): <0> MOUSE_MOVE, <1> MOUSE_BTN, <2> RPC_RX (Host \(\to\) Guest queue/reply ready), <3> DISPLAY_CFG. |
0x05 | PV_REG_IRQ_MASK | RW | 0x00000000 | Mask corresponding to PV_REG_IRQ_STATUS bits <3:0>. |
0x06 | PV_REG_IRQ_VECTOR | RW | 0x00000060 | 8-bit VME IACK vector (#x60 default; reject #x5F). |
0x07 | PV_REG_HOST_MONO_LO | RO | Host clock | Monotonic host microseconds <27:0> (28-bit fixnum). Latches upper bits into 0x08. |
0x08 | PV_REG_HOST_MONO_HI | RO | Host clock | Latched monotonic host microseconds <55:28> (28-bit fixnum). |
0x08..0x0F | (Reserved Core) | — | 0 | — |
0x10 | PV_REG_IDLE_YIELD | WO | 0 | Guest writes max sleep hint in \(\mu\text{s}\) (1 .. 100000, e.g. 16000). Sets board->pv.idle_yield_us = val, exits ivory_cpu_run() slice immediately after current instruction. |
0x11 | PV_REG_IDLE_COUNT | RO | 0 | Diagnostic counter <28:0> of guest-initiated idle yields. |
0x18 | PV_REG_MOUSE_XY | RO | 0 | <11:0> X (0..4095), <23:12> Y (0..4095), <27:24> screen_id (0 = B&W console, 1..15 = Color Heads), <28> in_window (1 = inside SDL content rect). |
0x19 | PV_REG_MOUSE_BTN | RO | 0 | <2:0> buttons (bit0=Left, bit1=Middle, bit2=Right—matches Genera tv:mouse-buttons-buffer), <10:3> signed 8-bit wheel delta (+128 biased), <27:16> 12-bit monotonic event seq. |
0x20 | PV_REG_RPC_CHAN_PMA | RW | 0 | Physical Memory Address (27-bit wired RAM PMA) of guest-allocated PV-RPC-CHANNEL-HEADER struct. |
0x21 | PV_REG_RPC_DOORBELL | WO | 0 | Guest writes <0>=1 (GUEST_TO_HOST_TX) or <1>=1 (HOST_TO_GUEST_ACK). Invokes board->pv.on_rpc_doorbell(ctx, val) to wake host RPC worker immediately. |
0x22 | PV_REG_RPC_STATUS | RO | 0 | <0> HOST_AGENT_READY, <1> CHANNEL_VALID, <15:8> active RPC protocol version (1). |
0x30 | PV_REG_HEAD_COUNT | RO | 1 | Total configured heads (1 = B&W only; 2..5 = B&W + 1..4 VME Color Heads). |
0x31 | PV_REG_HEAD_SELECT | RW | 0 | Selects Color Head index (1..4) for banked registers 0x32..0x39. |
0x32 | PV_REG_HEAD_MODE | RW | 0 | <0> ENABLE, <3:1> pixel format (0=off, 1=8bpp CLUT, 2=32bpp BGRX8888), <15:4> width (1152/1280/1600), <27:16> height (900/1024/1200). |
0x33 | PV_REG_HEAD_STRIDE | RO | 0 | Row stride in 32-bit Ivory words (width / 4 for 8-bpp, width for 32-bpp). |
0x34 | PV_REG_HEAD_VRAM_PMA | RO | 0 | Direct Ivory PMA base of selected head's linear VRAM (0xC5000000 + (head-1)*0x00200000). |
0x35 | PV_REG_HEAD_CLUT_IDX | RW | 0 | 8-bit CLUT write index (0..255, auto-increments on write to 0x36). |
0x36 | PV_REG_HEAD_CLUT_RGB | RW | 0 | 24-bit #x00RRGGBB palette entry (24-bit positive fixnum). |
0x37 | PV_REG_HEAD_CUR_CTL | RW | 0 | Hardware cursor sprite: <0> VISIBLE, <12:1> X, <24:13> Y, <28:25> hotspot X/Y latch. |
0x38 | PV_REG_HEAD_CUR_PMA | RW | 0 | Wired RAM PMA of 32x32 cursor bitmap/mask (or ARGB32 sprite) for zero-flicker color cursor. |
3. Detailed Subsystem Designs
3.1 Core C11 Data Structures (ivory_hw.h, ivory_emu.h)
Add constants in emu/include/ivory_hw.h and IvoryPvBoard inside MerlinBoard in emu/include/ivory_emu.h by reducing MerlinBoard::_reserved[1054] by the exact multiple of uint64_t words (sizeof(IvoryPvBoard) / 8):
#define IVORY_PV_MMIO_BASE_PMA UINT32_C(0xC4000000)
#define IVORY_PV_MMIO_SWAP_BASE_PMA UINT32_C(0xD4000000)
#define IVORY_PV_MMIO_WORDS 256U
#define IVORY_PV_VME_A32_BYTE_BASE UINT32_C(0x10000000)
#define IVORY_PV_VME_A32_BYTE_SIZE UINT32_C(0x00000400)
#define IVORY_PV_MAGIC UINT32_C(0x19565056)
#define IVORY_PV_VERSION UINT32_C(0x00010000)
#define IVORY_PV_DEFAULT_VECTOR UINT32_C(0x00000060)
typedef void (*IvoryPvDoorbellFn)(void *ctx, uint32_t doorbell_bits);
typedef void (*IvoryPvCtrlChangeFn)(void *ctx, uint32_t new_ctrl);
typedef struct IvoryPvBoard {
uint32_t ctrl;
uint32_t features;
uint32_t irq_status;
uint32_t irq_mask;
uint32_t irq_vector;
uint32_t idle_yield_us; /* Non-zero exits ivory_cpu_run() immediately */
uint32_t idle_yield_count;
uint32_t host_mono_hi_latch;
/* Multi-head uncaptured mouse state */
uint32_t mouse_xy; /* <28> in_win | <27:24> screen_id | <23:12> y | <11:0> x */
uint32_t mouse_btn; /* <27:16> seq | <10:3> wheel | <2:0> btns */
/* Bidirectional RPC channel */
uint32_t rpc_chan_pma;
uint32_t rpc_status;
/* Future multi-head color descriptors (heads 1..4 -> idx 0..3) */
uint32_t head_count;
uint32_t head_select;
uint32_t head_mode[4];
uint32_t head_cur_ctl[4];
uint32_t head_cur_pma[4];
uint8_t head_clut_idx[4];
uint32_t head_clut_rgb[4][256]; /* 4 * 1024 = 4096 bytes */
/* Reload-safe host shell callbacks (NULL in pure unit tests) */
uint64_t (*read_host_mono_us)(void *ctx);
IvoryPvDoorbellFn on_rpc_doorbell;
IvoryPvCtrlChangeFn on_ctrl_change;
void *host_ctx;
uint32_t _pad;
} IvoryPvBoard;
/* Ensure sizeof(IvoryPvBoard) % 8 == 0 and subtract sizeof(IvoryPvBoard)/8 from MerlinBoard::_reserved[1054] */
Export thin core helpers in IvoryCoreApi (ivory_core_api.h & core_api.c)—bumping IVORY_CORE_ABI_VERSION:
merlin_pv_set_callbacks(MerlinBoard *board, ...)merlin_pv_push_mouse_abs(MerlinBoard *board, uint8_t screen_id, uint16_t x, uint16_t y, bool in_win, uint8_t buttons, int8_t wheel_delta)(updatesmouse_xy/mouse_btn, setsPV_IRQ_MOUSE_MOVE/PV_IRQ_MOUSE_BTNinirq_status, callsmerlin_refresh_irq_cache(board)).merlin_pv_raise_irq(MerlinBoard *board, uint32_t irq_bits)(used by host RPC thread to raisePV_IRQ_RPC_RX).
3.2 Real Guest Idle Trigger (Host + Genera)
- Zero-Overhead Slice Exit in
libivory_core.so(cpu.c:1698-1706 & cpu.c:2345-2357):- In
cpu_run_threaded,OP_MEMORY_WRITEis already routed to&&L_exec_sys_sync(cpu.c:1568), which callsTHREADED_FINISH_CALLOUT(..., /*force_reload_=*/true)\(\to\)L_page_exit(advancingipand materializingcpu->pc) \(\to\)L_outer_reload. - At
L_outer_reload:(cpu.c:1703) and at the top of the scalarwhile (!cpu->halted)loop (cpu.c:2346), add:if (IVORY_UNLIKELY(board != NULL && board->pv.idle_yield_us != 0U)) { FLUSH_TIMERS(); /* in cpu_run_threaded */ return IVORY_OK; } - Hot-loop cost: 0 instructions added to
DISPATCH_NEXT_STRIDE().
- In
- Condvar Sleep in
emu_thread_main(main.c:1539-1602):- Immediately after
debug_ctl_run_budget(...), checkuint32_t guest_yield_us = rt->board->pv.idle_yield_us; rt->board->pv.idle_yield_us = 0U;. - If
guest_yield_us > 0U && rt->dbg.idle_yield_enabled && !rt->core.api->merlin_irq_asserted(rt->board):- Compute
uint64_t next_timer_us = rt->core.api->merlin_us_until_next_timer_irq(rt->board); uint64_t sleep_us = (guest_yield_us < next_timer_us) ? guest_yield_us : next_timer_us;(clamp to<= 25000U, skip if< 150U).- Sleep on
pthread_cond_timedwait(&rt->wake_cv, &rt->lock, &ts)—which is already signaled immediately by SDL keyboard/mouse events, SLIRP Ethernet RX, serial RX, debug socket commands, and now Host \(\to\) Guest RPC responses! - Keep the existing 3-slice heuristic spin detector as an automatic fallback when
PV_CTRL_IDLE_ENis0(e.g. during FEP prompt before Genera boots).
- Compute
- Immediately after
- Genera 8.3 Scheduler Idle Hook (
emulator-pv:pv-idle-hook):- Hook Genera's scheduler idle loop (
si::process-scheduler-idle-function/si:*scheduler-idle-hook*orsys:adviseon the scheduler's idle pass when no runnable process exists insi:active-processes). - Inside the hook, verify
(and *pv-enabled* (zerop (ldb sys:%%cr-trap-mode (sys:%control-register))))(interrupts enabled) and execute a single(sys:%memory-write *pv-reg-idle-yield-pma* 16000). The next Merlin 60 Hz / periodic timer, keyboard, mouse, Ethernet, or RPC VME#x60interrupt wakes the CPU cleanly.
- Hook Genera's scheduler idle loop (
3.3 Multi-Head Seamless Absolute Mouse (screen_id = 0..15)
Host Side (sdl_console.c)
- When
(board->pv.ctrl & (PV_CTRL_ENABLE | PV_CTRL_ABS_MOUSE_EN)) == (PV_CTRL_ENABLE | PV_CTRL_ABS_MOUSE_EN):- Disable
SDL_SetWindowRelativeMouseMode(never grab/trap the host cursor) and callSDL_HideCursor()while inside the active content rect (or keep OS cursor until first motion). - On
SDL_EVENT_MOUSE_MOTION,SDL_EVENT_MOUSE_BUTTON_DOWN/UP, andSDL_EVENT_MOUSE_WHEEL:- Map
event.windowID\(\to\)screen_id(0for the primary XL1200 B&W console window;1..4for secondary color head windows when Wave 4 is active). - Transform window coordinates
(event.x, event.y)through the window's letterboxedwin_rect(accounting foroverscan_trimmargins in sdl_console.c so trimmed margins add the exact X/Y pixel offset of the visible VRAM sub-rect!). - Clamp
(gx, gy)to[0..fb_width-1, 0..fb_height-1]and callcore->api->merlin_pv_push_mouse_abs(board, screen_id, gx, gy, in_rect, buttons, wheel)+pthread_cond_signal(&rt->wake_cv).
- Map
- Suppress
console_hw_push_mousequadrature packets whilePV_CTRL_ABS_MOUSE_ENis set, preserving automatic fallback to relative quadrature mouse wheneverPV_CTRL_ABS_MOUSE_ENis0(FEP mode or unpatched worlds).
- Disable
Genera 8.3 Guest Side (Two-Half Wired + Preemptive Daemon Design)
Why two halves are mandatory (verified in genera-original/sys.sct/i-sys/wired-console.lisp lines 427–686 and genera-original/sys.sct/window/mouse.lisp lines 1211–1242):
- Constraint A (
tv:mouse-set-sheetcannot run wired): Switchingtv:mouse-sheetbetween screens acquires window-system locks, updates per-screen blinkers, and sends Flavor messages—illegal insidesi:defwiredfunhigh-priority VME interrupt context. - Constraint B (
wired-mouse32-bit XOR fast-track width):si::xor-mouse-cursoruses a32-bit wideART-1Bmask (32 pxon 1-bpp monochrome, which would only span4 pxat 8-bpp or1 pxat 32-bpp). On color screens (> 1 bpp),tv::update-wired-mouse-cursorleaveswired-mouse-cursor-state = %mouse-cursor-open, delegating drawing to Genera'sMOUSEprocess blinker (tv:wakeup-wired-mouse) or ourPV_REG_HEAD_CUR_*hardware sprite!
Therefore, the VME #x60 interrupt handler (pv-vme-interrupt-handler, si:defwiredfun) does:
- Read
PV_REG_IRQ_STATUSand W1C the handled bits. - On
PV_IRQ_MOUSE_MOVE/PV_IRQ_MOUSE_BTN:- Read
xy = (sys:%memory-read *pv-reg-mouse-xy-pma*)andbtn = (sys:%memory-read *pv-reg-mouse-btn-pma*). - Extract
x = (ldb (byte 12 0) xy),y = (ldb (byte 12 12) xy),sid = (ldb (byte 4 24) xy),buttons = (ldb (byte 3 0) btn). - Same-Screen Fast Path (
(= sid *pv-active-screen-id*)):- Call
(si::wired-mouse-handle-motion (- x si::wired-mouse-x) (- y si::wired-mouse-y))(exact zero-drift delta against Genera's wired coordinate!). - If
(/= buttons si::wired-mouse-last-buttons), push a hardware-free timestamped entry directly intotv:mouse-buttons-buffer(tv:mouse-buttons-buffer-in-index, matchingwired-console.lisp:629-656) and call(tv:wakeup-wired-mouse). - If
sid > 0and hardware cursor sprite is enabled on headsid, write(dpb y (byte 12 13) (dpb x (byte 12 1) 1))toPV_REG_HEAD_CUR_CTL.
- Call
- Cross-Screen Warp Path (
(/= sid *pv-active-screen-id*)):- Store
sid,x,y,buttonsinto wired variables*pv-pending-screen-id*,*pv-pending-x*,*pv-pending-y*. - Wake
pv-screen-switch-daemon—a tiny background Lisp process created with(process:make-process "PV Mouse Screen Switcher" :warm-boot-action ... :priority 32 :preemptive t)—which looks up(aref *pv-screen-table* sid), calls(tv:mouse-set-sheet target-screen), warps(tv:mouse-warp x y), and updates*pv-active-screen-id*!
- Store
- Read
3.4 Bidirectional RPC Channel (PV-VME-TRANSPORT-AGENT) & Unified HOST: Filesystem
Instead of inventing a custom ad-hoc filesystem protocol, we build directly on Genera 8.3's existing Embedding RPC framework (genera-original/sys.sct/embedding/rpc/std-agent.lisp, genera-original/sys.sct/embedding/rpc/emb-agent.lisp, genera-original/sys.sct/embedding/emb-queue.lisp, genera-original/sys.sct/embedding/ux/rpc-services.lisp) and its C counterpart in genera-original/sun/sun-ux-support/src/ (RPC.h, rpc.c, stdagent.c, rpcspprt.c, fepfs.c).
Why This Fits Cleanly Without EmbCommArea
- Zero
EmbCommAreaPollution: Rather than allocating insidesys:*emb-communication-area*(which staysNIL),emulator-pvallocates one wired block in:wired-structure-area(PV-RPC-CHANNEL-HEADER+ 4 standardemb:emb-queuering buffers + packet buffers) and writes its physical address toPV_REG_RPC_CHAN_PMA(0xC4000020). - Zero Byte-Swapping (
RPC::LITTLE-ENDER-DATA): Both Ivory (<31:0>payload) and x86-64/ARM64 are little-endian! SubclassingRPC:STD-TRANSPORT-AGENT+RPC::LITTLE-ENDER-DATA+RPC::SERVER-PROCESS-MIXINmeans integers, floats, and arrays transfer natively withoutbswap32. - Interrupt-Driven Wakeup (Zero Spin-Polling):
- Guest \(\to\) Host:
send-messagepushes packet index toguest_to_host_queueand writes1toPV_REG_RPC_DOORBELL, waking the host C RPC worker immediately. - Host \(\to\) Guest: Host pushes reply or incoming Host \(\to\) Guest request to
host_to_guest_queueand callsmerlin_pv_raise_irq(board, PV_IRQ_RPC_RX). The VME#x60ISR sets*pv-rpc-rx-ready* = tand wakes the waiting RPC client/server process (process:process-waiton*pv-rpc-rx-ready*), unlike stockemb-agent.lisp:243which spin-polled!
- Guest \(\to\) Host:
Shared Wired Memory Layout (PV-RPC-CHANNEL-HEADER at PV_REG_RPC_CHAN_PMA)
All words are standard 40-bit Ivory DTP-FIXNUMs in wired RAM (host accesses mem->ram[pma].q.pointer under rt->lock or short copy-in/copy-out, marking dirty pages via ivory_mem_mark_ram_dirty on writes):
+0:magic(#x12504331,"RPC1"fixnum-safe)+1:version(1)+2:g2h_call_queue_pma(Guest \(\to\) Host RPC calls, 64 slots)+3:h2g_reply_queue_pma(Host \(\to\) Guest RPC replies, 64 slots)+4:h2g_call_queue_pma(Host \(\to\) Guest RPC calls, 32 slots)+5:g2h_reply_queue_pma(Guest \(\to\) Host RPC replies, 32 slots)+6:pool_base_pma(Wired packet pool: 128 buffers \(\times\) 1024 words = 128 KW = 512 KiB)+7:pool_buf_words(1024)
Defined Remote Modules (Syntax: Lisp+C)
Module
PV-HOST-SERVICES(#x50560001, Guest \(\to\) Host):- Host Info & Time:
GetHostInfo() -> (hostname os-name arch pid),GetHostUnixTimeNs() -> (sec_hi sec_lo nsec tz_offset_min). - Clipboard & Desktop:
GetClipboardText() -> string,SetClipboardText(string) -> ok,OpenHostUrl(string) -> ok. - Unified Zero-Copy
HOST:Filesystem Operations (sandboxed on host under configurable--host-fs-root <dir>, disallowing..escapes unless--host-fs-fullis passed):FsStat(rel_path) -> (exists kind size_hi size_lo mtime_univ uid gid mode)FsListDir(rel_path) -> list-of-entriesFsOpen(rel_path, flags, create_mode) -> (handle size_hi size_lo mtime_univ)FsClose(handle) -> okFsReadDma(handle, offset_hi, offset_lo, wired_buf_pma, byte_len, xlate_mode) -> (bytes_read eof_p): Host C reads directly from host fd and writes straight into wired guest RAMmem->ram[wired_buf_pma ..](callingivory_mem_mark_ram_dirty), supporting both raw binary (8-bit/16-bit.ibinFASL files!) and Lisp character newline/font translation (\n\(\leftrightarrow\)#\Return=0215octal, reusinggenera-original/sun/sun-ux-support/src/fepfs.crules).FsWriteDma(handle, offset_hi, offset_lo, wired_buf_pma, byte_len, xlate_mode) -> bytes_written: Zero-copy DMA read from wired guest RAM directly to hostpwrite().FsRename(old_path, new_path),FsDelete(rel_path),FsMkdir(rel_path).
- Genera
HOST:Pathname &fs:file-access-pathIntegration:- Define logical/physical host
"HOST"(HOST:/path/to/file.lisp, mapping Lisp versions.newest/.1cleanly to unversioned POSIX files,.ibinas binary 16-bit/byte stream,.lisp/.textwith LF\(\leftrightarrow\)Return translation) backed by a 64 KiB wired bounce buffer per open stream forFsReadDma/FsWriteDma.
- Define logical/physical host
- Host Info & Time:
Module
PV-GUEST-CONTROL(#x50560002, Host \(\to\) Guest, exposed ondebug_ctl.csocket asrpc ...):Ping() -> (genera-version world-name uptime-sec free-wired-words)EvalString(pkg_name, form_string) -> (ok_p values_string error_string)CompileAndLoadHostFile(host_pathname_string) -> (ok_p warnings_string)SaveIncrementalWorld(ilod_name) -> ok_p
3.4b External RPC Bridge / Sidecar Proxy (Beyond the Emulator)
To allow external host programs (Python/Common Lisp/Rust/C tooling, IDE plugins, custom UIs, external service daemons, or AI assistants) to interact directly with Genera over the low-latency IVPV RPC bus without modifying ivory-xl1200 C code:
- Local IPC Transport (
--pv-rpc-listen <addr>/:pv-rpc-listen): Reusesemu/include/emu_ipc.hto expose a framed binary/JSON-RPC proxy overAF_UNIX(Linux/Unix), Win32 Named Pipe (\\.\pipe\ivory-pv-rpc-<pid>), or opt-in localhost TCP (127.0.0.1:<port>). - Two-Way Extensibility:
- External Guest \(\to\) Host Modules: An attached external process sends
REGISTER_MODULE(module_id, name)(for custom module IDs outside built-in#x50560001/#x50560002, e.g.,#x50561000..#x5056FFFF). When Genera invokes a procedure on that module ID,pv_rpc_host.cforwards the little-endian RPC call packet to the registered sidecar client and relays its reply back intoh2g_reply_queue+PV_IRQ_RPC_RX. - External Host \(\to\) Guest Calls: Attached clients can invoke
PV-GUEST-CONTROL(or any guest-registered RPC server module) asynchronously throughh2g_call_queueand receive typed replies without going through text-onlydebug_ctlline parsing.
- External Guest \(\to\) Host Modules: An attached external process sends
- Safety: Disabled by default unless
--pv-rpc-listenis passed; disconnects cleanly on sidecar exit by returning an RPCMODULE_UNAVAILABLEerror to any in-flight guest call so Genera never hangs.
3.5 Separate Optional VME Linear Color Card (IVFB, screen_id = 1..4 — Lower Priority)
Decoupled Card Design: Linear color heads are modeled as a separate optional VME card (
VME_CARD_IVFB) registered at VME A320x1400_0000..0x15FF_FFFF(PMA 0xC500_0000..0xC57F_FFFF) on the shareddocs/vme-bus-plan.mdbus rather than required insideIVPV. This keepsIVPVminimal and lower-risk while allowingIVFBto be added independently later if desired.
Capacity Analysis on Physical XL1200 Architecture
- Physical XL1200 has a 7-slot VME chassis (Slot 1 = Merlin-II Ivory CPU, Slot 2 = Merlin I/O, leaving 5 free VME slots—1 for
IVPV+ up to 4 simultaneous Color Framebuffer Heads). - Genera's window system (
tv:all-the-screensingenera-original/sys.sct/window/screen.lisp,tv:define-screeningenera-original/sys.sct/window/screen-init.lisp) natively manages 1 onboard B&W console (screen_id = 0) +1..4simultaneous color screens (screen_id = 1..4) concurrently, each with independent window hierarchies, color maps, and Lisp Listeners, with seamless host cursor traversal across all SDL3 windows viaPV_REG_MOUSE_XY<27:24>!
Hardware & Guest Driver Design (Wave 4)
- VRAM Backing: Allocate on-demand per enabled head (
--color-heads N, default0, up to4) atPMA 0xC5000000 + (head - 1) * 0x00200000(2 MW = 8 MiB per head, enough for1152x900or1280x1024at both8-bpppseudocolor and32-bppBGRX8888, with dirty-page bitmap tracking identical tovram_dirty_bitmap). - Genera Screen Class (
pv-color-screen):- Subclass
tv:hardware-bitmap-screen-mixin+tv:color-bitmap-mixin+tv:screen(genera-original/sys.sct/window/bitmap-screen.lisplines 55–165,genera-original/sys.sct/window/colors.lisp). - Map the linear VME aperture (
0xC5000000+) into anART-8B(8-bpp,:bits-per-pixel 8, hardware CLUT viaPV_REG_HEAD_CLUT_IDX/RGB) orART-32B(32-bpp) displaced screen array (tv:screen-buffer). Because Ivory ALU BitBlt (bitblt/draw-line/draw-char) operates directly onART-8B/ART-32Bscreen arrays, zero custom graphics acceleration microcode is required (unlike the TMS34010/bt458 Symbolics Color/FrameThrower boards!). - Register each active head in
*pv-screen-table*at index1..4sopv-screen-switch-daemonswitchestv:mouse-sheetautomatically the moment the host pointer enters that SDL3 window.
- Subclass
4. Genera 8.3 Patching, Wired-Code Rules, Bootstrapping & World Save
4.1 Mandatory Genera Wired-Code Compilation Rules (genera-original/sys.sct/sys2/memory-cold.lisp lines 114–237, genera-original/sys.sct/sys/cold-load.lisp line 112)
Every function reachable from VME #x60 interrupt context (pv-vme-interrupt-handler and helpers) MUST obey these five rules or Genera will crash with a page fault inside high-priority sequence break:
- Storage Category Before Definition: Declare
(si:declare-storage-category :function-cell 'pv-vme-interrupt-handler :wired)BEFORE(si:defwiredfun pv-vme-interrupt-handler ...)so the symbol's function cell itself resides in wired memory. - Wired Variables Only: Every global read or written by a
defwiredfunMUST be defined with(si:defwiredvar *pv-...* ...)(which places its value cell in:wired-Preset-Variables). - Compile to
.ibinFile First (Compile File/Compile System): Do not interactivelyC-sh-C(Compile Definition) adefwiredfunin Zmacs unlesscompiler:*allow-wired-compile-to-core*is bound, because FASLoading a compiled.ibinis what allocates theDTP-COMPILED-FUNCTIONin:wired-function-area! - No Consing / No Bignums / No Flavor Messages: Use only fixnum
ldb/dpb/logand/+/-,sys:%memory-read,sys:%memory-write,arefon pre-allocated wired arrays, andprocess:wakeup/tv:wakeup-wired-mouse. - Post-Load Verification: After loading
emulator-pv, verify wired linkage via(si:funcall-in-wired-environment ...)/ checking that every function in the ISR call graph resides in a wired region (sys:%region-bits).
4.2 Graceful Probe & Cold/Warm Initialization
Register pv-probe-and-enable on '(:warm :cold) via si:add-initialization:
(defun pv-probe-board-p ()
(condition-case ()
(= (sys:%memory-read *pv-reg-magic-pma*) #x19565056)
(sys:memory-bus-error nil)))
- If
pv-probe-board-preturnsNIL(e.g., world booted with--no-pv-board), set*pv-enabled*toNIL, leavePV_REG_CTRL = 0, and fall back 100% cleanly to standard XL1200 relative mouse, heuristic idle, and Chaos/TCP/NFS networking. - If
T: allocate/verify wired RPC channel, writePV_REG_RPC_CHAN_PMA, install(cli:install-bus-interrupt-handler 'pv-vme-interrupt-handler #x60), startpv-screen-switch-daemonandpv-rpc-server, unmaskPV_REG_IRQ_MASK, and setPV_REG_CTRLenable bits.
4.3 Guest System Tree (genera-pv/ on Host \(\to\) SYS:SITE;EMULATOR-PV; in Guest)
Organize the Genera source files cleanly in a new repo directory genera-pv/:
emulator-pv.system—sct:defsystem :emulator-pvdeclaration (:default-pathname "SYS:SITE;EMULATOR-PV;").pkgdcl.lisp—(defpackage :emulator-pv (:use :scl :sys) ...).pv-defs.lisp— Register PMAs (DTP-PHYSICAL-ADDRESSconstants viacli:make-bus-address), bitfields,si:defwiredvardeclarations, and:function-cell ... :wireddeclarations.pv-wired.lisp—si:defwiredfunVME#x60interrupt handler, wired mouse fast-path + button ring injector, RPC RX wakeup flag, andpv-idle-yieldprimitive.pv-init-and-mouse.lisp—pv-probe-and-enable, scheduler idle hook installation,pv-screen-switch-daemon(tv:mouse-set-sheet), and(:warm :cold)initializations.pv-rpc-agent.lisp—PV-VME-TRANSPORT-AGENT(RPC:STD-TRANSPORT-AGENT+RPC::LITTLE-ENDER-DATA+RPC::SERVER-PROCESS-MIXIN) and wiredemb-queuechannel allocator.pv-rpc-services.lisp—Syntax: Lisp+CDEFINE-REMOTE-MODULEdefinitions (PV-HOST-SERVICES&PV-GUEST-CONTROL).pv-host-fs.lisp—HOST:logical/physical host &fs:file-access-pathimplementation usingFsReadDma/FsWriteDma+ wired bounce buffers.pv-color-screen.lisp(Wave 4) —pv-color-screen(tv:hardware-bitmap-screen-mixin+tv:color-bitmap-mixin).
4.4 Bootstrap Injection & Incremental World Save (IDS) Procedure
- First-Time Bootstrap into Running Stock Genera 8.3:
- Build a tiny ISO9660 image (
mkisofs/xorriso) containinggenera-pv/*.lispand attach it dynamically via the live debug control socket (scsi attach-cdrom ...—see xl1200-live-debug and genera-8.3-cdrom-install.md), or serve via SLIRP host gateway. - Copy to
LMFS(SYS:SITE;EMULATOR-PV;*.*), registerSYS:SITE;EMULATOR-PV.SYSTEM, and runCompile System :Emulator-Pv. - Once
emulator-pvloads,HOST:is immediately live! All subsequent iterations edit files directly ingenera-pv/on the Linux host and run(sct:compile-system :emulator-pv)or invokerpc compile-and-loadover the emulator control socket in <1 second!
- Build a tiny ISO9660 image (
- Persisting into an Incremental Bootable World (
.ilod):- Do NOT run
(si:full-gc)beforehand (keeps incremental delta small—typically 1–3 MB). - Quiesce in-flight RPC calls, leaving the
(:warm :cold)initialization hook registered. - Run:
saving e.g.Command: Save World :Bootable Yes :Incremental Yesgenera_8_3_pv.ilodto FEPFS alongsidegenera_8_3.ilodand updatinghello.boot(or FEPBootscript). On every future cold/warm boot,pv-probe-and-enableactivates idle yield, seamless mouse,HOST:, and RPC automatically within milliseconds of reaching Lisp!
- Do NOT run
5. /swarm Execution Plan: Waves, File Ownership & Verification Gates
To maximize parallel execution with zero merge conflicts, work is partitioned into 4 waves with strict file ownership boundaries.
flowchart TD
W1["Wave 1: Core C11 IVPV Board & Slice Yield (libivory_core.so)"]
W2A["Wave 2A: Shell Idle Condvar & Multi-Window Uncaptured Mouse (main.c, sdl_console.c)"]
W2B["Wave 2B: Host C11 RPC Engine, HOST: POSIX/DMA Sandbox & debug_ctl RPC Bridge (pv_rpc_host.c, debug_ctl.c)"]
W3A["Wave 3A: Genera Wired Core, Idle Hook & Multi-Head Mouse Lisp (genera-pv/ core)"]
W3B["Wave 3B: Genera PV-VME-TRANSPORT-AGENT, RPC Modules & HOST: Access Path (genera-pv/ rpc+fs)"]
W3C["Wave 3C: Live Genera Bootstrap, Integration Test & Incremental World Save"]
W4["Wave 4 (Optional/Stretch): Linear VME Color Framebuffers (screen_id 1..4) + Multi-Window SDL3"]
W1 --> W2A
W1 --> W2B
W2A --> W3A
W2B --> W3B
W3A --> W3C
W3B --> W3C
W3C --> W4Wave 1 — Core C11 IvoryPvBoard, VME IACK & Zero-Overhead CPU Yield
- Owned Files:
emu/include/ivory_hw.hemu/include/ivory_emu.hemu/include/ivory_core_api.hemu/src/core_api.cemu/src/merlin.cemu/src/cpu.cemu/tests/test_pv_board.c+emu/Makefile(unit test target only)
- Deliverables:
IvoryPvBoardstruct carved out ofMerlinBoard::_reservedpreservingsizeof(MerlinBoard) == 278528U,sizeof(IvoryMem) == 32768U,sizeof(IvoryCpu) == 4096U.- Direct VME A32 MMIO (
0xC4000000/0xD4000000), polled VME read/write (#x88000080..#x88000140), and VIC068 high-priority VME IACK (IA=0\(\to\) vector#x60, assertingMERLIN_IRQ_MII_VME_HIGH). - Zero-overhead
board->pv.idle_yield_us != 0Uexit atL_outer_reload(cpu.c:1703) and scalarivory_cpu_run(cpu.c:2346). - Exported
merlin_pv_*functions inIvoryCoreApi.
- Verification Gate:
nix develop --command make -C emu testpasses 100%, including newtest_pv_boardcovering: magic/version 29-bit fixnum check, direct vs polled VME R/W parity, W1C IRQ status +MERLIN_IRQ_MII_VME_HIGHassertion + IACK#x60vector read,#x5Fvector rejection, andPV_REG_IDLE_YIELDslice exit.readelf -WS emu/build/libivory_core.soconfirms 0 bytes of mutable.data/.bssandlddconfirms zero SDL/pthread/OS library dependencies.
Wave 2 — Host Shell Plumbing (Parallel Workstreams 2A & 2B)
Workstream 2A: Condvar Idle Sleep & Uncaptured Multi-Head SDL3 Mouse
- Owned Files:
emu/src/main.cemu/src/sdl_console.c
- Deliverables:
- CLI flags
--no-pv-board(disablesIVPVmagic for fallback testing) and--host-fs-root <dir>(default: none/disabled unless specified; passed to 2B). emu_thread_mainimmediate condvar sleep onboard->pv.idle_yield_usbounded bymerlin_us_until_next_timer_irq(), keeping 3-slice heuristic fallback whenPV_CTRL_IDLE_EN == 0.sdl_console.cuncaptured absolute mouse mode whenPV_CTRL_ABS_MOUSE_EN == 1: letterbox +overscan_trimcoordinate conversion,windowID -> screen_idmapping,merlin_pv_push_mouse_abs+wake_cvsignal, and automatic fallback to relative quadrature mouse whenPV_CTRL_ABS_MOUSE_EN == 0.
- CLI flags
Workstream 2B: Host C11 RPC Engine, Sandboxed HOST: DMA & debug_ctl Bridge
- Owned Files:
emu/src/pv_rpc_host.c(new) +emu/include/pv_rpc_host.h(new)emu/src/debug_ctl.cemu/Makefile(SHELL_SRCS)emu/tests/test_pv_rpc_host.c(new)
- Deliverables:
- Clean C11 port/adaptation of
STD-TRANSPORT-AGENTlittle-endian marshaling (emb-queuering reader/writer againstmem->ram+ivory_mem_mark_ram_dirty+merlin_pv_raise_irq(PV_IRQ_RPC_RX)+wake_cvsignal). PV-HOST-SERVICEShandlers (GetHostInfo,GetHostUnixTimeNs, SDL clipboard bridge, and path-jailedFsStat/FsListDir/FsOpen/FsClose/FsReadDma/FsWriteDma/FsRename/FsDelete/FsMkdirwith binary + Lisp Return/\ntranslation).PV-GUEST-CONTROLclient commands exposed indebug_ctl.c(pv-status,rpc-ping,rpc-eval <pkg> <expr>,rpc-compile-load <path>).
- Clean C11 port/adaptation of
- Wave 2 Verification Gate:
nix develop --command make -C emu all testsucceeds cleanly;test_pv_rpc_hostverifies ring-buffer wraparound,..path-traversal rejection, binary.ibinDMA exactness, and Lisp newline translation.- Booting authentic
fep330/rom.dumpto FEP prompt confirms zero regression whenPV_CTRL == 0.
Wave 3 — Genera 8.3 emulator-pv Guest Suite & Live World Verification
Workstream 3A: Wired Core, Idle Hook & Two-Half Multi-Head Mouse (genera-pv/ Core)
- Owned Files:
genera-pv/emulator-pv.system,genera-pv/pkgdcl.lisp,genera-pv/pv-defs.lisp,genera-pv/pv-wired.lisp,genera-pv/pv-init-and-mouse.lisp.
Workstream 3B: PV-VME-TRANSPORT-AGENT, RPC Modules & HOST: Access Path (genera-pv/ RPC & FS)
- Owned Files:
genera-pv/pv-rpc-agent.lisp,genera-pv/pv-rpc-services.lisp,genera-pv/pv-host-fs.lisp.
Workstream 3C: Live Genera Bootstrap, End-to-End Gate & Incremental .ilod Save
- Execution & Verification Gate (Strictly Authentic Genera 8.3 World):
- Generate bootstrap ISO from
genera-pv/, boot authentic Genera 8.3 inivory-xl1200 --host-fs-root genera-pv, compileemulator-pvto.ibinvia SCT, and load it. - Gate 1 (Wired Safety): Confirm zero page faults under sustained mouse movement +
PV_IRQ_RPC_RXbursts while GC (si:gc-immediately) runs concurrently. - Gate 2 (Real Idle Trigger): Measure host
ivory-xl1200thread CPU% at idle Genera Lisp Listener (< 3%host CPU vs spin baseline,pv-statusidle_yield_countincrementing at ~60 Hz, keystroke response< 5 ms). - Gate 3 (Seamless Mouse): Verify pixel-exact
(tv:mouse-x)/(tv:mouse-y)correspondence withdebug_ctlinjected/SDL mouse coordinates across both normal andoverscan_trimmodes, plus clean fallback whenPV_REG_CTRLis cleared. - Gate 4 (Bidirectional RPC &
HOST:DMA):- From Genera:
(probe-file "HOST:pv-defs.lisp"),(compile-file "HOST:pv-init-and-mouse.lisp"), and(load "HOST:pv-init-and-mouse.ibin")succeed with byte-identical checksums. - From Host (
xl1200-live-debugsocket):rpc-pingandrpc-eval CL-USER "(+ 40 2)"return"42"via VME#x60interrupt without guest polling.
- From Genera:
- Gate 5 (Persistence & Fallback): Save incremental
genera_8_3_pv.ilod, cold-boot withIVPVenabled (verify auto-activation via(:warm :cold)hook), and cold-boot the same.ilodwith--no-pv-board(verify bus-error-safe fallback to stock XL1200 peripherals).
- Generate bootstrap ISO from
Wave 4 (Optional / Stretch) — Multi-Head Linear VME Color Framebuffers (screen_id = 1..4)
- Owned Files:
- Host:
emu/src/mem.c(0xC5000000..0xC57FFFFFfast VRAM aperture),emu/src/sdl_console.c(secondary SDL3 windows1..4presenting 8-bpp CLUT / 32-bpp BGRX + hardware cursor sprite overlay),emu/src/merlin.c(PV_REG_HEAD_*registers). - Guest:
genera-pv/pv-color-screen.lisp(pv-color-screensubclassingtv:hardware-bitmap-screen-mixin+tv:color-bitmap-mixin, registered intv:all-the-screensand*pv-screen-table*).
- Host:
- Verification Gate:
- Boot Genera with
--color-heads 2(3 active screens simultaneously: 1 B&W + 2 Color). - Create colored windows/graphics on Color Heads 1 & 2, verify non-blank PPM dumps on all 3 heads, and verify moving the host pointer across Windows
0\(\leftrightarrow\)1\(\leftrightarrow\)2smoothly transitionstv:mouse-sheetviapv-screen-switch-daemonwithout locking or page-faulting wired code.
- Boot Genera with
- Brooktree Bt458 —
brooktree_1989_product_databook_Bt458.pdf(mirror) - VTC / Cypress VIC068A —
cypress_VIC068A_VAC068A_users_guide.pdf(mirror)