Archive for July, 2011

QEMU - Tiny Code Generator, Accelarator and Hardware assisted emulation

Posted in Software by Shafkat Shahzad, M.Sc - Senior Technical Content Manager on July 30th, 2011

The article will provide a user with information on QEMU’s Tiny code generator, Accelerator and Hardware assisted emulation.
Tiny Code Generator (TCG)
The Tiny Code Generator (TCG) aims to remove the shortcoming of relying on a particular version of GCC or any compiler, instead incorporating the compiler (code generator) into other tasks performed by QEMU in run-time.

Accelerator
Virtualization of machines or operating systems comes at the cost of speed of execution. One tried and true method to reduce the effect (cost) are software-based drivers which perform specific functions that would otherwise be very costly to perform by the virtualization software.

KQEMU or QEMU Accelerator was a Linux kernel module which notably sped up x86 emulation on x86 platforms. This was accomplished by running user mode code directly on the host computer’s CPU, and using processor and peripheral emulation only for kernel mode and real mode code. KQEMU also supported a kernel emulation mode in which portions of kernel mode code run on the host’s CPU.
Unlike KVM, KQEMU could execute code from many guest OSes even if the host CPU does not support hardware virtualization. KQEMU supports both x86 and x86_64 CPUs.

QVM86 was a drop-in replacement for the then closed-source KQEMU, licensed under GNU GPLv2 license. The developer of QVM86 ceased development on January 21, 2007 as they decided that the project had been rendered obsolete by the release of VirtualBox.

Hardware-assisted emulation
The MIPS-compatible Loongson-3 processor adds 200 new instructions to help QEMU translate x86 instructions; those new instructions lower the overhead of executing x86/CISC-style instructions in the MIPS pipeline.

Parallel emulation
Virtualization solutions that use QEMU are able to execute multiple virtual CPUs in parallel. QEMU is also able to run multiple threads in user-mode emulation mode.
For full system emulation, QEMU uses a single thread to emulate all the virtual CPUs and hardware. COREMU is a patch to QEMU to break this limitation. Each core uses a separate instance of QEMU binary translation engine, with a thin library layer to handle the inter-core and device communication and synchronization.

If a user has read this article then he/she would have learnt about QEMU’s Tiny code generator, Accelerator and Hardware assisted emulation.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

QEMU’s Features

Posted in Software by Shafkat Shahzad, M.Sc - Senior Technical Content Manager on July 23rd, 2011

The article will provide a user with information on QEMO’s features. QEMU offers many features that are also present in other emulators. An example will make this clear. QEMU can save and restore the state of the virtual machine with all programs running. As with many emulators, guest operating systems do not need to be patched to successfully run.

Please note that QEMU supports the emulation of various architectures, including IA-32 (x86) PCs, x86-64 PCs, MIPS R4000, Sun’s SPARC sun4m, Sun’s SPARC sun4u, ARM development boards (Integrator/CP and Versatile/PB), SH4 SHIX board, PowerPC (PReP and Power Macintosh), ETRAX CRIS and MicroBlaze architectures. The virtual machine can be equipped with many types of hardware and this includes: hard disks, CD-ROM drives, network cards, sound chips, and USB devices. USB devices can be completely emulated or the host’s USB devices can be used.

Virtual hard disk images can be stored in a special format (qcow or qcow2) that only takes up disk space that the guest OS actually uses. An emulated 120 GiB disk can take up just several hundred megabytes on the host. The QCOW2 format also allows the creation of overlay images that record the difference to another base image file which is not modified. This can be useful to have the possibility of reverting the disk’s contents to an earlier state. An example will prove helpful her. A base image could hold a fresh install of an operating system that is known to work, and the overlay images are worked with.
• QEMU can emulate network cards which share the host system’s connectivity by doing network address translation, effectively allowing the guest to use the same network as the host.
• QEMU integrates several services to allow the host and guest systems to communicate, for example, a SMB server and network port redirection (to allow incoming connections to the virtual machine).
• QEMU can also boot Linux kernels without having to prepare a bootable image with a bootloader.
• QEMU does not depend on the presence of graphical output methods on the host system.
• QEMU can allow one to access the screen of the guest OS via VNC.
• QEMU can also use an emulated serial line, without any screen, with applicable operating systems.
• QEMU does not require administrative rights to run, except if additional kernel modules for improving speed are used (like KQEMU).
If a user has read this article then he/she would have learnt about the features of QEMU.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

QEMU

Posted in Software by Shafkat Shahzad, M.Sc - Senior Technical Content Manager on July 16th, 2011

The article will provide a user with information on QEMU. QEMU is a processor emulator that relies on dynamic binary translation to achieve a reasonable speed while being easy to port on new host CPU architectures.

In conjunction with CPU emulation, it also provides a set of device models, allowing it to run a variety of unmodified guest operating systems; it can thus be viewed as a hosted virtual machine monitor. It also provides an accelerated mode for supporting a mixture of binary translation (for kernel code) and native execution (for user code), in the same fashion as VMware Workstation and VirtualBox.
QEMU can also be used purely for CPU emulation for user level processes; in this mode of operation closely resembles Valgrind.

One feature exclusive to QEMU is portability: The virtual machines can be run on any PC, even those where the user has only limited rights with no administrator access, realizing the “PC-on-a-USB-stick” concept. Similar applications (such as MojoPac) exist, but they currently require administrator rights to run, making them useless in areas such as public libraries, internet cafes, and so on.

QEMU has two operating modes:

User mode emulation
QEMU can launch Linux or Darwin/Mac OS X processes compiled for one CPU on another CPU. Target OS system calls are thunked for endianness and 32/64 bit mismatches. Fast cross-compilation and cross-debugging are the main targets for user-mode emulation.

Complete Computer System mode emulation
QEMU emulates a full computer system, including a processor and various peripherals. It can be used to provide virtual hosting of several virtual computers on a single computer. QEMU can boot many guest operating systems, including Linux, Solaris, Microsoft Windows, DOS, and BSD [1]; it supports emulating several hardware platforms, including x86, x86-64 (AMD64/Intel 64), ARM, Alpha, ETRAX CRIS, MIPS, MicroBlaze, PowerPC and SPARC.

If a user has read the article then he/she would have learnt about QEMU.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

PCSX2

Posted in Software by Shafkat Shahzad, M.Sc - Senior Technical Content Manager on July 9th, 2011

The article will provide a user with information on PCSX2. PCSX2 is an open-source PlayStation 2 (PS2) emulator for the Microsoft Windows and Linux operating systems. PCSX2 is based on a plug-in architecture, separating several functions from the core emulator. These are the graphics, audio, input controls, CD/DVD drive, and USB and FireWire (i.LINK) ports. Different plug-ins may produce different results in both compatibility and performance. Additionally, PCSX2 requires a copy of the PS2 BIOS, which is not available for download from the developers, due to the copyright concerns and legal issues associated with it.

The performance of PCSX2 has increased with the release of version 0.9 in April. Most 2D games and menus can reach 60-120 frame/s when specific plug-ins are used, and with the latest version, it is possible to reach speeds greater than the native PS2 frame rate of 60 frame/s (NTSC) and 50 frame/s (PAL). In version 0.9, PCSX2 also added support for dual core CPUs, resulting in a very significant performance increase on systems with dual core processors.

Several plug-ins are currently being further developed, for performance and compatibility enhancements. Some of them are listed below:
• GSdx
• ZZogl
• OpenGL

GSdx
GSdx is the highest performing graphics plug-in for Windows and utilizes DirectX. Development is tied to PCSX2’s Google Code project, so new builds will follow in step with PCSX2’s project SVN numbers. Hardware mode typically yields the fastest framerate and is accompanied with a texture resolution hack that can upscale to virtually any size, but this mode is not always the most accurate and at times switching to the native resolution or software mode will create a more complete image.

ZZogl
ZZogl is the most recently developed OpenGL-based graphics plug-in, which is commonly used by Linux users, since DirectX is exclusive to Windows. By nature, it is noticeably slower than GSdx, since it doesn’t efficiently offload enough tasks to the video card.

OpenGL
The OpenGL graphics plug-in has recently been integrated into the PCSX2 source code project hosted at Google Code, labeled as “zzogl-pg”.

The minum system requirements are:
• Windows XP/Windows Vista or Linux 32bit/64bit
• CPU that supports SSE2 (Pentium 4 and up, Athlon64 and up)
• GPU that supports Pixel Shader 2.0
• 512MB RAM

If a user read this article then he/she would have learnt about PCSX2.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

Linux software - ePSXe

Posted in Software by Shafkat Shahzad, M.Sc - Senior Technical Content Manager on July 2nd, 2011

The article will provide a user with information on ePSXe (enhanced PSX emulator) including design, system requirements, plug-ins and compatibility. ePSXe is a PlayStation emulator for x86-based PC hardware with Microsoft Windows or Linux.

Design
ePSXe makes use of plug-ins to emulate GPU, SPU (sound), and CD-ROM drive functions, a model first established in PSEmu Pro. Games can be loaded from the computer’s CD drive or from one of many types of CD images directly from the user’s hard drive.
A patching feature allows the user to apply game patches. Games that do not necessarily run properly, or even start at all, can be fixed and played via the use of ePSXe patch files in .ppf format. Not all games prone to bugs have ppf patches written for them.

System requirements
ePSXe’s stated system requirements are:
• Processor: Pentium 200 MHz, recommended Pentium 3 at 1 GHz
• RAM: 256 MB RAM, recommended 512 MB RAM
• Video card: 3D capable video card with support for OpenGL, DirectX, or Glide
• Operating system: Windows or Linux
• CD-ROM: 16x or faster (optional)

Plug-ins
• GPU: Most GPU plug-ins run with either Direct3D, OpenGL, or the Glide API, and are available as freeware or open source
• SPU: The SPU plug-ins can emulate everything from music to sound effects, with varying degrees of success depending on the plug-in settings, and of course the plug-in being used
• CD-ROM: ePSXe comes with a core CD-ROM plug-in, but many others are available for freeware download and many can emulate up to seven different types of read modes
• Input: The core plug-in is sufficient, but there are others that allow for more functionality.

CompatibilityThe current version of ePSXe, 1.7.0, is able to run most Playstation games accurately, however, few games run flawlessly without extensive configuration and trial by error testing. In the case that a game does not run successfully, patches written for the game in question can be used, though few games have patches available.
Quite often, users would download ePSXe 1.5.2 to avoid using ePSXe 1.6.0. This was due to version 1.6.0 having numerous complications that led users to use the last properly functional release. 1.7.0 repaired most of the issues present in 1.6.0.

If a user has read the article then he/she would have learnt about ePSXe.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists