Skip to content

Latest commit

 

History

46 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QEMouse

Build Version Size

QEMouse is a small Windows mouse driver for QEMU's vmmouse implementation.

It uses QEMU's VMware-compatible backdoor protocol to obtain absolute pointer coordinates while retaining the PS/2 interrupt path as the notification source.

Features ✨

  • QEMU absolute pointer coordinates
  • Supports Windows 3.11, 95, 98 and ME
  • Windows 386/VMD mouse type registration
  • DOS/fullscreen mouse handoff through the Windows INT 2F display-switch notifications
  • Falls back to normal relative PS/2 input when the VMware-compatible interface is unavailable
  • Uses Windows' existing enhanced-mode mouse stack; no additional VxD is required

Design 🧩

QEMU's vmmouse implementation queues each host input event as four VMware backdoor words and generates a fake PS/2 mouse event to notify the guest. The PS/2 BIOS callback is therefore used only as a wakeup mechanism when VMware absolute mode is active.

On each notification QEMouse:

  1. Queries VMware absolute-pointer status.
  2. Drains every complete 4-word packet currently queued.
  3. Reports absolute coordinates directly to Windows using SF_ABSOLUTE.
  4. Converts VMware's current left/right button state into Windows button transition events.

Draining the complete queue is intentional. QEMU can retain stale vmmouse packets if a fake PS/2 notification is missed; consuming all complete packets prevents the guest pointer from developing a permanent event backlog.

For DOS/fullscreen switching under Windows enhanced mode, QEMouse uses the INT 2F display-switch notifications. When Windows switches a VM to the background, QEMouse releases QEMU's vmmouse input handler so the DOS session can use normal relative PS/2 input. When Windows returns to the foreground, absolute vmmouse mode is restored from the normal PS/2 callback path.

Installation 📦

You can download the latest version from the Releases page.

Windows 95 / 98 / ME

For an existing Windows installation, place qemouse.inf and qemouse.drv in the same directory.

Right-click qemouse.inf and choose Install, then reboot Windows.

Windows 3.x

Copy qemouse.drv to the Windows SYSTEM directory and set:

[boot]
mouse.drv=qemouse.drv

in SYSTEM.INI, then restart Windows.

QEMU configuration 🖥️

QEMU's VMware-compatible VMPort interface must be available to the guest.

For machine types where VMPort is not enabled automatically, enable it with:

-machine vmport=on

QEMouse detects the VMware-compatible backdoor and absolute-pointer interface when Windows loads the driver.

If the absolute-pointer interface is unavailable, QEMouse falls back to conventional relative PS/2 mouse input.

Building 🛠️

QEMouse uses Open Watcom and the Windows headers supplied with it.

After loading an Open Watcom environment, run:

wmake qemouse.drv

To build a 1.44 MB floppy image containing qemouse.drv and qemouse.inf:

wmake flp

Acknowledgements 🙏

Special thanks to Javier S. Pedro, this project would not exist without his invaluable work.

Stars 🌟

Stargazers

About

Windows mouse driver for QEMU's vmmouse implementation.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages