Qemu package and guide for OSX available

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

Post Reply
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Qemu package and guide for OSX available

Post by mabam »

adespoton wrote:Great work! I'm looking forward to deploying your solution. It seems like the most appropriate method of file sharing between qemu 9.x and OS X.
Well, thank you for your guidance in this!

As you can see in the post above there are quite some hick-ups. But mounting and copying works. Only it's a shame that resource forks are not preserved.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Qemu package and guide for OSX available

Post by mabam »

In 'fuse/fuse_int.c', I had prepended 'fuse.h' with the path to the header of the MacFUSE compatibility layer while substituting "-lfuse" with the path to the OSXFUSE library 'cause it didn't work with the MacFUSE lib.

I now changed 'fuse/fuse_int.c' to the OSXFUSE header and reinstalled OSXFUSE without the compatibility layer. afpfs-ng-OSX still works fine, so the compatibilty layer is NOT required.

Updated 'fuse/fuse_int.c' and the readme in the github repository.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Qemu package and guide for OSX available

Post by mabam »

Development (or rather: code hacking) of afpfs-ng-OSX is continued at
http://emaculation.com/forum/viewtopic.php?f=34&t=9524
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Qemu package and guide for OSX available

Post by adespoton »

Well, I figured out what was going wrong with my attempts at using the September build of qemu... either the build, or the host OS upgrade have broken /dev/rdisk access. If I switch my references to /dev/disk, everything works perfectly. Seems odd, but that's where the issue lies.
User avatar
celebi23
Granny Smith
Posts: 101
Joined: Wed Jun 18, 2008 5:53 am

Re: Qemu package and guide for OSX available

Post by celebi23 »

Cat_7 wrote:Experimental builds:

24-12-2017
http://www.open.ou.nl/hsp/downloads3/Qe ... 122027.zip
This build combines an updated screamer with the speed improvements. Plays MP3s perfectly in 9.0/9.1/9.2 with Quicktime 6 and Itunes 2 installed. Other guests still have issues.
edit:
forgot to add "-bios openbios-ppc-screamer" to my Qemu.command file. Fixed that and it boots perfectly. Once it gets to the desktop, it freezes before any of the icons or the majority of the UI shows up.
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Qemu package and guide for OSX available

Post by PeterHolbrook »

Guides?

Are there any up-to-date guides about ways to better integrate the Qemu macOS window with its host system? I wish I had better understanding of the following:
  • Can the clipboard be shared between the guest and host operating systems?
  • Can the guest operating system print to at least one printer available to the host OS?
  • Can the guest operating system access devices connected to at least one USB port of the host?
  • Dragging and dropping files/folders between the guest and the host would be a terrific achievement. Are there any plans to implement this in the foreseeable future?
And two more questions:
  • Are there any plans to bring virtual hardware acceleration to the guest operating systems, such as Tiger?
  • Is it now safe to install Classic in a Qemu Tiger machine, or would it render the emulated disk unbootable?
Edit: I've just checked the "Classic" integration within Tiger (10.4.11) and it seems to work.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

Hi,

We currently do not have guides detailing options in experimental builds. But I do see some of the current guide needs updating. Oh well, it is all a labour of love ;-)

Can the clipboard be shared between the guest and host operating systems?
-No.

Can the guest operating system print to at least one printer available to the host OS?
-Yes, but it requires setting up tap networking or equivalent to access the host network.

Can the guest operating system access devices connected to at least one USB port of the host?
-Yes, you can access e.g., -device usb-audio but also other pass-through devices.

I had somehow believed that causing en emulated Qemu OS (such as OS 9.2.2) to recognise an "Exchange" virtual disk that can also be opened on the host would allow easy transfer of files between the host and the guest, but I tried that last night and the guest couldn't see what I had copied from the host end. Is there a better way to do this?
-The shared disk functionality depends on the maturity of other qemu parts. Currently you can only exchange stuff that is already in the shared folder at start-up.

Dragging and dropping files/folders between the guest and the host would be a terrific achievement. Are there any plans to implement this in the foreseeable future?
-No idea. Development specific for PPC Mac emulation depends on a limited number of people. And I guess there are more pressing matters: reliable booting, usb/adb and sound.

And two more questions:
Are there any plans to bring virtual hardware acceleration to the guest operating systems, such as Tiger?
-There is currently some development in supporting a specific Mac host graphics card, but it hasn't been fruitful as of yet. Perhaps it results in more generic support for host hardware.

Is it now safe to install Classic in a Qemu Tiger machine, or would it render the emulated disk unbootable?
-That I do not know, I haven't tried lately. But I believe there has been no change in the boot process, so the issue might very well still be present. A solution is to have two partitions.

You can check out the OSX MacQemu tool developed by ProgrammingKid for solutions to the sharing problem.
viewtopic.php?f=34&t=7047&p=58113&hilit=macqemu#p58113

Best,
Cat_7
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Qemu package and guide for OSX available

Post by PeterHolbrook »

Thanks, Cat_7.
BrianSC
Space Cadet
Posts: 1
Joined: Tue Feb 13, 2018 3:18 pm

Re: Qemu package and guide for OSX available

Post by BrianSC »

Hi! I just tried your 05-02-2018 package under 10.13.3 and all is fine (after name/path mods in qemu.command) until the step:

"Double-click qemu.command. This starts Qemu and boots the MacOS9.2.iso installation CD image."

The QEMU window opens and this is displayed:

Welcome to OpenBIOS v1.1 built on Jan 26 2018 07:53
Trying hd:,\\:tbxi...
Trying hd:,\ppc\bootinfo.txt...
Trying hd:,%BOOT...
No valid state has been set by load or init-program

0 >

...and that's all that happens.

Any suggestions? All was fine until this point - I have the .iso for 9.2.2 (properly referenced in qemu.command), the 2GB HD image created fine..all good until QEMU launches and spits out the above. Little help? And thanks!
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

Hi,

Your report suggests Qemu is trying to boot from a HD, while you want it to boot from a CD.
So there are two things to look for:
1. you have -boot d in your command line
2. you have the cd image entry before the hd image entry in your command line.

Best,
Cat_7
daniel78
Student Driver
Posts: 12
Joined: Fri Feb 16, 2018 8:52 am

Re: Qemu package and guide for OSX available

Post by daniel78 »

Hello, I could install 10.4.6 and upgraded to 10.4.11
Although networking works with the internet, I cannot share any files between host and guest. I also tried to work with VNC to get access and Screen Sharing, nothing helps. My host cannot talk to my guest. I tried several network commands and I am using this one right now: -netdev user,id=mynet0 -device rtl8139,netdev=mynet0

And is there a chance, one can speed up the guest, because it is a little slow from time to time. I installed on a qcow2-image. But qemu is really great! And I appreciate all the work and help!

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

Re: Qemu package and guide for OSX available

Post by Cat_7 »

Hi,

Speed can't be helped, but some small improvements are in development. Buy a really fast machine? ;-)

To get access to a shared folder on your host, first note the host ip-address. After booting Qemu go to Connect to server and enter:

afp://ip-address of your host.

Sharing through a virtual usb-device is also a possibility. But it is only reliable when the content you want to move into the guest is already in the folder to be shared before you start Qemu. Writing to the shared folder from the guest is not reliable!
Activate like this in the command line:

-device usb-storage,drive=fat16 -drive file=fat:rw:fat-type=16:/Users/hsp/qemu-master/USB-Exchange,id=fat16,format=raw,if=none

Of course you need to adapt the path to the folder you want to share.

Best,
Cat_7
daniel78
Student Driver
Posts: 12
Joined: Fri Feb 16, 2018 8:52 am

Re: Qemu package and guide for OSX available

Post by daniel78 »

Thank you very much! That's lots of new information :wink:
daniel78
Student Driver
Posts: 12
Joined: Fri Feb 16, 2018 8:52 am

Re: Qemu package and guide for OSX available

Post by daniel78 »

Hello Cat_7,

how do you get audio working? Prof. Curtis Roads sent me his Classic Software "CloudGenerator" and "PulsarGenerator" which was designed for the Classic environment. So in macOS 9.2. it runs fine, but my virtual machine does not have any sound.

I tried this command
-device usb-audio

but my console tells this

MacBook-Pro:~ daniel$ /Applications/QemuOSX64bit-2/qemu.command ; exit;
coreaudio: Could not initialize playback
coreaudio: Could not set samplerate 44100
coreaudio: Reason: kAudioDeviceUnsupportedFormatError
coreaudio: Could not initialize playback
coreaudio: Could not set samplerate 44100
coreaudio: Reason: kAudioDeviceUnsupportedFormatError
audio: Failed to create voice `usb-audio'
Trying to write invalid spr 0 (0x000) at 00f113c0
Trying to read invalid spr 0 (0x000) at 00f113c8
Trying to write privileged spr 955 (0x3bb) at 00f168c8
Trying to write invalid spr 959 (0x3bf) at 00f16930
Trying to read invalid spr 959 (0x3bf) at 00f16938
Trying to write privileged spr 955 (0x3bb) at 00f168c8
Trying to write invalid spr 959 (0x3bf) at 00f16930
Trying to read invalid spr 959 (0x3bf) at 00f16938

Any advice? Thank you very much in advance!
All the best,
Daniel
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

Hi,

Audio will not work that way. You need to use an experimental Qemu build for Audio support.
It will only work reasonably OK on Mac OS 9.2.

Download this: http://www.open.ou.nl/hsp/downloads3/Qe ... 122027.zip
From the download only use these two files and place them in your qemu folder:
-qemu-system-ppc-screamer
-openbios-ppc-screamer

Edit your qemu.command file so it points to the new files:
./qemu-system-ppc-screamer
-bios openbios-ppc-screamer (if there was no -bios entry in your qemu.command, add it).

(for your convenience there is also an example qemu.command file in the download.)

Save the file and start Qemu.
You should now have sound through the default audio device of your computer.

I've had best experiences with Quicktime 6 and iTunes 2 installed in Mac OS 9.2. Both can be found at the macintoshgarden site.

Best,
Cat_7
daniel78
Student Driver
Posts: 12
Joined: Fri Feb 16, 2018 8:52 am

Re: Qemu package and guide for OSX available

Post by daniel78 »

Great, thank you so much!!! :smile:

All the best,
Daniel
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Qemu package and guide for OSX available

Post by adespoton »

Any chance we can get a screamer build merged with 2.11.1 or later? Or is there really not much difference and 2.11 is just slowly catching up with the backlog of changes that makes screamer possible? I can't quite tell from the commit logs....
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

Hi,

There was some delay in getting patches into 2.12. We are getting PMU mos6522 emulation and new uninorth/grackle code into the default machine.

I've been testing with mcayland to get things going, but there are some issues currently holding back these patches going upstream. There seems some timer problem that has not yet been found.

Dgibson has started a 2.13 branch into which some of the aforementioned patches went. After all of the first set of patches have gone upstream, it will be easier to have a non-moving target for implementing the PMU and finally a new screamer build.

Latest rebase of the screamer code was on 22-01-2018, so there seems to be no real reason to make a new build now.

Best,
Cat_7
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Qemu package and guide for OSX available

Post by PeterHolbrook »

Cat_7 wrote:24-04-2018
http://www.open.ou.nl/hsp/downloads3/Qe ... 042018.zip
Build from Qemu 2.12 final code. Compatible with El Capitan and upwards.
Please note the inclusion of the pc-bios folder, which requires the -L pc-bios parameter in the command line for Qemu to find some required files such as openbios-ppc and qemu_vga.ndrv. Our guide has been updated accordingly. Also included are two scripts that can be used to run Qemu with tap networking.
Use it with this guide: http://www.emaculation.com/doku.php/ppc ... mu-for-osx
Does this build include sound capabilities?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

No,

I just updated from the latest source code.
It does now "officially" include the earlier experimental speed improvement.

Best,
Cat_7
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Qemu package and guide for OSX available

Post by PeterHolbrook »

Cat_7 wrote:Experimental builds:

16-06-2018
http://www.open.ou.nl/hsp/downloads3/Qe ... 062018.zip
Qemu built from pre 3.0 source. This build allows defining the machine model in 3 ways:
mac99,via=pmu (provides the PMU required to run 10.5, defaults to usb-mouse and keyboard)
mac99,via=pmu-adb (provides the PMU but with adb mouse and keyboard)
mac99,via=cuda (provides old cuda)

The default machine emulated is now the PowerMac3,1. This can run 9.0 up to 10.5
This build requires the included openbios-ppc-pmu.elf bios file to run.

There are various known issues with this build:
9.0 has no mouse.
10.1/10.2 show timing/video problems.
Your guest might hang at the desktop with a issue related to the monitors plugin.
Your guest may report time is set to before 2001.
I am currently using the latest previous build with "screamer". If I were to use this new build of 16 June, would I lose sound in Mac OS 9.2.2?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

You certainly would!

Until support for the screamer device is in the regular source code, I will specifically mention if the the screamer sound device is supported in a build.

Best,
Cat_7
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Qemu package and guide for OSX available

Post by PeterHolbrook »

Many thanks. That's very helpful.
stajcetron
Space Cadet
Posts: 1
Joined: Mon Jul 30, 2018 11:28 pm

Re: Qemu package and guide for OSX available

Post by stajcetron »

Hi there,

I'm a total noob here but I got so far as following all your instructions and this is what Terminal reads back to me after executing qemu.command:
Last login: Mon Jul 30 20:25:27 on ttys000
Owners-MacBook-Pro:~ owner$ /Users/owner/Downloads/Qemu212-64bit-OSX-24042018/qemu.command ; exit;
qemu-system-ppc: -drive file=/Users/owner/Mac-disks/9.2.img,format=raw,media=disk: Could not open '/Users/owner/Mac-disks/9.2.img': No such file or directory
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]
This is my code:

Code: Select all

#!/bin/bash
cd "$(dirname "$0")"

qemu-system-ppc -L pc-bios -boot d -M mac99,via=pmu -m 512 -prom-env 'auto-boot?=true' -prom-env 'boot-args=-v' -prom-env 'vga-ndrv?=true' -drive file=macos-922-uni.iso,format=raw,media=cdrom -drive file=macos-922-uni.img,format=raw,media=disk -netdev user,id=network01 -device sungem,netdev=network01
chmod +x qemu.command
I've changed the filename/img name to match what images I have. Host is 10.12.6.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for OSX available

Post by Cat_7 »

Hi,

I don't understand your error, it seems not to stem from the qemu.command file you executed.
The error mentions a file called '/Users/owner/Mac-disks/9.2.img' while your qemu.command file uses macos-922-uni.iso and macos-922-uni.img

See below for my qemu.command file. It is placed in the same folder as the Qemu program itself. My disks are in other folders as you can see from the "-drive file=" entries.
Make sure you set the path to the installation image and the disk image correctly. And check their names for capitals. If the images are in the same folder as the Qemu program, you do not need to set their paths, only their names, correctly.

Also, chmod +x qemu.command should not be in the command file. When you create a new qemu.command file from scratch, it should be used to make that file executable from the terminal.

#!/bin/bash
cd "$(dirname "$0")"

./qemu-system-ppc -L pc-bios -boot d -M mac99 -m 512 -prom-env 'auto-boot?=true' -prom-env 'boot-args=-v' -prom-env 'vga-ndrv?=true' -drive file=/home/hsp/Mac-images/9.2.iso,format=raw,media=cdrom -drive file=/home/hsp/Mac-disks/9.2.img,format=raw,media=disk -netdev user,id=network0 -device sungem,netdev=network0

Best,
Cat_7
Post Reply