Running Heretic II on Linux using a Windows CD
For some reason there does not seem to exist a patch for the Windows version of Heretic II to run it on Linux. I have, however, found a way to use the data from the Windows Heretic II CD with the Linux Heretic II demo to run Heretic II natively on Linux.
Requirements
- A copy of the Heretic II demo. (heretic2-demo.run)
- A Heretic II game disc.
- A way to extract a zip file. I use 7-zip.
- ffmpeg to re-encode the videos.
- A text editor
- A program to extract the pak files. (I will provide one.)
Extracting the Demo
To extract the Heretic II demo I had to use a 32-bit computer and transfer it to my 64. The following command will extract Heretic II on Ubuntu 9.04:
$ _POSIX2_VERSION=199209 heretic2-demo.run
Fetching the Full Version Data
Mount your CD drive and copy "/media/cdrom/Setup/zip/h2.zip" to your Heretic II demo directory. Rename your "base" directory to "base_demo" and extract the "base" directory in the zip.If you are using 7-zip this process would be as follows:
$ mount /media/cdrom/ $ cp /media/cdrom/Setup/zip/h2.zip ./ $ mv base base-demo $ 7za x h2.zip base
Now for some strange reason the Linux version of Heretic II will not read from the pak files. Because of this we will need to extract them. I have written a small program to do this. You will need CMake and G++ to compile.
$ wget http://maniacsvault.net/files/unpak-src.tar.bz2 $ tar -xvf unpak.tar.gz $ cd unpak-src $ cmake . $ make $ cp unpak ../unpak $ cd .. $ ./unpak base base/Htic2-0.pak base/Htic2-1.pak
Converting the Videos
In addition to being unable to read the pak files, the video format used by Heretic II can not be read. They can easily be converted by ffmpeg. The videos are located in "base/video". You can grab the bumper.mpg from the demo if you want, as far as I can tell it's the same video.
$ cd base/video $ ffmpeg -i Bumper.smk -b 104857k -ab 192k -aspect 5:3 -ar 44100 -r 30 -bt 7000k bumper.mpg $ ffmpeg -i Intro.smk -b 104857k -ab 192k -aspect 5:3 -ar 44100 -r 30 -bt 7000k intro.mpg $ ffmpeg -i Outro.smk -b 104857k -ab 192k -aspect 5:3 -ar 44100 -r 30 -bt 7000k outro.mpg $ cd ../
From the "base" directory, open "Default.cfg" and replace any occurance of "smk" with "mpg". They are on lines 236, 242, 245, and 248. When you are done, save and go back to the Heretic II directory.
Running Heretic II
You can now run the "heretic2_demo.x86" binary.
$ ./heretic2_demo.x86
Fixing GL Renderer Crash
If you are experiencing a crash at start up with the GL renderer then open ref_glx.so in a hex editor and locate the following string: "GL_EXTENSIONS: %s" Change the %s to some two characters which don't contain a '%' and save. (Reference)