Page 83 of 83

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

Posted: Tue Feb 19, 2019 9:22 am
by PeterHolbrook
Graphics acceleration?

I'm not sure I've understood some of the latest posts correctly. Has graphics acceleration been achieved on Qemu for OS X guests (like, say, Tiger)? If so, can Front Row run on such virtual machines? If it doesn't work yet, will that goal be achievable in the near future?

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

Posted: Tue Feb 19, 2019 10:38 am
by Cat_7
Hi,

No, there is no Graphics Acceleration. Only the basic drivers load. The GA drivers garble the OSX screen.
There would have to be a relation to hardware to get real acceleration, and currently there is none. So, even thought the driver might load, all graphics would still have to be calculated through software.

Best,
Cat_7

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

Posted: Tue Feb 19, 2019 10:45 am
by PeterHolbrook
Thanks.

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

Posted: Sat Mar 16, 2019 6:01 am
by celebi23
So, I'm using the latest screamer build (Qemu-4.0pre-OSX-Altivec-Screamer-09-02-2019) on Mac OS X and was wondering if there was a way to enable internet and sound on Mac OS X Public Beta?

Here's my qemu.command file

Code: Select all

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

./qemu-system-ppc -L pc-bios -boot c -M mac99 -cpu G4 -m 1024 -prom-env 'auto-boot?=true' -prom-env 'boot-args=-v' -drive file=MacintoshHD.dmg,format=raw,media=disk -drive file=files.dmg,format=raw,media=disk -rtc base="2000-09-13",clock=vm -netdev user,id=network01 -device sungem,netdev=network01 -device VGA,edid=on
Do I need to add anything to my command file to enable audio & an internet connection in Mac OS X Public Beta?

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

Posted: Sat Mar 16, 2019 4:36 pm
by Cat_7
Hi,

I just installed the PB from the macintoshgarden.
Internet should work with that command line. Internet Explorer tries to open e.g., www.google.com, but crashes...(what's new).

It seems the PB does not like the screamer code. As soon as I click a sound, Qemu starts throwing errors ... invalid key ....

Best,
Cat_7

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

Posted: Sun Mar 17, 2019 4:02 am
by adespoton
I think I got USB audio working on PB; screamer is incompatible.

For internet, it works, but you should disable the time server prior to enabling it, or PB will call home to Apple, set the time, and immediately stop working.

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

Posted: Sun Dec 29, 2019 3:15 pm
by Programmingkid
Great news! I made a patch that implements the Screamer sound chip into QEMU. This one sounds better than the older Screamer implementation. Also I am trying to commit these patches into QEMU so we will no longer need a custom made version of QEMU to play sound.

- Mac OS 9.0.4 plays MP3's perfectly.
- MP3's sound perfect on Mac OS 9.2.2. Games like Wolfenstein 3D and Duke Nukem 3D also sound perfect.
- The default Quicktime version in Mac OS 10.2.3 sounds very choppy when playing MP3's. When I use MpegDec 3.1.1 in the classic environment the audio sounds perfect. I think it is a problem with the MP3 decoder (Quicktime 6.0.2).
- On Mac OS 10.4.3 the audio is almost good sounding. Very minor audio artifacts appear. Mac OS 10.4.11 sounds ok.

I noticed that patches are sometimes committed that break features in QEMU that we need. Some patch has broken my Screamer patch. In order to make testing the sound system simple I added a word to the sound node in OpenBIOS called test-sound. When ran this word will play some musical tones. This should make testing easy for anyone who works on QEMU. There is no need to install a PowerPC operating system to test the sound.

To run this 'word' go to the sound node like this in OpenBIOS: cd mac-io/davbus/sound

Then type test-sound

http://www.mediafire.com/file/ez2xtxblo ... t.zip/file
Patches for both QEMU and OpenBIOS plus an already made OpenBIOS file with the patch applied.

Enjoy!

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

Posted: Fri Nov 20, 2020 11:48 pm
by jgreene01
I am running Qemu 5.1.0 on Catalina, which I obtained both from here and also via my Homebrew installation (which reports no issues).

On this thread, albeit some time ago, it is mentioned that Qemu's savevm and loadvm are working for people, but this isn't working for me. I've gotten both OS 9 & multiple versions of OS X booting (using both raw image drives and qcow2 drives), but when I go to the console and try to run savevm, Qemu immediately freezes and becomes unresponsive.

Anyone know have any idea if the problem might be in the command line options below, or in the platform I'm running, or in this release of Qemu?

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=MacOS10.4.qcow2,format=qcow2,media=disk \
-netdev user,id=network01 -device sungem,netdev=network01 \
-device VGA,edid=on

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

Posted: Sat Nov 21, 2020 6:38 am
by Cat_7
Hi,

The discussion on this topic seems to suggest savevm/loadvm does not work for qemu-system-ppc.
viewtopic.php?f=34&t=7047&hilit=qemu+savevm&start=1200

Best,
Cat_7

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

Posted: Sat Nov 21, 2020 4:26 pm
by WizKid
Cat_7 wrote: Sat Nov 21, 2020 6:38 am Hi,

The discussion on this topic seems to suggest savevm/loadvm does not work for qemu-system-ppc.
viewtopic.php?f=34&t=7047&hilit=qemu+savevm&start=1200

Best,
Cat_7
Then perhaps those monitor commands (and the relevant code) should only be enabled when in the target arch is not ppc?

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

Posted: Sat Nov 21, 2020 4:30 pm
by jgreene01
Cat_7 wrote: Sat Nov 21, 2020 6:38 am Hi,

The discussion on this topic seems to suggest savevm/loadvm does not work for qemu-system-ppc.
viewtopic.php?f=34&t=7047&hilit=qemu+savevm&start=1200

Best,
Cat_7
I see. Thank you so much!

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

Posted: Sat Nov 21, 2020 5:21 pm
by adespoton
jgreene01 wrote: Sat Nov 21, 2020 4:30 pm
Cat_7 wrote: Sat Nov 21, 2020 6:38 am Hi,

The discussion on this topic seems to suggest savevm/loadvm does not work for qemu-system-ppc.
viewtopic.php?f=34&t=7047&hilit=qemu+savevm&start=1200

Best,
Cat_7
I see. Thank you so much!
Drive snapshotting works as long as you pause the emulation first. It's just the full savevm/loadvm that hasn't been implemented properly yet.

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

Posted: Sat Nov 21, 2020 9:46 pm
by jgreene01
Drive snapshotting works as long as you pause the emulation first. It's just the full savevm/loadvm that hasn't been implemented properly yet.
Do am I right this means:
1) type "stop" in that console
2) make a copy the "img" file
3) type "cont" to get the emulation going again

This is helpful. But I suppose there's no way to avoid passing through the boot sequence when commencing the emulation :smile:

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

Posted: Mon Nov 23, 2020 6:06 pm
by adespoton
jgreene01 wrote: Sat Nov 21, 2020 9:46 pm
Drive snapshotting works as long as you pause the emulation first. It's just the full savevm/loadvm that hasn't been implemented properly yet.
Do am I right this means:
1) type "stop" in that console
2) make a copy the "img" file
3) type "cont" to get the emulation going again

This is helpful. But I suppose there's no way to avoid passing through the boot sequence when commencing the emulation :smile:
Not quite: start your qemu-ppc with -snapshot; then from the monitor you can type stop, commit, cont.

But as you say, you still need to boot every time you start emulation -- the snapshotting only allows you to save different states of the image as difference files (faster and uses up less space than a full copy) -- it doesn't do machine state or memory snapshotting.

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

Posted: Wed Nov 25, 2020 11:00 pm
by jgreene01
adespoton wrote: Mon Nov 23, 2020 6:06 pm
jgreene01 wrote: Sat Nov 21, 2020 9:46 pm
Drive snapshotting works as long as you pause the emulation first. It's just the full savevm/loadvm that hasn't been implemented properly yet.
Do am I right this means:
1) type "stop" in that console
2) make a copy the "img" file
3) type "cont" to get the emulation going again

This is helpful. But I suppose there's no way to avoid passing through the boot sequence when commencing the emulation :smile:
Not quite: start your qemu-ppc with -snapshot; then from the monitor you can type stop, commit, cont.

But as you say, you still need to boot every time you start emulation -- the snapshotting only allows you to save different states of the image as difference files (faster and uses up less space than a full copy) -- it doesn't do machine state or memory snapshotting.
Now that I grasp this I am sure it will be especially helpful for OS 9 since it's got its fragilities. Thank you much.

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

Posted: Fri Nov 27, 2020 6:15 pm
by mcayland
adespoton wrote: Mon Nov 23, 2020 6:06 pm But as you say, you still need to boot every time you start emulation -- the snapshotting only allows you to save different states of the image as difference files (faster and uses up less space than a full copy) -- it doesn't do machine state or memory snapshotting.
Well actually yes it does - a QEMU snapshot not only snapshots the disk, but also the internal device state of all devices. Last time I checked everything was working except that the timebase register was based upon wallclock time rather than virtual time, although I think some others have been looking at this recently. In my last set of tests it worked for me probably around 95% of the time.
adespoton wrote: Mon Nov 23, 2020 6:06 pm Not quite: start your qemu-ppc with -snapshot; then from the monitor you can type stop, commit, cont.
Ah no, this is incorrect. The -snapshot parameter tells QEMU to use a temporary snapshot for the qcow2 disk (and yes, it must be qcow2 as raw images don't have the required COW metadata) which means that any changes made to the disk will be lost when you exit qemu-system-ppc. I use this a lot during development for things like disk drivers where it can be all to easy to corrupt the disk: using the snapshot feature ensures I can simply reboot and try again without having to reinstall.
adespoton wrote: Sat Nov 21, 2020 5:21 pm Drive snapshotting works as long as you pause the emulation first. It's just the full savevm/loadvm that hasn't been implemented properly yet.
There's no need to pause the emulation to create a snapshot: QEMU will pause the VM, create the snapshot, and then resume as soon as the process is complete.

The correct sequence to generate a QEMU snapshot is to run qemu-system-ppc as normal, then type "savevm foo" in the monitor. This will snapshot the disk as well as the device data, and store the snapshot within the qcow2 disk image with the label "foo".

When you want to run from a snapshot previous saved within the qcow2 file then run qemu-system-ppc with the extra parameter "-loadvm foo" which will restore the state from the foo image and then start the VM as normal.

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

Posted: Fri Nov 27, 2020 6:27 pm
by adespoton
mcayland wrote: Fri Nov 27, 2020 6:15 pm
adespoton wrote: Mon Nov 23, 2020 6:06 pm But as you say, you still need to boot every time you start emulation -- the snapshotting only allows you to save different states of the image as difference files (faster and uses up less space than a full copy) -- it doesn't do machine state or memory snapshotting.
Well actually yes it does - a QEMU snapshot not only snapshots the disk, but also the internal device state of all devices. Last time I checked everything was working except that the timebase register was based upon wallclock time rather than virtual time, although I think some others have been looking at this recently. In my last set of tests it worked for me probably around 95% of the time.
adespoton wrote: Mon Nov 23, 2020 6:06 pm Not quite: start your qemu-ppc with -snapshot; then from the monitor you can type stop, commit, cont.
Ah no, this is incorrect. The -snapshot parameter tells QEMU to use a temporary snapshot for the qcow2 disk (and yes, it must be qcow2 as raw images don't have the required COW metadata) which means that any changes made to the disk will be lost when you exit qemu-system-ppc. I use this a lot during development for things like disk drivers where it can be all to easy to corrupt the disk: using the snapshot feature ensures I can simply reboot and try again without having to reinstall.
adespoton wrote: Sat Nov 21, 2020 5:21 pm Drive snapshotting works as long as you pause the emulation first. It's just the full savevm/loadvm that hasn't been implemented properly yet.
There's no need to pause the emulation to create a snapshot: QEMU will pause the VM, create the snapshot, and then resume as soon as the process is complete.

The correct sequence to generate a QEMU snapshot is to run qemu-system-ppc as normal, then type "savevm foo" in the monitor. This will snapshot the disk as well as the device data, and store the snapshot within the qcow2 disk image with the label "foo".

When you want to run from a snapshot previous saved within the qcow2 file then run qemu-system-ppc with the extra parameter "-loadvm foo" which will restore the state from the foo image and then start the VM as normal.
Wait... I'm confused now then. I thought true snapshotting with savevm wasn't working for qemu-ppc yet? That's where this sub-thread started. I was providing instructions for how to take a disk snapshot of a qcow2 image while we wait for savevm to work reliably on qemu-ppc. If you're saying it works now, ignore everything I've suggested :) But in the old docs from before snapshotting exists, disk snapshot documentation stated that you should always stop the emulation prior to using commit so that the disk caches are properly flushed prior to creating the qcow snapshot.

That method still works on QEMU-PPC 5 because I continue to do it -- but if savevm and loadvm are working now... that's great! But then we need to figure out what jgreene01 is doing wrong, as it didn't work for him, and it didn't work for me as of QEMU-PPC 4.x (the last time I checked).

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

Posted: Fri Nov 27, 2020 6:40 pm
by mcayland
adespoton wrote: Fri Nov 27, 2020 6:27 pm Wait... I'm confused now then. I thought true snapshotting with savevm wasn't working for qemu-ppc yet? That's where this sub-thread started. I was providing instructions for how to take a disk snapshot of a qcow2 image while we wait for savevm to work reliably on qemu-ppc. If you're saying it works now, ignore everything I've suggested :) But in the old docs from before snapshotting exists, disk snapshot documentation stated that you should always stop the emulation prior to using commit so that the disk caches are properly flushed prior to creating the qcow snapshot.

That method still works on QEMU-PPC 5 because I continue to do it -- but if savevm and loadvm are working now... that's great! But then we need to figure out what jgreene01 is doing wrong, as it didn't work for him, and it didn't work for me as of QEMU-PPC 4.x (the last time I checked).
Yes it should be working - in fact, you can see the thread where I submitted the original fixes upstream in 2015 at https://lists.gnu.org/archive/html/qemu ... 01546.html.

I can't say I've tested it much recently, but I'd be surprised if something had broken. I should add that the screamer device doesn't have a VMState definition so it likely won't restore properly, so unfortunately whilst that branch is still in extended beta, vanilla QEMU should be fine here. If it doesn't then feel free to report a bug.

So yeah, try it and see what happens. For jgreene01 i'd most likely suspect MacOS doing something odd with permissions, but that's not something I can test as I develop on Linux with occasional testing on Windows 10.