Added support for WACOM 2.x/ArtZ/Digitizer II compatibility. It does require the driver (easily available via many of the classic macos archives), but it allows a simple way to have an absolute pointing device on ADB-compatible VMs.
PATCH 1/1 Added support for WACOM 2.x/ArtZ/Digitizer II compatibility. It does require the driver (easily available via many of the classic macos archives), but it allows a simple way to have an absolute pointing device on ADB-compatible VMs.
From: Patrick Eads <[email protected]>
init
Promising polling initiated and data moving cursor now
Reverted delete of dev handler for wacom tablet
got the y-axis!
getting closer
more progress. it appears to not quite be WACOM II/IV, but x-axis is controlled by the first 2-3 bytes
really? 12-bits is the key? oh well, x-axis get
it's like a weird mesh of adb extended and wacom's protocols. fine, y-axis get
x AND y
twiddling with the settings in the driver control panel works wonders!
zeroing in on the resolution / dpi scale calculation
addded commentary to describe source material and reverse engineering decisions
commentary editing
renamed to adb-wacom, s.t. that it is clear it requires the wacom driver
--- hw/input/adb-mouse.c | 1 + hw/input/adb-wacom.c | 311 +++++++++++++++++++++++++++++++++++++++++ hw/input/meson.build | 2 +- hw/input/trace-events | 6 + include/hw/input/adb.h | 1 + 5 files changed, 320 insertions(+), 1 deletion(-) create mode 100644 hw/input/adb-wacom.c
hw/input/adb-mouse.c +1 -0
@@ -202,6 +202,7 @@ static int adb_mouse_request(ADBDevice *d, uint8_t *obuf,* 0x03: Mouse systems A3 trackball * 0x04: Extended Apple Mouse Protocol * 0x2f: Microspeed mouse +* 0x3A: Wacom tablet * 0x42: Macally * 0x5f: Microspeed mouse * 0x66: Microspeed mouse
hw/input/adb-wacom.c new file +311 -0
311 lines not on this page · raw message
hw/input/meson.build +1 -1
@@ -1,5 +1,5 @@ system_ss.add(files('hid.c')) -system_ss.add(when: 'CONFIG_ADB', if_true: files('adb.c', 'adb-mouse.c', 'adb-kbd.c')) +system_ss.add(when: 'CONFIG_ADB', if_true: files('adb.c', 'adb-mouse.c', 'adb-kbd.c', 'adb-wacom.c',)) system_ss.add(when: 'CONFIG_PCKBD', if_true: files('pckbd.c')) system_ss.add(when: 'CONFIG_PL050', if_true: files('pl050.c')) system_ss.add(when: 'CONFIG_PS2', if_true: files('ps2.c'))
hw/input/trace-events +6 -0
@@ -14,6 +14,12 @@ adb_device_mouse_readreg(int reg, uint8_t val0, uint8_t val1) "reg %d obuf[0] 0x adb_device_mouse_request_change_addr(int devaddr) "change addr to 0x%x" adb_device_mouse_request_change_addr_and_handler(int devaddr, int handler) "change addr and handler to 0x%x, 0x%x" +# adb-wacom.c +adb_device_wacom_flush(void) "flush" +adb_device_wacom_writereg(int reg, uint64_t buf) "\t<- reg %d buf 0x%04lX" +adb_device_wacom_readreg(int reg, uint64_t obut) "\t-> reg %d obuf 0x%04lX" +adb_device_wacom_request_change_addr_and_handler(int devaddr, int handler) "change addr and handler to 0x%x, 0x%x" + # adb.c adb_bus_request(uint8_t addr, const char *cmd, int size) "device 0x%x %s cmdsize=%d" adb_bus_request_done(uint8_t addr, const char *cmd, int size) "device 0x%x %s replysize=%d"
include/hw/input/adb.h +1 -0
@@ -104,5 +104,6 @@ void adb_register_autopoll_callback(ADBBusState *s, void (*cb)(void *opaque),#define TYPE_ADB_KEYBOARD "adb-keyboard"#define TYPE_ADB_MOUSE "adb-mouse" +#define TYPE_ADB_WACOM "adb-wacom"#endif /* ADB_H */
Signature · 1 line
2.45.2