Home >> Computers >> Systems >> Handhelds >> Palm OS >> Programming >> Emulators




The computer software copycat allows computer programs to run in the platform (computer architecture and/or operating system) other than a a single for which it were originally written. Unlike by having the simulation, an emulation does not attempt to precisely model a state of the device existence emulated; it sole tries to reproduce its behavior.

a popular apply of aper is to mimic the own household budget of running off arcade games or console games on Linux, Mac OS X, and Microsoft Windows. Emulating these in modern desktop computers is unremarkably less cumbersome than relying on the original machines. Even so, software program program licensing issues will expect copycat authors to write original software that duplicates a functionality of the original computer's bootstrap ROM and BIOS, often across high-level emulation.

Inside a technical indicator feel, the Church-Turing thesis implies that any operating environment may be emulated inside any more. Within practice, it may become quite hard, particularly whenever a precise behaviour of the technique to become emulated is non documented & has to be deduced across reverse engineering. It besides says nothing just about timing constraints; whenever a imitator doesn't perform when quickly when a original devices, a emulated package can do lot other slowly than it would wear a original devices.

Structure

Virtually all ape upright emulate the devices architecture — whenever the specific operating technique is called upon for the desired software package, it must exist as provided too (& might itself become emulated). Each a OS & a software program might so exist as interpreted by the emulator, like than existence begin by native devices. Apart from either this interpreter for the emulated machine's language, some other hardware (such as input or output devices) must be provided in virtual form as well: if writing to a specific memory location should influence the screen, for example, this will have to be emulated as well.

Instead of fully emulation of the devices, the compatibility layer may suffice. This translates body calls for the emulated models into supervisor call instruction for the unsuspecting hosts technique.

Developers of software system for embedded systems or video game consoles often design their computer software in especially precise copycat known as the simulator before trying it on the real devices. This is thus that software system may be produced & tested prior even to the final devices lives within big quantities, then that it may be tested forgoing ingesting a period to copy a program to the devices, or then that it may be debugged at a sale level forswearing introducing the side results of a debugger.

Occasionally, an ape is divided into modules that correspond roughly to the emulated computer's subsystems. Virtually all typically, an copycat is composed of the ensuing modules: the CPU ape or even CPU simulator (them terms come mostly interchangeable) the memory subsystem module various I/O gear emulators

Buses come typically non emulated, either for even even reasons of performance or simplicity, & virtual peripheral device communicate directly by owning a CPU or a memory subsystem.

The elaborated description of the internals of the specific imitator may be incurred in the ElectrEm article.

Memory subsystem

These are conceivable for the memory subsystem emulation to exist when reduced to only an array of elements both sized rather an emulated word; all the same, this model lessens super quickly when soon as any location in the computer's logical memory doesn't match physical memory.

This clearly is a instance when the emulated devices allows for advanced memory management (where out break, a MMU logic can be embedded in a memory ape, processed the module of its have, or even another time integrated into the CPU simulator).

Possibly whenever a emulated computer doesn't feature an MMU, though, there are commonly more factors that break a equivalence between logical & physical memory: numbers of (whenever does'nt virtually all) architecture offer memory-mapped I/O; even victims that don't nearly invariably have a prevent of logical memory mapped to ROM, which means that a memory-array module must exist as thrown away in case the see-onlyness of ROM is to become emulated.

Following, virtually all aper implement at least deuce procedures for writing to & reading from either logical memory, & these are these procedures' duty to map each access to the right location of the right object.

In the base-limit addressing system where memory from either location Cipher to location ROMSIZE is page through-exclusively memory, when a rest is RAM, something along a line of the as a result procedures would become average:

void WriteMemory(word Location, word Value) else }

void ReadMemory(word Location) else }

CPU simulator

The CPU simulator is often the most complicated part of an emulator. Many emulators are written using "pre-packaged" CPU simulators, sequentially to concentrate in dependable & effective emulation of the specific machine.

the simplest form of a CPU simulator is an interpreter, which follows the execution flow of the emulated program code &, for each machine code instruction found, executes operations on the unsuspecting hosts processor that come semantically same to the original videos.

This is manufactured conceivable by assigning the variable to each register and flag of the simulated CPU. a logic of the simulated CPU may so close to exist as directly translated into software system package algorithmic rule, creating a software re-implementation that fundamentally mirrors the original devices implementation.

A as punishment lesson illustrates how else CPU simulation is accomplished by an interpreter. around that outbreak, interrupts come checked for prior to each instruction executed, though this behavior is uncommon in real copycat for performance reasons.

void Execute(void) switch(ReadMemory(ProgramCounter++)) }

Interpreters may be popular when CPU simulators, when it is tremendously simpler to implement than sir thomas additional performant guide solutions, & their speed is to the higher degree adequate for emulating computers of more than about a decade ago on modern machines.

Nonetheless, a speed penalty inherent within interpretation can be a condition once emulating computers whose processor speed is on the equivalent order of magnitude as the hikers machine. Until does'nt numbers of years ago, emulation within such situations was considered all inpractical by several.

What allowed breaking across this restriction were a advances within dynamic recompilation techniques. Elementary a priori translation of emulated program code into code runnable on the unsuspecting hosts architecture is commonly impossible because of many reasons: code can be self-modifying there might not exist as how else to dependably distinguish data segments (which must not become translated) from either text segments (code segments) there might not become how else to communicate sustaining a emulated operating system in order for the emulator to become caring of new loaded (for instance from either disk) code

Various forms of dynamic recompilation, including a popular Just In Time compiler (JIT) technique, try to cicumvent these problems by waiting until the processor control flow jumps into the location containing untranslated code, & merely so ("just in time") translates the prevent of the code into hikers code that may be executed. the translated code is saved inside a code cache, and the original code is non wasted or possibly affected; this way, even information segments may be (meaninglessly) translated per recompiler, following around those days are gone than a waste of translation instance.

I/O

Virtually all imitator don't, when aforementioned above, emulate a independent patterns bus; for each one I/O device is so typically treated as a favorite out break, & there are no uniform interface for virtual peripheral device is provided.

This might effect within the performance benefit, since from each one I/O module may be tailored to the characteristics of the emulated device; designs according to the standard, unified I/O API can however rival such simpler system, whenever easily-thought, & it use at times a extra benefit of "automatically" providing a plug-circuit card service across which third-person virtual hardware may be utilized in the copycat.

the unified I/O API might not necessarily mirror the structure of the really devices bus: bus project is limited by many electrical contraints & a require for devices concurrency management that can mostly exist as ignored around the package implementation.

Possibly aper that address both device as the favorite outbreak, there exists unremarkably a most common basic infrastructure for managing interrupts, by means of a procedure that sets flags decipherable per CPU simulator if an interrupt is raised, permitting a virtual CPU to "poll for (virtual) interrupts" writing to & reading from either physical memory, by means of 2 procedures similar to a ones treating sustaining logical memory (although, contrary to the latter, the previous potty typically become left retired, & directly information to the memory array exist as listed instead)

Copilot - Windows PalmPilot Emulator
Greg Hewgill created Copilot. In early 1998, Palm Computing took over development and maintenance of the emulator. It is now called the Palm OS Emulator.

Copilot - Windows PalmPilot Emulator (Old)
The original information page before Palm Computing took over development of the emulator. Includes links to Copilot ports to many different operating systems and platforms.

Palm OS Emulator Skins
Customize the look of your Palm OS Emulator with a new skin. From Skinz.org.

Debuffer
Fully-scriptable, assembly-level debugger for PalmOS Emulator, for Windows and Macintosh.

Palm OS Emulator
Emulates the hardware of the various models of Palm OS platform devices.


Computers: Emulators






© 2005 GeneralAnswers.org