Is it possible to run OS 9.1/9.2 under MOL(inside QEMU)

Anything about Mac emulation that does not belong in the above categories.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
kikyoulinux
Tinkerer
Posts: 92
Joined: Sun Sep 28, 2014 11:53 am

Is it possible to run OS 9.1/9.2 under MOL(inside QEMU)

Post by kikyoulinux »

Hi,
I read some documents about MOL, it supports both new world and old world ROM. So I wonder whether I could run Mac OS 9.1/9.2 under MOL inside QEMU or not though it could be very slow...
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Is it possible to run OS 9.1/9.2 under MOL(inside QEMU)

Post by adespoton »

The short answer is no.

MOL requires the source hardware to have the same bits that should qemu add support, it would be able to boot 9.1/9.2/XBeta/10.0 all by itself, without requiring MOL.

In the 2011 Summer of Code, there was start on work to migrate the MOL code directly into qemu. What *hasn't* happened is adding the PMMU emulation and associated hardware emulation required to run these OSes.

On the plus side, I just picked up two G4 Minis for free -- unfortunately, they're too new to run 10Beta-10.0 or boot 9.1/9.2, but they happily run 9.1/9.2 under Classic in 10.4.11.

If someone's got some hardware that will boot 9.2, PLEASE let us know, as it could be used to document the missing pieces required for proper emulation.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Is it possible to run OS 9.1/9.2 under MOL(inside QEMU)

Post by mabam »

I have an iMac G3 333 Mhz which I use for my son to listen to radio plays. It can run 8.5 to 10.3.9.

But how is it accomplished to document the missing pieces? I mean, I doubt I would be able to do it and I don't want to give away the iMac.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Is it possible to run OS 9.1/9.2 under MOL(inside QEMU)

Post by adespoton »

I think the main thing we need to do is fire up an emulator of choice, and see where it dies. Then load macsbug into your Mac, set a breakpoint for that location, and step through what's supposed to happen next. Sure, this gives us simulation, not emulation, but this route will eventually give us enough to get things functioning reasonably well.

But yeah; it'd have to be you (or your son) setting the breakpoints and tracing the calls, documenting it all, and uploading it somewhere for implementation.

[edit] one tricky bit is that if emulation dies before the debugger handlers are initiated, we'd have to move to "plan b" which is setting the G3 in guest debug mode and monitoring it from a remote host. Still doable, but that'd take even more effort on your part.

I'd be wishing that I never sold my iMac G3/400 DV SE (Slot Loading), except that there's no way I'd want that clunky thing sitting around today taking up space (and not working properly, as I seem to recall the eject motor was on its last legs when I sold it). Interesting to think that in 15 years, we've moved from 400MHz to 4GHz. And 15 years prior, it was 4MHz on the original Mac :) Also, went from 128kb RAM to 128 MB RAM to 16GB RAM. That's 4GB over the curve! :)
kikyoulinux
Tinkerer
Posts: 92
Joined: Sun Sep 28, 2014 11:53 am

Re: Is it possible to run OS 9.1/9.2 under MOL(inside QEMU)

Post by kikyoulinux »

"Full PowerPC 32 bit emulation, including privileged instructions, FPU and MMU." as it said on QEMU 2.2 docs.
Doc: http://qemu.weilnetz.de/qemu-tech.html# ... femulation
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Is it possible to run OS 9.1/9.2 under MOL(inside QEMU)

Post by adespoton »

So, we've got our target emulator (Qemu 2.2) and our debug system :) Let's see if we can get 9.2 to launch! The other bit is making sure that OpenBIOS as used iwth Qemu 2.2 can handle what 9.2 expects -- that should be trivial once we know exactly what that is :)
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Is it possible to run OS 9.1/9.2 under MOL(inside QEMU)

Post by adespoton »

Guess what I just found?
http://wiki.qemu.org/Google_Summer_of_C ... _9_in_QEMU
I think the link says it all:
One of the topics up for grabs (under "advanced") in this year's Summer of Code is implementing Mac OS 9 support... and two of the linked resources are the stuff we've written on here :)
kikyoulinux
Tinkerer
Posts: 92
Joined: Sun Sep 28, 2014 11:53 am

Re: Is it possible to run OS 9.1/9.2 under MOL(inside QEMU)

Post by kikyoulinux »

Good news! May it come true.
MOL packages are not available for Debian 6&7... And as I tried on Debian 7.8(inside QEMU 2.2) yesterday, MOL 0.9.72.1 failed to build coz there's something wrong with zlib headers (maybe these were too new)...
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Is it possible to run OS 9.1/9.2 under MOL(inside QEMU)

Post by Cat_7 »

Some weeks ago I discussed Qemu's failure to run OS 9 inside OSX with the project's mentor.
Sadly nothing came from that, as even though I ran Qemu in debugging mode and monitored OS 9 startup in OS X, I could not gather any useful information ;-)
Funny he didn't link to their archives regarding the previous attempt.

Lets see whether the project is taken up and not hindered by the limitations in Openbios. Running OS 9 directly under Qemu using its hardware emulation features might prove to be more productive compared to running it inside OS X, as that would make OS 9 features dependent on the emulated hardware for OS X. Thinking about sound and networking here, which are (to my knowledge) not available in OS X on Qemu.

Best,
Cat_7
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Is it possible to run OS 9.1/9.2 under MOL(inside QEMU)

Post by adespoton »

Cat_7 wrote:Thinking about sound and networking here, which are (to my knowledge) not available in OS X on Qemu.
http://wiki.qemu.org/Google_Summer_of_C ... io_backend
Networking doesn't appear to be on the list, but working on audio shows promise.

That said, shouldn't the audio code from VirtualBox work for qemu? The guest-side code is already in place after all (it currently uses ALSA on the front end, doesn't it?)....
kikyoulinux
Tinkerer
Posts: 92
Joined: Sun Sep 28, 2014 11:53 am

Re: Is it possible to run OS 9.1/9.2 under MOL(inside QEMU)

Post by kikyoulinux »

Real Mackintoshes have their built-in Ethernet and audio adapters. Realtek provides RTL8139 drivers for Mac OS (X) 8.5 - 10.2, however, the audio emulation hasn't been done yet... Perhaps porting SheepShaver's audio emulation code is one way...
kikyoulinux
Tinkerer
Posts: 92
Joined: Sun Sep 28, 2014 11:53 am

Re: Is it possible to run OS 9.1/9.2 under MOL(inside QEMU)

Post by kikyoulinux »

Finally I didn't get MOL run on Debian 7... I tried to compile both stable release and latest SVN version but all failed. MOL packages for Debian 5 could be (forced) installed but wouldn't work.

I also tried Mac-On-Mac under QEMU-emulated Mac OS X 10.3. As I imagined, only the GUI would work.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Is it possible to run OS 9.1/9.2 under MOL(inside QEMU)

Post by adespoton »

I guess you missed the thread where I already reported these results (I also attemted MOL via Arch on qemu). The work needs to be done at the qemu level, and appears to be prepped for this year's Google Summer of Code (as mentioned in another thread). MOL just passes stuff through to the host, and a compatible host isn't emulated yet.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Is it possible to run OS 9.1/9.2 under MOL(inside QEMU)

Post by adespoton »

Finally a moot point; 9.1 and 9.2 (and both in Classic mode on 10.2-10.4) now run in qemu-ppc 2.7! rc0 is out, final version to be released on August 16.
Post Reply