Mac 68k emulator

broken image
broken image

These were invoked through a TRAP mechanism. Many of the common routines were shipped in ROM on the machine. The other aspect of the Mac was the Toolbox ROM. Since you had this extra layer, it was straightforward to interject a step to check if you were calling 68K code, and then route to the emulator rather than directly to the code. So, when you made a call to a segment, the segment could be loaded on demand, and, in between calls, the segment can be moved in memory. This layer is why multiple segments didn’t need to know the other segments addresses. The main affect about this, particularly in this use case, was that when you called routines in a segment, the call was routed through an extra layer. The Mac used the idea of Segments to break up its executable code. On the one hand, with the Mac architecture, it was straightforward. The 68K emulator in the PPC Macs was really quite a piece of work.