Thursday, November 29, 2007

Emulator 1 - Bochs

Bochs is a portable x86 and AMD64 PCs emulator mostly written in C++ and distributed as free software under GNU Lesser General Public License. It supports emulation of the processor(s) (including protected mode), memory, disks, display, ethernet, BIOS and common hardware peripherals of PCs.

Many guest operating systems can be run using the emulator including DOS, several versions of Windows, BSDs, Linux, AmigaOS and MorphOS. Bochs can run on many host operating systems, including Windows, Linux, Mac OS X.

Bochs is mostly used for operating system development (when an emulated operating system crashes, it does not crash the host operating system, so the emulated OS can be debugged) and to run other guest operating systems inside already running host operating systems. Some people use it to run older software – such as computer games – which will not run on their non-compatible computers.

Bochs can emulate the hardware needed by the guest operating system, including hard drives, CD drives, and floppy drives. Disk and ISO images can be "inserted" while the system is being run. However, the system performance is very slow due to the fact that it is only emulated. It doesn't provide any CPU virtualization features. However, it is useful for capturing screen shots in researching old DOS software. Bochs is widely used for hobbyist OS developing, as it saves the need for constant system restarts (to test code) Bochs is preferred by OS developers because it has error reporting and dump files that other emulators lack.

I am using this software as it is light but little hard to use for those who don't really know how to "scripting", since this program run from DOS without special Windows interface.

Rating: 4.2/5
Tested system: PC-DOS 1.10, MS-DOS 2.xx until 6.22, Windows 1.01 until Windows 3.11 (but for Windows 1.01, 1.02, 1.03 appear in black-n-white, instead of colours).





Click on the picture to enlarge, screen captured on Windows 95 guest system.

Understanding System Emulator

An emulator is also known as virtual machine, since it simulate and running the system on a virtual peripherals.

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. This focus on exact reproduction of external behavior is in contrast to simulation, which can concern an abstract model of the system being simulated, often considering internal state.

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 interpreted by the emulator, rather than being run by native hardware. Apart from 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; for example, if writing to a specific memory location should influence the screen, then 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 simulators 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.

CPU Simulator

The CPU simulator is often the most complicated part of an emulator. Many emulators are written using "pre-packaged" CPU simulators, in order to concentrate on good and efficient emulation of a specific machine.

The simplest form of a CPU simulator is an interpreter, which follows the execution flow of the emulated program code and, for every machine code instruction encountered, executes operations on the host processor that are semantically equivalent to the original instructions.
This is made possible by assigning a variable to each register and flag of the simulated CPU. The logic of the simulated CPU can then more or less be directly translated into software algorithms, creating a software re-implementation that basically mirrors the original hardware implementation.

The following example illustrates how CPU simulation can be accomplished by an interpreter. In this case, interrupts are checked-for before every instruction executed, though this behavior is rare in real emulators for performance reasons.

Summary

Therefore, if you really interested into running old software, you would certainly need to choose a correct simulator for your PC.

The choice of virtual machine/emulator maybe (to which I have already used),

VMware
Microsoft Virtual PC
Bochs
Qemu

There maybe other simulator but I will not be stressing on those. I will give example based on these simulator.

I will post information on these programs, therefore wait for my future post.


Adhall W. Idrewoods
VG

Monday, November 26, 2007

Warm Welcoming Message

Dear friend,

Thank you for visiting my blog. What I will share here, would all about the Operating System that has passed through the history - which some has made the name until today, yet some has been in old diskettes for so many years.

Before I further on, I would like to let you know, so you can have in your expectation, of things that I will be sharing here. Due to some constraint and legality, I may not be able to provide content(s) of any operating system here, but I will be sharing on how to run the old program (through emulation and emulator program, of course), perhaps where you can get a copy of the disk(s)/file(s), and screen capture of emulated system.

I myself, am expecting to share my experience and knowledge with regards to running emulation system, share what system I have been collected so far and how to keep them in order.

First, I might want to share the knowledge on getting some emulation program. Choosing what's best and good, without destroying the needs for such software. Then, I will delve into using some very old, old operating system, that is IBM 1.10 International Version. With which I will go on through MS-DOS systems, before I will make post on Windows 1.01 until (i hope to) Windows NT 4.0.

But, without putting much limitation, I would love to share on emulating Mac OS as well as CP/M. Don't ask me about Linux, I don't have much interest, but if the time fits, I may share some info about it.

I do hope that you guys will like this site, and will drop by here to read updated or new posted message. If you have any information that you would like to share with me, just don't hesitate to drop me messages at msah83@nve.com.my - I'll get into reply asap!

Until then, cheers everyone!

Best wishes,
A.W. Idrewoods