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

User avatar
adespoton
Forum All-Star
Posts: 4227
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 »

Probably best to use 7zip to compress; this handles large files, and has significantly better compression.
CharlesS
Granny Smith
Posts: 107
Joined: Thu Aug 14, 2008 9:05 am

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

Post by CharlesS »

There's actually an official version of the Zip format, called Zip64, which can handle large file sizes. Unfortunately not everything supports it. OS X didn't when I tried it, but that was years ago; Wikipedia claims that Yosemite and higher will create Zip64 images (but not extract them, which is odd). I'll have to test it sometime and see if that's actually true. You might want to check the program you're using to extract the archive, though, see if it supports Zip64, and try something else if it doesn't.

Of course, when I tested this about seven years ago, what OS X was doing at that time was just chopping off the upper 32 bits of all the file sizes, resulting in what was essentially a corrupt archive (which the Finder would somehow still be able to extract properly; I never did figure out how). If it turns out Wikipedia is wrong and the Finder is still doing that, then it's true that the archive should probably be compressed using something else.
There's no earthly way of knowing, which direction we are going, for the rowers keep on rowing, and they're certainly not showing any signs that they are slowing.
uyjulian
Apple Corer
Posts: 244
Joined: Fri Aug 27, 2010 1:02 am

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

Post by uyjulian »

yeah, Mac OS uses Zip64 to compress large files, it's incompatible with regular zip
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 »

I thought I should let everyone know about what I have learned from trying to make a Mac OS X guest play sound.

Using a sound file that plays a square wave, the output should look like this when played:

Image

Instead the output looks like this:

Image

The sound plays for a fraction of a second, then stops, then plays. This repeats over and over. I am using the USB audio device for sound output.

My current theory is there might be a bug with PowerPC floating point instruction emulation. Every time I play an mp3, there are a lot of floating point instructions used in QEMU. The sound is pretty broken sounding. But when I play an mpeg file, I see few floating point instructions being used. The mpeg file plays fine.

Would anyone like to share his or her theory as to what the problem is and a possible solution?
LightBulbFun
Tinkerer
Posts: 50
Joined: Mon Jul 13, 2015 11:32 am

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

Post by LightBulbFun »

so quick one here today I saw QEMU 2.6RC0 had been released on QEMUs page so I downloaded it compiled it quickly and tested it with my standard 10.4 image and the issue with the Mouse curser vanishing and about this mac crashing when using -cpu G4 is still around (it used to exist in older QEMU versions got fixed around 2.2 then got broken again in 2.5 :( it only happens in emulation mode on say my Mac pro, when using KVM with QEMU on a native PPC machine, my G5 running Linux i dont have this issue) i have yet to test OS9 etc ill do that shortly
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 »

LightBulbFun wrote:so quick one here today I saw QEMU 2.6RC0 had been released on QEMUs page so I downloaded it compiled it quickly and tested it with my standard 10.4 image and the issue with the Mouse curser vanishing and about this mac crashing when using -cpu G4 is still around (it used to exist in older QEMU versions got fixed around 2.2 then got broken again in 2.5 :( it only happens in emulation mode on say my Mac pro, when using KVM with QEMU on a native PPC machine, my G5 running Linux i dont have this issue) i have yet to test OS9 etc ill do that shortly
You have KVM? Could you do me a favor and test out sound under kvm? All you have to add is this to the command-line: -device ich9-usb-uhci1,id=newusb -device usb-audio,bus=newusb.0

Then all you need to do is play an mp3 file and let us know if the sound is good or not. Thank you in advance.
LightBulbFun
Tinkerer
Posts: 50
Joined: Mon Jul 13, 2015 11:32 am

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

Post by LightBulbFun »

well I played around with it a bit more have yet to fire up my KVM machine (linux was being a pain with AFP file sharing) but i was able to setup audio in QEMU on my mac pro the ICH9 USB controller does not work properly in QEMU in Tiger 10.4.11 (doesent even show up on the Mac99 machine) but i was able to use the apple USB controller (-device pci-ohci) with Panther on g3beige and the USB audio device and I think the audio is skipping just due to such a high CPU load and slow emulation (during playing the entire emulated machine slowed RIGHT down) so yeah another quick update will post more once i get linux playing nice
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 »

LightBulbFun wrote:well I played around with it a bit more have yet to fire up my KVM machine (linux was being a pain with AFP file sharing) but i was able to setup audio in QEMU on my mac pro the ICH9 USB controller does not work properly in QEMU in Tiger 10.4.11 (doesent even show up on the Mac99 machine) but i was able to use the apple USB controller (-device pci-ohci) with Panther on g3beige and the USB audio device and I think the audio is skipping just due to such a high CPU load and slow emulation (during playing the entire emulated machine slowed RIGHT down) so yeah another quick update will post more once i get linux playing nice
Mac OS 10.4.11 seems to break pci devices. Mac OS 10.4.0 works just fine. I suggest you switch to it if you can. It should work with the ICH9 USB controller.

I know it isn't slow emulation that is causing poor playback. PowerPC Linux plays mp3's just fine. Even Mac OS X plays mpeg files without the audio gaps. It is mp3's and about all other formats that play very poor audio. My only theory so far is some kind of PowerPC emulation bug that might be related to floating point instructions is causing problems. KVM would definitely prove or disprove my theory.
iQQator
Space Cadet
Posts: 3
Joined: Tue Apr 12, 2016 7:35 pm

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

Post by iQQator »

Code: Select all

git show
commit 2869653f23c63c400d3791513b507e9feddbc751
Merge: 3c07587 4d07c72
Author: Peter Maydell <peter.maydell@linaro.org>
Date:   Wed Nov 11 16:43:19 2015 +0000

    Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
    
    Block layer patches
    
    # gpg: Signature made Wed 11 Nov 2015 16:03:19 GMT using RSA key ID C88F2FD6
    # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
  
-- 10.2, 10.3 worked from PearPC image but not install from CD
-- 9.2 not run at all, error on boot.

Host info:
Darwin MacBook-Pro 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64
mcayland
Mac Mechanic
Posts: 152
Joined: Sun Nov 01, 2015 10:33 pm

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

Post by mcayland »

First of all the git commits you are referencing here are really old. I can think of at least 2 potential I/O hang bugs that have been fixed since then (the block layer has had a major reorganisation under the hood in this release cycle) so please update to git master or a 2.6-rc and try again.
iQQator wrote: -- 10.2, 10.3 worked from PearPC image but not install from CD
Can you explain a bit more about why the install from CD fails? If it's an I/O hang then please try again with a newer build and report back. Posting the parameters you are using to launch QEMU would also help here.
iQQator wrote: -- 9.2 not run at all, error on boot.
Currently you still need a custom OpenBIOS which you can find at https://www.ilande.co.uk/tmp/openbios/openbios-ppc. Simply drop-in the replacement and you should be able to get past the OS 9 bootloader.
mcayland
Mac Mechanic
Posts: 152
Joined: Sun Nov 01, 2015 10:33 pm

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

Post by mcayland »

mcayland wrote:
iQQator wrote: -- 10.2, 10.3 worked from PearPC image but not install from CD
Can you explain a bit more about why the install from CD fails? If it's an I/O hang then please try again with a newer build and report back. Posting the parameters you are using to launch QEMU would also help here.
Actually... with the latest code I'm seeing an intermittent AppleSCCSerial panic booting from the 10.2 CD. If you were seeing a panic on boot please can you re-test QEMU 2.6.0-rc2 or newer with the newly-updated https://www.ilande.co.uk/tmp/openbios/openbios-ppc image and confirm if this resolves the issue you were seeing?
User avatar
Cat_7
Expert User
Posts: 6145
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 »

Qemu 2.6 from dgibson with your latest bios boots the 10.2 installation CD to the installer. Haven't tested the installer itself. (using mac99)

Best,
Cat_7
mcayland
Mac Mechanic
Posts: 152
Joined: Sun Nov 01, 2015 10:33 pm

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

Post by mcayland »

Cat_7 wrote:Qemu 2.6 from dgibson with your latest bios boots the 10.2 installation CD to the installer. Haven't tested the installer itself. (using mac99)

Best,
Cat_7
For some reason I could only reproduce the problem with g3beige - if you try dgibson's 2.6 branch then do you see a panic booting 10.2 which is then fixed by replacing with updated OpenBIOS image above?
User avatar
Cat_7
Expert User
Posts: 6145
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 »

Indeed,

A nasty panic in AppleSSCSerial when using g3beige and openbios build 1391.
You new bios fixes that. Both mac99 and g3beige get to the installer now.

Best,
Cat_7

btw: Can you tell us what currently keeps Qemu/Openbios from running OS9?
mcayland
Mac Mechanic
Posts: 152
Joined: Sun Nov 01, 2015 10:33 pm

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

Post by mcayland »

@Cat_7: Brilliant, thanks for testing - I'll see if I can get this upstream.

As for OS 9 I haven't really spent much time looking at it since the ESCC fixes, and with a release coming up there's a lot of new fixes coming in. Last time I checked, the OT module was calling a NULL pointer which seems like an improvement but other than that, not much progress to report I'm afraid.
iQQator
Space Cadet
Posts: 3
Joined: Tue Apr 12, 2016 7:35 pm

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

Post by iQQator »

OS 9.2.2 - os922_uni.iso

$ qemu-system-ppc -bios openbios-ppc -boot d -cdrom os922_uni.iso -M mac99 -m 256

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

System boot, load finder, but i can't use -hda,hdb,hdc,hdd options, OS 9.2.2 did crash :(
iQQator
Space Cadet
Posts: 3
Joined: Tue Apr 12, 2016 7:35 pm

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

Post by iQQator »

Thanks,
Extract, rename from .dmg to .img
Boot as qemu-system-ppc -M mac99 -cpu G4 -m 512 hdd.img

But, Finder was not load and mouse dismiss and not worked after run any app.
User avatar
adespoton
Forum All-Star
Posts: 4227
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 »

Read a bit further back in the thread -- a factory OS 9 image won't boot currently due to some issues with Open Transport and the lack of an emulated serial port.

A bit further back in the thread are some prepared images that allow you to boot OS 9 by removing the Open Transport resources.

The post just before yours states:
Last time I checked, the OT module was calling a NULL pointer which seems like an improvement but other than that, not much progress to report I'm afraid.
This indicates that OS 9 still won't work without the modifications.
mcayland
Mac Mechanic
Posts: 152
Joined: Sun Nov 01, 2015 10:33 pm

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

Post by mcayland »

iQQator wrote:System boot, load finder, but i can't use -hda,hdb,hdc,hdd options, OS 9.2.2 did crash :(
If you can't use the -hd* options with the OS 9 BIOS link I posted above then my guess is that you're still using an older QEMU since the drive nodes were changed in the last release cycle and won't match with the BIOS (you can find some related discussion earlier in this thread). OS 9 work really is cutting edge, so as per my previous advice you need to update your QEMU source to something more recent in order for things to work correctly.
riven2000
Inquisitive Elf
Posts: 34
Joined: Mon Apr 18, 2016 12:18 am

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

Post by riven2000 »

Hi all,

I just joined the group here, and am wanting to get OS 9.2.2 running in QEMU on my G5, OS X 10.5.8. I'm not a programmer at all but have been reading up on the progress here, and wondered if someone could tell me in a nutshell (in english :smile: ) where QEMU is now on running 9.2.2. Thanks much!
User avatar
adespoton
Forum All-Star
Posts: 4227
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 »

It's still in the development stages. There are customized images linked in this thread that will boot, but some OS functionality is removed, and there's a high likelihood of failure.

Any reason why you're using 10.5 instead of 10.4.11 with Classic?
riven2000
Inquisitive Elf
Posts: 34
Joined: Mon Apr 18, 2016 12:18 am

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

Post by riven2000 »

I decided to go with 10.5 on my main partition since the internet is becoming really slow in 10.4 (using TenFourFox). Until QEMU is up and running, I can still log into 10.4 and use Classic as needed.
User avatar
sentient06
Mac Mechanic
Posts: 188
Joined: Tue Mar 29, 2011 8:57 pm
Location: London, UK

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

Post by sentient06 »

riven2000 wrote:I decided to go with 10.5 on my main partition since the internet is becoming really slow in 10.4 (using TenFourFox). Until QEMU is up and running, I can still log into 10.4 and use Classic as needed.
Must be so painful to use PPC these days.. I am still holding to my Intel Snow Leopard and I feel like most OSX updates done since are so pointless. =(

But it is fast as hell! =D

QEMU is not very mature to work with Mac OS 9.2, and I believe it will take a long time yet. Development is slow, there are many people involved and many unexpected issues arise now and then. You should keep your 10.4 partition and avoid using QEMU for anything you think is important or sensitive. But please, have a go and keep an eye in this thread, eventually cool stuff start happening all of a sudden. You don't need to be a programmer, but having some technical knowledge is always nice and make things smoother. And hey, welcome to the forum!
riven2000
Inquisitive Elf
Posts: 34
Joined: Mon Apr 18, 2016 12:18 am

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

Post by riven2000 »

Thanks! I'll definitely keep watching. PPC isn't really painful, just a bit annoying with TenFourFox in 10.4.11. Everything else runs smooth as silk. I decided to reinstall 10.4, totally clean, and see how it goes.
CharlesS
Granny Smith
Posts: 107
Joined: Thu Aug 14, 2008 9:05 am

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

Post by CharlesS »

sentient06 wrote:Must be so painful to use PPC these days.. I am still holding to my Intel Snow Leopard and I feel like most OSX updates done since are so pointless. =(
If you are still running Snow Leopard, you should probably disconnect it from the network, as SL hasn't been getting security updates for some time now, and is therefore somewhat of a security risk.
There's no earthly way of knowing, which direction we are going, for the rowers keep on rowing, and they're certainly not showing any signs that they are slowing.
Post Reply