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

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 »

gtxaspec wrote:mac99 or beige g3? could yo post command line arguments?
I installed Mac OS 10.2 in the g3beige target. It was a while ago since I last installed it. I think the command line arguments were something like this:

qemu-system-ppc -cdrom /dev/cdrom -hdc <image file path> -boot d -m 400

Note: I used a patch that allowed QEMU to directly read from a real installation CD rather than an iso file. That patch is currently in line to be reviewed by the QEMU block maintainer. An iso file should work just fine if you can't use the real installation medium.
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 »

WOW! beigeg3, I wonder how long ago this was fixed (in beigeg3), since according to reports it never worked before.

How neat.

I wonder how far away we are in OpenBIOS and QEMU from booting MacOS 9.x straight to beigeg3 target.
User avatar
Cat_7
Expert User
Posts: 6172
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 »

I upgraded my 10.2/9.1 disk image to 10.3 using Qemu. rtl8139 now works, and I can use the network from classic. The 9.1 Chooser allows to connect to shared disks, etc. Appletalk will of course not work over the slirp connection. Currently looking into tap/other networking options.

btw: this is with mac99/G3 target. I didn't try with g3beige and or G4.

Best,
Cat_7
User avatar
Cat_7
Expert User
Posts: 6172
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,

For decent/speedier/appletalk network access, you can use the tun/tap drivers from here: http://tuntaposx.sourceforge.net/download.xhtml

then in the qemu command line add:
-netdev tap,id=network0,script=no -device rtl8139,netdev=network0
and run qemu with sudo.

This brings up the tap device.

Then bridge the tap device with your enX network device in OSX:
sudo ifconfig bridge0 create
sudo ifconfig bridge0 addm en0
sudo ifconfig bridge0 up
sudo ifconfig bridge0 addm tap0

I can now connect to servers over appletalk, afp, etc.

Best,
Cat_7
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

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

Post by mabam »

Does DDP-based (non-IP) AppleTalk work? 'Cause then I'll try to image the 10.3.9 installation on my bondi blue iMac G3 333 MHz and try to set up QEMU.

That is, once I'm fully settled here. After moving I haven't installed the old iMac yet.

Edit: Whether DDP-based AppleTalk works can be tested by connecting to, e.g., Basilisk II running Mac OS 7.5.x or lower, as those versions didn't include IP-support.
User avatar
Cat_7
Expert User
Posts: 6172
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 »

@mabam

You mean with classic networking in 7.5, not with Open Transport?
If so, please advise how to configure networking for a network with router/dhcp server at 192.168.0.1

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

gtxaspec wrote:WOW! beigeg3, I wonder how long ago this was fixed (in beigeg3), since according to reports it never worked before.

How neat.

I wonder how far away we are in OpenBIOS and QEMU from booting MacOS 9.x straight to beigeg3 target.
In my experience the g3beige target was the working one and the mac99 target was the broken one. Things have changed in the last year to make the mac99 target actually usable.

I have thought about using Mac OS 9 in the g3beige target. The thing that is going to repel most developers from making this work is the fact QEMU would have to use the ROM from a real Macintosh. That is what most Macintosh emulators actually do. I have a feeling most QEMU maintainers would not allow that to happen since the Macintosh ROM is intellectual property of Apple.
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 »

Cat_7 wrote:I upgraded my 10.2/9.1 disk image to 10.3 using Qemu. rtl8139 now works, and I can use the network from classic. The 9.1 Chooser allows to connect to shared disks, etc. Appletalk will of course not work over the slirp connection. Currently looking into tap/other networking options.

btw: this is with mac99/G3 target. I didn't try with g3beige and or G4.

Best,
Cat_7
That would be neat if you could post a picture of Classilla running in QEMU. :) It would be a huge boost in moral to some of the people here.
User avatar
Cat_7
Expert User
Posts: 6172
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 »

Don't feed the fossil ;-)

Image
User avatar
adespoton
Forum All-Star
Posts: 4276
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 »

We need to get an image with something "classic" running in Classic as well :D Cairo Shootout?
User avatar
Cat_7
Expert User
Posts: 6172
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 »

Let me first upload the disk image that makes this possible. Then you can make your own ;-)

A disk image (containing two partitions, OSX 10.3/Mac OS 9.1) is available: http://www.open.ou.nl/hsp/downloads3/Qe ... lassic.zip
The zip is 4 Gb in size but the disk image will expand to ~20Gb.

Also contained: the qemu-system-ppc and openbios binary I used.
To enable networking, I used the tuntaposx drivers ( http://tuntaposx.sourceforge.net/download.xhtml )

This is the corresponding command file:

cd "$(dirname "$0")"
sudo ./qemu-system-ppc -bios ./openbios-qemu-hsp-modem.elf -L pc-bios -boot c -M mac99 -cpu G3 -m 256 -g 1024x768x32 -prom-env 'auto-boot?=false' -netdev tap,id=network0,script=no,downscript=no -device rtl8139,netdev=network0 -prom-env 'boot-args=-v' -drive file=./testimage10.3.dmg,format=raw,media=disk,index=0
sudo ifconfig bridge0 create
sudo ifconfig bridge0 addm en0
sudo ifconfig bridge0 addm tap0
sudo ifconfig bridge0 up

Username and password in OSX are both: "hsp" (no quotes)

Anyone knows how to attempt booting from the OS9 partition on the disk image?

I do not remember which patches I applied to both the qemu program and bios ;-)

Best,
Cat_7
Last edited by Cat_7 on Thu Feb 11, 2016 8:09 pm, edited 1 time in total.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

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

Post by mabam »

Cat_7 wrote:You mean with classic networking in 7.5, not with Open Transport?
If so, please advise how to configure networking for a network with router/dhcp server at 192.168.0.1
IIRC back in classic days the steps to enable AppleTalk via OT (so with TCP/IP) included the required steps for AppleTalk via DDP. So there should be no additional settings required in Mac OS in Classic mode on OS X 10.3 in QEMU.

In the control panel "AppleTalk" you would choose "Ethernet" and in the "Chooser" you would click the radio button "activate" in the bottom right corner next to where it says "AppleTalk".

The same goes for OS X 10.3. The settings to enable AppleTalk in general will automatically enable AppleTalk via DDP.

Whenever you connect to a machine on the network that is not capable of TCP/IP the system would automatically use DDP to establish the connection.
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 »

Thanks for the info, but the only sound card that QEMU emulates and that works with the Mac OS is the usb-audio card. By work I mean makes some kind of sound when activated. It is a long ways off from sounding good when used with the Mac OS.

Mac OS 10.2 does appear to have AC97 drivers, but the emulated AC97 sound card in QEMU does not appear to be compatible.
User avatar
Cat_7
Expert User
Posts: 6172
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 »

Whenever you connect to a machine on the network that is not capable of TCP/IP the system would automatically use DDP to establish the connection.
I have Basilisk running 753 with no networking configured (only appletalk enabled in the chooser), I see the appletalk file server from OSX 10.3 in the chooser.
But I get a message that the file server uses an incompatible version of the AFP protocol.

The other way around, however, I can connect to the 753 machine from the 9.1 chooser in classic running in OSX 10.3.

Please note that this is with the Basilisk version supporting Appletalk through bridging a tap connection. I added the tap device brought up by Basilisk to the bridge already running from starting Qemu with a tap device and bridge to my default network connection. So I have one bridge running, which bridges en0, tap0 and tap1.

Best,
Cat_7
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

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

Post by mabam »

That sounds great, thanks for testing!

According to this chart 7.5.3 uses AFP versions 1.1, 2.0, and 2.1 while 10.3 uses 2.2, 3.0, and 3.1. That's why only 10.3 can connect to 7.5.3 and not the other way around. There may be hick-ups, however.

Here at home I have an old NAT (running Netatalk for AppleTalk via TCP) providing iTunes on Mountain Lion with MP3 files for playing. But only after I have first clicked on the network volume provided by the NAT in Finder, iTunes is able to find the MP3's and play them. Same thing: Different AFP versions causing hick-ups.
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 »

Currently there are no videos on YouTube showing off Mac OS 9 running in QEMU. It would be neat if someone with some video editing skills and a catchy techno sound track filled that void....
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 tried to do that, but I used the Windows version of QEMU. I'm on a 64-bit Windows setup and I've yet to get the debugging stuff properly working. For one thing, the command line prompt in QEMU is permanently at 640*400, with no way of me being able to expand that in any way. I tried PuTTy, but it was frustrating. I tried to boot up to the desktop with no success. I almost got to the desktop with some of the OpenBIOS files created by other people, only to have QEMU crap out on me at the last moment possible.

I did record some footage, but it's unusable for anything except for showing off bugs. Even then, the footage doesn't contain any debugging stuff, so it wouldn't be very helpful. I also need to update my OpenBIOS file for the PPC side of things, since the one included with QEMU doesn't do anything when trying to boot up Mac OS 9 or X.
User avatar
adespoton
Forum All-Star
Posts: 4276
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 »

Programmingkid wrote:Currently there are no videos on YouTube showing off Mac OS 9 running in QEMU. It would be neat if someone with some video editing skills and a catchy techno sound track filled that void....
I'll get to that eventually; I've been adding videos for every version of Mac OS to apple.wikia.com. A bit busy right now to do one up, but I'll get to it (likely after someone else already has).

My early ones were using Apple audio off the install CDs and Apple ads, but YouTube doesn't seem to like that (I think someone else took the tracks and used them for the base of "professional" audio tracks, and fingerprinted those -- not Apple purchasing rights to existing licensed music).
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:I tried to do that, but I used the Windows version of QEMU. I'm on a 64-bit Windows setup and I've yet to get the debugging stuff properly working. For one thing, the command line prompt in QEMU is permanently at 640*400, with no way of me being able to expand that in any way. I tried PuTTy, but it was frustrating. I tried to boot up to the desktop with no success. I almost got to the desktop with some of the OpenBIOS files created by other people, only to have QEMU crap out on me at the last moment possible.

I did record some footage, but it's unusable for anything except for showing off bugs. Even then, the footage doesn't contain any debugging stuff, so it wouldn't be very helpful. I also need to update my OpenBIOS file for the PPC side of things, since the one included with QEMU doesn't do anything when trying to boot up Mac OS 9 or X.
The command prompt in QEMU is called the monitor. To set it to use your command prompt window add "-monitor stdio" to your command line arguments. Then you will be able to make it as big as you want.

A few years ago I did try to run QEMU on Windows 7. It was just too difficult to complete. There must have been over a dozen dependencies to go thru. I even tried someone's binaries that were offered on a web site but there was no interface to them. I think another piece of software was required connect to the video output of QEMU. I really wish things were better for the Windows people.
User avatar
Cat_7
Expert User
Posts: 6172
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 »

I'll make a new cross-build for windows tomorrow, using the gtk backend.

EDIT: so I did. But it doesn't change the abysmal performance. Only wiggling the mouse the whole time gets a bit of speed into booting and running the desktop ;-(
On the other hand, I found out how to get non-slirp networking going in Windows.
You need to install the OpenVPN tap driver, bridge it with your normal ethernet connection and use the following in the qemu command line:

-net nic,model=rtl8139 -net tap,ifname="Ethernet" (replace "Ethernet" with the name of the tap device network connection)

Best,
Cat_7
Last edited by Cat_7 on Fri Feb 12, 2016 7:28 pm, edited 1 time in total.
Reason:  
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

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

Post by mabam »

Cat_7 wrote:
A disk image (containing two partitions, OSX 10.3/Mac OS 9.1) is available: http://www.open.ou.nl/hsp/downloads3/Qe ... lassic.zip
The zip is 4 Gb in size but the disk image will expand to ~20Gb.

Also contained: the qemu-system-ppc and openbios binary I used.
To enable networking, I used the tuntaposx drivers ( http://tuntaposx.sourceforge.net/download.xhtml )

This is the corresponding command file:

cd "$(dirname "$0")"
sudo ./qemu-system-ppc -bios ./openbios-qemu-hsp-modem.elf -L pc-bios -boot c -M mac99 -cpu G3 -m 256 -g 1024x768x32 -prom-env 'auto-boot?=false' -netdev tap,id=network0,script=no,downscript=no -device rtl8139,netdev=network0 -prom-env 'boot-args=-v' -drive file=./testimage10.3.dmg,format=raw,media=disk,index=0
sudo ifconfig bridge0 create
sudo ifconfig bridge0 addm en0
sudo ifconfig bridge0 addm tap0
sudo ifconfig bridge0 up
Is this supposed to work in Mountain Lion?
User avatar
Cat_7
Expert User
Posts: 6172
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 »

Is this supposed to work in Mountain Lion?
Did you try and found out it didn't ?
Mountain Lion supports bridging, so it should work.

Best,
Cat_7
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

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

Post by mabam »

I suppose I have to add #!/bin/bash at the top of the command file.
"QemuOSX_Classic" is in my downloads folder. And I have placed the command file in "QemuOSX_Classic".

After opening the command file and entering my password I get

Code: Select all

dyld: Library not loaded: /usr/local/opt/pixman/lib/libpixman-1.0.dylib
  Referenced from: /Users/markus/Downloads/QemuOSX_Classic/./qemu-system-ppc
  Reason: image not found
ifconfig: BRDGADD tap0: No such file or directory
logout
tuntaposx is installed and does work when used for SheepShaver.
It looks like I miss a library. How do I install that?
LightBulbFun
Tinkerer
Posts: 50
Joined: Mon Jul 13, 2015 11:32 am

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

Post by LightBulbFun »

Cat_7 wrote:
Anyone knows how to attempt booting from the OS9 partition on the disk image?

I do not remember which patches I applied to both the qemu program and bios ;-)

Best,
Cat_7
Hey still here just keeping tabs heh. I played with your image a bit (thanks for uploading that heh) and got it to kinda boot the OS9 partition you have to type "boot hd:10,\\:tbxi" in OF to boot from the OS9 partition (its the 10th partition on the disk heh)

Image
Post Reply