Tuesday, July 29, 2014

Tomb Raider PC Oldskool Style

Title Screen - Software Mode
The original Tomb Raider, developed by Core Design and released by EIDOS, worked just fine in a DOS or Windows 9x system, but when Windows XP became the prevalent operating systems, it became more and more difficult to make it work.  With Windows XP, it was mainly an issue of getting the sound to work.  However, with 64-bit Operating Systems, it is not playable at all.  Today, you can buy it on Steam, emulate it via Glidos (for $10, demo available) or emulate it via DOSBox (for free).

Tomb Raider PC was released alongside versions for the Sony Playstation and Sega Saturn.  The PC version had certain enhancements and limitations compared with the console versions.  The PC advantages include an optional 640x480 resolution mode, faster loading times, the ability to save anywhere and at virtually anytime, more configurable controls and support for the Unfinished Business add-on.  The PSX and Saturn display better FMV quality, output better quality sound effects, have support for more than four buttons on a gamepad and a greater variety of music that is heard when certain triggering events occur in-game.


In-game - Software Mode 320x200
Out of the EIDOS-trademarked trapezoid box the PC version supports standard 320x200 VGA graphics and 640x480 SVGA/VESA graphics.  The game was built for a Pentium, and while a lower end Pentium can handle the low resolution graphics just fine, even a fast Pentium MMX will have some slowdown with the high resolution graphics.  Both graphics modes can show fewer pixels to increase speed, each press of F2 reduces the effective graphical resolution by approximately 10% compared the "full screen".  F3 cycles in reverse.

In-game - Software Mode 640x480
EIDOS released patches to support many of the new 3D accelerator cards that were available in late 1996 and early 1997.  There are patches for the basic Tomb Raider game for the 3dfx Voodoo Graphics, ATi Rage Pro 3D, Matrox Mystique, NEC Power VR, Rendition Verite, and S3 Virge.  The 3dfx and NEC cards were 3D-only accelerator cards that worked in tandem with a separate 2D card.  They often boasted better performance than the other 2D/3D cards against which they were competing.

In-game - 3dfx Patch
The Voodoo Graphics chipset was most often found on PCI cards like the Diamond Monster 3D, the Orchid Righteous 3D and the Canopus Pure 3D.  The first two came with 4MB of EDO DRAM, the latter contains 6MB of EDO DRAM.  The most common Power VR chipset is contained on the Videologic Apocalypse 3D, 3DX, 5D and Matrox m3D, which use 4MB of SDRAM.  The original Apocalypse 3D uses the PCX1 chip, while the others use the faster PCX2 chip.

The Mystique and Virge were especially notorious for poor feature sets, performance and drivers.  The ATi card was decent.  However, the ATi patch is unique because it contains a true Windows executable for Tomb Raider.  This allows it to run without any DOS sound card configuration and allows the full selection of buttons without a keyboard to joystick mapper.  It also supported 800x600 graphics in Tomb Raider.  The Verite had some good early 3D game support with its custom APIs, but the company's inability to release competitive products alongside 3Dfx and nVidia consigned the Verite architecture to obsolesence.

Unfinished Business Title Screen - Software Mode
A 3Dfx Voodoo Graphics (Voodoo 1) card brings many additional features to Tomb Raider.  The game uses a 640x480 resolution with the Voodoo patched-executable.  It is far more fluid than the software 640x480 mode.  Tomb Raider maxes out at 30fps, and you are much more likely to obtain 30fps on vintage hardware with a Voodoo than without.  With a Pentium II, the game can play buttery-smooth.  The Voodoo graphics makes the game look far better than the console versions.  It adds 16-bit rendering support, bilinear filtering, mip-mapping and anti-aliasing.  The Power VR patch looks superior to the Voodoo, supports 800x600 and 1024x768 and 60fps, but requires a much faster CPU.  The Voodoo, the Power VR and ATi Rage Pro 3D have Unfinished Business patches, other 3D accelerators do not.

Unfinished Business In-game - Software Mode 320x200
As the Voodoo cards were by far the most widely adopted of the early 3D accelerators, this blog entry will focus on them.  The other 3dfx Voodoo-compatible retail chipsets include the Voodoo Rush, Voodoo 2, Voodoo Banshee, Voodoo 3, Voodoo 4 and Voodoo 5.  The original Voodoo, the Voodoo Rush, the Voodoo 2 and the Voodoo Banshee were made by a wide variety of board manufacturers, but from the Voodoo 3, the boards were primarily built by 3dfx, which had bought STB systems to obtain access to manufacturing capabilities.  There are some differences depending on whether you are playing on a true Voodoo 1 or a later card.

Unfinished Business - Software Mode 640x480
For the basic game, there are two patches for 3Dfx cards.  One works only with Voodoo 1 cards, the other works with all Voodoo cards.  The latter patch is sometimes referred to as the Voodoo Rush or Voodoo 2 patch, but will work with any 3dfx chipset.  Both patches are named TOMB.EXE.  The Voodoo 1 patch has a size of 1,140,735 bytes and a CRC32 of 0288F887, and the Voodoo Rush patch has a size of 873,739 bytes CRC32 5A17B7F3.

Unfinished Business - 3dfx Mode
The original Voodoo patch suffers from high gamma levels, partially to offset the rather low-lit environments. This, combined with the VGA passthrough cable, tends to show the Voodoo 1 graphics in a relatively poor light, quality-wise. The combined 2D/3D boards do not have this problem, and the visual quality for the Voodoo 2 passthrough should be improved.  The visual quality is excellent with my Voodoo 3 card.

With a Voodoo Rush or better, you may see a white outline around Lara's pistols, their discharge and her left hand.  Disabling the anti-aliasing with F3 will remove it.  Custom DOSBox builds with Glide support may show black outlines.  Also, the mip-mapping feature will show "seams" in the surfaces on real hardware, so I would not advise using it.  I don't know whether this will be seen with a real Voodoo Graphics card.

For the Unfinished Business addon, there are two Voodoo patches.  The one that works with the Voodoo Rush, 2 and later 3dfx cards, despite what the readme file may say, and has a file size of 867,563 bytes and a CRC32 of EBFBFEAD.  This works with the same data files as the software-render only executable.

There is another patch floating around with the same file size but a CRC32 of 61E47504, this one may only work with the original Voodoo 1 graphics cards.

Glidos can improve the quality of the FMVs to Playstation levels with a downloadable pack, but this has not been integrated into the original DOS version.  There are also several texture enhancement packs available for Glidos, but not all cover the full game.

I have all the patches mentioned here, some of which can be hard to find.  If anyone needs a particular patch, contact me.


Tomb Raider, while a DOS game, is Windows-tolerant.  It's sound support is pretty basic, requiring only a Sound Blaster.  It supports a wide variety of ISA sound cards, including the Sound Blaster Pro, Sound Blaster 16/AWE32 & 64, Pro Audio Spectrum 16, Roland RAP-10, Microsoft/Windows Sound System, ESS AudioDrive, Ensoniq SoundScape, Gravis UltraSound and Gravis UltraSound Max.  It also supports the NewMedia.WAVJammer and I/O Magic Tempo PCMCIA sound cards natively.  The game uses middleware drivers from HMI.

In DOS, you shouldn't have a problem if you actually have one of these ISA or PCMCIA cards, or a card that advertises compatibility.  Tomb Raider uses a sound card only for sound effects, and they are typically in an 8-bit/22kHz format (lowest common denominator, suitable for a pre-Pro Sound Blaster).  In Windows 9x, DOS games can still access ISA sound cards directly.  All the listed sound cards have Windows 9x drivers, and most are built into Windows 98SE.  I am not sure whether there is a driver to obtain digital audio capabilities in Windows 9x for the Adlib Gold, only the FM Synthesizer may be supported.  Owners of that card would be out of luck for this game.

If you only have a PCI sound card, you will need to activate its DOS sound card emulation capabilities, if any.  Most PCI sound cards for Windows 9x do emulate a Sound Blaster Pro, so if you have the emulation drivers installed in Windows 9x, you should be good to go.  The Aureal Vortex 2 sound card works perfectly for this game, but you must set the resources manually in the setup program.  Of course, you will need to use the Tomb Raider setup program to tell the game the virtual resources (I/O, IRQ/DMA) the emulation is using.  You will need to run the game in Windows unless you have installed the drivers that provide real-mode DOS support for sound.

The Tomb Raider PC CD is a mixed data/audio CD, with one data track and nine audio tracks.  The audio tracks should be playable in a CD player or with Windows Media Player.  If you can hear no music, make sure that there is an MPC cable connected from your CD ROM or DVD ROM drive to your sound card. You can also hear the music if you plug in headphones or speakers to the audio output jack on the front of many drives.  Also, make sure your mixer settings have not muted the CD audio.  There are some budget releases where the CD audio is not present.

The Playstation version of the game is also a mixed data/audio CD but has fifty-six audio tracks.  Additional tracks are used for all in-game spoken dialog, including the tutorial level.  This dialog, recorded in 16-bit CD audio format, will sound superior to the 8-bit digital format the PC version uses.  There are also additional Playstation music tracks that play back at certain points in the levels that are entirely absent from the PC version.  On the other hand, the Playstation version does not have ambient music playing throughout the levels.  Core Design removed these extra tracks from the PC version as a "design decision", according to the PC version's readme file.  The theory behind the decision is that certain CD drives could not keep up with the frequent CD track changes.

The idea of putting these cues back in the game had been floating around for many years, but the trouble was that early hackers believed that the triggers for the in-game music would have to be recreated from scratch. Then a guy going by the name KMO  found that the triggers were still present, albeit disabled, in the main executable.  A small patch was made in 2007, called the Tomb Raider Audio Restoration Patch, to enable the triggers.  A new CD must be burnt containing the additional CD audio tracks from the PSX version or mp3s of those tracks.  Because any of the Greatest Hits releases of Tomb Raider can be purchased for very little money, I would suggest buying a copy and ripping the tracks using a program called Exact Audio Copy.  The patch will allow the best of both worlds, ambient music will play except when triggered music is activated.  Start reading here for more information : http://www.vogons.org/viewtopic.php?f=20&t=10463&start=180

The patch will be found on the next page, http://www.vogons.org/viewtopic.php?f=20&t=10463&start=200#p117936.  Included in the patch is a modified Voodoo Rush TOMB.EXE, but there are instructions to modify any Tomb Raider executable.  Glidos also supports restoring the triggers through a downloadable pack.


Tomb Raider defaults to using the keyboard, but can use a gamepad with the keyboard.  As it is a DOS game, it only recognizes four buttons and two axes.  If you are playing the game in Windows, make sure your controller uses ID1 in the Game Controller properties in the Control Panel.  If you have a gamepad with more than four buttons, you will need a program like JoytoKey to map the extra buttons to keyboard keys.  JoytoKey is one program that will work, but modern versions are only shareware and run on nothing less than Windows XP.  You can find an older freeware version of the software, 3.7.4, that works on Windows 9x here : http://www.electracode.com/4/joy2key/JoyToKey%20English%20Version.htm

I have successfully used an original Playstation controller (no analog sticks) with a Radio Shack PSX to USB adapter (RS Part # 26-304) in Windows 98SE.  The USB adapter will be seen by Windows 98SE as a generic HID device, and all the buttons of the PSX controller will be visible.  You can also use a PSX Dual Shock controller.  Tomb Raider for the Playstation was pre-Dual Shock and only supported digital axes.  A standard PC joystick provides analog axes, but I do not believe Tomb Raider for the PC really takes advantage of analog degrees of movement.  I would suggest mapping the more critical functions to the "real" DOS gamepad buttons (Action, Draw Weapons, Jump) and the less timing critical buttons to the "emulated" keyboard buttons.

I found that if I used a Gravis Gamepad connected to my Vortex 2's game port, the control was unreliable with the Voodoo Rush executables.  The menu would rotate uncontrollably and Lara would not run in a straight line without turning.  This was with my Pentium III 600E running at 600MHz.  When I reduced the speed to 400MHz by knocking down the FSB to 66MHz, the control was properly responsive.


idspispopd said...

There were certainly more than 3 Voodoo1 models, although the ones you mention are probably the earliest.

The Videologic Apocalypse 3D has a PowerVR PCX1 chip. The Matrox m3D has a PowerVR PCX2 chip, like the Videologic Apocalypse 3DX (and 5D, 5D Sonic). PCX1 and PCX2 need different patch executables for Tomb Raider.

The Verité V1000 had solid Direct3D support, better than everything else pre-Voodoo1, but it was significantly slower than Voodoo1. Verité V2200 (which can also run TR1) roughly reached Voodoo1 performance.
The reasons for Rendition's failure were more complex, a big part was that they were late to market.

ATI Rage and S3 Virge also had patches for Unfinished Business (see http://www.vogons.org/viewtopic.php?t=33483). Matrox Mystique and Rendition Verité did not have patches for UB. I *think* there was only one 3dfx patch for UB, but I don't know which kind that one was.

The original Voodoo1 patch is supposed to work with Voodoo2 cards provided you set certain DOS environment variables (see eg. http://www.vogons.org/viewtopic.php?t=35721).

Michael Huth said...

There is at least one official version with broken CD Audio tracks. (German green CD cover)

philscomputerlab said...

Good write up! Playing around with the game at the moment. The GOG.com and Steam releases are based on BIN / CUE images using OGG Audio CD tracks. Extracting the BIN files, converting the OGG to 44.1 KHz 16 bit WAV and burning a mixed mode CD gives you the full MS-DOS installation CD.

On Windows nGlide seems to be the easiest / best way to make the game look nicer. It will render at 1080p with 4:3 aspect ratio just fine.

However I ran into issues getting the PSX music going. Lots of dead links and no clear guide / resource. Does anyone know more about this topic?

Also in 3dfx mode, F2 is display FPS, F3 AA but what does F4 do?

idspispopd said...

@phil: According to Google and especially your page on the subject http://www.philscomputerlab.com/tomb-raider.html F4 should toggle mip mapping...

Robert Steed said...

Please post links to download the patches. I need 3Dfx ones in particular (I have a Voodoo Banshee).

Great Hierophant said...

http://www.patches-scrolls.com/tomb_raider.php has the correct patch