<s>
In	O
computing	O
,	O
an	O
emulator	B-Application
is	O
hardware	B-Architecture
or	O
software	B-Application
that	O
enables	O
one	O
computer	O
system	O
(	O
called	O
the	O
host	O
)	O
to	O
behave	O
like	O
another	O
computer	O
system	O
(	O
called	O
the	O
guest	O
)	O
.	O
</s>
<s>
An	O
emulator	B-Application
typically	O
enables	O
the	O
host	O
system	O
to	O
run	O
software	B-Application
or	O
use	O
peripheral	O
devices	O
designed	O
for	O
the	O
guest	O
system	O
.	O
</s>
<s>
Emulation	B-Application
refers	O
to	O
the	O
ability	O
of	O
a	O
computer	B-Application
program	I-Application
in	O
an	O
electronic	O
device	O
to	O
emulate	O
(	O
or	O
imitate	O
)	O
another	O
program	O
or	O
device	O
.	O
</s>
<s>
Many	O
printers	O
,	O
for	O
example	O
,	O
are	O
designed	O
to	O
emulate	O
HP	O
LaserJet	O
printers	O
because	O
so	O
much	O
software	B-Application
is	O
written	O
for	O
HP	O
printers	O
.	O
</s>
<s>
If	O
a	O
non-HP	O
printer	O
emulates	B-Application
an	O
HP	O
printer	O
,	O
any	O
software	B-Application
written	O
for	O
a	O
real	O
HP	O
printer	O
will	O
also	O
run	O
in	O
the	O
non-HP	O
printer	O
emulation	B-Application
and	O
produce	O
equivalent	O
printing	O
.	O
</s>
<s>
Since	O
at	O
least	O
the	O
1990s	O
,	O
many	O
video	O
game	O
enthusiasts	O
and	O
hobbyists	O
have	O
used	O
emulators	B-Application
to	O
play	O
classic	O
arcade	O
games	O
from	O
the	O
1980s	O
using	O
the	O
games	O
 '	O
original	O
1980s	O
machine	B-Language
code	I-Language
and	O
data	O
,	O
which	O
is	O
interpreted	B-Application
by	O
a	O
current-era	O
system	O
,	O
and	O
to	O
emulate	O
old	O
video	B-Application
game	I-Application
consoles	I-Application
.	O
</s>
<s>
A	O
hardware	B-Architecture
emulator	B-Application
is	O
an	O
emulator	B-Application
which	O
takes	O
the	O
form	O
of	O
a	O
hardware	B-Architecture
device	O
.	O
</s>
<s>
Examples	O
include	O
the	O
DOS-compatible	O
card	O
installed	O
in	O
some	O
1990s-era	O
Macintosh	B-Device
computers	O
,	O
such	O
as	O
the	O
Centris	B-Device
610	I-Device
or	O
Performa	B-Device
630	I-Device
,	O
that	O
allowed	O
them	O
to	O
run	O
personal	B-Device
computer	I-Device
(	O
PC	O
)	O
software	B-Application
programs	I-Application
and	O
field-programmable	O
gate	O
array-based	O
hardware	B-Architecture
emulators	B-Application
.	O
</s>
<s>
The	O
Church-Turing	O
thesis	O
implies	O
that	O
theoretically	O
,	O
any	O
operating	O
environment	O
can	O
be	O
emulated	B-Application
within	O
any	O
other	O
environment	O
,	O
assuming	O
memory	O
limitations	O
are	O
ignored	O
.	O
</s>
<s>
However	O
,	O
in	O
practice	O
,	O
it	O
can	O
be	O
quite	O
difficult	O
,	O
particularly	O
when	O
the	O
exact	O
behavior	O
of	O
the	O
system	O
to	O
be	O
emulated	B-Application
is	O
not	O
documented	O
and	O
has	O
to	O
be	O
deduced	O
through	O
reverse	O
engineering	O
.	O
</s>
<s>
It	O
also	O
says	O
nothing	O
about	O
timing	O
constraints	O
;	O
if	O
the	O
emulator	B-Application
does	O
not	O
perform	O
as	O
quickly	O
as	O
it	O
did	O
using	O
the	O
original	O
hardware	B-Architecture
,	O
the	B-Application
software	I-Application
inside	O
the	O
emulation	B-Application
may	O
run	O
much	O
more	O
slowly	O
(	O
possibly	O
triggering	O
timer	O
interrupts	B-Application
that	O
alter	O
behavior	O
)	O
.	O
</s>
<s>
Most	O
emulators	B-Application
just	O
emulate	O
a	O
hardware	B-Architecture
architecture	O
—	O
if	O
operating	B-General_Concept
system	I-General_Concept
firmware	O
or	O
software	B-Application
is	O
required	O
for	O
the	O
desired	O
software	B-Application
,	O
it	O
must	O
be	O
provided	O
as	O
well	O
(	O
and	O
may	O
itself	O
be	O
emulated	B-Application
)	O
.	O
</s>
<s>
Both	O
the	O
OS	O
and	O
the	B-Application
software	I-Application
will	O
then	O
be	O
interpreted	B-Application
by	O
the	O
emulator	B-Application
,	O
rather	O
than	O
being	O
run	O
by	O
native	O
hardware	B-Architecture
.	O
</s>
<s>
Apart	O
from	O
this	O
interpreter	B-Application
for	O
the	O
emulated	B-Application
binary	O
machine	B-Language
's	I-Language
language	I-Language
,	O
some	O
other	O
hardware	B-Architecture
(	O
such	O
as	O
input	O
or	O
output	O
devices	O
)	O
must	O
be	O
provided	O
in	O
virtual	O
form	O
as	O
well	O
;	O
for	O
example	O
,	O
if	O
writing	O
to	O
a	O
specific	O
memory	O
location	O
should	O
influence	O
what	O
is	O
displayed	O
on	O
the	O
screen	O
,	O
then	O
this	O
would	O
need	O
to	O
be	O
emulated	B-Application
.	O
</s>
<s>
While	O
emulation	B-Application
could	O
,	O
if	O
taken	O
to	O
the	O
extreme	O
,	O
go	O
down	O
to	O
the	O
atomic	O
level	O
,	O
basing	O
its	O
output	O
on	O
a	O
simulation	O
of	O
the	O
actual	O
circuitry	O
from	O
a	O
virtual	O
power	O
source	O
,	O
this	O
would	O
be	O
a	O
highly	O
unusual	O
solution	O
.	O
</s>
<s>
Emulators	B-Application
typically	O
stop	O
at	O
a	O
simulation	O
of	O
the	O
documented	O
hardware	B-Architecture
specifications	O
and	O
digital	O
logic	O
.	O
</s>
<s>
Sufficient	O
emulation	B-Application
of	O
some	O
hardware	B-Device
platforms	I-Device
requires	O
extreme	O
accuracy	O
,	O
down	O
to	O
the	O
level	O
of	O
individual	O
clock	O
cycles	O
,	O
undocumented	O
features	O
,	O
unpredictable	O
analog	O
elements	O
,	O
and	O
implementation	O
bugs	O
.	O
</s>
<s>
This	O
is	O
particularly	O
the	O
case	O
with	O
classic	O
home	O
computers	O
such	O
as	O
the	O
Commodore	O
64	O
,	O
whose	O
software	B-Application
often	O
depends	O
on	O
highly	O
sophisticated	O
low-level	O
programming	O
tricks	O
invented	O
by	O
game	O
programmers	O
and	O
the	O
"	O
demoscene	O
"	O
.	O
</s>
<s>
In	O
contrast	O
,	O
some	O
other	O
platforms	B-Device
have	O
had	O
very	O
little	O
use	O
of	O
direct	O
hardware	B-Architecture
addressing	O
,	O
such	O
as	O
an	O
emulator	B-Application
for	O
the	O
PlayStation	B-Device
4	O
.	O
</s>
<s>
In	O
these	O
cases	O
,	O
a	O
simple	O
compatibility	B-General_Concept
layer	I-General_Concept
may	O
suffice	O
.	O
</s>
<s>
This	O
translates	O
system	O
calls	O
for	O
the	O
foreign	O
system	O
into	O
system	O
calls	O
for	O
the	O
host	O
system	O
e.g.	O
,	O
the	O
Linux	O
compatibility	B-General_Concept
layer	I-General_Concept
used	O
on	O
*	O
BSD	O
to	O
run	O
closed	O
source	O
Linux	O
native	O
software	B-Application
on	O
FreeBSD	B-Operating_System
and	O
NetBSD	B-Device
.	O
</s>
<s>
For	O
example	O
,	O
while	O
the	O
Nintendo	B-Operating_System
64	I-Operating_System
graphic	O
processor	O
was	O
fully	O
programmable	O
,	O
most	O
games	O
used	O
one	O
of	O
a	O
few	O
pre-made	O
programs	O
,	O
which	O
were	O
mostly	O
self-contained	O
and	O
communicated	O
with	O
the	O
game	O
via	O
FIFO	B-Operating_System
;	O
therefore	O
,	O
many	O
emulators	B-Application
do	O
not	O
emulate	O
the	O
graphic	O
processor	O
at	O
all	O
,	O
but	O
simply	O
interpret	O
the	O
commands	O
received	O
from	O
the	O
CPU	O
as	O
the	O
original	O
program	O
would	O
.	O
</s>
<s>
Developers	O
of	O
software	B-Application
for	O
embedded	B-Architecture
systems	I-Architecture
or	O
video	B-Application
game	I-Application
consoles	I-Application
often	O
design	O
their	O
software	B-Application
on	O
especially	O
accurate	O
emulators	B-Application
called	O
simulators	B-Application
before	O
trying	O
it	O
on	O
the	O
real	O
hardware	B-Architecture
.	O
</s>
<s>
This	O
is	O
so	O
that	O
software	B-Application
can	O
be	O
produced	O
and	O
tested	O
before	O
the	O
final	O
hardware	B-Architecture
exists	O
in	O
large	O
quantities	O
,	O
so	O
that	O
it	O
can	O
be	O
tested	O
without	O
taking	O
the	O
time	O
to	O
copy	O
the	O
program	O
to	O
be	O
debugged	O
at	O
a	O
low	O
level	O
and	O
without	O
introducing	O
the	O
side	O
effects	O
of	O
a	O
debugger	B-Application
.	O
</s>
<s>
In	O
many	O
cases	O
,	O
the	O
simulator	O
is	O
actually	O
produced	O
by	O
the	O
company	O
providing	O
the	O
hardware	B-Architecture
,	O
which	O
theoretically	O
increases	O
its	O
accuracy	O
.	O
</s>
<s>
Math	O
co-processor	O
emulators	B-Application
allow	O
programs	O
compiled	B-Language
with	O
math	O
instructions	O
to	O
run	O
on	O
machines	O
that	O
do	O
not	O
have	O
the	O
co-processor	O
installed	O
,	O
but	O
the	O
extra	O
work	O
done	O
by	O
the	O
CPU	O
may	O
slow	O
the	O
system	O
down	O
.	O
</s>
<s>
If	O
a	O
math	O
coprocessor	O
is	O
not	O
installed	O
or	O
present	O
on	O
the	O
CPU	O
,	O
when	O
the	O
CPU	O
executes	O
any	O
co-processor	O
instruction	O
it	O
will	O
make	O
a	O
determined	O
interrupt	B-Application
(	O
coprocessor	O
not	O
available	O
)	O
,	O
calling	O
the	O
math	O
emulator	B-Application
routines	O
.	O
</s>
<s>
When	O
the	O
instruction	O
is	O
successfully	O
emulated	B-Application
,	O
the	O
program	O
continues	O
executing	O
.	O
</s>
<s>
Logic	O
simulation	O
is	O
the	O
use	O
of	O
a	O
computer	B-Application
program	I-Application
to	O
simulate	O
the	O
operation	O
of	O
a	O
digital	O
circuit	O
such	O
as	O
a	O
processor	O
.	O
</s>
<s>
This	O
is	O
done	O
after	O
a	O
digital	O
circuit	O
has	O
been	O
designed	O
in	O
logic	O
equations	O
,	O
but	O
before	O
the	O
circuit	O
is	O
fabricated	O
in	O
hardware	B-Architecture
.	O
</s>
<s>
Functional	O
simulation	O
is	O
the	O
use	O
of	O
a	O
computer	B-Application
program	I-Application
to	O
simulate	O
the	O
execution	O
of	O
a	O
second	O
computer	B-Application
program	I-Application
written	O
in	O
symbolic	O
assembly	B-Language
language	I-Language
or	O
compiler	B-Language
language	O
,	O
rather	O
than	O
in	O
binary	O
machine	B-Language
code	I-Language
.	O
</s>
<s>
This	O
is	O
distinct	O
from	O
simulating	O
execution	O
of	O
binary	O
code	O
,	O
which	O
is	O
software	B-Application
emulation	I-Application
.	O
</s>
<s>
The	O
first	O
functional	O
simulator	O
was	O
written	O
by	O
Autonetics	O
about	O
1960	O
for	O
testing	O
assembly	B-Language
language	I-Language
programs	O
for	O
later	O
execution	O
in	O
military	O
computer	O
D-17B	B-Device
.	O
</s>
<s>
This	O
made	O
it	O
possible	O
for	O
flight	O
programs	O
to	O
be	O
written	O
,	O
executed	O
,	O
and	O
tested	O
before	O
D-17B	B-Device
computer	B-Architecture
hardware	I-Architecture
had	O
been	O
built	O
.	O
</s>
<s>
Video	B-Application
game	I-Application
console	I-Application
emulators	B-Application
are	O
programs	O
that	O
allow	O
a	O
personal	B-Device
computer	I-Device
or	O
video	B-Application
game	I-Application
console	I-Application
to	O
emulate	O
another	O
video	B-Application
game	I-Application
console	I-Application
.	O
</s>
<s>
They	O
are	O
most	O
often	O
used	O
to	O
play	O
older	O
1980s	O
to	O
2000s-era	O
video	O
games	O
on	O
modern	O
personal	B-Device
computers	I-Device
and	O
more	O
contemporary	O
video	B-Application
game	I-Application
consoles	I-Application
.	O
</s>
<s>
They	O
are	O
also	O
used	O
to	O
translate	O
games	O
into	O
other	O
languages	O
,	O
to	O
modify	O
existing	O
games	O
,	O
and	O
in	O
the	O
development	O
process	O
of	O
"	O
home	O
brew	O
"	O
DIY	O
demos	B-Language
and	O
in	O
the	O
creation	O
of	O
new	O
games	O
for	O
older	O
systems	O
.	O
</s>
<s>
The	O
Internet	O
has	O
helped	O
in	O
the	O
spread	O
of	O
console	O
emulators	B-Application
,	O
as	O
most	O
-	O
if	O
not	O
all	O
-	O
would	O
be	O
unavailable	O
for	O
sale	O
in	O
retail	O
outlets	O
.	O
</s>
<s>
Examples	O
of	O
console	O
emulators	B-Application
that	O
have	O
been	O
released	O
in	O
the	O
last	O
few	O
decades	O
are	O
:	O
RPCS3	B-Language
,	O
Dolphin	B-Application
,	O
Cemu	B-Application
,	O
PCSX2	B-Application
,	O
PPSSPP	B-Language
,	O
ZSNES	B-Language
,	O
Citra	B-Application
,	O
ePSXe	B-Application
,	O
Project64	B-Language
,	O
Visual	B-Device
Boy	I-Device
Advance	I-Device
,	O
Nestopia	B-Application
,	O
and	O
Yuzu	O
.	O
</s>
<s>
Due	O
to	O
their	O
popularity	O
,	O
emulators	B-Application
have	O
been	O
impersonated	O
by	O
malware	O
.	O
</s>
<s>
Most	O
of	O
these	O
emulators	B-Application
are	O
for	O
video	B-Application
game	I-Application
consoles	I-Application
like	O
the	B-Operating_System
Xbox	I-Operating_System
360	I-Operating_System
,	O
Xbox	B-Device
One	I-Device
,	O
Nintendo	O
3DS	O
,	O
etc	O
.	O
</s>
<s>
Generally	O
such	O
emulators	B-Application
make	O
currently	O
impossible	O
claims	O
such	O
as	O
being	O
able	O
to	O
run	O
Xbox	B-Device
One	I-Device
and	O
Xbox	B-Operating_System
360	I-Operating_System
games	O
in	O
a	O
single	O
program	O
.	O
</s>
<s>
As	O
computers	O
and	O
global	O
computer	O
networks	O
continued	O
to	O
advance	O
and	O
emulator	B-Application
developers	O
grew	O
more	O
skilled	O
in	O
their	O
work	O
,	O
the	O
length	O
of	O
time	O
between	O
the	O
commercial	O
release	O
of	O
a	O
console	O
and	O
its	O
successful	O
emulation	B-Application
began	O
to	O
shrink	O
.	O
</s>
<s>
Fifth	B-Application
generation	I-Application
consoles	O
such	O
as	O
Nintendo	B-Operating_System
64	I-Operating_System
,	O
PlayStation	B-Device
and	O
sixth	B-Application
generation	I-Application
handhelds	O
,	O
such	O
as	O
the	O
Game	B-Device
Boy	I-Device
Advance	I-Device
,	O
saw	O
significant	O
progress	O
toward	O
emulation	B-Application
during	O
their	O
production	O
.	O
</s>
<s>
This	O
led	O
to	O
an	O
effort	O
by	O
console	O
manufacturers	O
to	O
stop	O
unofficial	O
emulation	B-Application
,	O
but	O
consistent	O
failures	O
such	O
as	O
Sega	O
v	O
.	O
Accolade	O
977	O
F.2d	O
1510	O
(	O
9th	O
Cir	O
.	O
</s>
<s>
1992	O
)	O
,	O
Sony	B-Operating_System
Computer	I-Operating_System
Entertainment	I-Operating_System
,	I-Operating_System
Inc	I-Operating_System
.	I-Operating_System
v	I-Operating_System
.	I-Operating_System
Connectix	I-Operating_System
Corporation	I-Operating_System
203	O
F.3d	O
596	O
(	O
2000	O
)	O
,	O
and	O
Sony	B-Device
Computer	I-Device
Entertainment	I-Device
America	I-Device
v	I-Device
.	I-Device
Bleem	I-Device
214	O
F.3d	O
1022	O
(	O
2000	O
)	O
,	O
have	O
had	O
the	O
opposite	O
effect	O
.	O
</s>
<s>
According	O
to	O
all	O
legal	O
precedents	O
,	O
emulation	B-Application
is	O
legal	O
within	O
the	O
United	O
States	O
.	O
</s>
<s>
Under	O
United	O
States	O
law	O
,	O
obtaining	O
a	O
dumped	B-Error_Name
copy	O
of	O
the	O
original	O
machine	O
's	O
BIOS	B-Operating_System
is	O
legal	O
under	O
the	O
ruling	O
Lewis	O
Galoob	O
Toys	O
,	O
Inc	O
.	O
v	O
.	O
Nintendo	O
of	O
America	O
,	O
Inc.	O
,	O
964	O
F.2d	O
965	O
(	O
9th	O
Cir	O
.	O
</s>
<s>
To	O
mitigate	O
this	O
however	O
,	O
several	O
emulators	B-Application
for	O
platforms	B-Device
such	O
as	O
Game	B-Device
Boy	I-Device
Advance	I-Device
are	O
capable	O
of	O
running	O
without	O
a	O
BIOS	B-Operating_System
file	O
,	O
using	O
high-level	O
emulation	B-Application
to	O
simulate	O
BIOS	B-Operating_System
subroutines	O
at	O
a	O
slight	O
cost	O
in	O
emulation	B-Application
accuracy	O
.	O
</s>
<s>
Terminal	O
emulators	B-Application
are	O
software	B-Application
programs	I-Application
that	O
provide	O
modern	O
computers	O
and	O
devices	O
interactive	O
access	O
to	O
applications	O
running	O
on	O
mainframe	B-Architecture
computer	I-Architecture
operating	B-General_Concept
systems	I-General_Concept
or	O
other	O
host	O
systems	O
such	O
as	O
HP-UX	B-Application
or	O
OpenVMS	B-Operating_System
.	O
</s>
<s>
Terminals	O
such	O
as	O
the	O
IBM	B-Operating_System
3270	I-Operating_System
or	O
VT100	B-Device
and	O
many	O
others	O
are	O
no	O
longer	O
produced	O
as	O
physical	O
devices	O
.	O
</s>
<s>
Instead	O
,	O
software	B-Application
running	O
on	O
modern	O
operating	B-General_Concept
systems	I-General_Concept
simulates	O
a	O
"	O
dumb	O
"	O
terminal	O
and	O
is	O
able	O
to	O
render	O
the	O
graphical	O
and	O
text	O
elements	O
of	O
the	O
host	O
application	B-Application
,	O
send	O
keystrokes	O
and	O
process	O
commands	O
using	O
the	O
appropriate	O
terminal	O
protocol	O
.	O
</s>
<s>
Some	O
terminal	O
emulation	B-Application
applications	O
include	O
Attachmate	O
Reflection	O
,	O
IBM	O
Personal	O
Communications	O
,	O
and	O
Micro	O
Focus	O
Rumba	O
.	O
</s>
<s>
Other	O
types	O
of	O
emulators	B-Application
include	O
:	O
</s>
<s>
Floating-point	O
emulator	B-Application
:	O
Some	O
floating-point	O
hardware	B-Architecture
only	O
supports	O
the	O
simplest	O
operations	O
:	O
addition	O
,	O
subtraction	O
,	O
and	O
multiplication	O
.	O
</s>
<s>
In	O
systems	O
without	O
any	O
floating-point	O
hardware	B-Architecture
,	O
the	O
CPU	O
emulates	B-Application
it	O
using	O
a	O
series	O
of	O
simpler	O
fixed-point	O
arithmetic	O
operations	O
that	O
run	O
on	O
the	O
integer	O
arithmetic	O
logic	O
unit	O
.	O
</s>
<s>
Instruction	B-Application
set	I-Application
simulator	I-Application
in	O
a	O
high-level	B-Language
programming	I-Language
language	I-Language
:	O
Mimics	O
the	O
behavior	O
of	O
a	O
mainframe	B-Architecture
or	O
microprocessor	B-Architecture
by	O
"	O
reading	O
"	O
instructions	O
and	O
maintaining	O
internal	O
variables	O
which	O
represent	O
the	O
processor	O
's	O
registers	B-General_Concept
.	O
</s>
<s>
Network	B-Architecture
emulation	I-Architecture
:	O
a	O
technique	O
for	O
testing	O
the	O
performance	O
of	O
real	O
applications	O
over	O
a	O
virtual	O
network	O
.	O
</s>
<s>
Server	B-Application
emulator	I-Application
:	O
Multiplayer	O
video	O
games	O
often	O
rely	O
on	O
an	O
online	O
game	O
server	O
,	O
which	O
may	O
or	O
may	O
not	O
be	O
available	O
for	O
on-premises	O
installation	O
.	O
</s>
<s>
A	O
server	B-Application
emulator	I-Application
is	O
an	O
unofficial	O
on-premises	O
server	O
that	O
imitates	O
the	O
behavior	O
of	O
the	O
official	O
online	O
server	O
,	O
even	O
though	O
its	O
internal	O
working	O
might	O
be	O
different	O
.	O
</s>
<s>
Typically	O
,	O
an	O
emulator	B-Application
is	O
divided	O
into	O
modules	B-Architecture
that	O
correspond	O
roughly	O
to	O
the	O
emulated	B-Application
computer	O
's	O
subsystems	O
.	O
</s>
<s>
Most	O
often	O
,	O
an	O
emulator	B-Application
will	O
be	O
composed	O
of	O
the	O
following	O
modules	B-Architecture
:	O
</s>
<s>
Buses	O
are	O
often	O
not	O
emulated	B-Application
,	O
either	O
for	O
reasons	O
of	O
performance	O
or	O
simplicity	O
,	O
and	O
virtual	O
peripherals	O
communicate	O
directly	O
with	O
the	O
CPU	O
or	O
the	O
memory	O
subsystem	O
.	O
</s>
<s>
It	O
is	O
possible	O
for	O
the	O
memory	O
subsystem	O
emulation	B-Application
to	O
be	O
reduced	O
to	O
simply	O
an	O
array	O
of	O
elements	O
each	O
sized	O
like	O
an	O
emulated	B-Application
word	O
;	O
however	O
,	O
this	O
model	O
fails	O
very	O
quickly	O
as	O
soon	O
as	O
any	O
location	O
in	O
the	O
computer	O
's	O
logical	O
memory	O
does	O
not	O
match	O
physical	O
memory	O
.	O
</s>
<s>
This	O
clearly	O
is	O
the	O
case	O
whenever	O
the	O
emulated	B-Application
hardware	B-Architecture
allows	O
for	O
advanced	O
memory	O
management	O
(	O
in	O
which	O
case	O
,	O
the	O
MMU	B-General_Concept
logic	O
can	O
be	O
embedded	O
in	O
the	O
memory	O
emulator	B-Application
,	O
made	O
a	O
module	B-Architecture
of	O
its	O
own	O
,	O
or	O
sometimes	O
integrated	O
into	O
the	O
CPU	O
simulator	O
)	O
.	O
</s>
<s>
Even	O
if	O
the	O
emulated	B-Application
computer	O
does	O
not	O
feature	O
an	O
MMU	B-General_Concept
,	O
though	O
,	O
there	O
are	O
usually	O
other	O
factors	O
that	O
break	O
the	O
equivalence	O
between	O
logical	O
and	O
physical	O
memory	O
:	O
many	O
(	O
if	O
not	O
most	O
)	O
architectures	O
offer	O
memory-mapped	B-Architecture
I/O	I-Architecture
;	O
even	O
those	O
that	O
do	O
not	O
often	O
have	O
a	O
block	O
of	O
logical	O
memory	O
mapped	O
to	O
ROM	B-Device
,	O
which	O
means	O
that	O
the	O
memory-array	O
module	B-Architecture
must	O
be	O
discarded	O
if	O
the	O
read-only	O
nature	O
of	O
ROM	B-Device
is	O
to	O
be	O
emulated	B-Application
.	O
</s>
<s>
Features	O
such	O
as	O
bank	B-General_Concept
switching	I-General_Concept
or	O
segmentation	B-General_Concept
may	O
also	O
complicate	O
memory	O
emulation	B-Application
.	O
</s>
<s>
As	O
a	O
result	O
,	O
most	O
emulators	B-Application
implement	O
at	O
least	O
two	O
procedures	O
for	O
writing	O
to	O
and	O
reading	O
from	O
logical	O
memory	O
,	O
and	O
it	O
is	O
these	O
procedures	O
 '	O
duty	O
to	O
map	O
every	O
access	O
to	O
the	O
correct	O
location	O
of	O
the	O
correct	O
object	O
.	O
</s>
<s>
On	O
a	O
base-limit	O
addressing	O
system	O
where	O
memory	O
from	O
address	O
0	O
to	O
address	O
ROMSIZE-1	O
is	O
read-only	B-Device
memory	I-Device
,	O
while	O
the	O
rest	O
is	O
RAM	O
,	O
something	O
along	O
the	O
line	O
of	O
the	O
following	O
procedures	O
would	O
be	O
typical	O
:	O
</s>
<s>
The	O
CPU	O
simulator	O
is	O
often	O
the	O
most	O
complicated	O
part	O
of	O
an	O
emulator	B-Application
.	O
</s>
<s>
Many	O
emulators	B-Application
are	O
written	O
using	O
"	O
pre-packaged	O
"	O
CPU	O
simulators	B-Application
,	O
in	O
order	O
to	O
concentrate	O
on	O
good	O
and	O
efficient	O
emulation	B-Application
of	O
a	O
specific	O
machine	O
.	O
</s>
<s>
The	O
simplest	O
form	O
of	O
a	O
CPU	O
simulator	O
is	O
an	O
interpreter	B-Application
,	O
which	O
is	O
a	O
computer	B-Application
program	I-Application
that	O
follows	O
the	O
execution	O
flow	O
of	O
the	O
emulated	B-Application
program	O
code	O
and	O
,	O
for	O
every	O
machine	B-Language
code	I-Language
instruction	O
encountered	O
,	O
executes	O
operations	O
on	O
the	O
host	O
processor	O
that	O
are	O
semantically	O
equivalent	O
to	O
the	O
original	O
instructions	O
.	O
</s>
<s>
This	O
is	O
made	O
possible	O
by	O
assigning	O
a	O
variable	O
to	O
each	O
register	B-General_Concept
and	O
flag	O
of	O
the	O
simulated	O
CPU	O
.	O
</s>
<s>
The	O
logic	O
of	O
the	O
simulated	O
CPU	O
can	O
then	O
more	O
or	O
less	O
be	O
directly	O
translated	O
into	O
software	B-Application
algorithms	O
,	O
creating	O
a	O
software	B-Application
re-implementation	O
that	O
basically	O
mirrors	O
the	O
original	O
hardware	B-Architecture
implementation	O
.	O
</s>
<s>
The	O
following	O
example	O
illustrates	O
how	O
CPU	O
simulation	O
can	O
be	O
accomplished	O
by	O
an	O
interpreter	B-Application
.	O
</s>
<s>
In	O
this	O
case	O
,	O
interrupts	B-Application
are	O
checked-for	O
before	O
every	O
instruction	O
executed	O
,	O
though	O
this	O
behavior	O
is	O
rare	O
in	O
real	O
emulators	B-Application
for	O
performance	O
reasons	O
(	O
it	O
is	O
generally	O
faster	O
to	O
use	O
a	O
subroutine	O
to	O
do	O
the	O
work	O
of	O
an	O
interrupt	B-Application
)	O
.	O
</s>
<s>
Interpreters	B-Application
are	O
very	O
popular	O
as	O
computer	B-Application
simulators	I-Application
,	O
as	O
they	O
are	O
much	O
simpler	O
to	O
implement	O
than	O
more	O
time-efficient	O
alternative	O
solutions	O
,	O
and	O
their	O
speed	O
is	O
more	O
than	O
adequate	O
for	O
emulating	B-Application
computers	O
of	O
more	O
than	O
roughly	O
a	O
decade	O
ago	O
on	O
modern	O
machines	O
.	O
</s>
<s>
However	O
,	O
the	O
speed	O
penalty	O
inherent	O
in	O
interpretation	O
can	O
be	O
a	O
problem	O
when	O
emulating	B-Application
computers	O
whose	O
processor	O
speed	O
is	O
on	O
the	O
same	O
order	O
of	O
magnitude	O
as	O
the	O
host	B-Operating_System
machine	I-Operating_System
.	O
</s>
<s>
Until	O
not	O
many	O
years	O
ago	O
,	O
emulation	B-Application
in	O
such	O
situations	O
was	O
considered	O
completely	O
impractical	O
by	O
many	O
.	O
</s>
<s>
Simple	O
a	O
priori	O
translation	O
of	O
emulated	B-Application
program	O
code	O
into	O
code	O
runnable	O
on	O
the	O
host	O
architecture	O
is	O
usually	O
impossible	O
because	O
of	O
several	O
reasons	O
:	O
</s>
<s>
there	O
may	O
not	O
be	O
a	O
way	O
to	O
reliably	O
distinguish	O
data	O
(	O
which	O
should	O
not	O
be	O
translated	O
)	O
from	O
executable	B-Application
code	I-Application
.	O
</s>
<s>
Various	O
forms	O
of	O
dynamic	O
recompilation	O
,	O
including	O
the	O
popular	O
Just	O
In	O
Time	O
compiler	B-Language
(	O
JIT	O
)	O
technique	O
,	O
try	O
to	O
circumvent	O
these	O
problems	O
by	O
waiting	O
until	O
the	O
processor	O
control	O
flow	O
jumps	O
into	O
a	O
location	O
containing	O
untranslated	O
code	O
,	O
and	O
only	O
then	O
(	O
"	O
just	O
in	O
time	O
"	O
)	O
translates	O
a	O
block	O
of	O
the	O
code	O
into	O
host	O
code	O
that	O
can	O
be	O
executed	O
.	O
</s>
<s>
The	O
translated	O
code	O
is	O
kept	O
in	O
a	O
code	O
cache	B-General_Concept
,	O
and	O
the	O
original	O
code	O
is	O
not	O
lost	O
or	O
affected	O
;	O
this	O
way	O
,	O
even	O
data	O
segments	O
can	O
be	O
(	O
meaninglessly	O
)	O
translated	O
by	O
the	O
recompiler	O
,	O
resulting	O
in	O
no	O
more	O
than	O
a	O
waste	O
of	O
translation	O
time	O
.	O
</s>
<s>
Particularly	O
when	O
emulating	B-Application
computers	O
which	O
were	O
"	O
closed-box	O
"	O
,	O
in	O
which	O
changes	O
to	O
the	O
core	O
of	O
the	O
system	O
were	O
not	O
typical	O
,	O
software	B-Application
may	O
use	O
techniques	O
that	O
depend	O
on	O
specific	O
characteristics	O
of	O
the	O
computer	O
it	O
ran	O
on	O
(	O
e.g.	O
</s>
<s>
its	O
CPU	O
's	O
speed	O
)	O
and	O
thus	O
precise	O
control	O
of	O
the	O
speed	O
of	O
emulation	B-Application
is	O
important	O
for	O
such	O
applications	O
to	O
be	O
properly	O
emulated	B-Application
.	O
</s>
<s>
Most	O
emulators	B-Application
do	O
not	O
,	O
as	O
mentioned	O
earlier	O
,	O
emulate	O
the	O
main	O
system	B-Architecture
bus	I-Architecture
;	O
each	O
I/O	O
device	O
is	O
thus	O
often	O
treated	O
as	O
a	O
special	O
case	O
,	O
and	O
no	O
consistent	O
interface	O
for	O
virtual	O
peripherals	O
is	O
provided	O
.	O
</s>
<s>
This	O
can	O
result	O
in	O
a	O
performance	O
advantage	O
,	O
since	O
each	O
I/O	O
module	B-Architecture
can	O
be	O
tailored	O
to	O
the	O
characteristics	O
of	O
the	O
emulated	B-Application
device	O
;	O
designs	O
based	O
on	O
a	O
standard	O
,	O
unified	O
I/O	O
API	B-Application
can	O
,	O
however	O
,	O
rival	O
such	O
simpler	O
models	O
,	O
if	O
well	O
thought-out	O
,	O
and	O
they	O
have	O
the	O
additional	O
advantage	O
of	O
"	O
automatically	O
"	O
providing	O
a	O
plug-in	O
service	O
through	O
which	O
third-party	O
virtual	O
devices	O
can	O
be	O
used	O
within	O
the	O
emulator	B-Application
.	O
</s>
<s>
A	O
unified	O
I/O	O
API	B-Application
may	O
not	O
necessarily	O
mirror	O
the	O
structure	O
of	O
the	O
real	O
hardware	B-Architecture
bus	O
:	O
bus	O
design	O
is	O
limited	O
by	O
several	O
electric	O
constraints	O
and	O
a	O
need	O
for	O
hardware	B-Architecture
concurrency	B-Operating_System
management	O
that	O
can	O
mostly	O
be	O
ignored	O
in	O
a	O
software	B-Application
implementation	O
.	O
</s>
<s>
Even	O
in	O
emulators	B-Application
that	O
treat	O
each	O
device	O
as	O
a	O
special	O
case	O
,	O
there	O
is	O
usually	O
a	O
common	O
basic	O
infrastructure	O
for	O
:	O
</s>
<s>
Emulation	B-Application
is	O
one	O
strategy	O
in	O
pursuit	O
of	O
digital	O
preservation	O
and	O
combating	O
obsolescence	O
.	O
</s>
<s>
Emulation	B-Application
focuses	O
on	O
recreating	O
an	O
original	O
computer	O
environment	O
,	O
which	O
can	O
be	O
time-consuming	O
and	O
difficult	O
to	O
achieve	O
,	O
but	O
valuable	O
because	O
of	O
its	O
ability	O
to	O
maintain	O
a	O
closer	O
connection	O
to	O
the	O
authenticity	O
of	O
the	O
digital	O
object	O
,	O
operating	B-General_Concept
system	I-General_Concept
,	O
or	O
even	O
gaming	O
platform	B-Device
.	O
</s>
<s>
Emulation	B-Application
addresses	O
the	O
original	O
hardware	B-Architecture
and	O
software	B-Application
environment	O
of	O
the	O
digital	O
object	O
,	O
and	O
recreates	O
it	O
on	O
a	O
current	O
machine	O
.	O
</s>
<s>
The	O
emulator	B-Application
allows	O
the	O
user	O
to	O
have	O
access	O
to	O
any	O
kind	O
of	O
application	B-Application
or	O
operating	B-General_Concept
system	I-General_Concept
on	O
a	O
current	O
platform	B-Device
,	O
while	O
the	B-Application
software	I-Application
runs	O
as	O
it	O
did	O
in	O
its	O
original	O
environment	O
.	O
</s>
<s>
Jeffery	O
Rothenberg	O
,	O
an	O
early	O
proponent	O
of	O
emulation	B-Application
as	O
a	O
digital	O
preservation	O
strategy	O
states	O
,	O
"	O
the	O
ideal	O
approach	O
would	O
provide	O
a	O
single	O
extensible	B-Architecture
,	O
long-term	O
solution	O
that	O
can	O
be	O
designed	O
once	O
and	O
for	O
all	O
and	O
applied	O
uniformly	O
,	O
automatically	O
,	O
and	O
in	O
organized	O
synchrony	O
(	O
for	O
example	O
,	O
at	O
every	O
refresh	O
cycle	O
)	O
to	O
all	O
types	O
of	O
documents	O
and	O
media	O
"	O
.	O
</s>
<s>
Practically	O
speaking	O
,	O
when	O
a	O
certain	O
application	B-Application
is	O
released	O
in	O
a	O
new	O
version	O
,	O
rather	O
than	O
address	O
compatibility	B-Device
issues	O
and	O
migration	B-General_Concept
for	O
every	O
digital	O
object	O
created	O
in	O
the	O
previous	O
version	O
of	O
that	O
application	B-Application
,	O
one	O
could	O
create	O
an	O
emulator	B-Application
for	O
the	O
application	B-Application
,	O
allowing	O
access	O
to	O
all	O
of	O
said	O
digital	O
objects	O
.	O
</s>
<s>
Because	O
of	O
its	O
primary	O
use	O
of	O
digital	O
formats	O
,	O
new	O
media	O
art	O
relies	O
heavily	O
on	O
emulation	B-Application
as	O
a	O
preservation	O
strategy	O
.	O
</s>
<s>
In	O
many	O
cases	O
,	O
the	O
goal	O
of	O
emulation	B-Application
in	O
new	O
media	O
art	O
is	O
to	O
preserve	O
a	O
digital	O
medium	O
so	O
that	O
it	O
can	O
be	O
saved	O
indefinitely	O
and	O
reproduced	O
without	O
error	O
,	O
so	O
that	O
there	O
is	O
no	O
reliance	O
on	O
hardware	B-Architecture
that	O
ages	O
and	O
becomes	O
obsolete	O
.	O
</s>
<s>
The	O
paradox	O
is	O
that	O
the	O
emulation	B-Application
and	O
the	O
emulator	B-Application
have	O
to	O
be	O
made	O
to	O
work	O
on	O
future	O
computers	O
.	O
</s>
<s>
Emulation	B-Application
techniques	O
are	O
commonly	O
used	O
during	O
the	O
design	O
and	O
development	O
of	O
new	O
systems	O
.	O
</s>
<s>
It	O
is	O
particularly	O
useful	O
in	O
the	O
design	O
of	O
multi-core	B-Architecture
systems	O
,	O
where	O
concurrency	B-Operating_System
errors	O
can	O
be	O
very	O
difficult	O
to	O
detect	O
and	O
correct	O
without	O
the	O
controlled	O
environment	O
provided	O
by	O
virtual	O
hardware	B-Architecture
.	O
</s>
<s>
This	O
also	O
allows	O
the	B-Application
software	I-Application
development	O
to	O
take	O
place	O
before	O
the	O
hardware	B-Architecture
is	O
ready	O
,	O
thus	O
helping	O
to	O
validate	O
design	O
decisions	O
and	O
give	O
a	O
little	O
more	O
control	O
.	O
</s>
<s>
The	O
word	O
"	O
emulator	B-Application
"	O
was	O
coined	O
in	O
1963	O
at	O
IBM	O
during	O
development	O
of	O
the	O
NPL	O
(	O
IBM	B-Application
System/360	I-Application
)	O
product	O
line	O
,	O
using	O
a	O
"	O
new	O
combination	O
of	O
software	B-Application
,	O
microcode	B-Device
,	O
and	O
hardware	B-Architecture
"	O
.	O
</s>
<s>
They	O
discovered	O
that	O
simulation	O
using	O
additional	O
instructions	O
implemented	O
in	O
microcode	B-Device
and	O
hardware	B-Architecture
,	O
instead	O
of	O
software	B-Application
simulation	O
using	O
only	O
standard	O
instructions	O
,	O
to	O
execute	O
programs	O
written	O
for	O
earlier	O
IBM	O
computers	O
dramatically	O
increased	O
simulation	O
speed	O
.	O
</s>
<s>
Earlier	O
,	O
IBM	O
provided	O
simulators	B-Application
for	O
,	O
e.g.	O
,	O
the	O
650	B-Device
on	O
the	O
705	B-Device
.	O
</s>
<s>
In	O
addition	O
to	O
simulators	B-Application
,	O
IBM	O
had	O
compatibility	B-Device
features	O
on	O
the	O
709	B-Device
and	O
7090	B-Device
,	O
for	O
which	O
it	O
provided	O
the	O
IBM	B-Device
709	I-Device
computer	O
with	O
a	O
program	O
to	O
run	O
legacy	O
programs	O
written	O
for	O
the	O
IBM	B-Device
704	I-Device
on	O
the	O
709	B-Device
and	O
later	O
on	O
the	O
IBM	B-Device
7090	I-Device
.	O
</s>
<s>
This	O
program	O
used	O
the	O
instructions	O
added	O
by	O
the	O
compatibility	B-Device
feature	O
to	O
trap	B-Application
instructions	O
requiring	O
special	O
handling	O
;	O
all	O
other	O
704	O
instructions	O
ran	O
the	O
same	O
on	O
a	O
7090	B-Device
.	O
</s>
<s>
The	O
compatibility	B-Device
feature	O
on	O
the	O
1410	B-Device
only	O
required	O
setting	O
a	O
console	O
toggle	O
switch	O
,	O
not	O
a	O
support	O
program	O
.	O
</s>
<s>
In	O
1963	O
,	O
when	O
microcode	B-Device
was	O
first	O
used	O
to	O
speed	O
up	O
this	O
simulation	O
process	O
,	O
IBM	O
engineers	O
coined	O
the	O
term	O
"	O
emulator	B-Application
"	O
to	O
describe	O
the	O
concept	O
.	O
</s>
<s>
In	O
the	O
2000s	O
,	O
it	O
has	O
become	O
common	O
to	O
use	O
the	O
word	O
"	O
emulate	O
"	O
in	O
the	O
context	O
of	O
software	B-Application
.	I-Application
</s>
<s>
However	O
,	O
before	O
1980	O
,	O
"	O
emulation	B-Application
"	O
referred	O
only	O
to	O
emulation	B-Application
with	O
a	O
hardware	B-Architecture
or	O
microcode	B-Device
assist	O
,	O
while	O
"	O
simulation	O
"	O
referred	O
to	O
pure	O
software	B-Application
emulation	I-Application
.	O
</s>
<s>
For	O
example	O
,	O
a	O
computer	O
specially	O
built	O
for	O
running	O
programs	O
designed	O
for	O
another	O
architecture	O
is	O
an	O
emulator	B-Application
.	O
</s>
<s>
Purists	O
continue	O
to	O
insist	O
on	O
this	O
distinction	O
,	O
but	O
currently	O
the	O
term	O
"	O
emulation	B-Application
"	O
often	O
means	O
the	O
complete	O
imitation	O
of	O
a	O
machine	O
executing	O
binary	O
code	O
while	O
"	O
simulation	O
"	O
often	O
refers	O
to	O
computer	B-Application
simulation	I-Application
,	O
where	O
a	O
computer	B-Application
program	I-Application
is	O
used	O
to	O
simulate	O
an	O
abstract	O
model	O
.	O
</s>
<s>
Computer	B-Application
simulation	I-Application
is	O
used	O
in	O
virtually	O
every	O
scientific	O
and	O
engineering	O
domain	O
and	O
Computer	O
Science	O
is	O
no	O
exception	O
,	O
with	O
several	O
projects	O
simulating	O
abstract	O
models	O
of	O
computer	O
systems	O
,	O
such	O
as	O
network	O
simulation	O
,	O
which	O
both	O
practically	O
and	O
semantically	O
differs	O
from	O
network	B-Architecture
emulation	I-Architecture
.	O
</s>
<s>
Hardware	B-Architecture
virtualization	B-General_Concept
is	O
the	O
virtualization	B-General_Concept
of	O
computers	O
as	O
complete	O
hardware	B-Device
platforms	I-Device
,	O
certain	O
logical	O
abstractions	O
of	O
their	O
components	O
,	O
or	O
only	O
the	O
functionality	O
required	O
to	O
run	O
various	O
operating	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
Virtualization	B-General_Concept
hides	O
the	O
physical	O
characteristics	O
of	O
a	O
computing	B-Device
platform	I-Device
from	O
the	O
users	O
,	O
presenting	O
instead	O
an	O
abstract	O
computing	B-Device
platform	I-Device
.	O
</s>
<s>
At	O
its	O
origins	O
,	O
the	B-Application
software	I-Application
that	O
controlled	O
virtualization	B-General_Concept
was	O
called	O
a	O
"	O
control	O
program	O
"	O
,	O
but	O
the	O
terms	O
"	O
hypervisor	B-Operating_System
"	O
or	O
"	O
virtual	B-Operating_System
machine	I-Operating_System
monitor	I-Operating_System
"	O
became	O
preferred	O
over	O
time	O
.	O
</s>
<s>
Each	O
hypervisor	B-Operating_System
can	O
manage	O
or	O
run	O
multiple	O
virtual	B-Architecture
machines	I-Architecture
.	O
</s>
