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 ofinvalid("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.
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.

Dutch guy living in Brazil. Has worked in the IT business since it was invented (well, almost...). Interests: Slackware, Lego, Star Wars.
May 30th, 2010 at 18:03
Thanks a lot for patching this game. I’ve made an AUR package for archlinux here:
http://aur.archlinux.org/packages.php?ID=37462
May 30th, 2010 at 21:50
Good to know that XSpaceWarp is now available for Slackware and archlinux !
June 2nd, 2011 at 7:01
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
June 2nd, 2011 at 8:22
Hi,
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!
June 2nd, 2011 at 11:09
Thanks. I’ll try it.