The Dilemma
As an operating system, Linux has many things to recommend it over Windows. Gaming, alas, is not one of them. Compared to Windows, Linux just doesnt have anywhere near the same level of good games. Yes, there are a few here and there, but overall, Windows continues to dominate as the PC gaming platform of choice, with the widest array of content and the most up-to-date graphics and audio drivers.
Conventional wisdom dictates that its always better to run games and applications natively. In the past, several game publishers would try to port their titles to Linux, but the return on investment was just too small. At one point, Loki tried to make a business out of porting titles from Windows to Linux, in much the way that MacPlay ported Windows games to the Apple platform. But Loki imploded in 2002, and no one else has tried such an ambitious approach.
The WineX project was started to enable Windows gaming on the Linux platform. Taking the WineX code and adding support and subscription options, TransGaming is trying to create a somewhat different business model. Instead of porting Windows titles to Linux, Windows games simply run under Linux.
TransGaming recently gave WineX a new name, Cedega, and announced support for a number of DirectX 9 titles. Thanks to the Cedega application, users have at least a chance at running some of their favorite Windows games on Linux — the key word being chance. It all depends on a number of factors, one of which is, how much futzing are you prepared to do to make a Windows game run on Linux? If youre a seasoned Linux user, an afternoon spent twiddling .conf file can be fine entertainment. If you just want a “click-and-go” gaming experience, however, Cedega may not be for you.
We tried Cedega out on three different distributions (and with a bunch of games). The results were decidedly mixed.
How We Tested
We tested Cedega on there different distributions: Fedora Core 2, Suse 9.1 and Xandros OC (the free, downloadable version of Xandros 2.0). The purpose was to see if any one of these distributions fared much better than another to get games up and running.
We tried a pretty wide variety of games on the three systems, but from the outset, we decided that we werent going to expend any heroic efforts to get a game up and running. If we hit into trouble, we spent a few minutes trying to troubleshoot, but if after about fifteen minutes we couldnt make a game work, we punted and moved on to the next game.
Fedora Core 2 |
Suse 9.1 |
Xandros OC |
|
CPU |
AMD Athlon XP 1900 |
Pentium 4 3.0 GHz |
Pentium 4 |
System RAM |
512MB |
512MB PC3200 DDR |
512MB |
3D Card |
GeForce FX 5700 |
Nvidia GeForce FX 5700 Ultra |
GeForce FX 5700 Ultra and ATI Radeon 9800 XT |
Sound Card |
Sound Blaster Live |
Sound Blaster Live |
Sound Blaster Live |
We tried a combination of games that are both supported and unsupported officially by Cedega and we found that only a select few games would just come up and run without a hitch. For each of the distributions, weve noted what happened when we tried to install and play each of our test games.
How Cedega Works
We wanted to find out more about how Cedega actually makes Windows games run on Linux and TransGamings Vikas Gupta and Gavriel State were kind enough to take us through some of Cedegas inner workings.
ET: How does Cedega take Win32 code and translate into something you can run on Linux?
Cedega does not use a virtual machine architecture. It actually loads and runs Win32 programs directly on the system.
There are essentially two main things that need to happen when running a Windows executable on Linux: The binary has to be loaded into memory on the Linux system and then dynamically linked to code that provides an implementation of the Win32 APIs that the program is using. The binary loader aspect is relatively straightforward but the real magic and complexity is in the implementation of the APIs.
The APIs that Windows games are mostly built on top of are primarily based on Microsofts DirectX system. These APIs include facilities for handling 3D graphics (Direct3D), mouse and keyboard input (DirectInput), audio (DirectSound), and so on. TransGaming creates compatible versions of Windows APIs that work on top of Linux equivalents, such as the OpenGL and X11 graphic APIs and the OSS and ALSA audio APIs. Cedega 4.0 is the culmination of over four years of effort on these APIs.
ET: What are the key components in Cedegas architecture that make it work?
Cedega needs to implement the Win32 APIs that are involved in running all the software that comes on a typical game CD. That doesnt just mean the game code itself, but also components such as the installer and any copy protection code the game uses.
For the games themselves, the most important set of APIs are the various DirectX components: Direct3D, DirectSound, DirectInput, etc. But for the rest of it – the installers, updaters, etc – weve had to implement everything from network protocols to APIs as complex as DCOM. That was quite a big job, but it was absolutely required for us to be able to run games built with InstallShield installers, as InstallShield uses a client-server architecture which is based on DCOM.
One of the other key components of the architecture is the implementation of the kernel level primitives. In the architecture used in previous versions, processing of Windows kernel level objects took place in a separate process that ran alongside the application processes. Communication with this process was relatively slow, making any code that made heavy use of kernel level synchronization primitives perform poorly.
In Cedega 4.0, weve changed this architecture and effectively lifted the kernel level objects into a shared user space. Each process running under Cedega can essentially “become” the Win32 kernel temporarily. This provides a significant performance boost for some applications. We wrote up a Cedega white paper on Reducing WineServer Overhead via a Shared-Memory approach some time ago, when it was in an early prototype stage:
ET: Do you have a kind of D3D-to-OpenGL wrapper that takes D3D calls and converts them into OpenGL calls to do 3D rendering?
Internally, Cedega deals with 3D by implementing the D3D HAL architecture and providing a D3D driver underneath. This allows us to do several things. Firstly, it means that we can consolidate our driver code in a single place, rather then having separate implementations of each of the D3D API versions. It also allows us the flexibility to use the best choice of graphics back-end available on the target system.
On Linux and Mac OS X, we use a back-end driver that implements the D3D HAL calls on top of OpenGL. On other platforms, we have the flexibility to go directly to hardware if we like.
ET: Which sound server do you use and how do you translate Dsound/Dsound3D calls? Are you using OpenAL?
Again, we use a flexible back-end architecture here, so we have support for multiple back ends. These include both ALSA and OSS APIs on Linux and CoreAudio on Mac OS X. Depending on the flexibility of the underlying hardware and API were using, we can send buffers directly to the hardware to be mixed, or we can do the mixing ourselves.
Weve looked at OpenAL, but it lacks some of the functionality we would need to implement DirectSound, unfortunately. Weve had some discussions with various people about adding OpenAL extensions that would allow us to do an OpenAL back end, but ultimately that wouldnt buy us that much, as we are already using the lower level APIs on our various target platforms.
ET: Did you have to reverse-engineer the Windows kernel(s) to make Cedega work?
Not at all. TransGaming never attempts to disassemble Microsofts code, whether its in the kernel, DirectX, or elsewhere. We obtain the majority of our information from publicly available sources such as online documentation, header files, as well as the occasional technical paper by a game developer. We also write test cases that we use to determine what the API behavior is supposed to be like when the documentation isnt specific enough. We use all of this information to craft the APIs and then we extensively test our versions of the APIs against various games.
We do use tracing tools that allow us to monitor exactly which APIs are called by a program and what parameters are passed. This is the primary tool we use when we see a divergence between expected and observed behavior. It does leave us scratching our heads in some cases though, because we can only guess at the underlying logic being used by the program. Nonetheless, our knowledge and expertise with the APIs is so extensive that weve become quite proficient at tracking down issues and getting support enabled very quickly. TransGamings knowledge of DirectX is probably second only to Microsofts own.
ET: How about PS 1.4 and PS 2.0. When will they be supported?
Fully supporting PS 2.0 on Linux requires features from the OpenGL 2.0 specification, which are not quite ready yet: the first drivers supporting OpenGL 2.0 features have only just started appearing on Linux in the last month. PS 1.4 will be easier to support, but we need to clear up a few issues with hardware vendors about the way their drivers do certain things. We dont have an ETA yet, but these are definitely very high on our priority list.
ET: Whats the latest/greatest list of supported games (officially and unofficially) that have a 4 or 5 rating?
Were extremely pleased that we have support for some of the hottest, triple-A blockbuster titles, including a number of DirectX 9.0 based games. Among the over 300 titles we support, the most popular and most important are EAs Battlefield Vietnam, Eidos Hitman: Contracts, and LucasArts Star Wars Galaxies. With our most recent release, Cedega 4.0, we also have unprecedented support for NCSofts recently released massive multiplayer online game City of Heroes and Blizzard Entertainments unreleased but highly anticipated World of WarCraft.
ET: How much does Cedega cost? Is it subscription only, or can you pay a one-time fee to get one version of the bits?
Cedega is available through a subscription service for $5 per month. As part of the subscription and monthly fee, our subscribers receive regular updates and releases, access to technical support, online discussion forums, and the very unique ability to vote on what games or technologies they would like us to work on next. Subscribers also receive discounts on products that we sell through our webstore. Were currently revamping our webstore and will be reopening it this fall with a number of exciting new products.
We dont have a one-time fee option directly although as we sign up more resellers and distributors who are interested in bundling or OEM deals, end-users will be able to purchase our product through these organizations or may receive a version bundled into their operating system.
Getting Started
We first had to download and install Cedega and Point2Play. Point2Play is a shell on top of Cedega that makes it a little easier for users to install and get games running. We initially installed Cedega by itself before realizing that we could more easily install if by using Point2Play. So if you decide to try out TransGamings service, be sure to download Point2Play first and then try installing Cedega though Point2Plays interface.
Installing Point2Play wasnt difficult in Fedora Core 2. If youve installed other applications in Linux you should have no problem with it. The Point2Play interface is easy to figure out — its broken into the following tabs: Main, System Tests, Versions and Languages.
The Main tab lets you install games, play games and edit game configurations. It also has a handy mount/unmount button for games that require multi-CD installs. If youve ever tried to install a multi-CD game in Linux you know that drive mounting can cause it to be a real headache – you cant get the system to relinquish control of the drive so you can open the door to put in the next required CD. Point2Play deals with this in an easy-to-use way. We just needed to click the Mount/Unmount button to feed in the rest of our CDs.
The System Tests tab lets you test your systems video card performance, CD card and sound. The Version tab lets you know which version of Cedega youre running, download Microsoft Fonts and also set up your TransGaming account. The Languages tab lets you install other languages. Note that theres a choice on the Configure drop down menu at the top of Point2Play that lets you configure joysticks.
Fedora Core 2
We tested TransGamings Point2Play and Cedega 4.0 under Fedora Core 2. In order to test, we had to install our Nvidia drivers by hand at the command prompt, since Fedora Core 2 does not do this automatically. If you dont install the Nvidia drivers no games that require 3D acceleration will work under Cedega. Although this is an obvious point, its worth mentioning since it initially slipped our mind that Fedora Core 2 doesnt install the Nvidia drivers that enable hardware 3D acceleration during installation.
We did the bulk of our testing on Fedora Core 2 and heres what we found:
Game |
Results |
Unreal Tournament 2004 (Windows Version) |
Installed and also ran pretty well. We could connect to a server and play online without a problem. However, some of the graphics were rendered oddly. |
Hunting Unlimited |
Installed, game loaded but we were not able to play successfully. |
Hunting Unlimited 2 |
Installed but would not play. |
Masque Slots |
Installed and ran well. No problems with this game. |
Dangerous Hunts |
Would not install. |
Trophy Hunter 2003 |
Installed but hangs when trying to start game. |
Star Wars: Knights of the Old Republic |
Would not install. |
Battlefield 1942 Single Player Demo |
Installed, would not run. |
WarCraft 3 Demo |
Installed and ran beautifully. No problems with this one. |
Joint Operations Demo |
Would not install. |
Far Cry Demo |
Installed but would not run. |
Xandros OC
Unlike Fedora Core 2, Xandros OC arrives with an enabled Nvidia 3D acceleration driver for OpenGL, so games had a fighting chance to get their graphics engines at least working. Cedegas how-to installation guide explains how to verify that 3D hardware acceleration is working:
You need to first bring up a command-line interface and type glxinfo. This will return information about your OpenGL driver stack: who makes it, what versions are supported and whether hardware acceleration is enabled. An easier way to sift through the output of this query is to type this:
“glxinfo > glxinfo.txt“
This pipes the querys output into a text file you can open using a graphical text editor and search for the word “direct”. If Direct Rendering is supported, you have hardware-accelerated OpenGL support up and running. If the Direct Rendering entry says “no,” youre running a software-only driver thats inadequate for games. The other way to verify that hardware acceleration is enabled is to type the following at a command-line:
“glxgears“
This will launch a little applet that renders three gears spinning together and every five seconds, it will output a frame rate back to the command-line interface. If hardware acceleration is enabled, your frame rate should by very high, over 5000fps in some instances. If you only have software rendering enabled, the frame rate will be down into the hundreds of frames per second.
For quite some time, Nvidia has made decidedly better Linux drivers than ATI. Although ATI now seems committed to building better Linux drivers, Nvidia still holds the advantage here. If youre at all serious about gaming on Linux and want to minimize your hassle factor, youll want an Nvidia-based 3D card powering this system. For most of our testing, we used a 3D card powered by Nvidias GeForce FX 5700 and it seemed to give us very few troubles. We also tried an ATI Radeon XT card, which turned out to be more problematic, owing to ATIs Linux drivers. By default, Xandros OC did not install hardware acceleration for the ATI-based 3D card, whereas it did for the Nvidia-based card.
We downloaded and tried to install ATIs Linux drivers, but were unsuccessful. Part of the install process was walking through the Xfree86 configuration manager, a tedious process at best. To get ATIs driver up and running, youll need to know what version of X Windows (Xfree86) youre running. To find this out, type the following:
“XFree86 –version“
ATIs driver supports three different versions of XFree86 though youll need to download the correct one. We did that and ran ATIs installer script. After walking through its many questions, we still found ourselves without hardware acceleration enabled. So we reverted back to the Nvidia-based 3D card and its drivers, which install during the Xandros OC installation.
We also got a warning about the fact that Xandros OC, which uses the 2.4.24-x1 Linux kernel, doesnt support POSIX threads (pthreads) and that several games might be adversely affected.
Game |
Results |
WarCraft 3 Demo |
Installed and ran fine, including online with BattleNet. |
Joint Operations Demo |
Installed, but would not run. |
Painkiller |
Would not install. |
Splinter Cell |
Installed but would not run. |
The only game we were able to successfully play was Warcraft 3, which ran quite well. Frame rates were smooth and never choppy, and audio sounded fine as well. We even tried an online multiplayer game via BattleNet and found that worked as well. However, when we tried some more recent titles like Joint Operations, Painkiller and Splinter Cell, none of these titles never ran successfully.
Suse 9
.1″>
We also fired up Suse 9.1 on an Intel-based system with a GeForce FX 5700 Ultra 3D card. It also had a Sound Blaster Live, so between that and the Nvidia-based 3D card and Intel chipset, its about as Linux-friendly as a platform can get. But even so, Loyd went 0-for-4 in his gaming exploits.
Heres what he tried and what happened:
Game |
Results |
Joint Operations Demo |
Install aborted, with “file not found” error about 60% of the way through. Tried a different CD, still the same. |
Dungeon Siege: Legends of Aranna |
Installed but would not run. |
Rise of Nations |
Would not install; would hang on installer launch |
Battlefield Vietnam |
Installed; would hang at splash screen. |
Both online and built-in help were pretty much useless for troubleshooting. Online forums mostly consisted of “Would like this game to run” or “Gee, this runs great!” –without any detailed explanations on how to actually install/configure the games. It always seemed like it was on the verge of working, but never actually did.
Final Thoughts
/What to Buy”>
Were of two minds about Cedega. As a product designed to bring the wide world of Windows gaming to Linux, it still has quite a ways to go. That said, for the Linux-only crowd, its an inexpensive, always-improving technology that brings at least some Windows gaming goodness to Penguinville.
Note that our experiences were limited. Several of the games that installed, but wouldnt run, could probably be made to run with some effort and trips to the Cedega forum. We continually felt like we were “almost there” with a number of games. But the process is clearly not as easy as popping a CD into your drive, running the autoplay installer, and playing the game.
TransGamings service is geared toward a special niche – dedicated Linux users that want to run certain games on their preferred operating system. Anybody expecting the TransGaming service to be a panacea for Linux gamers is going to be disappointed. The bottom line is that not all Windows games will work with it. Or they might work, but not particularly well. Even so, we still like the service. It fulfills a need for Linux games and offers at least the possibility of a broader range of games on Linux than whats available natively for that operating system. Just dont expect the latest & greatest to be at your fingertips. For that, youll still need a copy of Windows.
Product |
Cedega 4.0 |
Web Site: |
|
Pros: |
Lets Linux users run some Windows games on their Linux systems; Point2Play is easy to install and use |
Cons: |
Not all games will run and some run with glitches; the whole affair needs better documentation to get lesser Linux jockeys up and running |
Summary: |
The service is helpful to dedicated Linux users who dont run Windows and want to run the occasional Windows-based game. Die-hard gamers who need the latest and greatest gaming fix should stick with Windows. |
Price: |
$5/month (with a minimum three-month subscription). |
Score: |