GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

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

kataetheweirdo
Master Emulator
Posts: 313
Joined: Sun Feb 01, 2009 4:55 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by kataetheweirdo »

That is installation from cd starts,but as neither keyboard nor mouse work,installation can't continue...
That's because it relies on OpenBIOS to recognize the keyboard alias as keybd, keybrd, or keyboard (I forget which) as opposed to kbd. I recall there being discussions of a fix for QEMU.

Speaking of which, 2.8 is about to come out and release candidates are already being compiled.

Someone might want to check that out. I will pretty soon.
User avatar
adespoton
Forum All-Star
Posts: 4274
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by adespoton »

Did the OpenBIOS VGA changes and RTL fork get rolled in, or are those still external builds for 2.8?
kataetheweirdo
Master Emulator
Posts: 313
Joined: Sun Feb 01, 2009 4:55 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by kataetheweirdo »

The Sungem device did not get merged into 2.8, at least using -net nic,model=sungem. Nor did the VGA changes. Not sure about the RTL support though, but it doesn't seem like it got in either.

Mouse control seems to be worse in 2.8 when starting out windowed, with the host mouse being visible when full screen and the guest mouse moving too slow compared to the host mouse. SDL does not work in Stefan's build for 2.8, by default. I can confirm that using -full-screen accentuates this problem, by merely zooming in rather than scaling when you boot up with this option (which is a problem for non-4x3 resolutions).

The version of OpenBIOS included in 2.8 is a version from November 24, 2016. Looking at the QEMU mailing list, the last post I see about PPC Mac emulation is from October 1.

As for MacBench 5... Performance also seems to have slowed down from 2.8pre, with a score of 135 for the floating point and (somehow) 42 for the processor vs. a Power Mac G3/300.

Shutting down also doesn't seem to work right when done through QEMU rather than doing it within the OS.

I'm using Stefan's 64-bit Windows build of QEMU 2.8, compiled on December 21, 2016.
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Cat_7 »

Hi,

Indeed: sungem, pmu, mac99p model, and vga are not rolled into 2.8. So also no Leopard support out of the box. In fact, Benjamin Herrenschmidt has invited others to work on his code to get it upstream. Which means he has no time right now.

Stefan Weil initially dropped all SDL support from his windows builds, so you could not even enable it. That was a real pain. Luckily I (and others?) convinced him that SDL was needed on Windows. SDL 1.2 works better compared to SDL 2.
He has communicated on the developer list on the status of UI support for windows, where there was talk of dropping SDL support for all platforms. After that discussion someone proposed to properly support SDL 2, but that seems to depend on implementing a solution to the SDL requirement of running in the main thread. Work on this "should" start early next year.

I see no added benefit in grafting Benjamins code onto the final 2.8 code.
But I'll post new builds of 2.8 for OSX and Windows (both SDL 1.2 and 2.0) shortly.
And you'll hear from an experimental Christmas surprise build.

Best,
Cat_7
WizKid
Tinkerer
Posts: 72
Joined: Sun Jul 31, 2016 11:58 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by WizKid »

Cat_7 wrote: Indeed: sungem, pmu, mac99p model, and vga are not rolled into 2.8.
I concur. It's the same as rc5. As for the realtek support, the bug fix that prevented the rtl8139 emulation from working correctly has been fixed.
So also no Leopard support out of the box.
Because the PMU patches aren't integrated.
I see no added benefit in grafting Benjamins code onto the final 2.8 code.
Actually, there are benefits to adding the VGA driver and programmer's switch patches.

The VGA patch allows proper resolution support from MacOS, and the programmer's switch patch along with the menu patch posted earlier in this thread allows access to the MicroBug debugger for getting out of tough situations.
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Cat_7 »

Hi,

New qemu builds for Windows and OSX are available:

Two new windows builds here:
http://www.emaculation.com/forum/viewto ... =34&t=9028
One build from the recent qemu 2.8 source
One build with experimental sound support ;-) Read the note!

Two new OSX builds here:
http://www.emaculation.com/forum/viewto ... =34&t=8848
Build from the recent qemu 2.8 source

http://www.emaculation.com/forum/viewto ... 104#p52104
Build with experimental sound support ;-) Read the note!

Best,
Cat_7
WizKid
Tinkerer
Posts: 72
Joined: Sun Jul 31, 2016 11:58 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by WizKid »

The one with sound support doesn't load:

Code: Select all

dyld: Library not loaded: /usr/local/opt/nettle/lib/libnettle.6.dylib
  Referenced from: /Volumes/Overflow/Virtual Machines/Classic/qemu-system-ppc
  Reason: image not found
Oops...should have included it in the libs folder.

What does a crypto library have to do with qemu anyway?
alex195812
Mac Mechanic
Posts: 169
Joined: Mon Aug 29, 2016 3:44 am

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by alex195812 »

Well,sound in 9.2 woks OOB without attaching devices on command line,but no resolutions,sungem...The output shown is "built-in".At least it doesn't crush the system.In Panther output is "Internal speakers".
What source is the build complied from?Could it be combined with wip one?
And also about upper topics: could the alias to keyboard in openbios be done ourselves?That could bring the opportunity to boot all versions of Server/Rhapsody (some twisted way though)?
Last edited by alex195812 on Thu Dec 22, 2016 2:56 am, edited 1 time in total.
kataetheweirdo
Master Emulator
Posts: 313
Joined: Sun Feb 01, 2009 4:55 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by kataetheweirdo »

For the resolutions, I believe that's in OpenBIOS. I have a WIP OpenBIOS from August 2016 that allows one to switch resolutions in the OS.

You can add that alias yourself, but that's done through OpenBIOS. I believe you also need the WIP OpenBIOS too.
alex195812
Mac Mechanic
Posts: 169
Joined: Mon Aug 29, 2016 3:44 am

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by alex195812 »

Yes,but I get somewhat confused to get the source for that version to play with it separately from qemu source.All those submodules etc...
[edit]Found this: http://git.qemu-project.org/?p=openbios ... 92e31e46e2 .It seems like what is needed but compilation unsuccessful."make[1]: *** [target/drivers/usbohci.o] Error 1". AWOS cross-compilers used.
Other OBios versions give the same error.Does OBios compile on Mac OS X?
[edit]Read Cat_7's post 25th Aug,now it compiles.
There are adb-keyboard,keyboard and kbd aliases in dev tree,but with the Server cd keyboard still doesn't work.Changed kbd to kbrd,recompiled but no changes.Tried also keybd,keybrd and even kboard--no result.Maybe the problem is not in ihe alias only?Some time ago Leopard booted to Installer with no working keyboerd or mouse.Ben fixed it somehow.Isn't this case similar to that?
Last edited by alex195812 on Thu Dec 22, 2016 10:25 am, edited 3 times in total.
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Cat_7 »

dyld: Library not loaded: /usr/local/opt/nettle/lib/libnettle.6.dylib
Referenced from: /Volumes/Overflow/Virtual Machines/Classic/qemu-system-ppc
Reason: image not found
This issue should now be fixed. Please download again.

Screamer sound support code (needs both qemu and openbios):
https://github.com/mcayland/qemu/tree/screamer
https://github.com/mcayland/openbios/tree/screamer

I posted instructions on how to build openbios and qemu in OSX somewhere in this thread ;-)
For the resolutions, I believe that's in OpenBIOS. I have a WIP OpenBIOS from August 2016 that allows one to switch resolutions in the OS.
It is in both Benjamin Herrenschmidts repos: openbios and qemu, and needs the specific vga driver. It is based on qemu pre 2.8. Qemu 2.8 doesn't really give us anything new, so the builds from Ben's repos are still the most versatile.
Adding the sound code to these openbios and qemu repos would only works for some Mac OS versions, thus completely ruining the versatility of those "work in progress" builds. Not to mention the pain involved in manually adding the sound code to the wip code.

Best,
Cat_7
alex195812
Mac Mechanic
Posts: 169
Joined: Mon Aug 29, 2016 3:44 am

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by alex195812 »

I noticed that in the screamer build there's no usb-audio working...In Panther two new input devices can be seen.Sound works better than usb one: though with "repeating" but with no "crackling".
Interesting that Ben's qemu-WIP is compatible with both "official" and "screamer" openbioses(not vice versa).At least Panther boots with them with changeable resolutions.No sungem or mac99p of course.
And it appears that it's easy to import the last Ben's commit to openbios into "screamer" one.The compiled binary works with both qemu-wip and qemu-screamer and sungem works in qemu-wip while sound--in qemu-screamer.If someone's interesting: https://mega.nz/#!ogdxSYgZ!m339K9z_PYm0 ... hjMWYF3b6c
The source: https://mega.nz/#!dlswnSCD!UtRSmu3dR93J ... PzqD6kZgB4
Last edited by alex195812 on Fri Dec 23, 2016 3:31 pm, edited 2 times in total.
WizKid
Tinkerer
Posts: 72
Joined: Sun Jul 31, 2016 11:58 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by WizKid »

Now this:
dyld: Library not loaded: /usr/local/opt/libtasn1/lib/libtasn1.6.dylib
Referenced from: /Volumes/Overflow/Virtual Machines/Classic/./Libs/libgnutls.30.dylib
Reason: image not found
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Cat_7 »

dyld: Library not loaded: /usr/local/opt/libtasn1/lib/libtasn1.6.dylib
Referenced from: /Volumes/Overflow/Virtual Machines/Classic/./Libs/libgnutls.30.dylib
Reason: image not found
Should now finally? be fixed. I removed all dependencies on crypto stuff, that themselves had a bunch of dependencies.

Best,
Cat_7
WizKid
Tinkerer
Posts: 72
Joined: Sun Jul 31, 2016 11:58 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by WizKid »

Yes. fixed :)

However, sound doesn't work, and the extended graphics resolutions (1280x1024, etc) aren't working,.

It displays 800x600 in the Monitors control panel, but it looks more like 800x600.

And yes, I have the "Apple Audio Extension" version 2.5.2 installed. I also have qemu_vga.ndrv in the same directory.

Do I need to specify something like "-g 1280x1024x32" on the command line?

My command is:

Code: Select all

qemu-system-ppc-screamer -bios ./openbios-qemu-screamer.elf -boot c -M mac99 -m 1536 -prom-env 'auto-boot?=true' -prom-env 'boot-args=-v' -netdev user,id=network0 -device rtl8139,netdev=network0 -drive file=macos9.raw,format=raw,media=disk,cache=writethrough
Hmm...
alex195812
Mac Mechanic
Posts: 169
Joined: Mon Aug 29, 2016 3:44 am

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by alex195812 »

Strange,for qemu-ppc-screamer works for me.Resolutions don't work of course,but sound works.I use -m 512 and don't attach rtl network.Also I don't use cache=writethrough.I'm on MOSX 10.10.5.
User avatar
celebi23
Granny Smith
Posts: 101
Joined: Wed Jun 18, 2008 5:53 am

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by celebi23 »

Cat_7 wrote:
dyld: Library not loaded: /usr/local/opt/libtasn1/lib/libtasn1.6.dylib
Referenced from: /Volumes/Overflow/Virtual Machines/Classic/./Libs/libgnutls.30.dylib
Reason: image not found
Should now finally? be fixed. I removed all dependencies on crypto stuff, that themselves had a bunch of dependencies.

Best,
Cat_7
Is there a compiled version for Mac that has the new fixes? I'm trying to compile from source and having some dependency issues.
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Cat_7 »

Is there a compiled version for Mac that has the new fixes? I'm trying to compile from source and having some dependency issues.
See some posts above.

There is a build from the final 2.8 source code but it doesn't really add any functionality for us.

Then there is the experimental build with screamer sound device support.
Last time I checked it doesn't boot 9.0 or 9.1, it only works well in Mac OS 9.2. PPC OSX versions can use the sound device but the sound is somewhat delayed and chopped.

Best,
Cat_7
alex195812
Mac Mechanic
Posts: 169
Joined: Mon Aug 29, 2016 3:44 am

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by alex195812 »

I must apologize for the mistake I made in my last yesterday post.I thought that openbios version I compiled brings sungem support to qemu-screamer.It's not true as I found out today.I must have fogotten to click at the other terminal window(I tested qemu-wip and qemu-screamer in different terminal windows).I've corrected my post.
WizKid
Tinkerer
Posts: 72
Joined: Sun Jul 31, 2016 11:58 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by WizKid »

Now I'm getting this message:
coreaudio: Could not lock voice for audioDeviceIOProc
Reason: Invalid argument
Over and over again.
alex195812
Mac Mechanic
Posts: 169
Joined: Mon Aug 29, 2016 3:44 am

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by alex195812 »

Cat_7 wrote:
Is there a compiled version for Mac that has the new fixes? I'm trying to compile from source and having some dependency issues.
See some posts above.

There is a build from the final 2.8 source code but it doesn't really add any functionality for us.

Then there is the experimental build with screamer sound device support.
Last time I checked it doesn't boot 9.0 or 9.1, it only works well in Mac OS 9.2. PPC OSX versions can use the sound device but the sound is somewhat delayed and chopped.

Best,
Cat_7
I have just tested qemu-screamer with MOS 9.04 and found that with -M mac99 -cpu G3 it works.Boots rather slowly.To avoid "mad mouse" -device usb-mouse may be used.
I always had to do the same to make 9.0 work in qemu-wip,too.
User avatar
celebi23
Granny Smith
Posts: 101
Joined: Wed Jun 18, 2008 5:53 am

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by celebi23 »

Cat_7 wrote:
Is there a compiled version for Mac that has the new fixes? I'm trying to compile from source and having some dependency issues.
See some posts above.

There is a build from the final 2.8 source code but it doesn't really add any functionality for us.

Then there is the experimental build with screamer sound device support.
Last time I checked it doesn't boot 9.0 or 9.1, it only works well in Mac OS 9.2. PPC OSX versions can use the sound device but the sound is somewhat delayed and chopped.

Best,
Cat_7
With that fixed build, I'm getting this error message though:

Code: Select all

/Users/celebi23/Qemu_crap/Qemu_28pre-screamer-OSX-21122016/qemu.command ; exit;
dyld: Library not loaded: /usr/local/opt/libusb/lib/libusb-1.0.0.dylib
  Referenced from: /Users/celebi23/Qemu_crap/Qemu_28pre-screamer-OSX-21122016/./qemu-system-ppc-screamer
  Reason: image not found
/Users/celebi23/Qemu_crap/Qemu_28pre-screamer-OSX-21122016/qemu.command: line 4: 28622 Trace/BPT trap: 5       ./qemu-system-ppc-screamer -bios ./openbios-qemu-screamer.elf -boot d -M mac99 -m 256 -prom-env 'auto-boot?=true' -prom-env 'boot-args=-v' -drive file=Mac OS 9.2.1.toast,format=raw,media=cdrom -drive file=empty_disk.raw,format=raw,media=disk
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Cat_7 »

Is that because you call qemu crap ;-)

Seriously: To get qemu to run on systems that do not have the required libraries installed, I place these libraries in the folder Libs and change qemu to look for those libraries in that folder. If you get that error, then qemu can't find the library and you don't have it installed.
The library mentioned in the error should be in the Libs folder included in the download. I checked and it is indeed in that folder. The Libs folder should be placed beside the qemu program. Please check that you kept this folder and that it is in the right place.

Best,
Cat_7
User avatar
celebi23
Granny Smith
Posts: 101
Joined: Wed Jun 18, 2008 5:53 am

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by celebi23 »

Cat_7 wrote:Is that because you call qemu crap ;-)

Seriously: To get qemu to run on systems that do not have the required libraries installed, I place these libraries in the folder Libs and change qemu to look for those libraries in that folder. If you get that error, then qemu can't find the library and you don't have it installed.
The library mentioned in the error should be in the Libs folder included in the download. I checked and it is indeed in that folder. The Libs folder should be placed beside the qemu program. Please check that you kept this folder and that it is in the right place.

Best,
Cat_7
I haven't touched the Libs folder. I've only modified the qemu.command file. I'm not sure why I'm getting that error. Is there a command flag to have in qemu.command to manually point to the Libs folder?
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

celebi23 wrote:
Cat_7 wrote:Is that because you call qemu crap ;-)

Seriously: To get qemu to run on systems that do not have the required libraries installed, I place these libraries in the folder Libs and change qemu to look for those libraries in that folder. If you get that error, then qemu can't find the library and you don't have it installed.
The library mentioned in the error should be in the Libs folder included in the download. I checked and it is indeed in that folder. The Libs folder should be placed beside the qemu program. Please check that you kept this folder and that it is in the right place.

Best,
Cat_7
I haven't touched the Libs folder. I've only modified the qemu.command file. I'm not sure why I'm getting that error. Is there a command flag to have in qemu.command to manually point to the Libs folder?
The otool command can tell us what libraries the qemu binary uses. Could you run this command and tell us what the output is:
otool -L /Users/celebi23/Qemu_crap/Qemu_28pre-screamer-OSX-21122016/./qemu-system-ppc-screamer

If the path is set correctly, then you should see something like this: @executable_path/Libs/libusb-1.0.0.dylib

@Cat_7 Thank you very much for providing a binary of QEMU. Do you use the install_name_tool command to tell QEMU where to look for libraries?
Post Reply