QEMU Vs. VirtualBox, Round 1


Play Sonic CD in a VM. Sonic CD is a very old 2D game that only runs in Windows 9x clients without the Sonic CD PC Fix patch. It was originally an OEM-only pack-in that was written in Intel’s DirectScreen API. Later, the game went retail and the DirectScreen calls were re-mapped to DirectX.

Things Neither Emulator Can Do Yet:

Neither emulator can play CD audio tracks. No music for you!

How VirtualBox Fared

I originally tried a Windows 95 installation, which required that Virtualization extensions be turned off. The only problem was video display support — VirtualBox emulates a standard VESA card, and Windows 95 and 98 don’t even have default drivers for VESA cards. There’s a VBE (VESA BIOS Extensions) driver available for Windows 9x clients, but it has a serious known bug that freezes the system when a command prompt is opened. As a lot of installers use the command prompt for myriad miscellaneous tasks, this means you have to do all of your installing BEFORE you install the VBE driver.

The end result, however, is that Sonic CD ran piss-poor slow. In full-screen mode, 1 in-game second took 4-5 real-life seconds. Windowed mode didn’t fare much better. I witnessed an oddity where the game would play faster in windowed mode while the mouse was moving about. Enabling and disabling VirtualBox’s 2D and 3D acceleration options made no difference — presumably because VirtualBox Guest Additions need to be installed to take advantage of it, and Guest Additions are only available for the NT line of Windows.

Next, I tried Windows 98 SE after learning that the Virtualization extensions can be turned on post-install with that OS. The end result was only slightly better. The game was still dog slow, and the Virtualization extensions seemed to clash a bit with the VBE driver.

How QEMU Fared

A few more tricks had to be pulled with QEMU. I used QEMU Manager 7.0, which uses QEMU 0.11.1. For QEMU 0.11.1, the splash screen must be disabled (pressing ESC or adding Logo=0 to the [Options] section of MSDOS.SYS) or a hang occurs right as Windows switches away from it. Another bug hangs QEMU 0.11.1 as soon as the shutdown splash screen is shown, which can be worked around by opening a full-screen DOS box any time prior to shutdown.

The end result was that Sonic CD fared so much better even without acceleration. Even in full screen, the hiccups were minor. The most annoying thing is that sound effects sometimes get “stuck” until another sound effect gets played.

QEMU 0.11.1 wasn’t the latest-greatest, so I decided to give QEMU 0.12.3 a shot. This is when QEMU fell apart. While the splash-screen bugs are gone, QEMU 0.12.3 seems to have changed BIOSes and Windows 98 confuses the Plug N Play BIOS with the PCI Bus. If you specifically install the default PCI Bus driver for what Windows 98 thinks is the Plug N Play BIOS, a lot of devices get re-discovered and double-installed. After settling things down, you’re still left with a conflict that takes out the CD-ROM drive. Forcing the drive by using DOS-style drivers in CONFIG.SYS and AUTOEXEC.BAT only makes QEMU 0.12.3 unstable.

End Result

I didn’t expect QEMU to trounce VirtualBox so badly at unaccelerated 2D gaming, but that’s exactly what I got. There is one gotcha though, and that is QEMU Manager makes use of a patched version of QEMU specifically designed to get Windows 98 to run. As QEMU is GPL-licensed, it’ll be interesting to see if these patches made it up-stream and are available in Linux when Ubuntu 10.4 is released.