Apple IIgs development with MPW – Setup

The Apple IIgs is a great platform for software development.  Compared to 8-bit Apple II machines, the IIgs offers a faster processor, more memory, higher resolution video, and a more modern desktop graphical user interface (GUI).  The operating system, GS/OS, offers features found in modern desktop operating systems, such as a relocating system loader, dynamic memory management, networking, modular file systems, and event-driven user interfaces.

The platform has a number of excellent software development packages.  Whether you favor C, Pascal, Logo, Modula-2, Forth, BASIC, or assembly, you’re covered.

But, compared to software development on newer computers, the IIgs screen resolution and processor speed are unavoidable limitations.  A large screen allows you to see more of your code.  A fast processor cuts compile time and debugging.  Apple felt the pain of developing large programs on the IIgs and created add-ons for the Macintosh Programmer’s Workshop (MPW) that allow IIgs software development from the relatively advanced Macintosh platform.  Apple used these MPW-based development tools for some of its most complicated IIgs software projects, including GS/OS itself and Hypercard.

Let’s get MPW setup and running.

Get a Mac that runs classic MacOS or a Mac emulator

I choose the Basilisk II emulator.  Follow the directions at E-Maculation to install and setup Basilisk II with Mac OS System 7.5.5.

MPW and the IIgs add-ons run under classic MacOS, so you’ll need a suitable machine with either a PowerPC or 680×0 processor.  Your fancy new Intel-based Mac won’t work.  OSX won’t work either.  I’m not very knowledgeable about classic Macs, so I’m not sure of the “best” machine, processor, and OS version.

Given that these IIgs tools were written for a 680×0 based Mac, I figure such a Mac is the best place to start.  I don’t have the desk room or the inclination to start a classic Mac hobby, so I turn to emulation.  The E-Maculation site does a great job of identifying the options for Mac emulation.  Mini vMac and Basilisk II look to be my best options.  I choose Basilisk II because, compared to Mini vMac, Basilisk II offers higher resolution color display and networking, which I believe will be valuable for software development.

Install MPW and DiskCopy

Download MPW and Disk Copy from Apple.  Use the HFVExplorer tool included with Basilisk II to transfer to software to your emulated Mac.  You will also want StuffIt Expander, which is useful for de-compressing certain software.

Disk Copy is a self-extracting archive, so double-click the downloaded file on your emulated Mac to open the file.  Then, copy the program to a convenient location on your emulated hard drive.  Then, use Disk Copy to open the MPW image.  Copy the entire MPW folder to your emulated hard drive.  I find the Software Downloads article from Apple helpful in understanding the various Mac file formats.

Install the MPW IIgs software

Purchase the MPW IIgs Tools and MPW IIgs Assembler from Syndicomm.  Optionally, also purchase MPW IIgs Pascal, MPW IIgs C, or MPW IIgs Orca/C from Syndicomm.  Jump through a few overly complex hoops to get the software transferred to the emulated Mac.  Follow the directions in the MPW IIgs manuals (included with your purchase from Syndicomm) to install the software.

While Apple freely distributes the old MPW tools, the MPW IIgs add-ons are not free.  Syndicomm is the only authorized retailer and sells the pieces both individually and part of a package.  The APDA Software Library seems to be a good deal if you’re interested in some of the other included software.  If you only care about MPW, the MPW IIgs Collection is the best deal.

For reasons I don’t understand, the Disk Copy disk images from Syndicomm are difficult to use with Basilisk II.  The emulator does not support mounting these disk images as emulated disks.  I tried, and Mac OS offered to format the unrecognized volumes.  Next, I tried transferring the images into another disk image with HFVExplorer.  Disk Copy 6, unfortunately, fails to mount the images complaining that the images are corrupt.  Third, I tried creating a new image on my OSX laptop and copying the contents of the MPW images to the new image, but OSX 10.6 does not support writing to HFS disk images so this approach didn’t get very far.  OSX 10.6 does mount the MPW add-on images read-only, so I know the images are usable.  Finally, I used Sweet16 to create a Disk Copy 6 image, mounted the image in Sweet16, booted GS/OS, formatted the image with HFS, mounted the MPW images in Sweet16, and copied the MPW IIgs software to the new disk image.  Then, I transferred the new disk image containing all of the MPW IIgs collection to the emulated Mac filesystem with HFVExplorer.  Disk Copy 6 on the emulated Mac finally opened the image.

Sweet16 Create Image dialog

The manuals for the MPW IIgs software describe the installation steps.  I did have a minor problem with the install script for the MPW IIgs Tools.  The script contains a reference to a directory named “SR.71”, and I had to edit the script to remove that reference.

Use MPW to develop IIgs software

There are plenty of documentation and samples.  I’m still learning.

MPW with the IIgs add-ons running in Basilisk II

MPW and the MPW IIgs software include excellent documentation.  There are a few example programs included with MPW IIgs, but they’re generally outdated and probably not very good models.  The IIgs Source Code Sampler package, available from Syndicomm and elsewhere on the Internet, is more up to date and provides several good assembly language examples.

What’s Next

I’m left with a few questions that I’m still exploring:

  1. Is Basilisk II stable enough?  I’ve had a few emulator crashes, but, so far, Basilisk II seems sufficiently stable.
  2. How will I transfer compiled/assembled software to the IIgs?  There are several options, including networking, but I haven’t experimented to find the best option yet.
  3. I’m using an emulated classic Mac to develop software for the Apple IIgs.  Does this make any sense?  Will I be happier developing directly on the IIgs?  A2Central just started a series on selecting a IIgs assembler.

Overall, I’m pleased with using MPW to develop software for the IIgs.  I still have a lot to learn, and I’m not yet certain I’ll stick with using MPW.  My next post will be a tutorial “writing your first IIgs program with MPW.”