@Maijestro
There are two ways:
1) adding the USB device directly into the command line that launches QEMU. In this way the emulated machine starts already seeing the connected USB device
2) using QEMU Monitor to add or remove USB device.
I prefer way #2, a few times I have had problems if the USB device is already connected when booting AmigaOS4.1 with an emulated machine.
Practical example:
- assuming that you have a USB touchscreen with vendorID=0x0eef and productID=0x0001.
- the touchscreen is already connected to the host machine
- you have to launch qemu with the following additional parameters:
-usb -device usb-ehci,id=ehci- to "connect" it to the guest machine you must type in the QEMU Monitor console:
device_add usb-host,bus=usb-bus.0,vendorid=0x0eef,productid=0x0001,id=mytouchscreen- to remove the device from the guest machine you must type:
device_del mytouchscreenYou can choose any identifier of your choice instead of mytouchscreen.
Note: to be able to use USB on Linux, I had to configure qemu in the following way, before recompiling it:
./configure --enable-libusb --target-list=ppc-softmmI don't know if it's enabled by default on Windows or not.
To learn more about QEMU and USB:
QEMU USB emulationIn particular, you must be careful to correctly set the permissions to allow QEMU to access USB devices, as described in the following paragraph:
QEMU - Using host usb devices on a linux hostNote: to open the QEMU Monitor console, press Ctrl+Alt+2 on the QEMU window.
Edited by AlfredOne on 2023/11/27 9:51:21