XSpaceWarp, or: converting old source code for modern compilers | Niels Horn's Blog

Niels Horn's Blog

Random thoughts, tips & tricks about Slackware-Linux, Lego and Star Wars

XSpaceWarp, or: converting old source code for modern compilers

How it all started

On the TRS-80 mailing list I subscribe there was a discussion about an old (from 1977!) game I used to play on my TRS-80 Model I called Space Warp. This game was originally called “Time Trek”, based on the popular television series Star Trek. When Tandy/Radio Shack released this game commercially, they changed some of the terms, probably for copyright reasons.

Someone mentioned that it had been ported to X and that the sources were available. But, when I downloaded the sources from x.org and tried to build it, I noticed that this port was from 1995 and many things have changed since then… It simply threw tons of errors instead of building the program. For sentimental reasons I did not give up though, and decided to try to solve the incompatibilities with the modern Gnu C++ compiler.

What needed to be adapted

Some of the needed changes were quite obvious, others required a bit of “Googling” to discover. All in all, it was a nice exercise for me. The major items were:

  • #include <iostream.h> – Modern versions of gcc expect #include <iostream> and a line defining the namespace (”using namespace std“)
  • string literals needed to be defined as (char*) like: invalid((char*)"columns"); instead of invalid("columns");

Other changes were less obvious, but all in all I had to create a patch file of 999 lines :)

After all these patches, XSpaceWarp built fine on Slackware 13.0 and the 13.1 beta, both 32 & 64-bits. I also tested it on ARMedslack.

The result

Here are two screenshots from the game:

It’s not exactly a graphic-intensive game, but don’t forget that this was written over thirty years ago :)

Get it!

If you use Slackware, you can get packages from Slackware 13.0 32 & 64-bits and for ARMedslack from my site.
As soon as SlackBuilds.org opens for submissions again (after the release of Slackware 13.1), I’ll submit the SlackBuild.

If you want to build the program yourself, get the original sources from x.org or the patched version for newer compilers here.
The patch is also separately available here, so that you can study it and patch your own sources.

Bookmark and Share

This entry was posted on Friday, May 14th, 2010 at 23:21 and is filed under ARMedslack, Patches, Slackware, TRS-80, gcc. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

5 Responses to “XSpaceWarp, or: converting old source code for modern compilers”

  1. Giuseppe Flavio Says:

    Thanks a lot for patching this game. I’ve made an AUR package for archlinux here:

  2. Niels Horn Says:

    Good to know that XSpaceWarp is now available for Slackware and archlinux ! :)

  3. ron studenny Says:

    Where can I get spaced warp for my pc. My wife and I and friends played it for hours in college. When ever we get together we always yell “2,2,2″. You would hit that to get out of trouble if your energy was low. Of course you had to clear that sector out fist. Anyway I’m not computer code savy and wanted to get the game. Can you help me????? Ron

  4. Niels Horn Says:


    There is a Windows program that looks a lot like SpaceWarp, called WinTrek.
    You can find it here: http://www.joejaworski.com/wintrek/

    have fun!

  5. ron studenny Says:

    Thanks. I’ll try it.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

It may take some time for your comment to appear, it is not necessary to submit it again.