Shoebill ported to Windows!

Shoebill!

Shoebill!

Good news, as mentioned here, the Shoebill emulator was recently given some much needed SDL love, and ported to Linux.

Well that’s great and all, but the vast majority of people who run anything these days do it with Windows.  So I decided to try to get it to compile with MinGW to see how far I could get.

And the short version is that I got it working!

The long version is that in the first pass there is some SIGUSR2 stuff that is undefined.  And for a good reason, since it won’t work.  So I just commented them out.  The next minor problem was the lack of bzero.  Honestly I don’t know why bzero is missing from MinGW, but who knows why.

Shoebill also processes some internal macros with a perl script that for some reason was dropping in binary values into the source, making GCC mad.  I just commented out a line that was adding in more comments into the header.  This let me compile with a simple pass.

There was some issues reading the ROM file, since the 68000 is a BIG ENDIAN processor, and the 8086 is LITTLE ENDIAN, Shoebill makes extensive use of hotns and hotnl, ntohl, and ntohll.  These can be found in the winsock library, and even better they dont need any winsock initialization, they work right away.  I just have to make sure I include winsock2.h, and link against the winsock library.

However when trying to boot, the checksum was 0x00000000, not the expected value!   Luckily there was an assert to catch that and crash.  This led me to notice that in Linux files are opened in binary mode by default, while on Windows, they are opened in ASCII mode.  A quick change of all the fopen calls, and I was reading the ROM, but now crashing on the disk.

As it turns out newer versions of GCC go all crazy when it comes to structs, and try to automatically align to boundaries for quick access.  Which sound nice, until you try to read in some binary data, and expect things to be in certain locations and find out that your structure is larger than expected, and data is read in the wrong place.

The solution is to force the compiler to leave it alone with

__attribute__ ((__packed__))

HOWEVER as luck would have it, Microsoft apparently packs structures a different way, and you have to either make a macro to do a bunch of work to force it to make the structure 1:1 of what you expect, or use the CFLAG option of

-mno-ms-bitfields

And now MinGW’s GCC will build something along the lines of what it’d build on Linux.

Putting it all together, I amazingly got this!

Shoebill on Windows

Shoebill on Windows

Phew!  So for those interested, here is the source code drop(Use the updated one here!), and here is the binary.

If you ever wanted to see the “OS X” of the 1980’s, now is your chance!

Upgraded my Mac Pro to include Wifi & Bluetooth!

There! Done!

Trust me if you’ve ever attempted this, then you know not only just how difficult this whole process is, but to not only get it working was a major accomplishment!

And I only lost ONE of the screws.. Sigh they are just too small, I finally broke down and got an eye glass repair kit after losing one of them (no idea where it went to, I shook the case like crazy then it stopped rattling, so its either wedged somewhere good, or I’ve thrown it somewhere around here….).  The trick was to use a small plastic sleeve to jam the screw almost all the way in, with enough of the stem showing so I could carefully get a few twists of the tread into the hole…

But of course I didn’t start it out that way, instead I thought it’d be easier to clip on the antennas to the wifi card (BCM94311MCAG) first, then slip it into its slot, then screw it down, but since it goes in at an angle, it forces itself up & out so you end up fighting it.  This is where I lost the one screw during installation.  The ‘trick’ was to use my iphone’s camera light so I could see what I was doing, then try to press down on the wifi card while trying to screw in the board using one of the plastic sleeve things from the repair kit.  Surprisingly after enough false starts I got it to thread and was able to finish screwing it in with the driver.

The Bluetooth module (A1115) was much easier, as it is just a simple daughter card, that you just push onto the board, then screw in.  Because its not actively resisting you, it was much easier to get into place, and screw in…. I just hope mine lasts ok as its only got the one screw.

As always have a clean work area, and take your time.  Working with stuff this insanely small is going to take longer than you expect..

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…

Island 8080 Emulator

Island 8080 running CP/M on MinivMac

I’ve never heard of this before, but a friend pointed me towards this this page, that has a CP/M version that’ll run on a Macintosh.  But as they list out it ONLY works on super ancient Mac’s namely the 128k & 512k varities.  Plus owners & everyone beyond them is out of luck.

So what is there to say?  Well it does in fact run CP/M, and the demo disk includes WordStar but without a clear way of getting data on & off the diskettes it is kind of .. pointless?  I’m sure back in the day this would have been an awesome programme for Macintosh users as you could run ‘all that CP/M’ stuff out there on these giant 400kb diskettes.  Needless to say the rise of the IBM PC killed that and everyone went to MS-DOS but for some people I’m sure this was the tipping point of why to go Mac.  In this day & age emulators to run emulators may seem silly but I figured it was at least worth mentioning that this did in fact exist…

I suppose I could rig something to transfer the 8080 version of Zork1 to it, but is it worth the effort?

SoftPC 3.1 for MacOS

SoftPC 3.1 for MacOS

SoftPC 3.1 for MacOS

I had purchased this a while back on ebay for $15, and used it occasionally but ever anything that involved. Mostly because it’s dreadfully slow on an 030, and ever since the intel cpu has won out, it’s not all that needed in this day in age. But at the same time, its interesting to check out various emulators through the ages.

Installing it was way easier under Basillisk II, then running it is more smooth under mini vmac. Mostly because of it’s 68881 emulation, and also it just seems faster.

An 80286 in every box!

Running MSD shows that it does in fact emulate a 80286 processor!

So doing the only natural thing, I installed Microsoft C 5.1 but configured it only for OS/2 development, then used a old 286 dos extender I found, and blamo, it works!

Hello from protected mode!

The sad thing, is that it seems the 80386 & 80486 stuff was RISC (MIPS/Alpha/PowerPC) or 80486 based only. I’m pretty sure the version of SoftPC for NeXTSTEP did a 80386… I’d love a real copy of that, but I know there was a demo out there somewhere.

Anyways for it’s age, SoftPC seems to be about as annoying as any 286 computer was at the time. And as a bonus running emulators under emulators makes it about as slow as a 286..

Duke Nukem 3D for the Macintosh (68020)

mini vmac II duke nukem

mini vmac II duke nukem

I had no idea this even existed… I guess it’s to be expected, all the popular games of the time (doom) were ported to pretty much everything and anything.

So after stubmling across this site, Emacualtion, I had to fire this thing up!

The first thing I needed to do was get the latest source to Mini vMac. What is different about this is that you get the source from within the emulator. Basically you pass a program what config you want and it’ll spit out source code. So for me to build on windows, a mac II with 256 colors, I gave it..

-t wx86 -m II -depth 3

Easy right?

There is some help on the mini vmac site, but it’s kind of in places.

With the emulator built, the next fun filled thing was to dump the ROM from my SE/30, which was.. an exciting adventure in floppy disks, but with it in hand I was ready!

The next part of the puzzle was System 7.5.3, which apple still thankfully provides, along with HFVExplorer, and Stuffit, and I was all set to go!

I created a target diskette of 100MB, then used hfvexplorer to copy 7.5.3 and it’s 19 segments into the disk. Then I booted the emulator with a minimal System 7 floppy. I then installed 7.5.3 into the 100mb disk, then shut down the emulator. Then using hfv explorer, copy over Duke and stuffit.

Boot back into MacOS, install stuffit, and expand Duke and away we GO!

Naturally with the speed limits dropped it’s quite FAST! vMac doesn’t have sound yet, so it’s a silent experience but it works quite well.

mini vmac II duke

mini vmac II duke

The sad thing is that Doom requires 32bit mode, which it seems that Mini vMac can’t do just yet.

MacMinix

MacMinix

Once upon a time, I bought a Mac Plus, and decked it out with 4MB of ram, and a 40MB SCSI hard disk. I thought it was so cool, I even got a cable to talk to a normal external modem, and used it as a compact terminal to BBS, although the 800Kb floppies were a bit of a pain….

Anyways it was OK for a while but system 6 is so… limiting. Then I started using it for a foot rest, as I couldn’t do anything really more with it. Then someone at college pointed out that Minix actually supported a bunch of 68000 based machines, namely the Amiga, Atari ST, and the Macintosh!!!

The best part of the Mac port being that you didn’t have to format, repartition or anything, as it was essentially and operating environment!

The best parts being, that it had vi, and even a C compiler! Although without documentation getting things in & out of the Mac seemed impossible, and I kind of gave up on it.

But after digging around these ancient Linux things, I thought I’d take a look at MacMinix again.

To start, Brad Pliner has an excellent site, with lots of documentation for this port of Minix, including some PDF’s of the instructions.

I’ve detailed some of the install steps on gunkies.

The only real downside will be that the C compiler is ancient… It really can’t compare to MINT’s GCC.