Emulation is the reproduction of the behavior of one computing system by another so that software or other components designed for the original system can operate in the substitute environment. The system being reproduced is commonly called the target or guest, while the system performing the reproduction is the host. An emulator may reproduce an entire computer, a processor, a peripheral device, or a software interface. Its defining purpose is behavioral compatibility: operations presented to the emulator should produce results that are sufficiently consistent with those of the target.
Emulation allows programs to outlive the machines for which they were written, supports the transition between processor architectures, and makes unavailable or unfinished hardware accessible to developers. It is important in commercial compatibility systems, video-game preservation, operating-system development, security research, and electronic design. Its practical difficulty lies in deciding which aspects of the target must be reproduced: correct arithmetic and file access may suffice for one application, whereas another depends on exact interrupt timing, undocumented processor behavior, or the electrical characteristics of a storage device.
Emulation is closely related to virtualization, simulation, and compatibility layers, but these terms describe overlapping rather than identical techniques. An emulator is best understood through the interface it reproduces, the observations it preserves, and the assumptions it makes about the software that will use it.
Behavioral compatibility and the scope of emulation
An emulator implements a contract between a target system and its users. That contract can include instructions, memory addresses, device registers, file formats, calling conventions, and timing relationships. A processor emulator, for example, must reproduce the effects of instructions on registers and memory. A printer emulator might instead accept a historical printer command language and render its output into a modern document. Neither needs to reproduce every physical detail of the original device.
This distinction separates emulation from physical duplication. A software model of a processor need not contain anything corresponding physically to its transistors. It can represent registers as variables and decode instructions through ordinary host-language operations. Conversely, an implementation built from programmable logic can reproduce much of a historical circuit’s structure without using the same manufacturing process. The relevant question is whether the replacement behaves appropriately at the boundary exposed to the components that depend on it.
Compatibility is therefore relative to a specified class of observations. Consider a program that adds two integers, writes a file, and terminates. An emulator might reproduce the final file perfectly while executing instructions in a different order internally. That difference is immaterial unless the program can observe it. A program that polls a hardware register thousands of times per frame may expose timing differences that the first program never encounters. A statement such as “fully compatible” has little technical meaning without a target version, workload, and fidelity criterion.
The conceptual possibility of one machine reproducing another is associated with Alan Turing’s 1936 account of a universal Turing machine. A universal machine can interpret an encoded description of another machine. This establishes a foundation for general-purpose interpretation, but it does not guarantee that a practical emulator will be fast, easy to construct, or faithful to undocumented hardware.
Emulation also need not preserve the original system’s limitations at every external boundary. An emulator can provide faster storage, enlarged memory, debugging controls, or improved display output. Such extensions may be useful while reducing historical fidelity. Well-defined implementations distinguish the target-compatible behavior from optional enhancements, because software may depend on restrictions or defects that an enhancement removes.
Historical development
Emulation became commercially important as computer manufacturers sought to preserve customers’ software investments while replacing incompatible hardware. Early computers frequently had distinctive instruction sets, data representations, and peripheral conventions. Moving an application could require substantial rewriting, especially when it contained assembly language or depended directly on hardware behavior.
A major historical example was IBM’s System/360 family, announced in 1964. The family established a common architecture across machines with different performance levels, while selected models also offered compatibility facilities for earlier IBM systems. The System/360 Model 30, for example, supported emulation of the IBM 1401 through appropriate hardware, microprogramming, and software facilities. These arrangements helped customers migrate gradually instead of converting every existing program before adopting new equipment. Early commercial emulation was consequently often a property of a specially designed machine rather than a standalone software application.
As general-purpose processors became faster, software emulation became practical for a wider range of targets. Personal-computer owners used emulators to run software written for other platforms, while researchers used instruction-set simulators to study architectures. The boundary between a compatibility product and a research simulator was often determined by purpose: one emphasized running existing applications, the other measurement and experimentation.
Processor transitions supplied prominent commercial examples. During Apple’s move from Motorola 68000-family processors to PowerPC in the 1990s, Macintosh system software included facilities for running existing 68000-family code. Apple later introduced Rosetta with the Intel-based Macintosh transition in 2006, translating PowerPC applications. Rosetta 2, introduced during the transition to Apple silicon in 2020, performs a corresponding compatibility role for Intel applications. These systems illustrate application-level binary compatibility rather than the recreation of every component of an earlier Macintosh.
Emulation also became an important open-source software activity. MAME began in 1997 with an emphasis on arcade machines; DOSBox began in 2002 to support DOS software, especially games; and QEMU first appeared publicly in 2003 as a machine emulator and dynamic translator. Their different objectives produced different engineering priorities: broad hardware documentation, convenient application compatibility, and flexible system execution respectively. Across these developments, emulation shifted from an expensive migration feature to a widely available technique for software maintenance, experimentation, and historical access.
Emulation, simulation, virtualization, and compatibility layers
The distinction between emulation and simulation is useful but not absolute. In a common engineering usage, a simulator models a system to study its properties, whereas an emulator acts as a usable substitute for it. A processor simulator might estimate pipeline stalls and power consumption while running far more slowly than real hardware. A processor emulator might omit those internal details while correctly executing the same application. Some tools do both, and product names do not consistently follow this distinction.
Virtualization usually divides or manages real computing resources so that multiple isolated environments can use them. When the guest and host share an instruction-set architecture, many guest instructions can execute directly on the host processor. Privileged operations and device access remain controlled by a virtual-machine monitor. Emulation, by contrast, can execute instructions belonging to an architecture that the host processor does not implement. Nevertheless, a virtual machine often combines both approaches: its processor may use hardware-assisted virtualization while its disk controller, network adapter, and display device are emulated.
A compatibility layer works at a different boundary. Rather than reproducing an entire machine, it supplies the interfaces expected by an application. Wine, for example, implements Windows interfaces on other operating systems rather than requiring a complete Windows installation inside an emulated computer. The familiar expansion of its name, “Wine Is Not an Emulator,” emphasizes this architectural distinction. A compatibility layer can nevertheless be combined with processor translation when the application’s instruction set differs from the host’s.
Two important boundaries are the application binary interface and the application programming interface. An application binary interface specifies details such as register usage, data layout, calling conventions, and executable formats. An application programming interface describes callable services and their behavior. Reimplementing either can provide compatibility without recreating the underlying hardware, but success depends on whether applications stay within that boundary.
Terminology also varies by field. A mobile-device “emulator” may contain a virtualized processor, a simulated sensor environment, and reimplemented platform services. A terminal emulator reproduces the commands and display behavior of a physical terminal, not necessarily its processor or circuitry. In electronic design, hardware emulation commonly means mapping a circuit design into specialized programmable hardware. These are not contradictory uses: each reproduces a selected interface for a particular purpose. A precise description therefore states what is emulated, what executes directly, and what behavior is deliberately omitted.
Full-system and application-level architectures
A full-system emulator represents enough of a computer to boot a guest operating system. Its components generally include one or more processors, physical memory, interrupt controllers, timers, storage controllers, and input/output devices. It also supplies or loads the firmware that initializes the guest machine. The guest operating system manages the resulting environment much as it would manage physical hardware, although the emulator may expose a simplified or explicitly virtual platform.
The central organizing problem is the machine’s address space. Ordinary memory accesses can be directed to host memory holding guest bytes. Other addresses correspond to memory-mapped devices: reading or writing them invokes device-model behavior. A write to a display register might change the visible framebuffer, while a write to a storage-controller register might begin a transfer. Systems with separate input/output instructions require an additional mechanism for routing those operations.
Processor state includes more than general-purpose registers. Full-system execution can require privilege levels, exception state, address-translation registers, floating-point modes, and interrupt masks. To run a guest kernel, an emulator must reproduce the effects of privileged instructions and the rules governing exceptions. Guest virtual memory adds another layer: an address generated by a guest program may need translation through guest page tables before the emulator locates the corresponding host storage.
Application-level, or user-mode, emulation avoids reproducing the whole machine. It loads a foreign executable, translates its instructions, and maps its requests for operating-system services onto the host. QEMU’s user-mode facilities follow this general approach for supported combinations of guest architecture and host operating system. A system call may require translation of register conventions, structure layouts, byte order, and error results. Signals, threads, and process creation can be especially difficult because their semantics extend beyond a single instruction.
Application-level emulation generally has less device-model overhead and can integrate naturally with host files and processes. Its limitations follow from the same design: it cannot automatically run an arbitrary guest kernel, and it may not reproduce services absent from the host. Full-system emulation offers a more self-contained environment but must maintain many interacting components. The choice depends on whether compatibility is required for an application, an operating-system environment, or a historically specific machine configuration.
Instruction interpretation and binary translation
The most direct execution technique is interpretation. An interpreter fetches a guest instruction, decodes it, performs the corresponding operations on guest state, and advances the guest program counter. A simple implementation can dispatch through a table indexed by instruction opcode. Interpretation is comparatively easy to inspect and can handle unusual instructions precisely, but repeated fetching, decoding, and dispatch impose substantial overhead.
An alternative is binary translation, which converts guest machine code into code executable by the host. Static translation performs this conversion before execution. It can optimize extensively, but identifying all executable instructions is difficult when programs mix code with data, compute branch destinations, or generate instructions at runtime. Dynamic binary translation converts code during execution, usually in blocks, and stores the results in a translation cache.
A dynamic translator often decodes guest instructions into an intermediate representation, optimizes that representation, and generates host instructions. It may keep frequently used guest registers in host registers, combine operations, and link translated blocks directly to one another. These techniques reduce dispatch overhead. QEMU’s Tiny Code Generator is an example of infrastructure designed to translate multiple guest architectures to multiple host architectures.
Translation must preserve effects that do not map neatly between architectures. Guest and host processors may differ in condition flags, integer widths, alignment rules, byte order, and floating-point behavior. An x86 arithmetic instruction can update several condition flags even when the surrounding program uses only one. Translators can defer flag computation until needed, but must still reconstruct correct state if an exception, debugger, or later instruction observes it. Floating-point differences involving rounding, exceptional values, or intermediate precision can likewise affect compatibility with IEEE 754 arithmetic.
Self-modifying code introduces another difficulty. If a program changes instructions already translated, the cached translation becomes stale. The emulator must detect relevant writes, invalidate affected blocks, and coordinate changes across executing threads. Precise exceptions impose a related requirement: an error arising in generated host code must be reported as if it occurred at the correct guest instruction, with the appropriate guest state.
Performance therefore depends on workload and implementation rather than on a single universal slowdown factor. Large, frequently repeated blocks can amortize translation cost; code that changes constantly or crosses frequently into emulated services may not. Interpretation and translation are also compatible strategies: an emulator can interpret uncommon operations while translating frequently executed paths.
Timing, concurrency, and fidelity
Functional correctness concerns what a system computes; timing fidelity concerns when observable events occur. An emulator may produce the right arithmetic results and still fail to run software that depends on interrupt spacing, processor speed, or contention for memory. Historical software often used instruction loops as timers or synchronized display updates with the progress of a video beam. Such behavior makes time part of the compatibility interface.
A cycle-oriented emulator tracks time in units associated with the target hardware’s clocks. It may assign cycle costs to instructions or model smaller steps such as bus accesses. The term cycle-accurate is not a guarantee that every internal effect has been reproduced. Accuracy depends on which clocks, components, and interactions the model includes. A processor can have correct instruction durations while its interaction with video hardware remains inaccurate.
The Commodore 64 illustrates why component interaction matters. Its MOS 6510 processor and VIC-II video chip share access to memory, and video activity can affect processor progress. Software can change graphics registers at particular raster positions to produce effects beyond a static display configuration. Reproducing only the documented final register values may therefore be insufficient; the emulator must account for the sequence and timing of accesses.
Modern multiprocessor systems introduce a different fidelity problem. Instructions on separate guest processors interact through shared memory, interrupts, and atomic operations. Different architectures permit different orderings of memory operations. A translator running a guest with stronger ordering requirements on a more weakly ordered host may need additional synchronization. Correctly implementing the guest memory model is essential even when ordinary single-threaded tests succeed.
Determinism is related to timing but is not identical to it. A deterministic emulator produces the same execution from the same initial state and specified inputs. Host scheduling, real-time clocks, network traffic, and asynchronous device completions can disturb this property. Record-and-replay systems capture nondeterministic inputs so that an execution can be reproduced for debugging or analysis.
The fidelity target determines which mechanisms are necessary. Application compatibility may tolerate approximate peripheral timing, while hardware diagnostics may probe exact interrupt behavior. Performance research may require detailed cache and pipeline models that ordinary compatibility software does not need. Higher detail also increases implementation and validation costs; a more elaborate model is not automatically more accurate unless its assumptions and parameters match the target.
Peripheral devices and external interfaces
Peripheral emulation often accounts for more complexity than instruction execution. A storage controller, graphics device, sound chip, or network adapter has its own state machine, command formats, buffering rules, and error conditions. Software may rely on behavior absent from official manuals, especially when drivers were developed against particular hardware revisions. Consequently, an emulator that executes every processor instruction correctly can still fail because a device model returns the wrong status bit.
Storage emulation commonly separates the guest-visible controller from the host-side storage representation. The guest might see an IDE disk or a floppy controller while the emulator stores its contents in a regular host file. A simple sector image preserves logical data but may omit physical track layout, unusual sector sizes, timing information, or deliberately malformed regions. Historical copy-protection schemes sometimes depend on these omitted properties, requiring richer disk representations.
Graphics emulation spans several levels. A simple framebuffer exposes memory whose contents become pixels. A command-based graphics processor instead accepts operations that must be interpreted or translated into host rendering commands. Differences in precision, clipping, texture formats, and synchronization can make direct translation imperfect. A graphics processing unit also interacts with the processor through memory visibility and command completion, so visual correctness alone does not establish complete compatibility.
Sound devices can require both digital and analog modeling. Reproducing a sound chip’s register behavior may not reproduce its audible output if filters, distortion, or component tolerances matter. Emulators often distinguish mathematically idealized synthesis from models intended to approximate particular hardware revisions. Host audio buffering introduces an additional compromise between latency and resistance to interruptions.
External connectivity requires similar choices. An emulated network adapter can connect a guest to a host-provided virtual network, while a terminal interface may be connected to a host window or serial device. Direct access to physical equipment can improve compatibility, but it ties the guest more closely to the host environment and complicates isolation.
Some virtual environments avoid reproducing historical devices and instead expose interfaces designed for virtualization. A cooperating guest uses a specialized device driver to communicate efficiently with the host. This approach, often called paravirtualization, can reduce overhead, but it changes the guest-visible platform. It is therefore especially useful for contemporary virtual machines and less suitable when the purpose is to reproduce an unmodified historical installation.
Hardware emulation and programmable implementations
Emulation can be implemented in hardware as well as software. In electronic design, hardware emulation executes a representation of a digital circuit on specialized hardware so that designers can test behavior before manufacturing the final chip. The target is typically described using a hardware description language, such as Verilog or VHDL, rather than as a sequence of processor instructions.
This technique occupies a practical middle ground between software-based logic simulation and fabricated silicon. A detailed software simulator can expose many internal events but may execute a large design too slowly to run substantial operating-system or application workloads. Hardware emulation can make such workloads more tractable while preserving access to internal signals and debugging controls. It is widely used in electronic design automation, particularly for complex systems on a chip.
A related approach maps a design to a field-programmable gate array, or FPGA. Its configurable logic and routing can implement many circuit operations concurrently. FPGA prototyping often emphasizes execution speed and integration with external devices, whereas dedicated hardware-emulation systems emphasize verification capacity, visibility, and controllability. The distinction is not absolute, but it affects how designs are partitioned, compiled, and instrumented.
Programmable logic also supports recreations of historical computers and game systems. Instead of a host processor sequentially interpreting every guest instruction, configurable logic implements processor and peripheral state machines that operate concurrently. This can make fine-grained timing relationships easier to represent. It does not, however, guarantee accuracy. A hardware recreation can contain incorrect logic, omit undocumented behavior, or approximate analog components just as a software emulator can.
Digital and analog boundaries remain important. An FPGA implementation may accurately reproduce the logic of a sound generator but use a different output circuit. A recreated video system may generate logically correct pixel values while using modern digital output rather than the original analog signal. Whether these differences matter depends on the purpose: running software, preserving the experience of a display, or validating a circuit.
Hardware and software techniques are frequently combined. A virtual platform can execute processor software while a hardware emulator handles an accelerator or subsystem. Such co-emulation requires communication protocols and synchronization between the two sides. Its performance depends not only on the speed of each model but also on the frequency and cost of interactions across that boundary.
Software preservation, reproducibility, and legal boundaries
Emulation preserves access to executable behavior rather than merely extracting stored information. A document’s meaning can depend on the application that interprets it, while an interactive work may depend on timing, input devices, sound, and display conventions. Running original software in an emulated environment can therefore preserve properties that conversion into a new file format does not capture. This makes emulation relevant to archives, libraries, and institutions responsible for cultural heritage.
A preserved environment usually contains several interdependent objects: the emulator, its configuration, guest firmware, operating-system files, applications, and storage images. A disk image by itself may not identify the machine model or peripheral settings required to use it. Descriptive metadata is consequently important. Version numbers, configuration files, provenance, and checksums help establish what was preserved and whether later execution uses the same materials.
Emulator versioning introduces a further problem. Correcting a device model can change the behavior of software that appeared to work under an earlier version. Save states are particularly sensitive because they encode internal execution state rather than merely guest files. Unless explicitly designed for portability, a save state may depend on the emulator version and implementation details. Preserving the source environment alongside ordinary guest storage can therefore be important for reproducibility.
Legal rights attach separately to different components. An emulator’s implementation, a machine’s firmware, an operating system, and an application may have different owners and licenses. The fact that a work is no longer commercially sold does not by itself place it in the public domain. Likewise, lawful use of an emulator does not establish that every distributed game or firmware image is authorized.
United States litigation has addressed some aspects of compatibility-oriented reverse engineering. In Sega Enterprises Ltd. v. Accolade, Inc. in 1992, the Ninth Circuit considered intermediate copying undertaken to discover compatibility requirements. In Sony Computer Entertainment, Inc. v. Connectix Corp. in 2000, the same court addressed intermediate copying during development of a PlayStation emulator. The decisions recognized fair use in the circumstances before them; they did not establish unrestricted permission to distribute copyrighted software.
Copyright exceptions, contractual terms, and rules concerning circumvention vary by jurisdiction and context. Preservation practice therefore separates technical authenticity from rights status. An accurately recreated machine environment can still contain materials whose copying or public availability is restricted, while a legally distributable recreation may omit original assets needed to reproduce a complete historical experience.
Validation, debugging, and security
Validating an emulator requires evidence at several levels. Instruction tests check arithmetic, flags, exceptions, and unusual operand combinations. Device tests check register transitions, interrupts, and transfer behavior. Complete applications then exercise interactions that isolated tests may miss. Successfully booting an operating system is a useful milestone, but it is not proof that every instruction, device, or timing relationship is correct.
A common technique is differential testing: the same workload is executed on the emulator and a reference implementation, and their observable states are compared. The reference may be physical hardware, another emulator, or an independently developed model. Differences can be localized by comparing instruction traces, register values, memory writes, or device events. This method is powerful but inherits the limits of the reference; two implementations can share the same mistaken assumption.
Randomly generated instruction sequences and fuzz testing help explore cases that manually written programs rarely cover. Generators must distinguish defined behavior from unspecified or implementation-dependent results. Otherwise, a disagreement may reflect an invalid test expectation rather than an emulator defect. Formal verification can establish properties of selected translation rules or state machines, although proving a complete practical machine emulator remains much more demanding.
Emulation is also an unusually powerful debugging environment. Execution can be paused at arbitrary instructions, memory accesses can trigger breakpoints, and device state can be inspected without modifying the guest. Snapshots allow a complete virtual machine to return to an earlier state. With suitable deterministic replay, reverse debugging can reconstruct the events preceding a failure instead of relying only on the final corrupted state.
Security analysis uses these properties to observe malware, inspect suspicious files, and analyze software for architectures unavailable to the investigator. Emulation can expose instructions, memory accesses, and calls to operating-system services with fine granularity. However, malicious programs may detect an emulator through distinctive device identities, timing behavior, missing instructions, or implementation defects and then alter their behavior. Failure to observe harmful activity in one emulated environment is therefore not evidence that a program is harmless.
An emulator is not inherently a secure sandbox. Guest-controlled instructions, executable files, disk images, and device commands all reach complex host-side code. Defects in that code can create a security vulnerability allowing effects beyond the intended guest boundary. Shared directories, clipboard integration, networking, and device passthrough also expose deliberate channels to the host. Security evaluations must therefore distinguish the accuracy of the emulated machine from the strength of the isolation surrounding it.