Giter VIP home page Giter VIP logo

wacom-qemu's Introduction

Emulated Wacom tablets for QEMU

These devices simulate the basic functionality of a Wacom Bamboo or Wacom Intuos 5 graphics tablet in QEMU. I have built this as an alternative to the support that QEMU already has for simulating a Wacom "PenPartner" tablet, because this tablet model is positively ancient and isn't well-supported by guest drivers anymore.

The goal of this project is to allow me to test out official Wacom drivers (macOS / Windows) for tablets that I don't actually own, for my Wacom Driver Fix project that fixes bugs in Wacom's abandoned macOS drivers.

The Intuos 5 model emulates an Intuos 5 Touch Medium PTH-650 (but with no touch support). The Bamboo tablet is a Bamboo Pen CTL-460.

The emulated devices work on Linux (with input-wacom), Windows 10 and macOS Catalina (both using Wacom's official drivers).

There's probably nobody else in the world who will find this useful, but I'm posting it here just in case.

Adding this to QEMU

Add the two drivers dev-wacom-bamboo.c and dev-wacom-intuos-5.c into QEMU's sourcecode at /hw/usb, alongside the dev-wacom.c driver that is already included with QEMU. Then edit meson.build in that same directory to add the new drivers to the list of object files:

Before:

softmmu_ss.add(when: 'CONFIG_USB_TABLET_WACOM', if_true: files('dev-wacom.c'))

After:

softmmu_ss.add(when: 'CONFIG_USB_TABLET_WACOM', if_true: files('dev-wacom.c', 'dev-wacom-bamboo.c', 'dev-wacom-intuos-5.c'))

Then build QEMU from source.

Using the new tablet devices

You can attach one of the new tablets to your VM the same way as with the built-in usb-wacom device. The new tablets are named usb-wacom-tablet-intuos-5 and usb-wacom-tablet-bamboo, e.g.:

qemu -device usb-wacom-tablet-intuos-5,id=wacom

I've dropped support for the tablet's fallback HID Mouse mode, which is normally used when no Wacom tablet drivers are loaded in the guest. Instead, QEMU will send your mouse events to its next input driver in the stack (likely the PS/2 tablet device) until the guest's Wacom driver is loaded.

(You can tell if you're using the proper Wacom device rather than the PS/2 fallback, because your scrollwheel will stop functioning, since I didn't add support for it)

You can override the vendorid and productid of the device like so (but the tablet may not provide the features that are expected of it by the guest's drivers, and fail to operate):

qemu -device usb-wacom-tablet-bamboo,id=wacom,vendorid=0x056a,productid=0x0069

When the cursor is idle for 3 seconds, the virtual tablet will simulate the pen leaving proximity, then it'll simulate a re-enter the next time the cursor moves.

Your scrollwheel controls the simulated pen pressure, but it seems like you can't change the pressure while the pen is held down, maybe a QEMU quirk.

wacom-qemu's People

Contributors

thenickdude avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wacom-qemu's Issues

compiling error qemu 4.2.1

Hi,
I just wanted to try compiling qemu 4.2.1 in ubuntu 20.04, to see if my wacom graphire (et-0405a-u) can work through evdev passthrough.
However I get this error:
(...)
CC aarch64-softmmu/trace/control-target.o
LINK aarch64-softmmu/qemu-system-aarch64
/usr/bin/ld: ../hw/usb/dev-wacom-bamboo.o: in function usb_wacom_class_init': /mnt/almacenKVM/instalacion_qemu+wacom/qemu-4.2.1/hw/usb/dev-wacom-bamboo.c:716: undefined reference to device_class_set_props'
/usr/bin/ld: ../hw/usb/dev-wacom-intuos-5.o: in function usb_wacom_class_init': /mnt/almacenKVM/instalacion_qemu+wacom/qemu-4.2.1/hw/usb/dev-wacom-intuos-5.c:803: undefined reference to device_class_set_props'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:208: qemu-system-aarch64] Error 1
make: *** [Makefile:491: aarch64-softmmu/all] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.