Wednesday, September 06, 2017

Trouble Finding Your Linux Game Libraries?

Some Linux games, especially the older Linux games, are installed with the version of libraries that they need. The problem arises when the specific libraries are unknown to your system and the game won't launch.

The old Loki game installers attempted to fix this with some shell scripting. Maybe that works, maybe it doesn't. Here's an easy way to fix this problem.

First, we use a kernel utility, ldd, to see what shared libraries the binary expects to see.

$ ldd

You will get a list of libraries needed and a clear indication of whether they are present or not.

Trick #1

Assuming your system reports them missing, but you can see them in the directory where you installed the game, rather than fix the script that launches the game, we'll simply tell the system where to look.

Become root, and change directory to /etc/ldd.so.conf.d. Once there, create a file, name_of_game.conf and in that file enter 
/full/path/to/the/game/libraries.

Running the ldconfig utility,

# ldconfig

And the magic is done.

It's also possible to manually export the path every time you need to launch the game and/or put it in your .bashprofile or .bashrc, but the method outlined above solves the problem for every user of the system.

Trick #2

Some older games just require old version of libraries that must be compiled against older kernel versions. Where do we find those? We can look to the Loki Compatibility Libraries.

Download the libraries and install them in /usr/local/lib/loki.
Then, as detailed above, add loki.conf to /etc/ldd.so.conf.d and run ldconfig.

Sunday, September 03, 2017

Hexen on Modern Linux


There is a Linux binary housed at Hexen II: Hammer of Thyrion. It is in the Mageia repositories and can be installed using urpmi. The binary gets installed in /usr/bin and the rest of the game files and documents can be found in /user/games/hexen2.

I have not yet experienced Hexen2 since I don't have the retail version. The installer only installs the game engine, so I've purchased an original game CD from eBay.


RESOURCES

Hexen II Wikipedia

Hexen Wiki

Doomworld Wiki

Hexen II: Hammer of Thyrion

Linux-x86

Linux-AMD64

Install HOWTO

Hexen II Linux Demo

Saturday, September 02, 2017

nVidia Triple-head Display

What with the price of older-but-decent video cards and monitors being very reasonable, I decided to move from the dual-head display I have been using for the past 15 years to triple-head.

After some aggravations, I got it working, except that the Google-Chrome browser goes wonky in the display, but Firefox and other apps seem to be unaffected. If you want to see the wonky behavior, a video is available.

Here's the xorg.conf for triple-head display. It seems that nvidia-settings added extra Screen sections, so I'll need to experiment with that to see what stays.

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" 1280 0
    Screen      2  "Screen2" 2560 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "1"
EndSection

Section "Module"
    Load           "v4l" # Video for Linux
    Load           "glx"
EndSection

Section "ServerFlags"

    # allows the server to start up even if the mouse does not work
    #DontZoom # disable / (resolution switching)
    Option         "allowmouseopenfail"
    Option         "DontZap" "False" # disable (server abort)
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from data in "/etc/sysconfig/keyboard"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "us"
EndSection

Section "Monitor"
    Identifier     "monitorLeft"
    VendorName     "Samsung"
    ModelName      "Samsung SyncMaster 930B"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
    ModeLine       "1024x768" 78.525 1024 1049 1145 1312 768 769 772 800 +hsync +vsync
    ModeLine       "800x600" 62.357 800 821 901 1040 600 601 604 632 +hsync +vsync
    ModeLine       "640x480" 49.886 640 661 725 832 480 481 484 514 +hsync +vsync
    ModeLine       "832x624" 57 832 876 940 1152 624 625 628 667 -hsync -vsync
    ModeLine       "800x600" 100 800 816 824 840 600 616 624 640 -hsync -vsync
    ModeLine       "1152x768" 78.741 1152 1173 1269 1440 768 769 772 800 +vsync
    ModeLine       "1024x768" 65 1024 1032 1176 1344 768 771 777 806 -hsync -vsync
    ModeLine       "1024x768" 65 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
    ModeLine       "1024x768" 112.62 1024 1076 1248 1420 768 768 780 808 +hsync +vsync
    ModeLine       "1280x1024" 135 1280 1288 1392 1664 1024 1027 1030 1064
    ModeLine       "1280x1024" 134.989 1280 1317 1429 1688 1024 1025 1028 1066 +hsync +vsync
    ModeLine       "768x576" 50.00 768 832 846 1000 576 590 595 630
    ModeLine       "768x576" 63.07 768 800 960 1024 576 578 590 616
EndSection

Section "Monitor"
    Identifier     "monitorMiddle"
    VendorName     "Samsung"
    ModelName      "Samsung SyncMaster 930B"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
    ModeLine       "1024x768" 78.525 1024 1049 1145 1312 768 769 772 800 +hsync +vsync
    ModeLine       "800x600" 62.357 800 821 901 1040 600 601 604 632 +hsync +vsync
    ModeLine       "640x480" 49.886 640 661 725 832 480 481 484 514 +hsync +vsync
    ModeLine       "832x624" 57 832 876 940 1152 624 625 628 667 -hsync -vsync
    ModeLine       "800x600" 100 800 816 824 840 600 616 624 640 -hsync -vsync
    ModeLine       "1152x768" 78.741 1152 1173 1269 1440 768 769 772 800 +vsync
    ModeLine       "1024x768" 65 1024 1032 1176 1344 768 771 777 806 -hsync -vsync
    ModeLine       "1024x768" 65 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
    ModeLine       "1024x768" 112.62 1024 1076 1248 1420 768 768 780 808 +hsync +vsync
    ModeLine       "1280x1024" 135 1280 1288 1392 1664 1024 1027 1030 1064
    ModeLine       "1280x1024" 134.989 1280 1317 1429 1688 1024 1025 1028 1066 +hsync +vsync
    ModeLine       "768x576" 50.00 768 832 846 1000 576 590 595 630
    ModeLine       "768x576" 63.07 768 800 960 1024 576 578 590 616
EndSection

Section "Monitor"
    Identifier     "monitorRight"
    VendorName     "Samsung"
    ModelName      "Samsung SyncMaster 930B"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
    ModeLine       "1024x768" 78.525 1024 1049 1145 1312 768 769 772 800 +hsync +vsync
    ModeLine       "800x600" 62.357 800 821 901 1040 600 601 604 632 +hsync +vsync
    ModeLine       "640x480" 49.886 640 661 725 832 480 481 484 514 +hsync +vsync
    ModeLine       "832x624" 57 832 876 940 1152 624 625 628 667 -hsync -vsync
    ModeLine       "800x600" 100 800 816 824 840 600 616 624 640 -hsync -vsync
    ModeLine       "1152x768" 78.741 1152 1173 1269 1440 768 769 772 800 +vsync
    ModeLine       "1024x768" 65 1024 1032 1176 1344 768 771 777 806 -hsync -vsync
    ModeLine       "1024x768" 65 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
    ModeLine       "1024x768" 112.62 1024 1076 1248 1420 768 768 780 808 +hsync +vsync
    ModeLine       "1280x1024" 135 1280 1288 1392 1664 1024 1027 1030 1064
    ModeLine       "1280x1024" 134.989 1280 1317 1429 1688 1024 1025 1028 1066 +hsync +vsync
    ModeLine       "768x576" 50.00 768 832 846 1000 576 590 595 630
    ModeLine       "768x576" 63.07 768 800 960 1024 576 578 590 616
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Samsung SyncMaster"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Samsung SyncMaster"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
EndSection

Section "Monitor"
    Identifier     "Monitor2"
    VendorName     "Unknown"
    ModelName      "Samsung SyncMaster"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
EndSection

Section "Device"
    Identifier     "deviceLeft"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9800GT"
    Option         "DPMS"
    BusID          "PCI:1:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "DeviceMiddle"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9800 GT"
    Option         "DPMS"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Device"
    Identifier     "DeviceRight"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9800GT"
    Option         "DPMS"
    BusID          "PCI:7:0:0"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9800 GT"
    BusID          "PCI:1:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9800 GT"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9800 GT"
    BusID          "PCI:7:0:0"
EndSection

Section "Screen"
    Identifier     "ScreenLeft"
    Device         "DeviceLeft"
    Monitor        "MonitorLeft"
    DefaultDepth    24
    Option         "UseDisplayDevice" "DFP-0"
    Option         "metamodes" "nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "ScreenMiddle"
    Device         "DeviceMiddle"
    Monitor        "MonitorMiddle"
    DefaultDepth    24
    Option         "UseDisplayDevice" "DFP-1"
    Option         "metamodes" "nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "ScreenRight"
    Device         "DeviceRight"
    Monitor        "MonitorRight"
    DefaultDepth    24
    Option         "UseDisplayDevice" "DFP-0"
    Option         "metamodes" "nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "DVI-I-2: nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "DVI-I-3: nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen2"
    Device         "Device2"
    Monitor        "Monitor2"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Wednesday, August 23, 2017

Medal of Honor: Pacific Assault on Modern Linux

Installation using Codeweavers Crossover from the DVD version found no problems for the installation or running the game. Of course, the DVD must be in the drive due to SafeDisc v3 DRM. The game played without issue (36FPS), but became unplayable (12FPS) after installing the v1.2 patch.

I also installed, again using Codeweavers Crossover, the GOG.com version which is very useful considering that version of the game is DRM free. However, I received error messages during the install:  "Runtime Error (at 181:806): Out Of Stack Range" and "Out of Global Vars range" messages. Still, the game launched, so I'm guessing that the errors were  from the GOG game installer, not the game itself. However, even though the game would run, it was very slow (12FS) which is due to the version 1.2 that GOG installs.

Saved games are kept at %USERPROFILE%\Documents\EA Games\Medal of Honor Pacific Assault\ and saved games can be obtained from several places on the Internet if you have already played the game and want to jump around to different missions.

The games requires Windows XP, Direct3D version 9.0c and Version 1.1 or 2 shader model support, so most modern systems and video cards are well in excess of the game requirements.

To enable cheats, look here to enable the console. And to enter the cheats in the console, see the list here or here.

There are mods available here, here, and a hires texture mod here as well as other sites. However, the high texture mod caused my gameplay to be sluggish with low FPS.


The multiplayer master server was shut down prior to 2012. So much for on-line play.

RESOURCES

MOH: PA Wikipedia

Patches and Mods

MOH: PA on Windows -  Install Tips

PC Gaming Wiki
An amazing amount of information. THE go-to site for games.

 GOG.com Community Discussions for game series

 GOG.com Support Page

 Medal of Honor Wiki

 Neoseeker forums for Medal of Honor: Pacific Assault


Monday, August 21, 2017

Call of Duty on Modern Linux

I have been able to get COD and COD:UO installed from the CDs and running under Crossover, but they run once or twice and then won't work, so I am abandoning any attempt to install these in Crossover. They do work well when installed in Crossover's Steam bottle, so I'll go with that. I believe that the copy protection is part of the installation problem and installing from a DVD edition would resolve those issues as it did for other games where I have both versions. I'm sure there exists some way to copy the CDs to a single DVD, but the copy protection gets in the way of that.

Call of Duty, a first person shooter released in 2003, spawned an entire franchise of COD games that persist to this day. Installing using Codeweaver's Crossover should be easy, but it's not. COD: United Offensive is an expansion pack for COD and the COD game must be installed before COD:UO can be installed.

Crossover expects you to install the game through Steam. I own the original discs and shouldn't have to pay for it again.
There were several problems with my approach. The first was in the way Mageia mounts CDs and the way that Crossover presents them to the game.

By default, Mageia will mount the CD under /run/media//COD_1. But Crossover sees that not as /dev/sr0, but as a hard drive directory. Then it is impossible to "eject" the CD, because is no longer associated with /dev/sr0.

So I thought to fix this, I should edit a DOS drive letter symlink in the COD bottle to point to /dev/sr0. Then I manually mounted the CD as:
$ sudo mount /dev/sr0 /mnt

Now I believe I have control of the drive and both Crossover and the COD installer recognize it as /dev/sr0, a device that can be unmounted in the way the installer expects. But again, problems. It can't be unmounted as it is held by a wineserver. Killing the wineserver to eject the drive kills the install. Forcing the drive to eject leaves the wineserver unable to connect to a newly mounted CD2.

I even tried putting CD2 in a second drive and mounting it over CD1 at /mnt, but I can't fool the installer or the wineserver with this with this. I'm guessing that if this problem could be solved, it would be possible to do a regular install of the game.

What is on CD2 are the large /pak files that live under /Main, so I killed the COD install (selected NO for rolling back the installation) and copied the CD2 files into the COD bottle. That didn't work because the installer puts language translations in the CDO directory and I don't see where they are just copied over, they must be extracted from somefile.

Sadly, the best way is to install under Windows and copy it to the COD bottle crated in the aborted install.
But a new problem - CD1 needs to be in the drive for the copy protection to run the game.  I did not want to tru and get Crossover to find the CD. It had already given me hours of aggravation about that. So . . . a no-cd crack was installed and the game should launch, but . . .

While the start menu links aren't automatically created for use, they should be able be created through the "Run command" utility. But . . . not for us.

And another problem. When I could get the game to start, it crashed with a buffer overrun error that some detective work discovered that it had to do with modern nVidia drivers and the length of an environmental string. The fix? Just prefix the entire command in quotes with:
__GL_ExtensionStringVersion=17700

But, of course, it's not that easy. There were still a few problems remaining. It seems that running a line of Linux code is not possible in the "Run command" dialog.  This is solved by launching the game using a script named ~/bin/codsp.

#!/bin/sh
cd /home/hoyt/.cxoffice/Call_of_Duty/drive_c/Program\ Files/Call\ of\ Duty\ Game\ of\ the\ Year\ Edition/
__GL_ExtensionStringVersion=17700 \
/opt/cxoffice/bin/wine --bottle "Call_of_Duty" /home/hoyt/.cxoffice/Call_of_Duty/drive_c/Program\ Files/Call\ of\ Duty\ Game\ of\ the\ Year\ Edition/CoDSP.exe
The command is all on one line.

What the script does is to cd to the games installed directory or the game won't know where it finds it s files. Too bad there's no --basedir option. Then we execute the full paths of everything just to avoid any problems there using the special command line incantations to tell Crossover where it should be looking.

Even with all that work, the game engine might not find a default.cfg, so you can download one from here and just rename it.

And there you have it.

Saved Games
If you have previously played through COD, it makes sense to download a package of saved games so that you can have fun with the game.


NEW ISSUE
I attempted to install COD: United Offensive and it would not proceed because COD was not found. I'm guessing it looks in the Registry for the data and my Bottle does not have that data. So I need to go back to my Windows install and copy that or create one from that example. If you do create one, you CD key is the letters and numbers you entered to install the game, just without the dashes. And the new installed version number is 1.3. COD: United Offensive will update it to 1.4 if you install that expansion game.

It may be possible to install the game after converting the CDs to a DVD as describes at File Forum.

RESOURCES

Call of Duty View -- updates

Saved Games

Steam Community Forum

PC Gaming Wiki
Excellent source of technical information.

Call of Duty View

Doom for Modern Linux

This game was released in 1993 and is considered a pioneer in 3D gaming. Previous games from id Software were 2D.

While the original game might be playable in DosBox, There are more modern ports with greater stability and wide platform support. One of the ports, prboom, is available for Mageia6 (and MS-Windows and many other platforms). Based on the release of the original source code; it uses the SDl library.

prboom is one of those rare Linux things that has been fixed enough that everything works. It offers a true-to-the-original gameplay rather than updating the game with modern features like ZDoom, EDGE, and Eternity Engine. prboom emulates the games engines from the different versions of DOOM; it is also compatible with the demo version of DOOM.

$ sudo urpmi prboom 

installs the game in  /usr/games and run the first time with no arguments creates .prboom in your home directory, which is where you will place your *.wad files (referred to as IWADs.

Mageia6 also provides the man freedoom wads in the freedoom package and installs them at

/usr/share/games/doom/freedoom1.wad
/usr/share/games/doom/freedoom2.wad

To install the freedoom IWADS,

$ sudo urpmi freedoom

The freedoom Docs are worth a read and can be found in /usr/share/doc/freedoom/README.html 

So, in answer to the classic meme "Can it run Doom?", launch the first game:

$ prboom -iwad /usr/share/games/doom/freedoom1.wad

Yes, this was considered groundbreaking in 1993, but you can see who far 3D gaming has progressed in 24 years.

The ArchLinux Wiki has excellent instructions on how to configure and launch prboom.

Graphical Frontend for DOOM

Mageia does not provide a graphical frontend for launching Doom games. There is one available from enyo-doom, Doomseeker, Super Shotgun Launcher, qzdl, and DoomLauncher.

I chose to use DoomLauncher (download) . As a java jar, it should work cross-platform. Placing it in ~/bin/, I wrote a script simply named doom to launch it (and don't forget to chmod +x.)
#!/bin/sh# launch DoomLauncherjava -jar ~/bin/DoomLauncher.jar
Once running, initial configuration is not obvious at first.


Begin by clicking on Engine: ...  and select the path to prboom. You can install multiple different game engines if you desire.

Next, click on Iwad: ... and select the path to your IWADs.

Once you have selected your game engine and your IWAD, click on Launch to start the game.

NOTE: The GUI does not do well upon your exit from the game. You need to close it and start it again. Otherwise, it appears to work well.

RESOURCES

ArchLinux Wiki

Zandronum Wiki

Playing SDL_mixer games with soundfonts

PrBoom+

 Troubleshooting JAR File Associations for DoomLauncher

Doomworld Wiki




Sunday, August 20, 2017

Unreal 2003/2004 for Modern Linux

If Unreal2 was the redheaded stepchild of the original Unreal game, Unreal Tournament 2003 was the redheaded stepchild of the original Unreal Tournament. The gaming community was not happy with the game as it originally shipped in September 30th, 2002. So unhappy, in fact, that EPIC released Unreal Tournament 2004 which re-used much of UT2003.

UT2003 does offer a Linux installer and there is a Linux update as well as the DE Bonus pack and the Epic Bonus Pack. A Windows-only Community Bonus Pack was released followed by a Linux installer for it.

While it can be installed uising WINE, PlayOnLinus and Crossover, we will be installing as root to make the game available to all system users.

The Linux installer is on disc3. Mount the game discs and copy them all to ~/ut2003. Copy the Linux installer to that directory, cd there and su to root.

First, we need to set a workable POSIX version value.

# export _POSIX2_VERSION=199209

Second, set a usable libc version.

# export SETUP_LIBC=glibc-2.1

Your distro might provide compat-libstdc. If so, install that.

Third, tell the installer that we are running on a 32-bit system.

# linux32 ./linux_installer.sh

Now you can use the graphical installation tool and provide your CD key and play the game.

For Unreal Tournament 2004, a Linux binary was not released, but the games installs and plays well using Crossover.

RESOURCES

The EPIC Bonus Pack can be unpacked with unzip, then the files transferred to your UT2003 installation.

Most of the game updates, mods and utilities can be downloaded from GameFront. There is a umod extractor for Linux as well as a conversion to return the game to Classic UT, plus the Official maps and the Community Maps, skins and mods.

UT2003 Fedora 23 HOWTO

The Unreal Admin Page Forum UT2003