SheepShaver with pcap support

It "works", just incredibly slowly

It “works”, just incredibly slowly

so I got it to “work” on OS X….. well 10.6 in VMWare. I have no idea if this means it will work on your setup.

  • If AppleTalk packets get passed early in the boot stage, it will crash.
  • If JIT is enabled, it will crash
  • Performance is horrible, I’m getting 150k/sec on my LAN, Basilisk II with no JIT blows this thing away.
Honestly I feel kind of hesitant releasing this, but I know it was desired, and I guess it’ll help someone somewhere being able to have an easier conversation… So I’m going to upload my source tree, including binaries built with GCC 4.0 & 4.2 with either O2 or Os flags. I’m not sure which is more stable/faster…So here is my source tree. Sorry you still have to deal with the changing password thing, but cancel it, and it’ll tell you the password.Other lessons learned… SheepShaver’s segfault model only works when the CPU thread is the main thread. Even though you “can” stuff the CPU into a subordinate thread, it doesn’t play nice once it segfaults, it’ll just spin waiting for something that clearly isn’t going to happen.In config.h I added in USEGLOBALvideo as a way for main to call the screen update to end the vast majority of pool leakage. I also added SHEEPSHAVER_CURSOR to enable the hardware cursor. I was having some issues installing OS 8.x when the ‘hand’ was drumming the fingers waiting for the OS to install it crashed many times, while disabling the hardware cursor made it play nicer. Maybe it’s my setup, I’m not sure.

Also in this version I don’t read .sheepshaver_prefs but rather sheepshaver_prefs in the current working directory. I didn’t want to trash any other prefs. I have to test again but I think this should work on 10.10 … As I found out the hard way x86_64 binaries can no longer mess with the zero page, so this is a 32bit only build, but I was running it with my SLiRP fixes ok on my macbook air.

This hasn’t been extensively tested. I hate to even call it tested, I just copied a few MB of stuff over an NT server running AppleTalk,a nd viewed some flash video with Internet Explorer 5.1 …. I’m sure there are PLENTY of things broken. JIT should work with these binaries (Quake 1 is quite playable), but DOOM crashes hard (isn’t it a 68k binary?). DOOM runs ok on Basilisk II so does it matter?

If you want speed, JIT + SLiRP is the way to go. Since this is basically the same as the version I was using with BasiliskII I think it’s more stable than the generic version as I could at least run all kinds of programs with some of my fixes vs the ‘stock’ github version.

I should add that I’ve been primarily testing with that PowerMac 9500 v1 ROM, along with MacOS 8.6. I found 8.0 and 8.1 too unstable, 7.x & 9.0.4 uninteresting.

To get around the early crashing while booting 8.6, I rigged it to drop the first 30 packets. I’ve successfully booted 10/10 times, so I’m almost OK with that. I’d rather know when the OS is ok, and go with that, but I’m not sure. I thought about a timer, and say ignore the network for the first 30 seconds, and maybe that is the better way to go. When you launch this you’ll see some message updating about packets and “wait for 30->” and a number… once it reads “wait for 30->30” , the message will no longer update, and it’ll start to forward packets into the machine. You probably will have to disable and re-enable AppleTalk from the chooser to see the network (or I had to). You may have to get creative to generate the needed packets on your network to get it over 30, as those are packets received. Broadcast packets work too, so maybe you can work with that… As long as Sheep Shaver isn’t alone something should be looking for other devices.

Phase one on a SheepShaver rebuild complete

SheepShaver on Linux

SheepShaver on Linux

Only because people were asking for it.  The first thing I did for Basilisk II was to get it building on Linux, so here we are.  I only tweaked the config process to let me build it with GCC 4.7.2 .

So this will be in the same effort of removing features, and trying to place in my SDL drivers, network and SCSI stuff.

Im starting with SheepShaver v2.2, which is pretty old.  But 700kb compressed is a good starting point.  As you can see it boots MacOS 8.0 which is also good enough for me.

The other questions will be, can this build under Windows with MinGW configured like this, and can it build with OS X.  It looks like all the stuff is there so this may be kind of easy. I hope.

Also SheepShaver does something funky with it’s memory space, it does some direct mapping to the user area.  I’ll have to see if I can disable that, performance be damned (well I turned off JIT as it won’t compile with 4.7 either) so this won’t be fast, but I’m just patching stuff up, not re-implementing the wheel here.

Qemu 1.7.0 released!

The main qemu page hasn’t been updated yet, but the download page has the source to the new version of Qemu.

I’ve gone ahead and built binaries for OS X, both a full version, and  a i386 minimal version.

As always testing is very minimal, all I’ve done is installed MS-DOS 6.22 & Doom 1.1, and tested the SoundBlaster 16 emulation.  And as with the pre-release versions, the adlib code is still broken.  And Ive done the ‘better’ fix in this code regarding that.

I haven’t run anything else, including fun things like the PowerPC & OS X emulation, MIPS with Windows NT, or even trying anything x64 based as I’m sure it is still broken from back in the Qemu 0.90 days.

OS X 10.2 on Qemu PowerPC

Blast from 2002

Blast from 2002

So yeah, I got 10.2 to install.  Well from my standpoint as a user it worked ok, but it is SLOW.. Then again my MacPro is a tad old, it is a 2006 model with 2 x 2 Ghz Dual-Core Intel Xeon processors…. I hope to upgrade to the new MacPro when it finally launches later this year.

So yeah, On my computer this runs slower than my first 333Mhz iMac that I ran OS X on.  Needless to say a 450Mhz G4 blows this thing away, although I don’t think that is a fair comparison.

Even with all the screwed up colours, it is kind of neat going back into time to see where OS X, was with AIM & Internet Explorer.  How things changed with Apple carving out their own niche territory in both regards.

All in all it was an interesting time back then, with Apple making the leap from the dated OS 9, to the NeXT inspired OS X.  And as they say the rest is history.

OS X PowerPC on Qemu

In the latest release notes, I saw that Qemu can now run OS X!

Screen Shot 2013-08-14 at 9.35.57 PM

Language selection

Screen Shot 2013-08-15 at 12.12.08 PM



The installer for 10.4 will run, but it’ll then freak out saying that this model of mac is not supported.  The ‘working’ cli I’m using is:

ppc-softmmu/qemu-system-ppc -L pc-bios/ -m 256 -M g3beige -hda osx1046.vmdk  -cpu G3 -cdrom Mac\ OS\ X\ Install\ DVD.toast -boot d

Sure the colours are off, and it is kind of pokey, but still the more guest OS’s on Qemu, namely for something like the PowerPC.  If anyone has any better idea of how to fully run OS X on Qemu drop me a note!  Plus there is additional information on the mailing list.

reviving a G5

This has to be one of the more convoluted things I’ve ever done.

So basically it starts like this, I left my quad G5 mac in storage, some 1,600 miles away.  I wanted to see if I could get a cheap mac, and I managed to get a $100 mac out here in Vegas.  Part of the reason it was cheap is because the OS was screwed up.. You’d be surprised how many people ditch good machines, because the OS is messed up.

So I figure I’d just pop in a 10.4 or 10.5 DVD set and boot up, format and all will be well right?  Well it turns out the DVD drive doesn’t work properly.  And I don’t have any old ATA/parallel style DVD drives on me.  So I’ve basically got a $100 paper weight.

Until I decide to try something insane, so I get the great emulator PearPC, and install 10.4 into that.  Sadly PearPC doesn’t support raw disks, otherwise my original plan of popping in the disk to my PC, running PearPC and having it install to \\.\PhysicalDrive2 didn’t work so well.  But at least I could create a small install of 10.4.6 which will boot on a G5.

Next I dug out the ancient ancestor of all the hackintoshes, the deadmoo 10.4.1 image, and got it running on VirtualBOX (set the IDE to P3 mode, otherwise its SLOW!), after converting the raw 6GB image into a VMDK.  I then could use Qemu’s disk image conversion program to convert the 10.4.6 disk I installed with PearPC into a VMDK which I could then mount under the deadmoo image.

With that setup, I could then use the diskutil program on OS X deadmoo, and create a compressed disk image of the PowerPC 10.4.6 .  Then VirtualBOX will let you link to a physical drive, with a command something like this:

VBoxManage internalcommands createrawvmdk -filename drive2.vmdk
      -rawdisk \\.\PhysicalDrive2

With that done, I then could boot back into deadmoo with the G5’s disk attached, remove all the files/directories from the G5 disk (I didn’t format as I wondered if I format from an intel machine, would the endian be backwards making the filesystem unnecessarily slow?), doing the ‘repair permissions’ shuffle from the diskutil program, and then finally I could restore the PearPC compressed image of 10.4.6 onto the G5’s hard disk.

It worked.

Its a shame the PowerPC machines cannot boot from USB disks, otherwise there may have been an easier way…  Well that or order a DVD drive, but that’d take time…

So thankfully with emulation, disks that can work between machines, I was able to get the box up and running.

Mini vMac II for OS X (PPC)

Emulators in Emulators..

I wanted to run some old 68000 programs on OS X, but as luck would have it, OS X 10.5 doesn’t support the classical environment, and the 10.4 discs that I have won’t boot on a G5.  So I don’t have a good way to get there from here.  However I did remember the great mini vMac is very portable, runs 68000 code great, and even can run 68020 programs with the experimental branches.. So I had to install OS 7 on a Windows machine with my last binary, configure the source there, then import it to my PowerPC, then build it on my G5.  The OS X PowerPC build is lacking sound (did the intel OS X have it?) but it runs!

For anyone that cares, my PowerPC binary is here.

I’ve just updated it to contain all the 32bit binaries…

$ file minivmac

minivmac: Mach-O universal binary with 3 architectures
minivmac (for architecture i386): Mach-O executable i386
minivmac (for architecture ppc7400): Mach-O executable ppc
minivmac (for architecture ppc): Mach-O executable ppc

It turns out this is reliant on Carbon, which doesn’t allow for 64bit binaries…

Building Qemu 0.15.1 on OS X 10.5.8

End of the line for the PPC

So I was wanting to build Qemu for my somewhat new G5.  After going through some hardware hell, of a bad hard disk, ram, and having to reseat the video card (should have figure it’d get shaken in the transit) and blowing out all the gunk, my G5 is now in action! … But silly me I wanted to play with OS/2 and while I do have Virtual PC for OS X (yeah MSDN) I wanted to play with Qemu.

I didn’t feel like dealing with 1.0.1, I thought I’d take a stab at the older stable branch, 0.15.1 .. And what a joy that was.

So first off I installed OS X 10.5 from the nicely provided install DVD.  That went fine with good RAM (shockingly with bad memory it gets corrupted and has all kinds of errors, if only the RAM test from the boot ROM was worth anything…. but it makes a nice chime noise).  So I found out much to my amazement after unpacking and going to build 10.15.1 that it requires.. glib-2.0 .  Well damn, this puts me in the same build hell that made Qemu 1.0+ in Win32.

But I figured OS X being a UNIX it may be somewhat easier to build… Somewhat.

So I started with glib-2.30.2, which of course dies because there is no pkg-config.  I download pkg-config-0.26 which won’t build because… yes, there is no glib-2.0 …. GRRRR!!!!  So I try pkg-config-0.18.1 and it actually builds!  One thing to keep in mind is that you *MUST* have the environment variable “PKG_CONFIG_PATH” set to something like this:


or it won’t work. I tried to build glib again, and now it fails because there is no libffi.  I try libffi-3.0.10 and it won’t build with some weird error of:

$ make
MAKE powerpc-apple-darwin9.8.0 : 0 * all-all
make: *** [all-all] Error 1

And yes it still did it after I was able to build glib2 (spoiler!?)…

Thankfully, libffi-3.0.4 did build, and installed fine.  So I try to build glib2 again, and now I fail because it wants gettext, so I went ahead and was able to build and install gettext- .  I went to build glib-2 and was totally shocked when it not only configured, but actually compiled!

I installed it, and was able to build Qemu 0.15.1, I just did the i386-softmmu target with the NE2000 fixed to be 0x300,IRQ 10, and enabled the AdLib!  And it compiled!

Now I’m sure some of the things that I’m fighting is that I’m on a PowerPC (G5!) and needless to say this version has been pretty much abandoned by everyone. I’m also using the dev tools that came on the 10.5 DVD, gcc version 4.0.1 (Apple Inc. build 5465) Which is great because they don’t seem to let you download any of the old X-Code stuff anymore..

The good news is that I could boot up my OS/2 disk image, the TCP/IP worked, however the mouse was all screwed up, left clicking just jumps the mouse like crazy, but it seems to track correctly, it just doesn’t click correctly… However the sound works GREAT!

Doom 1.1 on OS/2 2.0 via Qemu 0.15.1 on OS X

I know it isn’t much to look at, but it actually runs!

So here, for my fellow PowerPC OS X refugees, here is Qemu 0.15.1, I just built it for the i386. Doom in OS/2 on it is quite playable, but I’ve got a 2.5Ghz G5 so…. Your millage may vary.  Greatly.

And for the real daring people, here is Qemu 1.0.1 for the PowerPC.  I haven’t done much of any testing outside of loading up OS/2 2.0 from an image I had on my Windows 8 PC, connecting to the internet, and then loading up the shareware version of Doom 1.1

Qemu 0.14 PowerPC & Debian.

So I got this request about running Mono on the PowerPC. As it stands right now I don’t have a PowerPC box in my home to test, so I thought I’d turn to Qemu & Debian.

Qemu 0.14.0 PowerPC Debian boot

Qemu 0.14.0 PowerPC Debian boot

And yes, it surprisingly boots!

I opted for the network install, as I didn’t even know if it would work. But not only did the 32bit version of Linux for the PPC boot up, but the 64bit did as well! The flags were a little involved to get going, but it went something like this for the 32bit version:

qemu-system-ppc.exe -m 512 -boot d -hda debian-ppc.qcow2 -L pc-bios -M mac99 -net nic,model=pcnet -net user -cdrom debian-6.0.1a-powerpc-netinst.iso -boot d

And for the 64bit version:

qemu-system-ppc64.exe -L pc-bios -m 512 -hda ppc64.qcow2 -net nic,model=pcnet -net user -cdrom debian-6.0.1a-powerpc-netinst.iso -boot d

And then it’s a matter of waiting… Maybe I should have just torrented the install DVDs or something.. 😐

Qemu 0.14.0 PowerPC Debian install 33%

Qemu 0.14.0 PowerPC Debian install 33%

But booting from the hard disk produces a:

openbios panic: Unexpected exception 704

So close. Perhaps the macintosh machine type I select means the boot type isn’t PReP like for OpenBIOS to find?

I’ve also been told you can find various pre-built images here.