10. Emulation and Virtual Machines

Linux gets ragged on alot because we don't have the wealth of games that other platforms have. Frankly, there's enough games for me, although it would be really nice to have some of the bleeding edge games and classics like Half-life and Carmageddon. Fortunately, we have more emulators than you can shake a stick at. Although playing an emulated game is not quite as fun as playing it on the native machine, and getting some of the emulators to work well can be a difficult task, they're here, and there's alot of them!

10.1. Apple 8-bit

All the 8-bit Apple ][ emulators require a copy of the original ROM, for whichever system you want to emulate, in a file. If you search hard enough, you can find file copies of the ROMs for the Apple ][, ][+, ][e, ][c and //gs. They are still copyrighted by Apple, and you can only use them legally if you actually own one of these computers.

10.1.1. KEGS

KEGS is an Apple II emulator written by Kent Dickey which was originally written for HP-UX, but improved and customized for Linux. It runs under X at any color depth, and supports changeable memory sizes, joysticks, and sound. KEGS boots all Apple II variants, and supports all of the Apple ]['s graphics modes. I can't find a working homepage for this application.

10.1.2. apple2 and xapple2

The SVGAlib based apple2 and X based xapple2 can emulate any Apple ][ variant except for the //gs. The interface is a bit funky, but usable. Configuration is also a bit funky, too; this emulator would benefit from an SVGA or X based configuration tool. It supports the undocumented portion of the 6502 instruction set which some games rely on. apple2 is currently being maintained by Michael Deutschmann and seems to be developed at a slow but constant pace. I don't think this application has a homepage.

10.2. DOS

10.2.1. dosemu

dosemu is the canonical DOS emulator on Linux. When you think of DOS, don't think of things like PROCOM PLUS OR OTHER PROGRA~1 WHICH HAVE SHORT NAMES AND ARE IN ALL CAPS. There are some real classics that were written for DOS like Carmageddon, Redneck Rampage and Tomb Raider. dosemu can run these. Unfortunately, it can take alot of effort to get dosemu to work, and of Jan 2002, the sound code is somewhat broken. Not a big deal when you're trying to run Wordperfect or an old database application. It's an absolute show stopper for gaming. Getting dosemu to work well is not easy, but unfortunately, for DOS games it's the best avenue. Good luck. If you have success using dosemu, I would like to hear from you to include your experience in the dosemu HOWTO which I also maintain.

10.3. Win16

10.3.1. Wabi

Wabi is a commercial Win16 emulator. That is, it'll run Windows 16-bit applications from a Windows 3.1, Windows 3.11 or Windows for Workgroups 3.11 environment. Wabi was originally created by SCO Unix a long time ago and then was purchased by Caldera sometime in mid year 2001.

Reports are that wabi is fast and does a good job for what it does, although I've heard it said that wabi for Solaris is more stable than Linux. It might be useful for playing older Win16 games, but there are three problems:

  • You must have a licensed copy of Windows 3.1/3.11 or WfW 3.11.

  • Wabi is awfully expensive for what it does.

  • Wabi doesn't work under 32bpp or 24bpp color.

Wabi does NOT do DOS itself, but it looks like it can use a DOS emulator as a backend for running DOS programs. There was talk about Wabi 3.0 which would've done Win32 emulation, but AFAIK, this project was shelved indefinitely. I think Wabi will run under Linux on all architectures (can someone verify this?)

10.4. Win32

10.4.1. wine

wine, which bears the GNUish acronym `Wine Is Not An Emulator' is a non-commercial implementation of the Win32 API using Unix calls and X. The reason why it's not an emulator is subtle and not of much interest to non computer scientists, so we'll call it an emulator here. Its homepage is www.winehq.org". Wine has come a long way, and is capable of emulating many complicated and important programs, which is great news for Linux users who want this sort of stuff. Note this doesn't mean that Wine can run pure DOS programs; it can't. It implements the Win32 API. Not DOS. For that, see dosemu.

Wine is both a complete Windows emulator (run-time translation of Win32 calls to POSIX/X11) as well as a Windows-to-UNIX porting kit (compile-time translation of Win32 calls to POSIX/X11). x86 architecture is not required, but is recommended since it can allow actual x86 binary execuation as well as direct DLL support/usage).

You can use wine `with Windows', which means that wine uses libraries that actually come with Microsoft Windows itself. This is legal only if you own a copy of Windows which isn't currently being used on a computer. It's said that wine has the best success when run with Windows. You can also run wine without Windows. The people at winehq are writing their own set of libraries called libwine which implements the Win32 API with no Microsoft code at all.

Wine has never been too good at implementing DirectX. However, see the section on winex.

10.4.2. Win4Lin

Win4Lin is a commercial product by Netraverse. (www.netraverse.com/products/win4lin30/. It uses the virtual machine approach, so you'll get a big window from which you can boot Windows and run all kinds of Windows applications. I've never used Win4Lin, but since it's a virtual machine, I imagine it does Direct X and games just fine. There are a few problems with using Win4Lin:

  • It's not cheap. As of January 2002, expect to pay $80 without printed docs and $90 with printed docs. In addition, there isn't an evaluation copy available, although you get a 30 day money back guarantee. However, since it's commercial you do get tech support.

  • You are required to have a licensed copy of Win95 or Win98. Win4Lin cannot use an existing Windows installation the way wine can.

  • It can only run on x86 architectures.