Skip to content
EntityQ2316985· pop 5· linked from 22 articles

Mac 68K emulator

Sign in to save

software emulator built into all versions of the classic Mac OS for PowerPC

Described at

The 68LC040 Emulator (IM: PS)

developer.apple.com

Important: The information in this document is obsolete and should not be used for new development. The 68LC040 Emulator is the part of the PowerPC system software that allows 680x0 applications and other software to execute on PowerPC processor-based Macintosh computers. This emulator provides an execution environment that is virtually identical to the execution environment found on 680x0-based Macintosh computers. The emulator converts 680x0 instructions into PowerPC instructions, issues those instructions to the PowerPC microprocessor, and updates the emulated environment (such as the emulated 680x0 registers) in response to the operations of the PowerPC microprocessor. In general, the 680x0 emulation environment supports all existing 680x0 applications that already work correctly on all Macintosh computers containing a Motorola 68020, 68030, or 68040 microprocessor. There are, however, some differences between the operation of the 68LC040 Emulator and an actual 68040 microprocessor. The following two sections provide some information on the general operation and limitations of the 68LC040 Emulator. Unless you are programming in assembly language or doing very low-level debugging, you're not likely to need the information in the following two sections. The 68LC040 Emulator implements the basic Motorola 68040 user mode instruction set. It does not, however, support any of the instructions from the optional 68881 or 68882 floating-point coprocessors. Moreover, although the emulator supports the operations of the Virtual Memory Manager, it does not support instructions from the 68851 Paged Memory Management Unit (PMMU). The 680x0-based Macintosh computer whose hardware configuration most closely resembles the software configuration of the 68LC040 Emulator is the Macintosh Centris 610, which contains the Motorola 68LC040 microprocessor. (The 68LC040 microprocessor is identical to the 68040 microprocessor except that it has no floating-point unit.) As a result, if your application or other software runs without problems on the Macintosh Centris 610, it is very likely to run without problems under the 68LC040 Emulator. For the complete specification of how you can expect both a real 68040 and the 68LC040 Emulator to behave, see the MC68040 32-Bit Microprocessor User's Manual . The Gestalt function returns the value gestalt68020 when you pass it the selector gestaltProcessorType and the calling software is executing under the emulator. This return value is intended to highlight the two ways in which the 68LC040 Emulator more closely resembles a 68020 processor than a 68040 processor: The emulated environment does not support either the FPU or the MMU contained in an actual 68040 processor. The emulated environment creates exception stack frames in accordance with the 68020 exception frame model. The 68LC040 Emulator consists of two main parts, a main dispatch table and a block of additional code called by entries in the main dispatch table. The main dispatch table contains two native PowerPC instructions for each recognized 680x0 operation code (or opcode). In cases where a 680x0 opcode can be handled by a single PowerPC instruction, the first native instruction in the dispatch table is enough to complete the requested operation. In most cases, however, the handling of a 680x0 opcode requires more than one PowerPC instruction. In that case, the first native instruction in the main dispatch table simply begins the emulation process. The second native instruction in the emulator's main dispatch table is usually a PC-relative branch into the block of additional code. The additional code continues the emulation of the 680x0 opcode begun by the first instruction. The emulator's main dispatch table also includes entries that support private opcodes reserved for use by the system software, including both A-line and F-line instructions. For example, the Mixed Mode Manager communicates with the 68LC040 Emulator using A-line instr

Excerpt from a page describing this subject · 22,742 chars · not written by Vinony

Available in 5 languages

via Wikidata sitelinks · CC0