The Quadra 800 coming to Qemu

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

The Quadra 800 coming to Qemu

Post by Cat_7 »

Just some snippet from the qemu mailing list...

"but this change will be needed to emulate Quadra 800."

Whether that means we will be booting 68K Macs with System 7 in Qemu is not clear to me (yet). Perhaps only Linux at first?

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

Re: The Quadra 800 coming to Qemu

Post by adespoton »

Well, if the Q800 is emulated enough to run NetBSD, all it should need is the Q800 ROM to run Mac OS.
darthnvader
Mac Mechanic
Posts: 178
Joined: Sun Feb 07, 2016 4:40 pm

Re: The Quadra 800 coming to Qemu

Post by darthnvader »

I think Qemu is hesitant to use Rom's due to copyright issues, but then I've been wrong before.

It sure would be nice to have a 68k emulator that could run the Mac OS in Qemu, tho an issue maybe that it runs too fast. That's a real first world issue, right there. :mrgreen:

Ballisk II still runs well for me, tho I haven't used it on my new Ryzen 7 build, so I may run into the issue of it being too fast. My old Chromebook 1.6 Ghz Arm runs it way faster than any 68k Mac I ever had.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: The Quadra 800 coming to Qemu

Post by adespoton »

Qemu wouldn't be providing any ROMs, as that's generally not a good idea -- so the two options are to either manually inject one of your own, or for someone to make a Q800 clean room toolbox implementation.

Seems to me that the clean room implementation might not actually be as difficult as it sounds, if Mac OS 8.1 is used in the testing phase, as most of the toolbox calls will already be overwritten by the OS, minimizing the number needed to be implemented in the ROM bootstrap.

Of course, at that point, it's not really emulating a Q800 anymore.

I wonder if the Executor code could help here... that was open sourced, right?
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: The Quadra 800 coming to Qemu

Post by Programmingkid »

According to its wikipedia entry Executor is open sourced. See https://en.wikipedia.org/wiki/Executor_(software).

It is an interesting idea to use Executor's ROM in QEMU. I won't personally. An authentic ROM would probably be superior to Executor's ROM. Finding them is pretty easy. This page has the motherload of ROMs: https://www.macintoshrepository.org/703 ... s-68k-ppc-
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: The Quadra 800 coming to Qemu

Post by Cat_7 »

@Programmingkid

I saw you asked the developer whether MacOS would run ;-)

And this snippet confirms MacOS booting on 68k is in the making...
"I'm working on booting MacOS...

I think we should also be able to boot NeXTSTEP , but the work of Bryce
Lanham (GSoC 2011) must be rebased on my branch and cleaned up."
darthnvader
Mac Mechanic
Posts: 178
Joined: Sun Feb 07, 2016 4:40 pm

Re: The Quadra 800 coming to Qemu

Post by darthnvader »

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

Re: The Quadra 800 coming to Qemu

Post by adespoton »

That's a bit off-topic for this thread, but it'll be nice to have an Apple-sanctioned alternative to LisaEm :)
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: The Quadra 800 coming to Qemu

Post by adespoton »

Has anyone heard any updates for the Quadra support or the new Lisa emulator?
mePy2
Tinkerer
Posts: 58
Joined: Fri Dec 29, 2017 3:43 pm

Re: The Quadra 800 coming to Qemu

Post by mePy2 »

Updates?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: The Quadra 800 coming to Qemu

Post by Cat_7 »

Current status: Starting qemu-system-m68k with a Quadra 800 rom lets Qemu make a noise. But nothing more ;-)

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

Re: The Quadra 800 coming to Qemu

Post by adespoton »

Which noise? The "hardware tests passed" noise, or one of the failure noises? Or some indecipherable noise that's supposed to be one of those?

If it's the standard startup chime, I'm very happy, as that means that the hardware at least pretends to present itself correctly, and memory management and rudimentary audio work :)
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: The Quadra 800 coming to Qemu

Post by Cat_7 »

Which noise? The "hardware tests passed" noise, or one of the failure noises? Or some indecipherable noise that's supposed to be one of those?
Good question! I deliberately kept it vague because I cannot determine exactly which sound it starts to play and quickly partly repeats. If I had to guess, I'd guess it is not the start-up chime, though.

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

Re: The Quadra 800 coming to Qemu

Post by adespoton »

Hmm... I should get it set up and fire up the monitor and see what it spits out. The original plan for supporting the Q800 seemed reasonable, and most of the emulation is already available -- so this smells like a bug between the core emulation and the ROM -- the interface that hadn't been created yet.
mfnickster
Space Cadet
Posts: 9
Joined: Thu May 14, 2009 6:40 pm
Location: Minneapolis, MN

Re: The Quadra 800 coming to Qemu

Post by mfnickster »

Has anyone here tried installing NetBSD on the emulated Quadra 800?
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: The Quadra 800 coming to Qemu

Post by adespoton »

Is there an update on the Q800 that gets further than the "makes a noise" version? Because NetBSD on a Quadra requires a full boot of Mac OS and it then bootstraps from there. So without Mac OS booting, there's no NetBSD possible.

M68kLinux, however, I think avoids the bootstrap with its own kernel that hooks the ROM toolbox. But the ROM still needs to fully load for htis.
mfnickster
Space Cadet
Posts: 9
Joined: Thu May 14, 2009 6:40 pm
Location: Minneapolis, MN

Re: The Quadra 800 coming to Qemu

Post by mfnickster »

Ok, that's pretty much as it was last time I looked into it. I just wondered if someone might have managed to create a virtual disk image of a NetBSD/mac68k install from a physical Mac and booted that.

Just out of curiosity, could the M68kLinux booter be adapted to bootstrap the NetBSD kernel? Apologies if there's an obvious reason why not and I'm just too n00b to know it.
darthnvader
Mac Mechanic
Posts: 178
Joined: Sun Feb 07, 2016 4:40 pm

Re: The Quadra 800 coming to Qemu

Post by darthnvader »

mfnickster wrote:
Just out of curiosity, could the M68kLinux booter be adapted to bootstrap the NetBSD kernel? Apologies if there's an obvious reason why not and I'm just too n00b to know it.
It would require a major overhaul of the boot loader, as one is made for a Linux kernel and one is made for a BSD kernel.

At that point you may as well write your own boot loader.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: The Quadra 800 coming to Qemu

Post by adespoton »

darthnvader wrote:
mfnickster wrote:
Just out of curiosity, could the M68kLinux booter be adapted to bootstrap the NetBSD kernel? Apologies if there's an obvious reason why not and I'm just too n00b to know it.
It would require a major overhaul of the boot loader, as one is made for a Linux kernel and one is made for a BSD kernel.

At that point you may as well write your own boot loader.

And IIRC, the reason this wasn't done is that each Mac ROM would need its own equivalent bootloader for that hardware type... so since NetBSD was attempting (at the time) to run on as much hardware as possible, and couldn't predict how Apple would change the ROM for new devices, they decided to hook the Toolbox for their bootloader, as those calls are consistent from one set of hardware to another, and much of the hardware loading process is already taken care of by that point. M68kLinux, on the other hand, works on a more limited set of 68k Mac models, specifically because it uses its own bootloader.

However, having said all that, I just went back and checked http://www.mac.linux-m68k.org/docs/penguin.php -- it turns out my fuzzy memory was slightly off, as the Penguin Booter also boots from a running Mac OS. So no matter what route is used going forward, we're going to need to start at least by getting both the ROM and the System loaded.
mfnickster
Space Cadet
Posts: 9
Joined: Thu May 14, 2009 6:40 pm
Location: Minneapolis, MN

Re: The Quadra 800 coming to Qemu

Post by mfnickster »

Thanks, that is good information!

It might be worth looking at how Shoebill does it - IIRC it doesn't need a Mac OS partition (actually can't use one) to boot A/UX. If it would require modifying the QEMU m68k machine that would be a tough egg to crack.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: The Quadra 800 coming to Qemu

Post by adespoton »

The thing to examine would really be A/UX, not Shoebill; Shoebill just emulates enough of the hardware to get A/UX running without emulating enough to get Mac OS running (except, of course, A/UX runs Mac OS itself).

So what we need here is the code A/UX uses to bootstrap from the ROM. And A/UX is even more hardware-limited than M68kLinux.

Probably better to just get the ROM fully loaded and work from there.
mfnickster
Space Cadet
Posts: 9
Joined: Thu May 14, 2009 6:40 pm
Location: Minneapolis, MN

Re: The Quadra 800 coming to Qemu

Post by mfnickster »

Stock A/UX requires a Mac partition with the "A/UX Startup" utility on it. Shoebill doesn't, but I'm not sure if that's because its boot process bypasses the Mac OS/ROM step or emulates it.

Edit: Alan Cox notes here that the Linux/mac68k bootloader was adapted from OpenBSD's:
http://www.mac.linux-m68k.org/docs/macpaper.php
uyjulian
Apple Corer
Posts: 244
Joined: Fri Aug 27, 2010 1:02 am

Re: The Quadra 800 coming to Qemu

Post by uyjulian »

Shoebill loads the kernel from the root filesystem. The A/UX Startup utility isn't used. https://github.com/pruten/shoebill/blob ... api.c#L637

A/UX userspace emulation would be interesting, just to run the assembler for cross-compiling GCC (since A/UX assembler has features not implemented in GAS)…
Ministar48
Student Driver
Posts: 20
Joined: Tue Jul 03, 2018 12:34 am

Re: The Quadra 800 coming to Qemu

Post by Ministar48 »

Can we run Mac OS on it yet?
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: The Quadra 800 coming to Qemu

Post by adespoton »

Ministar48 wrote:Can we run Mac OS on it yet?
Unclear what the question is here: Mac OS 9 has worked on QEMU-PPC for years now. Anything lower is waiting for Quadra 800 emulation to complete for QEMU-M68k. There are no plans I know of to get Mac OS booting on Shoebill (although it does run on top of A/UX inside Shoebill).

As for QEMU-PPC running 7.1.2 through 8.6: 7.1.2-8.1 requires old world ROM support, same as the Quadra 800 emulation; so once Q800 works, the appropriate code should be portable to QEMU-PPC to support newer OSes. While 8.6 doesn't require an Old World ROM, there are other architectural differences that have prevented it booting off a New World ROM in QEMU-PPC.

If the question is about running Mac OS on the Quadra 800 QEMU, the answer is "no". As mentioned above, it doesn't even fully load the ROM yet.
Post Reply