Warning: mkdir() [
function.mkdir]: Permission denied in
/home/webs/affiliatelib2/CacheManager.php on line
12
Warning: mkdir() [
function.mkdir]: No such file or directory in
/home/webs/affiliatelib2/CacheManager.php on line
12
Warning: fopen(/home/templatecore2cache//*cluesnet.com/35/354116d3b4a23e202ccc2b01ab4befc976757812.tc2cache) [
function.fopen]: failed to open stream: No such file or directory in
/home/webs/affiliatelib2/CacheManager.php on line
130
Warning: fwrite(): supplied argument is not a valid stream resource in
/home/webs/affiliatelib2/CacheManager.php on line
131
Warning: fclose(): supplied argument is not a valid stream resource in
/home/webs/affiliatelib2/CacheManager.php on line
132
emulates the familiar command line interface of DOS.
An
emulator duplicates (provides an
emulation of) the functions of one system with a different system, so that the second system behaves like (and appears to be) the first system. This focus on exact reproduction of external behavior is in contrast to simulation, which concerns an abstract model of the system being simulated, often considering internal
state (computer science).
Emulators in computer science
Emulation refers to the ability of a computer program or electronic device to
imitate another program or device. Many
Computer printer, for example, are designed to emulate
Hewlett-Packard LaserJet printers because so much software is written for HP printers. By emulating an HP printer, a printer can work with any software written for a real HP printer. Emulation "tricks" the software into believing that a device is really some other device.
A
hardware emulator is an emulator which takes the form of a hardware device. Examples include printer emulators inside the
Read-only Memory of the printer, and
Field-programmable gate array-based hardware emulations.
In a theoretical sense, the Church-Turing thesis implies that any operating environment can be emulated within any other. In practice, it can be quite difficult, particularly when the exact behavior of the system to be emulated is not documented and has to be deduced through
reverse engineering. It also says nothing about timing constraints; if the emulator does not perform as quickly as the original hardware, the emulated software may run much more slowly than it would have on the original hardware.
Types of emulator
Most emulators just emulate a hardware architecture — if operating system firmware or software is required for the desired software, it must be provided as well (and may itself be emulated). Both the OS and the software will then be interpreter (computer software) by the emulator, rather than being run by native hardware. Apart from this interpreter for the emulated
machine language, some other hardware (such as input or output devices) must be provided in virtual form as well; for example, if writing to a specific memory location should influence the screen this would need to be emulated.
While emulation could, if taken to the extreme, go down to the atomic level, basing its output on a simulation of the actual circuitry from a virtual power source, this would be a highly unusual solution. Emulators typically stop at a simulation of the documented hardware specifications and digital logic. Sufficient emulation of some hardware platforms requires extreme accuracy, down to the level of individual clock cycles, undocumented features, unpredictable analog elements, and implementation bugs. This is particularly the case with classic home computers such as the
Commodore 64, whose software often depends on highly sophisticated low-level programming tricks invented by game programmers and the demoscene.
In contrast, some other platforms have had very little use of direct hardware addressing. In these cases, a simple
compatibility layer may suffice. This translates system calls for the emulated system into system calls for the host system.
Developers of software for
embedded systems or video game consoles often design their software on especially accurate emulators called
Simulation#Simulation in computer science before trying it on the real hardware. This is so that software can be produced and tested before the final hardware exists in large quantities, so that it can be tested without taking the time to copy the program to be debugged at a low level without introducing the side effects of a
debugger. In many cases, the simulator is actually produced by the company providing the hardware, which theoretically increases its accuracy.
Structure of an emulator
Typically, an emulator is divided into module (computing) that correspond roughly to the emulated computer's subsystems.Most often, an emulator will be composed of the following modules:
- a CPU emulator or CPU simulator (the two terms are mostly interchangeable in this case)
- a memory subsystem module
- various I/O devices emulators
Buses are often not emulated, either for reasons of performance or simplicity, and virtual peripherals communicate directly with the CPU or the memory subsystem.
Memory subsystem
It is possible for the memory subsystem emulation to be reduced to simply an array of elements each sized like an emulated word; however, this model falls very quickly as soon as any location in the computer's logical memory does not match
physical memory.
This clearly is the case whenever the emulated hardware allows for advanced memorymanagement (in which case, the
Memory management unit logic can be embedded in the memory emulator, made a module of its own, or sometimes integrated into the CPU simulator).
Even if the emulated computer does not feature an MMU, though, there are usually other factors that break the equivalence between logical and physical memory: many (if not most) architecture offer memory-mapped I/O; even those that do not almost invariably have a block of logical memory mapped to
Read-only memory, which means that the memory-array module must be discarded if the read-only nature of ROM is to be emulated. Features such as bank switching or
memory segment may also complicate memory emulation.
As a result, most emulators implement at least two procedures for writing to and reading from logical memory, and it is these procedures' duty to map every access to the correct location of the correct object.
On a
base-limit addressing system where memory from address
0 to address
ROMSIZE is read-only memory, while the rest is RAM, something along the line of the following procedures would be typical:
void WriteMemory(word Address, word Value) {
word RealAddress;
RealAddress=Address+BaseRegister;
if(RealAddressROMSIZE) MemoryRealAddress=Value;
} else {
RaiseInterrupt(INT_SEGFAULT);
}
}
word ReadMemory(word Address) {
word RealAddress;
RealAddress=Address+BaseRegister;
if(RealAddress management that can mostly be ignored in a software implementation.
Even in emulators that treat each device as a special case, there is usually a common basic infrastructure for:
- managing interrupts, by means of a procedure that sets flags readable by the CPU simulator whenever an interrupt is raised, allowing the virtual CPU to "poll for (virtual) interrupts"
- writing to and reading from physical memory, by means of two procedures similar to the ones dealing with logical memory (although, contrary to the latter, the former can often be left out, and direct references to the memory array be employed instead)
Legal controversy
See article Console emulator#Legal issues
See also
- Simulation
- List of emulators — Software emulators:
- Other uses of the term emulator in the field of computer science:
- Hardware emulators:
- Field Programmable Gate Array (FPGA) Arcade hardware emulators.
- Field Programmable Gate Array (FPGA) CPU hardware emulators.
- Translation:
External links
- HowTo: Writing a Computer Emulator
- Checklist — Emulator Compatibility lists
- The History of Emulation — 1800 to 1999: Part 1, Part 2, Part 3, Part 4
- EmuFAQ — collection of essays surrounding the legality of emulators
- A Simple Python CPU Emulator Implementation
- Emulator News — Free Online Games — and Emulator downloads
- Mo'Slo — a popular CPU emulator with slow-down capabilities
- The Oldskool PC — provides information on how to run older games on newer computers
- EPROM emulator - hardware EPROM emulator for fast, easy program development
- PCSX2 - Sony Playstation 2 Emulator
- ZSNES - Super Nintendo Entertainment System Emulator
emulator from FOLDOC
emulator. Hardware or software that performs emulation. (1995-05-12) Try this search on Wikipedia, OneLook, Google
EMULATOR.ORG.UK
BOOB! - Emulators
Submit News
Stephen Owen S Emulators
Emulators Online - Run the Mac OS on Windows!
Official page of Emulators, Inc. the developers of the SoftMac emulator.
NeSC > Emulators
A-list: "Most people, most of the time" 1964 - an advanced core and plugin compatible; Project64 - the most complete overall emulator; These are the current leaders in terms of ...
C64 Emulators
CCS (v3.4) (1684KB) The latest Windows build, includes multiplay over the Internet, increased compatability and more resolutions. Vice (v1.22) (4870KB)
World of Spectrum - Emulators
Notice that, although the emulators are written for DOS, they will run in a DOS-box in Windows as well.
Emulator - Wikipedia, the free encyclopedia
An emulator duplicates (provides an emulation of) the functions of one system using a different system, so that the second system behaves like (and appears to be) the first system.
Transputer Emulator
Emulates one T414 transputer (no FPU or bit blit instructions), supplies file and terminal I/O services; purely interpretive (slow), easily portable C source code compiles on ...