Rosetta is a
dynamic binary translator developed by
Apple Inc. for
macOS, an application compatibility layer between different
instruction set architecture
In computer science, an instruction set architecture (ISA), also called computer architecture, is an abstract model of a computer. A device that executes instructions described by that ISA, such as a central processing unit (CPU), is called an ' ...
s. It enables a transition to newer hardware, by automatically translating software. The name is a reference to the
Rosetta Stone, the artifact which enabled translation of
Egyptian hieroglyph
Egyptian hieroglyphs (, ) were the formal writing system used in Ancient Egypt, used for writing the Egyptian language. Hieroglyphs combined logographic, syllabic and alphabetic elements, with some 1,000 distinct characters.There were about 1,00 ...
s.
The first version of Rosetta, introduced in 2006 in
Mac OS X Tiger, was part of the
Mac transition from PowerPC processors to Intel processors, allowing
PowerPC
PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
applications to run on
Intel-based Macs. The second version, introduced in 2020 as a component of
macOS Big Sur, is part of the
Mac transition from Intel processors to Apple silicon, allowing Intel applications to run on
Apple silicon Macs.
Background
Macintosh has used CPUs with several different
instruction set architectures: the
Motorola 68000 series
The Motorola 68000 series (also known as 680x0, m68000, m68k, or 68k) is a family of 32-bit complex instruction set computer (CISC) microprocessors. During the 1980s and early 1990s, they were popular in personal computers and workstations and w ...
,
PowerPC
PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
, Intel
x86, and
ARM64 in
Apple silicon. Each instruction set architecture is incompatible with its predecessor, necessitating a transition plan based on a software layer to
emulate the previous instruction set on the succeeding one.
With the launch of
Power Macintosh, the
Mac 68K emulator
The Mac 68k emulator is a software emulator built into all versions of the classic Mac OS for PowerPC. This emulator enabled running applications and system code that were originally written for the 680x0-based Macintosh models. With a few exceptio ...
is part of
System 7.1.2 and later. This emulator uses PowerPC features and is embedded at the lowest levels of the operating system, integrated with the
Mac OS nanokernel
The Mac OS nanokernel is an operating system Kernel (operating system), kernel serving as the basis of most PowerPC based system software versions 7 through 9 of the classic Mac OS, predating macOS, Mac OS X.
The initial revision of this software ...
. This means that the nanokernel is able to intercept PowerPC interrupts, translate them to 68k interrupts (then doing a mixed mode switch, if necessary), and then execute 68k code to handle the interrupts. This allows 68k and PowerPC code to be interspersed within the same
fat binary.
Rosetta
Apple launched Rosetta in 2006 upon the
Mac transition to Intel processors from PowerPC. It was embedded in
Mac OS X v10.4.4 "Tiger", the version that was released with the first
Intel-based Macs, and allows many
PowerPC
PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
applications to run on Intel-based Mac computers without modification. Rosetta is based on
QuickTransit
QuickTransit was a cross-platform virtualization program developed by Transitive Corporation. It allowed software compiled for one specific processor and operating system combination to be executed on a different processor and/or operating syste ...
technology. It has no user interface, and launches as needed with no notification of the user, which led Apple to describe it as "the most amazing software you'll never see". Rosetta is optionally installable in
Mac OS X v10.6
Mac OS X Snow Leopard (version 10.6) is the seventh major release of macOS, Apple's desktop and server operating system for Macintosh computers.
Snow Leopard was publicly unveiled on June 8, 2009 at Apple’s Worldwide Developers Conference. ...
"Snow Leopard".
Rosetta is neither included nor supported in
Mac OS X v10.7
OS X Lion, also known as Mac OS X Lion, (version 10.7) is the eighth major release of macOS, Apple's desktop and server operating system for Mac computers.
A preview of OS X 10.7 Lion was publicly shown at the "Back to the Mac" Apple Speci ...
"Lion" or later, which therefore cannot run PowerPC applications.
Because of the greater architectural differences between Intel and PowerPC processors, Rosetta operates at a higher level than the 68000 emulator does, as a
user-level
A modern computer operating system usually segregates virtual memory into user space and kernel space. Primarily, this separation serves to provide memory protection and hardware protection from malicious or errant software behaviour.
Kernel ...
program that can only intercept and emulate user-level code. It translates
G3,
G4, and
AltiVec instructions, but not
G5 instructions. Although most commercial software for PowerPC-based Macs was compatible with these requirements (G4 systems were still widely used at the time), any applications that relied on G5-specific instructions had to be modified by their developers to work on Rosetta-supported Intel-based Macs. Apple advised that applications with heavy user interaction but low computational needs (such as
word processors) would be best suited to use with Rosetta, and applications with high computational needs (such as games,
AutoCAD, or
Photoshop) would not.
Rosetta also does not support the following:
* The
Classic environment, and thus any
non-Carbon application built for
Mac OS 9
Mac OS 9 is the ninth major release of Apple Inc., Apple's classic Mac OS operating system which was succeeded by macOS, Mac OS X (renamed to OS X in 2011 and macOS in 2016) in 2001. Introduced on October 23, 1999, it was promoted by Apple as "T ...
or earlier
* Code that inserts preferences into the System Preferences pane
* Applications that require precise exception handling
* Screen savers
*
Kernel extensions and applications that depend on them
* Bundled
Java applications or Java applications with
JNI libraries that cannot be translated
* Java applets in Rosetta-translated applications, meaning that a native Intel web browser application, rather than a legacy PowerPC version, must be used to load Java applets
Rosetta 2
In 2020, Apple announced Rosetta 2 would be bundled with
macOS Big Sur, to aid in the
Mac transition to Apple silicon. The software permits many applications compiled exclusively for execution on
x86-64-based processors to be translated for execution on Apple silicon.
In addition to the
just-in-time (JIT) translation support, Rosetta 2 offers
ahead-of-time compilation
In computer science, ahead-of-time compilation (AOT compilation) is the act of compiling an (often) higher-level programming language into an (often) lower-level language before execution of a program, usually at build-time, to reduce the amount ...
(AOT), with the x86-64 code fully translated, just once, when an application without a universal binary is installed on an Apple silicon Mac.
Rosetta 2's performance has been praised greatly. In some benchmarks, x86-64-only programs performed better under Rosetta 2 on a Mac with an Apple M1 SOC than natively on a Mac with an Intel x86-64 processor. One of the key reasons why Rosetta 2 provides such high level of translation efficiency is the support of x86-64
memory ordering Memory ordering describes the order of accesses to computer memory by a CPU. The term can refer either to the memory ordering generated by the compiler during compile time, or to the memory ordering generated by a CPU during runtime.
In modern mic ...
in Apple M1 SOC.
Although Rosetta 2 works for most software, some software doesn't work at all or is reported to be "sluggish".
Similar to the first version, Rosetta 2 does not normally require user intervention. When a user attempts to launch an x86-64-only application for the first time, macOS prompts them to install Rosetta 2 if it is not already available. Subsequent launches of x86-64 programs will execute via translation automatically. An option also exists to force a universal binary to run as x86-64 code through Rosetta 2, even on an ARM-based machine.
See also
* – combined 68k/PPC applications that run natively on both processors
*
Universal binary – combined PPC/Intel applications that run natively on both processors
*
Universal 2 binary
The universal binary format is, in Apple Inc., Apple parlance, a format for executable files that run natively on either PowerPC or Intel-manufactured IA-32 or Intel 64 or AArch64, ARM64-based Apple Macintosh, Macintosh computers. The format or ...
– combined Intel/ARM applications that run natively on both processors
References
External links
*
*
*
Does it ARM?Rosetta 2 compatibility index
{{DEFAULTSORT:Rosetta (Software)
MacOS-only software made by Apple Inc.
MacOS emulation software
MacOS
PowerPC emulators
x86 emulators
Department of Computer Science, University of Manchester