GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
Moderators: Cat_7, Ronald P. Regensburg
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
Also, I notice he's still using an external OpenBIOS, which is where the mouse handling would be done. Likely this is the culprit. My OpenBIOS doesn't do this, and neither does the one built in to QEMU 2.7. Remove the -bios ./openbios-ppc flag, and 2.7 should function, as it has a default one built in.
-
Programmingkid
- Apple Corer
- Posts: 245
- Joined: Sun Jan 31, 2016 6:01 pm
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
I just wanted to let everyone know the progress I have made with the sound problem in QEMU. After replacing all the calls to the floating point instruction fmadds with a c language equivalent in the AppleUSBAudio kernel extension, audio played without that crackling sound. It sound almost perfect. The audio was from an mpeg file. MP3 files probably go thru a decoder that uses floating point instructions, so that's probably why they still play poorly.
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
Did the mpeg file have uncompressed audio?Programmingkid wrote:I just wanted to let everyone know the progress I have made with the sound problem in QEMU. After replacing all the calls to the floating point instruction fmadds with a c language equivalent in the AppleUSBAudio kernel extension, audio played without that crackling sound. It sound almost perfect. The audio was from an mpeg file. MP3 files probably go thru a decoder that uses floating point instructions, so that's probably why they still play poorly.
If you have ffmpeg installed, try:
ffprobe /path/to/mpeg/file
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
This does seem like an extremely long way around the problem, particularly as it would be a huge amount of work on the QEMU side. Why not simply do what Ben did with sungem, i.e. reverse engineer a QEMU sound device from one of the many hardware open source drivers available?Programmingkid wrote:I just wanted to let everyone know the progress I have made with the sound problem in QEMU. After replacing all the calls to the floating point instruction fmadds with a c language equivalent in the AppleUSBAudio kernel extension, audio played without that crackling sound. It sound almost perfect. The audio was from an mpeg file. MP3 files probably go thru a decoder that uses floating point instructions, so that's probably why they still play poorly.
-
kikyoulinux
- Tinkerer
- Posts: 92
- Joined: Sun Sep 28, 2014 11:53 am
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
I ran a benchmark, just out of curiosity. such poor FPU performance...


Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
That's great news! So if we speed up the floating point emulation code, we should get proper audio as well. Meanwhile, USB audio might work if we just replace the floating point with direct calls.
Does the OS instability also go away with the change?
Does the OS instability also go away with the change?
-
Programmingkid
- Apple Corer
- Posts: 245
- Joined: Sun Jan 31, 2016 6:01 pm
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
Yes, the audio was compressed. The file used the mp2 audio codec.julialy wrote:Did the mpeg file have uncompressed audio?Programmingkid wrote:I just wanted to let everyone know the progress I have made with the sound problem in QEMU. After replacing all the calls to the floating point instruction fmadds with a c language equivalent in the AppleUSBAudio kernel extension, audio played without that crackling sound. It sound almost perfect. The audio was from an mpeg file. MP3 files probably go thru a decoder that uses floating point instructions, so that's probably why they still play poorly.
If you have ffmpeg installed, try:
ffprobe /path/to/mpeg/file
-
Programmingkid
- Apple Corer
- Posts: 245
- Joined: Sun Jan 31, 2016 6:01 pm
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
The driver will only tell us the interface to the device, it won't tell us what goes on behind the scenes. I tried this with the screamer sound chip used by Apple. It was just too hard to succeed.mcayland wrote:This does seem like an extremely long way around the problem, particularly as it would be a huge amount of work on the QEMU side. Why not simply do what Ben did with sungem, i.e. reverse engineer a QEMU sound device from one of the many hardware open source drivers available?Programmingkid wrote:I just wanted to let everyone know the progress I have made with the sound problem in QEMU. After replacing all the calls to the floating point instruction fmadds with a c language equivalent in the AppleUSBAudio kernel extension, audio played without that crackling sound. It sound almost perfect. The audio was from an mpeg file. MP3 files probably go thru a decoder that uses floating point instructions, so that's probably why they still play poorly.
One sound chip that is well documented is the SoundBlaster. There is a Mac OS 9 driver available for it. If someone were to port the SoundBlaster ISA card in QEMU to PCI, it might be possible to make sound play thru it.
-
Programmingkid
- Apple Corer
- Posts: 245
- Joined: Sun Jan 31, 2016 6:01 pm
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
That is probably true. Just replacing one floating point instruction yielded very good results. Replacing all of them would make things even better.adespoton wrote:That's great news! So if we speed up the floating point emulation code, we should get proper audio as well. Meanwhile, USB audio might work if we just replace the floating point with direct calls.
I didn't really notice any operating system instability with or without the change to the USB Audio driver.Does the OS instability also go away with the change?
Thank you for setting me on the right path. I would still be writing test cases for all the floating point instructions if you hadn't told us how slow the floating point unit was in QEMU.
-
Programmingkid
- Apple Corer
- Posts: 245
- Joined: Sun Jan 31, 2016 6:01 pm
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
Your FPU score is pretty high compared to mine. What is your host processor?kikyoulinux wrote:I ran a benchmark, just out of curiosity. such poor FPU performance...
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
Sorry, the mouse issues were a red herring. I tried the VM on another machine and it works perfectly, so it's something specific to my 10.9.5 system. I'll report back if I find the source.
-
kikyoulinux
- Tinkerer
- Posts: 92
- Joined: Sun Sep 28, 2014 11:53 am
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
on an i3-3110M(2.4GHz) laptop... Windows 10 rs1 and lxss. qemu built with -march=native.Programmingkid wrote:Your FPU score is pretty high compared to mine. What is your host processor?kikyoulinux wrote:I ran a benchmark, just out of curiosity. such poor FPU performance...
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
Just ordered a Pi Zero, do you think I might be able to run OS 9/10 on it ? 
Do I just need to compile from the latest sources, and if so, does anybody have a link for them which includes the latest OpenBIOS ?
Do I just need to compile from the latest sources, and if so, does anybody have a link for them which includes the latest OpenBIOS ?
-
kataetheweirdo
- Master Emulator
- Posts: 336
- Joined: Sun Feb 01, 2009 4:55 pm
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
Because I forgot to point this out in the App Compatibility topic, I should point out that I used an Intel Core i7 (some pre-2011 models) and those eked out with slightly worse results than what kikyoulinux is getting. Seems like there's a new problem with the Power 9 vector instructions. Does there need to be ifdefs to make sure the correct execution is going on in G4 mode?
The Pi Zero might run Mac OS 9 slightly less than OK (in comparison to the Power Mac G3/300), though you might have to set the memory to 128 MB at most. OS X might run, but it would be very slow. You can compile from 2.7's branch onward. As for OpenBIOS, can't help you much there.
The Pi Zero might run Mac OS 9 slightly less than OK (in comparison to the Power Mac G3/300), though you might have to set the memory to 128 MB at most. OS X might run, but it would be very slow. You can compile from 2.7's branch onward. As for OpenBIOS, can't help you much there.
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
Thanks for your answer, I'll try that as soon as I can.kataetheweirdo wrote: The Pi Zero might run Mac OS 9 slightly less than OK (in comparison to the Power Mac G3/300), though you might have to set the memory to 128 MB at most. OS X might run, but it would be very slow. You can compile from 2.7's branch onward. As for OpenBIOS, can't help you much there.
-
kikyoulinux
- Tinkerer
- Posts: 92
- Joined: Sun Sep 28, 2014 11:53 am
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
And I tried Mac OS X Panther on my Android phone(4x Cortex-A53) before... it took 10 minutes to start up and 20 seconds or so to open a menu. So you'd better not.Arths wrote:Thanks for your answer, I'll try that as soon as I can.kataetheweirdo wrote: The Pi Zero might run Mac OS 9 slightly less than OK (in comparison to the Power Mac G3/300), though you might have to set the memory to 128 MB at most. OS X might run, but it would be very slow. You can compile from 2.7's branch onward. As for OpenBIOS, can't help you much there.
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
Thanks. I tried removing the OpenBIOS flag, but I get the same behavior. As mentioned in another reply, I found the issue seems specific to my 10.9.5 system. Runs great on my 10.8 system.
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
Will try 9.2.2kikyoulinux wrote:And I tried Mac OS X Panther on my Android phone(4x Cortex-A53) before... it took 10 minutes to start up and 20 seconds or so to open a menu. So you'd better not.Arths wrote:Thanks for your answer, I'll try that as soon as I can.kataetheweirdo wrote: The Pi Zero might run Mac OS 9 slightly less than OK (in comparison to the Power Mac G3/300), though you might have to set the memory to 128 MB at most. OS X might run, but it would be very slow. You can compile from 2.7's branch onward. As for OpenBIOS, can't help you much there.
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
How are you folks gettign SunGEM working in OS9? I'm using BenH's wip tree, and the following command line:
But the interface doesn't show up in OS9.2.2, full extensions enabled.
Thanks!
Code: Select all
./qemu-system-ppc -bios ~/qemu/os9/openbios-ppc -boot c -m 512 -cpu G3 -M mac99 -g 800x600x32 -prom-env "auto-boot?=true" -prom-env "boot-args=-v" -drive file=/home/qemu/os9/os9.img,format=raw,media=disk,cache=writethrough -display gtk -net nic,model=sungem -net user
Thanks!
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
I'm using:
Looks like you're using the old -net flags. Better to switch to the non-deprecated -netdev + -device format.
Code: Select all
./qemu-system-ppc
-bios "openbios-qemu-wip-13082016.elf" \
-boot c \
-drive file="/dev/rdisk$DEVNUM",format=raw,media=disk,cache=writethrough \
-M mac99 \
-m 256 \
-cpu G3 \
-netdev user,id=vlan0 \
-device sungem,netdev=vlan0 \
-prom-env 'auto-boot?=true' \
-g 1280x720x32 \
-name "- $osver" & EMUPID=$!Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
Still getting "The previously selected connection, "Ethernet", is not available. The connection has been changed to "PPP".
Code: Select all
./qemu-system-ppc -bios ~/qemu/os9/openbios-ppc -boot c -m 512 -cpu G3 -M mac99 -g 800x600x32 -prom-env "auto-boot?=true" -prom-env "boot-args=-v" -drive file=/home/qemu/os9/os9.img,format=raw,media=disk,cache=writethrough -display gtk -netdev user,id=vlan0 -device sungem,netdev=vlan0
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
Did you build your own qemu?
Perhaps try the wip executable with sungem support downloaded from the forum.
http://www.emaculation.com/forum/viewto ... =34&t=9028
Best,
Cat_7
Perhaps try the wip executable with sungem support downloaded from the forum.
http://www.emaculation.com/forum/viewto ... =34&t=9028
Best,
Cat_7
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
I did, built from BenH's WIP branch, built on linux. trying to see if i can build from source and get networking working.
- sentient06
- Apple Corer
- Posts: 250
- Joined: Tue Mar 29, 2011 8:57 pm
- Location: London, UK
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
I don't remember if I asked this before but, is there any kind of "save state" functionality in QEMU? If so, is it available to any kind of virtual machine or should work be done depending on the case?
Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
You can save vm's, but raw format is not supported. QCOW2 and QED are supported.
So if you install on a qcow2 image, in OSX you can use the compat-monitor to create and load states:
Documentation ( http://wiki.qemu.org/download/qemu-doc. ... t_005fmode ) says that these commands are available:
savevm "imagename"
loadvm "imagename"
delvm "imagename"
info snapshots
I tested in OSX with mac os 9.1 running on a qcow2 image and savevm and loadvm worked.
Best,
Cat_7
So if you install on a qcow2 image, in OSX you can use the compat-monitor to create and load states:
Documentation ( http://wiki.qemu.org/download/qemu-doc. ... t_005fmode ) says that these commands are available:
savevm "imagename"
loadvm "imagename"
delvm "imagename"
info snapshots
I tested in OSX with mac os 9.1 running on a qcow2 image and savevm and loadvm worked.
Best,
Cat_7