Connect QEMU OS9.2.2 to Host Devices?

About Qemu-system-ppc, a PPC Mac emulator for Windows, macOS and Linux that can run Mac OS 9.0 up to Mac OS X 10.5

Moderators: Cat_7, Ronald P. Regensburg

User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by Cat_7 »

Phew, never saw that before. I'm afraid I will not have a solution for that error.

Best,
Cat_7
pmj
Inquisitive Elf
Posts: 27
Joined: Tue Jan 19, 2021 10:07 am

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by pmj »

No problem, thanks for your help with this. Looks like I’ll be maintaining an old OS9 machine for a while longer.

Cheers
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by Cat_7 »

Ah, I see this error when I run on Sierra, while Qemu was built on Mojave.
The error seem not to occur on Big Sur.

Best,
Cat_7
pmj
Inquisitive Elf
Posts: 27
Joined: Tue Jan 19, 2021 10:07 am

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by pmj »

Is there a more "High Sierra friendly" build available?
shaketuna
Student Driver
Posts: 14
Joined: Tue Jan 26, 2021 10:11 am

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by shaketuna »

Bravo Cat_7.

Your Qemu-5.2-OSX-USB-Screamer-26-01-2021 build works for me!
Now I can use QuickTime instruments with OMS.
(there's a bit of a lag but can't complain!)

If I were to be picky, "allow_qemu_to_run.command" mentionned in Readme should be fixed as "allow_qemu_to_run_screamer.command", or I might suggest avoiding re-naming files with "-screamer" altogether to avoid related oopsies.

Anyway, Thank you again, what a progress!
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by Cat_7 »

Is there a more "High Sierra friendly" build available?
I tried to build on Sierra but ran into the same issue.
Unfortunately for us the Qemu developers have the policy to only support the last two macOS versions. My Sierra and your High Sierra machine are no longer supported.

Best,
Cat_7
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by Cat_7 »

Your Qemu-5.2-OSX-USB-Screamer-26-01-2021 build works for me!
Now I can use QuickTime instruments with OMS.
Does this mean you passed through an USB device successfully?
I believe OMS is the "default" midi configuration tool for Mac OS 9. What exactly does this now do for you?

EDIT: the file naming/readme text issues stem from the fact that I want to keep normal Qemu builds and sound-enabled Qemu builds separated and thus have to maintain two sets of instructions. It would quickly become difficult to spot issues if I were to name the normal and sound enabled builds the same: the qemu-system-ppc program is specifically linked to the openbios-ppc file in the pc-bios folder. If you mix them up, Qemu simply will not run. This is all due to the screamer code not yet being integrated into the main qemu source code. It still has its issues so I expect that not to happen any time soon. If I were the developer, I also wouldn't want to take responsibility for maintaining that code before I was sure it was mature. But at the same time that means that we (the simple end users) can only use "experimental" builds.
And the ones in this thread are even more experimental compared to the ones provided in the main OSX builds thread.

Best,
Cat_7
pmj
Inquisitive Elf
Posts: 27
Joined: Tue Jan 19, 2021 10:07 am

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by pmj »

shaketuna wrote: Wed Jan 27, 2021 5:28 am Now I can use QuickTime instruments with OMS.
(there's a bit of a lag but can't complain!)
I was playing around with OMS yesterday for a while but it’s not something I use under a normal OS9 machine as it conflicts with things I use a lot. I tend to use FreeMidi purely as it just “works” without issues.

Under Qemu, how do you get OMS to see the USB ports on the Host machine? It was endlessly searching the Modem and Printer ports (?) and found two Alesis Q7 keyboards which I don’t have :)

Thanks for any tips, glad it’s working for you.
shaketuna
Student Driver
Posts: 14
Joined: Tue Jan 26, 2021 10:11 am

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by shaketuna »

First, thank you Cat_7 for taking time to explain the filename dilemma.
I understand and once experienced, I for one have no problems dealing with it.

As for USB passthrough with my MIDI interface,
The UM-880 USB MIDI interface has 2 driver modes:
1. "Original" (uses a device-specific driver software, in this case a MacOS9 extension file)
2. "Generic" (talks directly to its host OS)

When in 1, the guest System Profiler recognizes the hardware as a "vendor specific" USB device with correct IDs, but when in 2, the System Profiler does not see it.

The host OS (Catalina) does not have a device-specific driver software for this hardware, so I am guessing that in case of 1, the host is leaving the device alone as unknown and in case of 2, the hosts’s native Audio/MIDI driver is occupying the device, inhibiting secondary direct access to it by QEMU.

I previously mentioned that I was able to configure UM-880 under guest, but since I haven’t been able to confirm any hardware response, it probably means that I was only interacting with its driver software.
However, I do believe the guest is able to at least correctly recognize the device’s presence, because it shows up in OMS setup scan only when connected in “Original” driver mode.

As for pmj’s question about OMS port scanning, simply leave modem and printer ports unchecked during setup and OMS will automatically scan other sources, namely USB.

BTW, I choose OMS over FreeMIDI because I use an Opcode brand MIDI sequencer software (Musicshop).
pmj
Inquisitive Elf
Posts: 27
Joined: Tue Jan 19, 2021 10:07 am

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by pmj »

Thanks for the tips, interestingly I managed to get OMS to recognise the Tascam today, but it sees it as two devices "Tascam US122 MIDI" and "Tascam US122 MIDI Port". I can connect devices to the "Port" version but it doesn't seem to pass any actual MIDI information at all.
shaketuna
Student Driver
Posts: 14
Joined: Tue Jan 26, 2021 10:11 am

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by shaketuna »

pmj,

Looks like we are on the same boat as far as getting the device recognized but unable to get it to do something.
I am not familiar with Tascam units, but does it appear differently on a real OS9 machine?
Perhaps the QEMU OMS thinks it is both a MIDI synth and an interface.
Anyways, if you haven't done so already, it may be a virtue to install the latest (or last) OMS v.2.3.8.
pmj
Inquisitive Elf
Posts: 27
Joined: Tue Jan 19, 2021 10:07 am

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by pmj »

shaketuna wrote: Thu Jan 28, 2021 1:51 am I am not familiar with Tascam units, but does it appear differently on a real OS9 machine?
Perhaps the QEMU OMS thinks it is both a MIDI synth and an interface.
Anyways, if you haven't done so already, it may be a virtue to install the latest (or last) OMS v.2.3.8.
I think you're correct, the Tascam is an audio interface and a MIDI interface. Under QEMU it seems to see the two functions as two devices where on a normal OS9 machine it just sees the device and allows you to use whichever function without making the distinction.

I am using OMS v.2.3.8 so as up to date as it can be there I guess.

I've tried my old Midisport 2x2 interface this morning and that gets picked up by OMS as one device with two available ports which is correct (there's no audio on that box but it has A & B input and output MIDI ports). The problem there is it causes the cursor pointer in QEMU to hang which makes it impossible to test it properly. Is there anything I could edit in qemu.command to stop the device and mouse from conflicting?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by Cat_7 »

I've tried my old Midisport 2x2 interface this morning and that gets picked up by OMS as one device with two available ports which is correct (there's no audio on that box but it has A & B input and output MIDI ports). The problem there is it causes the cursor pointer in QEMU to hang which makes it impossible to test it properly. Is there anything I could edit in qemu.command to stop the device and mouse from conflicting?
No idea whether this will work, but you might try -M mac99 (without the ,via=pmu)

and then add
-usb
-usb-host.....
-device usb-mouse

Best,
Cat_7
pmj
Inquisitive Elf
Posts: 27
Joined: Tue Jan 19, 2021 10:07 am

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by pmj »

Thanks Cat_7 but made no difference I'm afraid
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by Cat_7 »

Yes,

I've narrowed it down to an issue in the communication between the USB 1.1 controller and Mac OS 9.
Passing through e.g. a flash drive to Mac OS will also not work, while it will work with OSX guest from 10.3 upwards using the USB 2.0 controller.

Passing through a flash drive to a Linux guest does work with USB 1.1, so the issue is between Mac OS 9 and the USB 1.1 controller.

Best,
Cat_7
shaketuna
Student Driver
Posts: 14
Joined: Tue Jan 26, 2021 10:11 am

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by shaketuna »

Hi,

Sounds like we're getting warmer nontheless, thanks for your efforts!
I look forward to the day when my MIDI interface's activity indicator lamp ignites upon QEMU launch!
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by Cat_7 »

Do you have software for your midi device for OSX 10.3?
You could try whether they are visible as valid usb midi devices in 10.3.

If you want to try, you would have to install OSX 10.3 and then add the device as:

-device usb-ehci,id=ehci
-device usb-host,bus=ehci.0,vendorid=0xXXXX,productid=0xXXXX

Best,
Cat_7
shaketuna
Student Driver
Posts: 14
Joined: Tue Jan 26, 2021 10:11 am

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by shaketuna »

Thank you for your tips, Cat_7.

I don't have convenient access to 10.3, although device driver is available.
Nevertheless, my interested app is only compatible with OS8 and 9.
Furthermore, the "Classic" environment under OSX does not support MIDI time management needed for playback (whereas QEMU apparently does), and thus still not usable even if connection to the device is successful under emulated OSX.

Frankly, I am currently not inconvenienced with my app usage, for that I have a couple of souped-up G4 Cubes to host it.
But it would be convenient, reassuring, and COOL to be able to extend that option to my modern MacBook Pro!
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by Cat_7 »

I mailed the developer about this issue. It would require extensive debugging and knowledge of the Mac OS/Qemu USB stack to get to the bottom of this issue.
I lack the knowledge, he lacks the time.

Best,
Cat_7
shaketuna
Student Driver
Posts: 14
Joined: Tue Jan 26, 2021 10:11 am

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by shaketuna »

It's OK, it's not something I depend on (for now anyway), and besides I think it's cool enough that I came across and had the opportunity to dig into OS9@QEMU when I did.

I will hopefully wait for a future release that would resolve this issue, and thank you so much for raising that chance!
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by Cat_7 »

Hi,

I've created a Catalina build from the latest Qemu source that includes the option to log usb traffic to a pcap file. This might help diagnose the actual pass-through issue.
You can find it here: https://surfdrive.surf.nl/files/index.p ... L/download
Please run this build with MacOS 9.2 guest and:

-device usb-host,vendorid=xxxxxx,productid=xxxxxx,pcap=usblog.pcap

And send me the resulting usblog.pcap to me. I'll provide my e-mail address in a private message.

Best,
Cat_7
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by Cat_7 »

Meanwhile I've heard back from the developer taking care of the USB stack and pass through.
It seems there are issues when an USB 1.1 device is connected to an USB 2.0 hub related to the maximum size of packets exchanged between the guest and the host.
My test with a Linux guest and an USB memory stick was successful, while a test with Mac OS 9.2 was not. The developer says this is primarily a problem with mass storage devices, which the Linux guest seems work around.

So the issue might be with Mac OS 9.2 not working correctly in relation to the USB emulation and USB pass through traffic.
Things do not look good yet for this to be resolved, but all hope is lost....

Meanwhile, if one of you has a real USB 1.1 hub, it would be interesting to see what happens when a device is connected to through that.

Best,
Cat_7
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by adespoton »

Cat_7 wrote: Tue Feb 16, 2021 8:45 pm Meanwhile I've heard back from the developer taking care of the USB stack and pass through.
It seems there are issues when an USB 1.1 device is connected to an USB 2.0 hub related to the maximum size of packets exchanged between the guest and the host.
My test with a Linux guest and an USB memory stick was successful, while a test with Mac OS 9.2 was not. The developer says this is primarily a problem with mass storage devices, which the Linux guest seems work around.

So the issue might be with Mac OS 9.2 not working correctly in relation to the USB emulation and USB pass through traffic.
Things do not look good yet for this to be resolved, but all hope is lost....

Meanwhile, if one of you has a real USB 1.1 hub, it would be interesting to see what happens when a device is connected to through that.

Best,
Cat_7
Just a note: I believe the Apple USB Keyboard and Apple Pro Keyboard both had a USB 1.1 hub. The A1048 and later have a 2.0 hub.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by Cat_7 »

Thanks @adespoton

I do have an older USB 1.1 keyboard, and what do you know: it successfully passes through an USB stick in my Linux host!
Have to try in macOS host as well.

Edit: Yes, got the stick passed through to Mac OS 9.2 in Sierra host as well. It needs unloading the /System/Library/Extensions/IOUSBMassStorageDriver.kext first.
And that might be a problem for hosts that do not have sip disabled.

This might give options for other devices connected through such a keyboard (or a another 1.1 hub).

Best,
Cat_7
shaketuna
Student Driver
Posts: 14
Joined: Tue Jan 26, 2021 10:11 am

Re: Connect QEMU OS9.2.2 to Host Devices?

Post by shaketuna »

I pulled out my older MacBook Pro with USB-A ports and tried connecting the USB device directly to it.
But the behavior was all the same with OS9.2.2.
Post Reply