Alpha/OSF binaries of Quake 1 for use with SimpleScalar ========================================================= This README is part of a modified version of the original Quake 1.06 shareware distribution which is available from: ftp://ftp.cdrom.com/pub/idgames/idstuff/quake/quake106.zip This modified version includes Alpha/OSF binaries of the X and OpenGL versions of Quake 1 that are suitable for use with the SimpleScalar microprocessor simulator, which is available from: http://www.cs.wisc.edu/~mscalar/simplescalar.html. You also need to obtain the latest Alpha ISA and system call definition files from: http://www.cs.wisc.edu/~plakal/simplescalar These binaries were built with a modified version of the recently released Quake 1 source code. The modified source should be available at the site from which you downloaded this distribution (i.e., the URL above from where you can get the latest Alpha definition files). How to use: ----------- - Make sure you rebuild the Simplescalar simulators using the latest Alpha ISA and system call definitions (from the URL above) - Go to the directory containing x11quake.* and glquake.* - Run X Quake: sim-fast x11quake.cc -noudp - Run OpenGL Quake: sim-fast glquake.cc -noudp - The above command lines make Quake cycle through a list of 3 demos or allow you to start a new game. To play a specific demo, try: sim-fast x11quake.cc -noudp +playdemo demo2 The demos available in this distribution are demo1, demo2 and demo3. - See below for some options that can speed up glquake.cc's performance. Additions to the original distribution: --------------------------------------- - README.ss_alpha : this file - x11quake.cc glquake.cc x11quake.gcc glquake.gcc: Statically-linked Alpha executables of both the X and OpenGL versions of Quake compiled using both the GNU C compiler and the vendor compiler. Compilation configuration details: Platform: Alpha 21264, Digital UNIX V4.0F (Rev. 1229) Compiler: gcc: gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release) cc: DEC C V5.9-005 Flags: gcc: -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -static cc: -O4 -arch ev6 -non_shared Libraries: X: X Window System Version 11 Release 6.3 OpenGL: Mesa v3.0 These executables do not have sound/CD audio support and do not use any assembly render routines or DGA extensions of the X server. Details of changes to the code from the original Quake can be found in the modified source distribution which should be available at the site from which you downloaded this distribution. - id1/glquake subdirectory: The glquake.* executables use "meshes" of various models of game objects. These meshes are stored in ".ms2" files and are created on-the-fly during the game's first execution. To save on start-up time, I saved these meshes from a previous execution and modified the game to read the meshes from the id1/glquake directory when it starts up (the message "HACK: Reading pre-computed mesh ..." will be noticed). The original source was supposed to implement this functionality but for some reason was unable to read from the id1/glquake directory. This may have something to do with the fact that GLQuake was not originally intended to be used with the shareware distribution of Quake. Experience/Suggested use/Known bugs: ------------------------------------ - Speed: These run very, very slowly on Simplescalar!! I was optimistic about this because DooM on Simplescalar was quite close to playable. Here are some performance results using the `timedemo demo1' Quake console command at 320x200 resolution on a 500MHz 21264 box: Quake executable Native Using optimized sim-fast x11quake 30 fps 1.4 fps glquake 2 fps (didn't wait till completion) As you can see, GLQuake is much slower than X-Quake. This is probably due to the fact that the OpenGL version was designed with hardware-accelerated OpenGL drivers in mind, while the Mesa OpenGL is not fast enough in software-rendering mode. Anyone want to write a 3-D card emulator for Simplescalar and hook it up to real host OpenGL drivers :) ??? Seriously, one could imagine using an annotated OpenGL library which could capture the OpenGL calls made by Quake so that we can feed those to a model of an OpenGL hardware accelerator in Simplescalar. See also the wish-list in the README for the modified sources. See below for some options that might speed up simulation. - Suggested use: x11quake.cc runs tolerably well without tweaking any options glquake.cc -width 320 -height 200 +gl_playermip 2 +gl_picmip 2 +gl_texturemode GL_NEAREST will run with 320x200 resolution, with low-resolution textures and with a faster texture-mapping method. For more OpenGL Quake options, see various GLQuake FAQs at: http://www.geocities.com/SiliconValley/Pines/8567/glquake-our-faq.html http://www.planetquake.com/gldojo/faq/general.html#8 - Known problems: - Quake must be run with the -noudp option to disable TCP/IP networking since Simplescalar does not currently support bind() and other socket-related system calls. GLQuake also makes the mkdir() and shmget() system calls. The latest version of the SS-Alpha system call file (available from a URL above) makes all unsupported system calls fail without aborting the simulation (while printing out an informative warning). - x11quake on the native Alpha makes a large number of unaligned accesses. Someone could clean up the code if they want to. - x11quake.* sometimes gave me a division-by-zero error in Simplescalar (but not on the native Alpha). This went away when I placed the binaries in a fresh copy of the distribution. This may have something to do with Quake 1 writing a id1/config.cfg file and reading values that might have gone stale or something. Also, FP support in Simplescalar-Alpha could be improved. Enjoy! Manoj Plakal plakal@cs.wisc.edu 24 Dec 1999