Qemu package and guide for Windows available

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
ruthan
Tinkerer
Posts: 72
Joined: Mon Oct 31, 2016 11:56 pm
Location: Prague or space village in woods near of it

Re: Qemu package and guide for Windows available

Post by ruthan »

adespoton wrote:Running software in Classic under 10.4 is noticeably slower than booting into 9.2 directly, both on hardware and via QEMU.
Thanks, i never know that is even possible install old Mac OS 9.x in native mode on newer Mac with G5, i through that it is reason for Classic OS mod, that it some compatibility layers.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Qemu package and guide for Windows available

Post by adespoton »

The comment was for QEMU, not for the G5. G5s can't run OS 9 natively. I do, however, have a G4 Mini that runs it natively with the custom MacOS9 Lives! release. I see the same behaviour there.
User avatar
ruthan
Tinkerer
Posts: 72
Joined: Mon Oct 31, 2016 11:56 pm
Location: Prague or space village in woods near of it

Re: Qemu package and guide for Windows available

Post by ruthan »

I wonder old release where using -G3 / G4 parameters, i checked new command line is no more here.. and in QEMU manual is that G3 /G4 is emulated..
For real or emulated usage so there any other difference between them other that CPU speed and maybe max memory?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for Windows available

Post by Cat_7 »

The G4 adds altivec emulation, so has vector algorithmic in hardware. The emulation in Qemu is also faster.

Best,
Cat_7
User avatar
ruthan
Tinkerer
Posts: 72
Joined: Mon Oct 31, 2016 11:56 pm
Location: Prague or space village in woods near of it

Re: Qemu package and guide for Windows available

Post by ruthan »

Windows tutorial is for 9.2 there some changes what should be done for 10.x? What is max save memory settings?

I tried to experiment with other raw disc images and 10.4, but i had problem that disk utility didnt see any other that raw images.. i have to boot other installed disk image and use Disk utility for side loaded empty image.. after that i was able, to see this disks (VDI growable), installer completed fine, but i this got kernel panic during boot, with raw images its working fine (only disk suffers, especially with multiple machines, backups etc..).

I also wonder, in tutorials you are using:
-drive "file= ... syntax, what is difference between this and -hda imagename syntax?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for Windows available

Post by Cat_7 »

I don't know the max memory setting for OSX guests, but it must be 2048 or above, as I just tested that. Ah, it will not boot with 4096.

Qemu's qcow2 format is a sparse format, I always use that.

For the -drive and -hda syntax: using -hda (b,c,d) already sets some parameters you can manually set with -drive.
-hda already sets media=disk. And I guess it reads the format from the image. However, when using e.g., .img it will warn you to set the format. Which I believe you cannot do with -hda. Same for -cdrom which already sets media=cdrom.

For detailed info see the qemu manual:
https://qemu.weilnetz.de/doc/qemu-doc.h ... ce-options
https://www.qemu.org/docs/master/system ... ivers.html

Best,
Cat_7
User avatar
ruthan
Tinkerer
Posts: 72
Joined: Mon Oct 31, 2016 11:56 pm
Location: Prague or space village in woods near of it

Re: Qemu package and guide for Windows available

Post by ruthan »

I have question about PPC Mac partitions resize, i can resize disk with qemu-img resize, but still need to resize MacOS partition, because in only resized whole disk image.
How to that? I prefer it without data lost - Disk utility seems to only delete original partition.. and use its image way, means new disk and lots of time.

What is biggest test working HDD PPC image? I tried 100GB one, but i wasnt able to boot.. not bootable disk found, install was fine.
User avatar
ruthan
Tinkerer
Posts: 72
Joined: Mon Oct 31, 2016 11:56 pm
Location: Prague or space village in woods near of it

Re: Qemu package and guide for Windows available

Post by ruthan »

2 more question;

1) i have problem with TAP bridge when i active im getting freeze blue screen and moving mouse cursor during boot, when i change line to user (slirp) networking boot is fine. I dont thing that my TAP networking is broken, because its working with standard QEMU 4.2 for Windows package, at least for QEMU Dos machine, where mTCP networking is working fine. In all instances im emulation Realtek 8139 card.. and using 10.4 (G4 /G3 install) + QEMU 4.2 + screamer, but same problem is even with ancient QEMU 2.6 build, which i still have on my PC.

-net nic,model=rtl8139 -net user SLiRP is working fine, so not ping, but Windows shares access is working
-net nic,model=rtl8139 -net tap,ifname=TAP // Blue destkop Freeze, NIC working with 4.2 QEMU DOs machine

2) I have some old images one installed with -G3 a second with -G4 parameter, is there really difference, make sense to keep both? In old tutorials these parameters were present, i new one at least for 9.2 is arent..
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for Windows available

Post by Cat_7 »

I have question about PPC Mac partitions resize, i can resize disk with qemu-img resize, but still need to resize MacOS partition, because in only resized whole disk image.
How to that? I prefer it without data lost - Disk utility seems to only delete original partition.. and use its image way, means new disk and lots of time.

What is biggest test working HDD PPC image? I tried 100GB one, but i wasnt able to boot.. not bootable disk found, install was fine.
Sorry, no idea on both questions.
2 more question;

1) i have problem with TAP bridge when i active im getting freeze blue screen and moving mouse cursor during boot, when i change line to user (slirp) networking boot is fine. I dont thing that my TAP networking is broken, because its working with standard QEMU 4.2 for Windows package, at least for QEMU Dos machine, where mTCP networking is working fine. In all instances im emulation Realtek 8139 card.. and using 10.4 (G4 /G3 install) + QEMU 4.2 + screamer, but same problem is even with ancient QEMU 2.6 build, which i still have on my PC.

-net nic,model=rtl8139 -net user SLiRP is working fine, so not ping, but Windows shares access is working
-net nic,model=rtl8139 -net tap,ifname=TAP // Blue destkop Freeze, NIC working with 4.2 QEMU DOs machine

2) I have some old images one installed with -G3 a second with -G4 parameter, is there really difference, make sense to keep both? In old tutorials these parameters were present, i new one at least for 9.2 is arent..
EDIT:
1. I just tested this setup in Windows. It works. For newer qemu builds it is advisable to use the sungem nic, for which all Mac OS/OSX have a driver available by default. If you specify nothing on the command line, qemu will use -net user -net nic,model=sungem

To use tap, use something like this on the command line: -netdev tap,ifname=Tap0,id=network01 -device sungem,netdev=network01

2. Setting the cpu to G3 is relevant for booting certain Mac OSX betas and and perhaps also for 10.0/10.1. The G4 is the default, so if you set nothing it will use that. I don't know whether setting the cpu to G3 during installation actually changes anything in what is installed.

Best,
Cat_7
User avatar
ruthan
Tinkerer
Posts: 72
Joined: Mon Oct 31, 2016 11:56 pm
Location: Prague or space village in woods near of it

Re: Qemu package and guide for Windows available

Post by ruthan »

Thanks very much for info..
I will try net network setting, i never used -netdev.. I would be really nice, if you can enhance windows tutorial about this new info and about change which are needed for 10.x because tutorial is for 9.x and i think that im not alone, who is not sure, what it means for 10.x
Info how to install Classic OS on 10.x would be great too.

I managed to use qcow growable images.. i found out, that problem with them, is that installer not see them out box as raw image.. and you have use disk utility before install.
I also tried lots of conversion with vdi, vhd, vhdx, vmdk disk images.. i hope that i would be able to edit image and add data from windows, by This computer vhd mount or by Winimage or Poweriso or other tools, but im used to edit virtual machine images (for quicker data import).. same with Vmware vmdk mount.. but it seems that Apple partition table is blocker.
I know that on Linux you can mount at least some of them like some device, but on Windows its problem.

BTW disk utility has some MS-DOS parition mode, does such disk working as non system disk in MacOS too? If yes, would able to use for quick data import as games volume.

About G3 i was failing for my old QEMU 2.6 install, i was getting some I/O error during disk utility setup, but with 4.2 its fine. G4 install worked fine in both version.
User avatar
ruthan
Tinkerer
Posts: 72
Joined: Mon Oct 31, 2016 11:56 pm
Location: Prague or space village in woods near of it

Re: Qemu package and guide for Windows available

Post by ruthan »

One more question, what about PPC MAC QEMu Linux experience?
Tried someone pass through of some supported (form original G3/4 Macs) videocard? QEMU KVM has such feature, but i dunno if for PPC mac too..
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for Windows available

Post by Cat_7 »

Hi,

I'm not sure I understand the question. Are you referring to running Qemu on a PPC Mac? Or running Qemu on Linux Intel and passing through a real mac video card? The problem with passing through a video card is that the rom on the card needs to be read and executed by the openbios implementation.

There are patches that allow execution of the rom in Openbios, but they are not in the current Openbios.
The emulation of a card (the Ati Rage Pro 128) is limited, no 3d acceleration is available. We have an experimental build available for Windows and OSX here:
(OSX) https://www.emaculation.com/forum/viewt ... 102#p52102
(Windows) https://www.emaculation.com/forum/viewt ... =34&t=9028

Passing through a real card has been attempted, but failed as far as I know.

Best,
Cat_7
User avatar
ruthan
Tinkerer
Posts: 72
Joined: Mon Oct 31, 2016 11:56 pm
Location: Prague or space village in woods near of it

Re: Qemu package and guide for Windows available

Post by ruthan »

I meant QEMU under on real Linux machine, because if im not wrong, only Linux KVM is supporting pass through of some card to QEMU running machine..

I really dont know how PPC Qemu +openbios are working together.. but with KVM and Windows or Linux QEMU machines you can do that and use real card, to fix lack of feature of emulated card.. like 3D API acceleration.

If im not wrong, PPC mac used just PC videocard some ATI Rage / Radeons or Nvidia Geforces. I dunno if these card had some generic PC bios, or some special for MAC.. if there is special bios - could try some videocard from real MAC and place in in PC and hope that it would at least detected.. Or you maybe only need use generic PC card and flash Apple special bios to it.

Other problem would be that at least G5, has AGP card.. and new PC MB boards has not AGP slots.. G4 - ATI RAGE 128 Pro AGP too, im not sure there was some models with PCI ones. Which you still can get.. i saw some Z170 chipset and even Z370 Mbs with PCI slot. I dunno where some Power Mac able to use some PCI videocards?

Update:
Regarding of wikipedia G4 had PCI ATI 128 variant:
https://en.wikipedia.org/wiki/Power_Mac_G4
G3 ATI 3D Rage II seem to be PCI too..
https://en.wikipedia.org/wiki/Power_Macintosh_G3
G5 - seems to be AGP only, but if im not working, we cant emulate G5 so far.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Qemu package and guide for Windows available

Post by adespoton »

For KVM+QEMU, you're using the KVM virtualization layer and only using QEMU as the interface and to provide emulated devices to the virtual machine. To do something equivalent, you'd need to be running KVM on a PowerPC machine running QEMU-PPC in virtualization mode instead of using emulation.

Once you throw device emulation into the mix (PPC on Intel or ARM), you need to emulate ALL the hardware you're presenting, as the emulator is in control of the devices, not the host hardware's virtual machine management system.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for Windows available

Post by Cat_7 »

Add to that that qemu-system-ppc (being 32bit) will not run flawless under kvm on a powerpc machine. Qemu-system-ppc64 might, but then that will not run Mac OS.

This has been tested in the past.

Best,
Cat_7
User avatar
ruthan
Tinkerer
Posts: 72
Joined: Mon Oct 31, 2016 11:56 pm
Location: Prague or space village in woods near of it

Re: Qemu package and guide for Windows available

Post by ruthan »

@adespoton Thanks for explanation.. i lived notion that QEMU already provide (emulated) all that emulated PPC HW.. and that for pass through you dont need use same architecture on hosting OS. If is PPC needed, such thing can do maybe few people with expensive Raptor Power machine.

Partition resize (its working):
Otherwise i solved that partition resizing, so enjoy my new growable disc images, before i converted it to dynamic size, i kept them small.
Solution is iPartition, if you can believe Macintosh garden it was given free to community by its developers, because original company is gone.

There is classic problem, you cannot resize system partition on the fly. iPartition can possiblity to create boot cd to make from it.. but when i tried it - i end up that im not able to burn cd with QEMU. It would need insert some emulated black cd and pass through datat to disc iso file, or pass through whole cd driver on windows.
Or someone on real Mac can just create real cd and make iso of it and share it.

So i used second best approach.. I added target disc as second to other machine.. At first look i was disappointed, there was on any new dialog to show that is not read only.. but later i found out that there is small element in pie graphs which enable to resize it with help of Go icon.
So i resized disk with qemu resize command i.e:
qemu-img resize "D:\Games\!Emulators\Macintosh - PowerPC - QEMU 42\HDDs\System10-4-G4-Alls-Installed-Growable.qcow2" +20G This add 20G to existing image.
Booted again and i was disappointed again, because i saw that disk is now bigger, but partition graph for resize is still orginal.. but finnaly i have found option - Partition map - expand partition map, i never heard about such stuff.. but it updated graph to see whole disc space and after that i could finally resize partition to full disk size, without data lost and its still booting!

Some picture, it seems taht dropbox picture links in img tags are not working:
https://www.dropbox.com/s/6jc8dqi344sqt ... 2.png?dl=0
https://www.dropbox.com/s/fpz91tz99b3pm ... 4.png?dl=0
https://www.dropbox.com/s/x5z2l4trdcxpe ... 5.png?dl=0

I only wonder its possible to do with qcow2 images something like compact in vmware to shirt them after some wild operation, to clean free space? Because by this operation, my image i thing grow from 6g to 10g, what is still better than real emulated 30G size, but compact usually fix this and shrink disk to real data size.. and empty space has almost zeroes size.

G3/G4 qemu flag effect:
I also tried to boot G3 and G4 install with G4 amd G3 flag and it booted fine, i did not some big testing, but it seems that data are working fine with both. I checked that G3 / G4 is stet up correctly in about Mac screen.
Last edited by ruthan on Wed Feb 26, 2020 1:58 am, edited 1 time in total.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Qemu package and guide for Windows available

Post by adespoton »

Ah; one other thing you need to watch out for: growable qcow2 is one-way: in order to shrink an image, you first have to zero out the unused space on the disk image, and THEN use qemu-img to duplicate (or shrink, but duplication is faster) the image, shrinking the file back down to actually used space. Zeroing the space can be done under PPC OS X from Terminal via diskutil. Under OS 9, you'll likely need to copy a file full of binary 0's onto the image... or just create a new image and copy all the contents over to it, as there's no special metadata you need to preserve.
User avatar
ruthan
Tinkerer
Posts: 72
Joined: Mon Oct 31, 2016 11:56 pm
Location: Prague or space village in woods near of it

Re: Qemu package and guide for Windows available

Post by ruthan »

adespoton wrote: Zeroing the space can be done under PPC OS X from Terminal via diskutil.
Do you know exact command?

For Win and Linux is found this:
https://www.jamescoyle.net/how-to/323-r ... qcow2-vmdk

Otherwise even without zeroeing clean.. i tried qemu-img convert command which seems to be meant to do it.. and i saved only 200 MB.
qemu-img convert -O qcow2 HDD-System10-4-G4.qcow2 HDD-System10-4-G4-Compacted.qcow2 -p
-p is just for report the progress
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Qemu package and guide for Windows available

Post by adespoton »

Code: Select all

diskutil secureErase freespace 0 /path/to/disk
clarusthedogcow
Space Cadet
Posts: 3
Joined: Wed Mar 18, 2020 11:23 pm

Re: Qemu package and guide for Windows available

Post by clarusthedogcow »

Hello. Please forgive my ignorance here, I've never used qemu and I'm having trouble starting it. I've tried two different computers, both with Windows 7. Following the instructions, I've downloaded the latest experimental screamer build dated Feb 10 2020. I have also tried builds 4.0 and 4.1. I have created my blank disk image with qemu-img.exe (which was not in the download, but I found it in older versions). I have edited my batch file to include my MacOS 9.2.2 install ISO:

Code: Select all

qemu-system-ppc.exe -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=macos-922-uni.iso,format=raw,media=cdrom ^
-drive file=MacOS9.2.img,format=raw,media=disk ^
-sdl ^
-netdev user,id=network01 -device sungem,netdev=network01 ^
-device VGA,edid=on
When I run the batch file, the start command with the options is echoed in a terminal window that pops up, and then I get a dialog that says "The procedure entry point ScriptIsComplex could not be located in the dynamic link library GDI32.dll"

I have downloaded various 64-bit flavors of GDI32.dll and placed them in qemu's folder, but it still won't start.

Searching for combinations of qemu and that error or gdi32 did not reveal any useful hits.

Thank you for any help.
User avatar
ruthan
Tinkerer
Posts: 72
Joined: Mon Oct 31, 2016 11:56 pm
Location: Prague or space village in woods near of it

Re: Qemu package and guide for Windows available

Post by ruthan »

I checked by scripts, i try to remove sdl parameterm maybe it helps.
clarusthedogcow
Space Cadet
Posts: 3
Joined: Wed Mar 18, 2020 11:23 pm

Re: Qemu package and guide for Windows available

Post by clarusthedogcow »

Removing the -sdl option did not work. Same error.
User avatar
ruthan
Tinkerer
Posts: 72
Joined: Mon Oct 31, 2016 11:56 pm
Location: Prague or space village in woods near of it

Re: Qemu package and guide for Windows available

Post by ruthan »

OK just try to run qemu-system-ppc.exe vanilla without parameters, if it report this error too, if not add parameters one by one to find which is generating this error.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Qemu package and guide for Windows available

Post by Cat_7 »

Hi,

Yes, I see this error too in a windows 7 virtual machine. No real idea what causes it. But if I had to guess, it has something to do with the dll's included in the compiler on Fedora Linux I use to build those executables.

Non-experimental builds do run (but only without -sdl)

Best,
Cat_7
clarusthedogcow
Space Cadet
Posts: 3
Joined: Wed Mar 18, 2020 11:23 pm

Re: Qemu package and guide for Windows available

Post by clarusthedogcow »

Thank you for the help but it's doesn't work. I get the error even with no parameters in the bat file.

I've tried other builds and different boot iso's too.

Either I get the GDI32 error or I just get a blank cmd32 window that never goes away.
Post Reply