C O M P U T E R   E M U L A T I O N
Aaron Kaluszka
14 Dec 2001

How Computer Emulation Works
Emulation differs from simulation in that code from an original machine can be run directly on the emulator. In simulation, the overall function of a machine is accomplished, but in emulation, each internal function of the machine is directly enacted. Computers have basic hardware parts that interact with each other in order to accomplish functions. Each component of the computer must be emulated in order to have a complete emulator. The CPU is the core of the computer, and it is the core of the emulation code. CPU emulators are often distributed separately for use in many emulation projects that attempt to emulate different devices that use the same CPU. Each instruction that software sends the emulator should be implemented and interpreted by the emulator. These are the functions that must be emulated. The entire design of the device should also be emulated.

Besides the CPU, memory must emulated as well. Memory architecture varies from system to system, but should be the easiest component to implement as it is usually a basic array of dynamic values. In addition, most useful emulators handle the I/O of a device. This means that the emulator can take input from a keyboard, mouse or other input device and use it just as the real machine would. Outputs, such as a monitor or TV and sound is usually emulated. This is the most complex part of any given machine to emulate because screen and sound updates must be synchronized with the CPU emulation in order to achieve useful results. Furthermore, outputs can have their own processing units which also must be emulated in order to achieve full functionality. Sometimes, emulator and simulator technology can be integrated if complete emulation is not feasible on a system. For example, early emulators simulated sound by including sound samples instead of actually generating the sounds.