Compiling Pararena 2
by Brendan Shanks
Pararena 2 is a classic Mac game written by John Calhoun (of Glider fame) and released commercially by Casady & Greene in 1991. Calhoun released the source code under the MIT license on GitHub in January 2016, but I think I may be the first to actually build and run it.
If you have a Mac, it’s pretty straightforward! Any version of OS X that can run Basilisk II should work (I used 10.11). Note that THINK C 6 does not run well under the OS X Classic Environment (both THINK C and its installer will crash Classic regularly).
- First, install Basilisk II and System 7.5 using this howto at Emaculation. Make sure that “Ignore Illegal Memory Accesses” is checked in the setup app. Once you install Mac OS, reboot into your clean new install:
- Download THINK C 6.0.1, and add all four of the floppy images as volumes in the Basilisk II setup app. Relaunch Basilisk, run the installer off disk 1, and install THINK C:
- Back on the host OS X system, clone the Pararena 2 git repository into a folder inside the Basilisk transfer folder. At the time of this guide, I used commit
08c83ddb59ee
. - A couple of files in the repository will need to be un-BinHexed. In the OS X Finder, open
Pararena.project.bin
,Para Sounds.bin
,Sources/Para.bloon.bin
,Sources/sms.a.π.bin
, andSources/SMSCore.a.π.bin
. Each file should extract to the same filename without the.bin
(i.e.Para Sounds.bin
will becomePara Sounds
) - Rez needs to be run on
Pararena.project.r
, to compile the text .r format into an actual resource fork file. From a terminal, inside the Pararena 2 repository, runRez Pararena.project.r > Pararena.project.rsrc
(you may be prompted to install Xcode and/or the Command Line Tools) - Inside Basilisk, copy the
pararena_2
folder from the Unix transfer volume to Macintosh HD (THINK C can’t open the files from the transfer volume directly, probably because the file type code is not set correctly). Also, rename thesms.a._
andSMSCore.a._
files to end with.π
as shown below. Option-P is the key combo to typeπ
. - Now, double-click to open
Pararena.project
. You just opened a project file that hasn’t been changed since June 1992! - THINK C is very basic compared to modern IDEs, but double-clicking on a file does open it for editing:
- Close the file, and use Project -> Bring Up To Date (command-U) to bring the whole project up to date. Even emulated, this runs really fast on a modern Mac!
- THINK C works differently than modern IDEs/compilers: all object files are stored inside the single project file (
Pararena.project
in this case), and the target application is not automatically linked/built. Choose Project -> Build Application… to link and save the application. You should see it in the Finder. - Now double-click on the Pararena 2 application. It runs!
- But after changing the color depth, the next dialog asks for the master disk in order to confirm you legitimately own the game. This does not play nicely with Basilisk, and I saw Pararena quit unexpectedly, the system crash with a bomb, and this odd request:
- Clearly we need to bypass this copy protection, and since we have the source code it’ll be easy to crack. It was straightforward to find where the copy protection code lives: in
ValidInstall.c
. I made the following change insideValidInstallation()
at the bottom of the file: (Also, note the exception for the PowerBook 100. It was the only Macintosh at the time that did not include an internal floppy drive, which I assume is why the master disk check is bypassed) - With that modification made, bring the project up-to-date and rebuild the application. Launch the app, and it should work without any copy protection! Unfortunately the gameplay itself runs very slowly inside Basilisk, but consider it a good reason to pick up some actual vintage Mac hardware 😛
Subscribe via RSS