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
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 »

Two new Qemu builds are available:

OSX:
http://www.emaculation.com/forum/viewto ... 104#p52104

Windows:
http://www.emaculation.com/forum/viewto ... =34&t=9028

These builds are from the same source, so should provide equal functionality. Noticeable is the support for the sungem network device, which is recognised natively in Mac OS/OSX. So no more installing realtek drivers.

Machine models to use for different Mac OS/OSX versions:
Leopard: -m mac99p
Mac OS 9.0 and OSX 10.2: -m mac99

All others "should" work with either model.

Happy testing!
Cat_7
User avatar
sidoh
Tinkerer
Posts: 51
Joined: Sun Aug 21, 2016 12:59 am
Location: Unknown

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

Post by sidoh »

Great. I have verified that the following versions work on the Windows build:

Mac OS 9.1
Mac OS 9.2d8 (Very buggy, but it managed to install and run a couple of times before going down completely, like any good Mac OS developer build. :smile: )
Mac OS 9.2.1
Mac OS 9.2.2
Mac OS X 10.0.0
Mac OS X 10.1.2 from the Power Mac G4 Quicksilver 2002 CD set

My host is Windows Server 2016 TP5 at this moment, will be upgrading to the final soon.
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 »

Seems like the only significant thing left to do is the AWACS support, which allows both Mac OS and Mac OS X to play sound. It's moderately difficult to implement it, but all things considered, I think it's worth it now that we have networking up and running. It's really the only thing holding QEMU back in my eyes at this point.

I'll definitely check out the new build, since that actually has 256 color support (needed for many older games). I'd be curious how other PPC OSes handle 256 color support in QEMU now.
pjc1990
Space Cadet
Posts: 8
Joined: Sun Aug 21, 2016 9:36 pm

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

Post by pjc1990 »

hello I am using the build of qemu linked above the 6gb empty_disk.raw image in the qemu tutorial and a 9.22 install cd image
when qemu boots up os 9.22 it asks me to initialize the disk. I click initialize and ok when it tells me it will wipe the data on the image but then the emulated mac freezes.
can anyone help me? sorry if this sounds silly.
gtxaspec
Tinkerer
Posts: 62
Joined: Mon Oct 19, 2015 7:32 pm

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

Post by gtxaspec »

Cat_7, are you able to provide a linux build as well? If not I may be able to, which repository are you using?
Last edited by gtxaspec on Mon Aug 22, 2016 5:15 am, edited 1 time in total.
gtxaspec
Tinkerer
Posts: 62
Joined: Mon Oct 19, 2015 7:32 pm

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

Post by gtxaspec »

Cat_7 wrote:Two new Qemu builds are available:

OSX:
http://www.emaculation.com/forum/viewto ... 104#p52104

Windows:
http://www.emaculation.com/forum/viewto ... =34&t=9028

These builds are from the same source, so should provide equal functionality. Noticeable is the support for the sungem network device, which is recognised natively in Mac OS/OSX. So no more installing realtek drivers.

Machine models to use for different Mac OS/OSX versions:
Leopard: -m mac99p
Mac OS 9.0 and OSX 10.2: -m mac99

All others "should" work with either model.

Happy testing!
Cat_7
unable to install Os 9.2.1 using mac99, installer crashes during installation.
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 »

gtxaspec wrote:Cat_7, are you able to provide a linux build as well? If not I may be able to, which repository are you using?
I think I will not go there. Too many distros to support ;-)
I used these repositories:
For Qemu: https://github.com/ozbenh/qemu
For OpenBIOS: https://github.com/ozbenh/openbios
For the VGA driver https://github.com/ozbenh/QemuMacDrivers

Best,
Cat_7
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 new build from Cat7 is faster than 2.7.0-rc1. This is notable in the Scrapbook, but less visible in the Graphing Calculator. However, it suffers from not being able to recognize the keyboard without an additional BIOS argument in the command line.

Annoyingly, I had to copy the VGA driver from the pc-bios folder into the QEMU folder to get it running at all. The mouse also appears to be glitchier.

Here's the command line used:
qemu-system-ppc-wip -bios openbios-qemu-wip.elf -boot d -drive file=Mac_OS_9.2.2_Uni.iso,index=0,media=cdrom -M mac99 -m 256 -prom-env 'auto-boot?=true' -g 800x600 -net none -usb -device usb-mouse -device usb-kbd
There was also a patch done a while back to better allocate the NVRAM, but I still see the "Unable to find a usable NVRAM portion" error.

Here's the stdout file:
MACIO: Creating CUDA
PMU: 0000000000000000
CUDA: 0000000019044cf8
adb_bus: 0000000019045100
Machine ARCH=1
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-system-ppc-wip -bios openbios-qemu-wip.elf -boot d -drive file=Mac_OS_9.2.2_Uni.iso,index=0,media=cdrom -M mac99 -m 256 -prom-env 'auto-boot?=true' -g 800x600 -net none -usb -device usb-mouse -device usb-kbd
Do you still need to copy the vga driver if you use -L pc-bios as additional parameter?
What about mouse behaviour when you use -sdl ? I have no mouse problems, but the window needs to be scaled and the image is not as crisp as it should be (this is in Windows).

Best,
Cat_7
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 »

I don't need to move qemu-vga.ndrv. And thank goodness. I usually go fullscreen to eliminate the mouse issues entirely, but yeah, the mouse issues are virtually gone in fullscreen now. It's not crisp, but it's the proper aspect ratio at least.
qemu-system-ppc-wip -bios openbios-qemu-wip.elf -L pc-bios -boot d -drive file=Mac_OS_9.2.2_Uni.iso,index=0,media=cdrom -M mac99 -m 256 -prom-env 'auto-boot?=true' -g 800x600 -net none -usb -device usb-mouse -device usb-kbd -sdl
Oh, and as for earlier versions of 9.0.4 (like the retail version) and earlier, these probably run in real mode instead of virtual mode, which is why they don't run in QEMU at all. These versions don't require the MMU for booting (and are the versions that Sheepshaver can run), but OpenBIOS can only support starting up with the MMU on right now.

I'm gonna test out installing 9.2.2 next, which I've been putting off for so long by this point.

EDIT:
So...using Cat7's build, QEMU does indeed freeze up when you initialize a blank disk (without any formatting) with Drive Setup.

Here's my command line:
qemu-system-ppc-wip -bios openbios-qemu-wip.elf -L pc-bios -boot d -drive file=Mac_OS_9.2.2_Uni.iso,index=0,media=cdrom -drive file=testimg.img,index=1,media=disk -M mac99 -m 256 -prom-env 'auto-boot?=true' -g 800x600 -net none -usb -device usb-mouse -device usb-kbd -sdl
And here's the stderr file that results from this (complete with bolding as to why it would freeze):

Code: Select all

WARNING: Image format was not specified for 'testimg.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, [b]write operations on block 0 will be restricted.[/b]
         Specify the 'raw' format explicitly to remove the restrictions.
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
Seems like I just change "-drive file=testimg.img,index=1,media=disk" to "-drive file=testimg.img,index=1,media=disk,format=raw" to prevent a lock-up. I'll see how that works later. Right now, I'm busier with other IRL things, but I'll check back soon to see the responses.
User avatar
sidoh
Tinkerer
Posts: 51
Joined: Sun Aug 21, 2016 12:59 am
Location: Unknown

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

Post by sidoh »

To anyone who has problems with OS 9.x in the latest build: If you use this BIOS (https://www.ilande.co.uk/tmp/openbios/openbios-ppc-rtas) you can install and use OS 9.x successfully.

Here's a screenshot I took of OS 9.2d8 when using this BIOS:

Image
pjc1990
Space Cadet
Posts: 8
Joined: Sun Aug 21, 2016 9:36 pm

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

Post by pjc1990 »

When I try to install 9.2.2 it says problem accessing the system file on untitled hd. :cry:
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 »

sidoh wrote:To anyone who has problems with OS 9.x in the latest build: If you use this BIOS (https://www.ilande.co.uk/tmp/openbios/openbios-ppc-rtas) you can install and use OS 9.x successfully.

Here's a screenshot I took of OS 9.2d8 when using this BIOS:

Image
I never heard of Mac OS 9.2d8. Where did you find this? Also what is the Slurm! menu?

Great screenshot.
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 »

pjc1990 wrote:When I try to install 9.2.2 it says problem accessing the system file on untitled hd. :cry:
Are you using Cormac O'Brien's Mac OS 9.2.2 iso? I think he had to alter it to make it work with QEMU back then. An unaltered iso might work better.

If the problem is file system corruption, the Disk First-aid program should be able to fix things.

The amount of information I have to work with is a bit lacking. Could you post a screenshot or text of the error message, QEMU command-line arguments, and anything else that might help.

Thank you.
User avatar
sidoh
Tinkerer
Posts: 51
Joined: Sun Aug 21, 2016 12:59 am
Location: Unknown

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

Post by sidoh »

Programmingkid wrote:I never heard of Mac OS 9.2d8. Where did you find this? Also what is the Slurm! menu?

Great screenshot.
Mac OS 9.2d8 = Mac OS 9.2 Developer Release 8 (or such)

In System 7.0 betas and later, the Special menu was renamed to something fun for every build. This was done for easy identification. 9.2d8 ended up getting 'Slurm!'.

Also, http://macintoshgarden.org/apps/apple-d ... april-2001

Knock yourself out. Just note that this build can be buggier than you expect. :wink:
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 »

kataetheweirdo wrote:Seems like the only significant thing left to do is the AWACS support, which allows both Mac OS and Mac OS X to play sound. It's moderately difficult to implement it, but all things considered, I think it's worth it now that we have networking up and running. It's really the only thing holding QEMU back in my eyes at this point.
Interesting idea.
User avatar
sidoh
Tinkerer
Posts: 51
Joined: Sun Aug 21, 2016 12:59 am
Location: Unknown

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

Post by sidoh »

I'd also like to note that Mac OS X DP3 crashes when trying to boot from it's CD in the latest Windows build. This happened when I was both emulating a G3 and G4.

UPDATE: Spoke too soon. Apparently, I was booting off the wrong partition. Specifying the correct partition allowed DP3 to install fine:

Image

Image
pjc1990
Space Cadet
Posts: 8
Joined: Sun Aug 21, 2016 9:36 pm

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

Post by pjc1990 »

Programmingkid wrote:
pjc1990 wrote:When I try to install 9.2.2 it says problem accessing the system file on untitled hd. :cry:
Are you using Cormac O'Brien's Mac OS 9.2.2 iso? I think he had to alter it to make it work with QEMU back then. An unaltered iso might work better.

If the problem is file system corruption, the Disk First-aid program should be able to fix things.

The amount of information I have to work with is a bit lacking. Could you post a screenshot or text of the error message, QEMU command-line arguments, and anything else that might help.

Thank you.
Ok tried to replicate the error again to explain. Also tried a spanish 9.2.2 iso comes up with same error.

Image
qemu-system-ppc-wip -bios openbios-ppc-rtas -L pc-bios -boot d -drive file=C:\Users\User\Downloads\macos-922-uni\macos-922-uni.iso,index=0,media=cdrom -drive file=os.raw,index=1,media=disk -M mac99 -m 256 -prom-env 'auto-boot?=true' -g 1024x768 -net none -usb -device usb-mouse -device usb-kbd -sdl
Last edited by pjc1990 on Mon Aug 22, 2016 5:00 pm, edited 1 time in total.
peter_j
Tinkerer
Posts: 61
Joined: Sat Jul 02, 2016 12:28 pm

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

Post by peter_j »

pjc1990 wrote:
Ok tried to replicate the error again to explain.

Much the same here.
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 »

Ok, so there seems to be a problem with disk access when partitioning/formatting in Mac OS 9.x. At first I thought it was only affecting the windows build, but the OSX build has the same problem. I noticed I could partition/format a disk image from the Leopard DVD.

So for these last builds, the solution is to first partition/format a disk using Leopard.

The resulting images are usable in Mac OS 9.x. But re-partitioning in 9.x hangs Mac OS the moment you click initialise.
I'll see if I can send a message to the developer.

Best,
Cat_7
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 »

pjc1990:

Change "-drive file=os.raw,index=1,media=disk" to "-drive file=os.raw,index=1,media=disk,format=raw". That should fix it.
pjc1990
Space Cadet
Posts: 8
Joined: Sun Aug 21, 2016 9:36 pm

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

Post by pjc1990 »

kataetheweirdo wrote:pjc1990:

Change "-drive file=os.raw,index=1,media=disk" to "-drive file=os.raw,index=1,media=disk,format=raw". That should fix it.
strange its still coming up with the same error.
peter_j
Tinkerer
Posts: 61
Joined: Sat Jul 02, 2016 12:28 pm

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

Post by peter_j »

Got 9.22 up, and booting. Had to try the install twice - first time it had an error installing/reading Big System Morsels so I tried again and it worked. I am just installing the basic system - no "optional extras" in the installer. Clearly there is still something flaky in the i/o. Batch:

Code: Select all

qemu-system-ppc-wip.exe -bios openbios-ppc-rtas -L pc-bios -boot d -m 512 -M mac99 -prom-env "auto-boot?=true" -prom-env "boot-args=-v" -sdl -net none -drive file=macos-922-uni.iso,index=0,format=raw,media=cdrom -drive file=Test9_6_GB.img,index=1,format=raw,media=disk  -g 800x600
User avatar
adespoton
Forum All-Star
Posts: 4226
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 »

Do the older builds have the same issues? Just wondering if we can pin this down to a refactoring issue, or if it is indeed something still unimplemented. From the fact that when using a raw device it appears to be hit and miss, I'd guess this isn't in the emulation itself, but more likely in the OpenBIOS code.
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 »

adespoton wrote:Do the older builds have the same issues? Just wondering if we can pin this down to a refactoring issue, or if it is indeed something still unimplemented. From the fact that when using a raw device it appears to be hit and miss, I'd guess this isn't in the emulation itself, but more likely in the OpenBIOS code.
I think there was an interrupt change in OpenBIOS (edge to level) and Ben hacked some openpic code around this, so maybe that's the culprit? How does it compare with the official git master? Is it something in Ben's branch?
Post Reply