Shared text clipboard via VMware backdoor + W95TOOLS.EXE guest agent (#361)

Three layers:

  v86 — src/vmware.js gains the legacy text-clipboard backdoor commands
  (GETSELLENGTH/GETNEXTPIECE/SETSELLENGTH/SETNEXTPIECE, 6–9). The host
  stages bytes via the vmware-clipboard-host bus event; the guest pushes
  via 8/9 and the device emits vmware-clipboard-guest when the buffer
  fills. Same wire protocol as open-vm-tools' pre-RPC copy/paste.
  Committed on the windows95-base fork branch; libv86.js rebuilt here.

  renderer — src/renderer/clipboard.ts polls Electron's clipboard (no
  change event exists), translates host UTF-8/LF ↔ guest CP-1252/CRLF,
  and bounces bytes through the two bus events. Echo-suppressed so a
  value we just wrote does not come back as a change.

  guest — guest-tools/agent/W95TOOLS.EXE is a 22 KB hidden-window agent
  that joins the Win32 clipboard-viewer chain (push-on-copy) and polls
  the backdoor on a 250 ms timer (pull-from-host). Win9x runs ring-3
  with the I/O bitmap wide open, so a plain IN EAX,DX from a user
  process reaches the port — no driver needed. Named for growth: time
  sync and host-initiated shutdown will live here too. Built with Open
  Watcom v2 inside Docker (Makefile + Dockerfile alongside the source);
  subsystem 4.0, no msvcrt, runs on Win95 RTM.

Install: copy \\HOST\TOOLS\agent\W95TOOLS.EXE into the guest and drop a
shortcut in StartUp. Text only, 64 KB cap.
This commit is contained in:
Felix Rieseberg
2026-04-11 20:17:06 -07:00
committed by GitHub
parent 6e73df11ae
commit bc76e9c79a
9 changed files with 322 additions and 10 deletions

View File

@@ -35,11 +35,13 @@ That branch merges four feature branches, each upstreamable on its own:
writes to target only `current_interface`, but per ATA spec they're
channel-shared (one register file on the IDE cable; both drives latch
the same value).
- **`vmware-abspointer`** — `src/vmware.js` implements the VMware mouse
backdoor (port `0x5658`, GETVERSION + ABSPOINTER_*) so a guest driver
- **`vmware-abspointer`** — `src/vmware.js` implements the VMware
backdoor (port `0x5658`): GETVERSION + ABSPOINTER_* so a guest driver
(VBADOS VBMOUSE) can read absolute cursor position and track the host
cursor 1:1 without pointer lock. Consumes the `mouse-absolute` bus
event that `MouseAdapter` already emits.
cursor 1:1 without pointer lock, and the legacy text-clipboard commands
69 so `W95TOOLS.EXE` (guest-tools/agent) can sync `CF_TEXT` with
the host. Consumes `mouse-absolute` and `vmware-clipboard-host` bus
events; emits `vmware-absolute-mouse` and `vmware-clipboard-guest`.
- **`vga-defer-vbe-disable-v86`** — `src/vga.js` defers `dispi[4]=0`
written from V86 mode until a legacy attribute-mode write reaches the
hardware. Win9x's VDD virtualises ports 3B03DF for a windowed DOS VM