Trouble with Qemu Guide

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

Post Reply
starfiretbt
Mac Mechanic
Posts: 161
Joined: Fri Jun 06, 2014 8:33 pm

Trouble with Qemu Guide

Post by starfiretbt »

I am trying to set up Qemu with the screamer build but it's not acting the way the guide seems to say it should. Here is what I have done.

1. I downloaded Qemu-system-ppc-7.2-macOS-screamer-14-12-2022.zip for windows, I am working with windows 10, and unpacked it.
2. I put in the folder a copy of the files called "Mac OS ROM" and "Apple MacOS 9.0.4.iso" from my sheepshaver folder so I know they work.
3. Here is where I run into trouble; I try to, and I quote from the guide "Create an empty disk image with qemu-img.exe." I did this by clicking on both qemu-img.exe and qemu-system-ppc-screamer.exe. A program will start up but only for a split second before it disappears so nothing seems to get created.

I was told this in another post "Note that you need the ENTIRE folder though; the ndrv files, for example, are different for the two builds," does this mean the screamer build I downloaded is incomplete? Do I need to download another file and just move everything into the same folder?
User avatar
adespoton
Forum All-Star
Posts: 4275
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Trouble with Qemu Guide

Post by adespoton »

These programs are command-line programs on Windows aren't they? You'll need to run them from cmd.exe.

You also won't need Mac OS ROM.

And the Screamer build has its own set of dependency files that are included with it in the zip; you need all of those for it to function. Don't mix them with the non-Screamer files, as they're different.

There should be a bat file that you can double click to run the exe, but you'll need to configure the settings in the bat file first before running it. And you'll need to create your blank image from the command line prior to doing so, and add the name of the file you create to that bat file.

This all seems to be covered in https://www.emaculation.com/doku.php/pp ... or-windows ?
starfiretbt
Mac Mechanic
Posts: 161
Joined: Fri Jun 06, 2014 8:33 pm

Re: Trouble with Qemu Guide

Post by starfiretbt »

The guide says "Open a command prompt and navigate to your Qemu folder." I don't know how to do that so I found a video https://www.youtube.com/watch?v=0MOuaL1eaLk that showed I just have to post the location of my qemu folder by copying the address into the command prompt. However when I post the address I get the message 'C:\Users\TBTol\Desktop\Qemu' is not recognized as an internal or external command,
operable program or batch file.

Is there a better video guide for showing how to set up mac os 9 in Qemu for Windows?
User avatar
Ronald P. Regensburg
Expert User
Posts: 7831
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Trouble with Qemu Guide

Post by Ronald P. Regensburg »

Navigating to a certain location is done with the cd command. Type cd then a space and then the path to the location (in this case the Qemu folder).
starfiretbt
Mac Mechanic
Posts: 161
Joined: Fri Jun 06, 2014 8:33 pm

Re: Trouble with Qemu Guide

Post by starfiretbt »

OK, that worked. I was able to create a disc image and I was able to create a bat file with this written in it

qemu-system-ppc.exe ^
-L pc-bios ^
-M mac99,via=pmu ^
-m 512 ^
-display sdl ^
-boot d ^
-drive file=MacOS9.2.iso,format=raw,media=cdrom ^
-drive file=MacOS9.2.img,format=raw,media=disk

I saved the bat file but when I tried to open it nothing happens. I figured "MacOS9.2.iso" is the installation cd which for me was called "macos_921_ppc.iso" but I changed it to "MacOS9.2.iso" and still nothing happens. I do have a file called "MacOS9.2.img" so I think I did that right.
User avatar
adespoton
Forum All-Star
Posts: 4275
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Trouble with Qemu Guide

Post by adespoton »

starfiretbt wrote: Fri Jan 19, 2024 5:23 pm OK, that worked. I was able to create a disc image and I was able to create a bat file with this written in it

qemu-system-ppc.exe ^
-L pc-bios ^
-M mac99,via=pmu ^
-m 512 ^
-display sdl ^
-boot d ^
-drive file=MacOS9.2.iso,format=raw,media=cdrom ^
-drive file=MacOS9.2.img,format=raw,media=disk

I saved the bat file but when I tried to open it nothing happens. I figured "MacOS9.2.iso" is the installation cd which for me was called "macos_921_ppc.iso" but I changed it to "MacOS9.2.iso" and still nothing happens. I do have a file called "MacOS9.2.img" so I think I did that right.
Run the bat file from the command line, and it will usually output useful error messages to the command line that you can use to debug your setup. Once it's working, double clicking the bat from Windows Explorer should work to get the emulator running.
starfiretbt
Mac Mechanic
Posts: 161
Joined: Fri Jun 06, 2014 8:33 pm

Re: Trouble with Qemu Guide

Post by starfiretbt »

So I looked up "how to run a program through command prompt" and I typed the location of my folder (which is on my desktop for now) "cd C:\Users\TBTol\Desktop\Qemu" then I typed "start qemu.bat" and another command prompt came up saying

C:\Users\TBTol\Desktop\Qemu>qemu-system-ppc.exe -L pc-bios -M mac99,via=pmu -m 512 -display sdl -boot d -drive file=MacOS9.2.iso,format=raw,media=cdrom -drive file=MacOS9.2.img,format=raw,media=disk
'qemu-system-ppc.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\TBTol\Desktop\Qemu>
My install disc is titled MacOS9.2.iso (but I did change it's name to match the guide), my img file is called MacOS9.2.img, is there anything I am missing?
User avatar
adespoton
Forum All-Star
Posts: 4275
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Trouble with Qemu Guide

Post by adespoton »

starfiretbt wrote: Fri Jan 19, 2024 7:46 pm So I looked up "how to run a program through command prompt" and I typed the location of my folder (which is on my desktop for now) "cd C:\Users\TBTol\Desktop\Qemu" then I typed "start qemu.bat" and another command prompt came up saying

C:\Users\TBTol\Desktop\Qemu>qemu-system-ppc.exe -L pc-bios -M mac99,via=pmu -m 512 -display sdl -boot d -drive file=MacOS9.2.iso,format=raw,media=cdrom -drive file=MacOS9.2.img,format=raw,media=disk
'qemu-system-ppc.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\TBTol\Desktop\Qemu>
My install disc is titled MacOS9.2.iso (but I did change it's name to match the guide), my img file is called MacOS9.2.img, is there anything I am missing?
At the command prompt, qemu-system-ppc.exe has to exist in the folder as well. If it exists at C:\Users\TBTol\Desktop\Qemu\qemu-system-ppc.exe , then there's something wrong with the bat file -- possibly you need to put a .\ in front of qemu-system-ppc.exe:

Code: Select all

.\qemu-system-ppc.exe ^
-L pc-bios ^
-M mac99,via=pmu ^
-m 512 ^
-display sdl ^
-boot d ^
-drive file=MacOS9.2.iso,format=raw,media=cdrom ^
-drive file=MacOS9.2.img,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: Trouble with Qemu Guide

Post by Cat_7 »

Nothing is needed in front of the program name in the bat file in windows.

The qemu-system-ppc.exe program should be in the same folder as all the dll files, the pc-bios folder and the 2 disk images
Is it there and does it have exactly that name? Or did you download the screamer version? Does that perhaps have a different name?
If so, you should edit the qemu.bat file and change the name of program there. Then save it and try again.

Please tell us what exactly you downloaded.

Best,
Cat_7
starfiretbt
Mac Mechanic
Posts: 161
Joined: Fri Jun 06, 2014 8:33 pm

Re: Trouble with Qemu Guide

Post by starfiretbt »

I downloaded screamer, that was the problem. I changed "qemu-system-ppc.exe" to "qemu-system-ppc-screamer.exe" and it started right up. I think I'm ready to begin however reading the document "Before You Install" tells me I need to have 9.1 installed first.
Please tell me I'm not going to have to do this all over again with 9.1. I'm not seeing anything like that in the guide.
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Trouble with Qemu Guide

Post by Cat_7 »

You downloaded a version of Mac OS 9.2 that only contains an upgrade?
If Qemu booted from the CD image, why don´t you just try to install?

Please note that you have use the disk utility program on the CD first to partition the new hard disk image before you can install on it.

Best,
Cat_7
starfiretbt
Mac Mechanic
Posts: 161
Joined: Fri Jun 06, 2014 8:33 pm

Re: Trouble with Qemu Guide

Post by starfiretbt »

I didn't install the cd image because I wanted to read the "before you install" document and it warned me that I needed something else to install first so I stopped.

However, as you guys have been helping me I think I have figured out how to use command prompt. Rather than look for another cd image of 9.2 (which I have been trying to set up to keep as close to the guide as possible) I will just keep using what I know works, my 9.0.4 disc image. I went back to the beginning and did the "cd C:\Users\TBTol\Desktop\Qemu" command then entered "qemu-img.exe create -f raw -o size=2G MacOS9.0.4.img" and that got me an .img file with the drive I really wanted, one to replace sheepshaver and possibly basilisk. I then changed the qemu.bat file to this

qemu-system-ppc-screamer.exe ^
-L pc-bios ^
-M mac99,via=pmu ^
-m 512 ^
-display sdl ^
-boot d ^
-drive file=AppleMacOS9.0.4.iso,format=raw,media=cdrom ^
-drive file=MacOS9.0.4.img,format=raw,media=disk

and ran the file from the prompt and it started but it now says
"unable to find a usable NURAM partition - using offset 0x1400.
call-method get-key-map: exception -21"

I remember being told I need to set up a partition, how do I do that? I see in the guide there is a part about setting up a partition but it looks like I need to boot from the cd. Did I make a mistake somewhere in my setup? Because I thought I changed everything exactly as it needed to be.
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Trouble with Qemu Guide

Post by Cat_7 »

The error you saw in the yellow screen is "normal", but qemu should then continue to boot.

Please look at our guide: https://www.emaculation.com/doku.php/pp ... or-windows
First look at the table at the top of the guide and what it tells you about running Mac OS 9.0.4 with regard to the -M parameter in your bat file.
A CD image for SheepShaver might not work with Qemu. Look for a CD image with 9.0.4 for e.g., the G4 Cube. You can find one at the macintoshgarden site

Then read on to see how to use disk utility.
It's all there: https://www.emaculation.com/doku.php/pp ... _mac_os_92

However, for good sound support I suggest you keep trying with Mac OS 9.2

Best,
Cat_7
starfiretbt
Mac Mechanic
Posts: 161
Joined: Fri Jun 06, 2014 8:33 pm

Re: Trouble with Qemu Guide

Post by starfiretbt »

I got it working. I gave up trying to install 9.0.4 and kept with 9.2.1. The rest of the guide worked just fine, it was just figuring out how to use command prompt I had trouble with. Is there a reason Qemu isn't more user friendly like Basilisk and Sheepshaver? Having to use command prompt makes me feel like an amateur hacker.

EDIT: I'm assuming the .img file is where all my mac programs are kept and I add programs to it using the hfvexplorer.
User avatar
adespoton
Forum All-Star
Posts: 4275
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Trouble with Qemu Guide

Post by adespoton »

starfiretbt wrote: Sun Jan 21, 2024 6:43 pm I got it working. I gave up trying to install 9.0.4 and kept with 9.2.1. The rest of the guide worked just fine, it was just figuring out how to use command prompt I had trouble with. Is there a reason Qemu isn't more user friendly like Basilisk and Sheepshaver? Having to use command prompt makes me feel like an amateur hacker.

EDIT: I'm assuming the .img file is where all my mac programs are kept and I add programs to it using the hfvexplorer.
The main difference is that Basilisk II and Sheepshaver each emulate one virtual system; Qemu emulates hundreds of virtual systems, and those system profiles are changing continually.

To deal with the multiple hardware profiles, Qemu goes the "back end/front end" route, like MAME. Way back, there was a Qemu for OS X that had a front end as well, but then qemu-system-ppc went into serious development to get things like G3 and G4 Macintosh emulation working, and compatibility broke with the front end. Every time someone went to update it or create a new one, Qemu back-end shifted again, breaking the new attempts. So since then, it's been mostly shell scripts until UTM came along, by which point the back end had stabilized again.

So now, if you're on macOS, there's UTM that provides a front end (and I've even got pre-made configurations so all you need to bring is your install DVD); if you're on Windows or Linux, there's other third party launchers. But the builds on here still use the config files, and in doing so allow you to run the emulator with as little abstraction as possible, such that when one small improvement/change comes along, it just requires a tweak in the script instead of building a new option into a front end.

If you want an all-in-one package, using a tool like Platypus will let you wrap the script and binary in a clickable app once you've got it configured; I did that for a number of years before switching to just building an app from scratch using a folder, a contents.plist, and the files provided.
starfiretbt
Mac Mechanic
Posts: 161
Joined: Fri Jun 06, 2014 8:33 pm

Re: Trouble with Qemu Guide

Post by starfiretbt »

OK, so what I'm hearing is create more drives like in basilisk and sheepshaver, so I went through the process in the guide where I navigated to the qemu folder and enterted "qemu-img.exe create -f raw -o size=4g Games1.qcow2" and edited my qemu.bat from

qemu-system-ppc-screamer.exe ^
-L pc-bios ^
-M mac99,via=pmu ^
-m 512 ^
-display sdl ^
-boot c ^
-drive file=MacOS9.2.qcow2,format=qcow2,media=disk ^
-device sungem,netdev=network01 -netdev user,id=network01,hostfwd=tcp::2121-:21
to
qemu-system-ppc-screamer.exe ^
-L pc-bios ^
-M mac99,via=pmu ^
-m 512 ^
-display sdl ^
-boot c ^
-drive file=MacOS9.2.qcow2,format=qcow2,media=disk ^
-drive file=Games1.qcow2,format=raw,media=disk ^
-device sungem,netdev=network01 -netdev user,id=network01,hostfwd=tcp::2121-:21

But I'm not seeing the extra drive. I first tried creating a file just called games1 but that didn't work, neither did games1.img so I have a
Games1
Games1.img
Games1.qcow2

I'm assuming my .bat file isn't written correctly
User avatar
adespoton
Forum All-Star
Posts: 4275
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Trouble with Qemu Guide

Post by adespoton »

starfiretbt wrote: Fri Feb 23, 2024 12:31 am OK, so what I'm hearing is create more drives like in basilisk and sheepshaver, so I went through the process in the guide where I navigated to the qemu folder and enterted "qemu-img.exe create -f raw -o size=4g Games1.qcow2" and edited my qemu.bat from

qemu-system-ppc-screamer.exe ^
-L pc-bios ^
-M mac99,via=pmu ^
-m 512 ^
-display sdl ^
-boot c ^
-drive file=MacOS9.2.qcow2,format=qcow2,media=disk ^
-device sungem,netdev=network01 -netdev user,id=network01,hostfwd=tcp::2121-:21
to
qemu-system-ppc-screamer.exe ^
-L pc-bios ^
-M mac99,via=pmu ^
-m 512 ^
-display sdl ^
-boot c ^
-drive file=MacOS9.2.qcow2,format=qcow2,media=disk ^
-drive file=Games1.qcow2,format=raw,media=disk ^
-device sungem,netdev=network01 -netdev user,id=network01,hostfwd=tcp::2121-:21

But I'm not seeing the extra drive. I first tried creating a file just called games1 but that didn't work, neither did games1.img so I have a
Games1
Games1.img
Games1.qcow2

I'm assuming my .bat file isn't written correctly
You've done the first step -- creating a new volume. Now you have to format a partition on that volume, which is something you can do using Disk Tool inside OS 9. Once you've partitioned your virtual HD, THEN you'll have something that will show up in the FInder.
starfiretbt
Mac Mechanic
Posts: 161
Joined: Fri Jun 06, 2014 8:33 pm

Re: Trouble with Qemu Guide

Post by starfiretbt »

Oh I was hoping I could just plug another volume into qemu like I do with sheepshaver and basilisk and not worry about partitions. I thought you were talking about merging two volumes into one. Can't I just plug a blank volume in and have two drives?

EDIT: sorry I got ahead of myself, I didn't read your comment close enough. You did say it will show up as two drives.
starfiretbt
Mac Mechanic
Posts: 161
Joined: Fri Jun 06, 2014 8:33 pm

Re: Trouble with Qemu Guide

Post by starfiretbt »

Oh now I see why I couldn't find my comments, they were in the wrong post. Sorry everybody. Is there a way to move comments?
User avatar
adespoton
Forum All-Star
Posts: 4275
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Trouble with Qemu Guide

Post by adespoton »

starfiretbt wrote: Fri Feb 23, 2024 12:40 am Oh I was hoping I could just plug another volume into qemu like I do with sheepshaver and basilisk and not worry about partitions. I thought you were talking about merging two volumes into one. Can't I just plug a blank volume in and have two drives?

EDIT: sorry I got ahead of myself, I didn't read your comment close enough. You did say it will show up as two drives.
SheepShaver and BII create floppy disk images. These present themselves to the guest OS as a huge floppy disk with a single HFS+ partition. On a Mac, when a blank floppy is inserted, the Finder will ask if you want to format it, then will do so and mount the partition.

QEMU emulates the entire hardware chain, so when you add a volume to the command line, it's like plugging a hard drive into a computer. When you boot a Mac with a blank HD in it, it doesn't show up in the Finder: you need to run Disk Tools (or HD SC Setup for older OS versions) and use the partition manager to partition and format the disk. After that, any created HFS(+) partitions will automatically mount in the Finder. The plus side is that this method also creates the driver partition and a few others, such that unusual hardware configurations can still interact with the OS. This also means that with QEMU, when you run the OS 9 installer, you can install the drivers (which it tries to do by default), and they'll actually install and be usable! Try that with SheepShaver and the emulator will lock up/crash.
Post Reply