Repository navigation
Developer Tutorial
Richard Dawkins designed and wrote the original version of the Watchmaker Suite programs using one of the original m68k family of Apple Macintosh computers, introduced in 1984. The programs won't run on any later computer than the very last PowerPC-based Macintosh released in 2005, which was the last to feature a special legacy support mode for original Macintosh programs.
Fortunately for fans of obsolete computer systems, there exist computer emulators. Emulators are pure software applications which can simulate the behavior of the hardware of another computer. The emulator runs as an application on a computer which may have completely different hardware. The emulation is exact, right down to simulating the other computer's processor, memory, and firmware. For devices which connect with the outside world, such as keyboards, disk drives, pointing devices, and displays, the emulator does the work of interfacing with the host computer's real-world hardware, its keyboard, disk drives, and so on.
The actual computer that the emulator runs on is called the host or hosting system, and the emulated system is sometimes termed a 'virtual machine'. The term 'virtual' highlights the fact that the emulated system has no real hardware of its own, but exists solely as a software process running on the host system.
Interestingly, there are emulators which run on the same kind of computer they emulate: one can host a virtual IBM PC running Windows on an actual IBM PC running Windows; host a virtual Macintosh on a real Macintosh of the same type, and so on. It is even possible for a virtual machine to run an emulator itself, so that the virtual machine becomes a host for another virtual machine. One is tempted to imagine recursing this process indefinitely, creating an infinitely nested "hall of mirrors" of virtual machines. In practice, there are practical limits to the degree of nested hosting of virtual machines within other virtual machines.
At the top of the hierarchy, there must, after all, be a real, physical computer, and any given computer system has finite limitations of speed and memory capacity. Hosting a virtual machine is expensive of both these resources, particularly in the case of emulating a different processor architecture than that of the host machine. In that case, the hardware processor of the virtual machine must be simulated by a set of data structures in memory, capable of representing the state of the emulated processor at a given moment. The instructions contained within programs written for the virtual machine's hardware can't run natively on the host machine's processor. The emulator must provide translation software which reads the instructions to be executed on the virtual machines, and interprets these instructions as necessary to manipulate the data structures representing the processor's state, changing the state in just the same way that the state of a real, physical processor of the same design would change in response to the same instructions.
In contrast, if the virtual machine is of the same architecture as the hosting system, some economies are possible, such as running the virtual machine's instructions directly on the (identical) hosting system's actual processor, albeit in a special "sandbox" mode which keeps the virtual machine from 'leaking' into the hosted system's overall operation.
Nevertheless, whether or not the virtual machine is of the same architecture as the hosting system, there are computational costs associated with emulation, and nested emulation cannot in practice be carried past a particular degree, for any given actual, physical computer.
Basilisk II is a free, open source emulator of the original m86k Macintosh computer architecture. Versions are available for Windows, Linux, and Mac System X. Basilisk II requires the user to find a copy of the image from a real, Apple-copyrighted, system ROM. The system ROM inside each original Macintosh contained instructions for operating the Macintosh hardware at the lowest level. Different ROM images are used to emulate different models of the original Macintosh. The present work was done using the ROM from the very last model of Macintosh to use the m86k architecture, the Quadra 900/950, and here we may pause to examine the architecture of the Quadra.
Many Linux distributions have packages