Open source MS-DOS games

Open source DOS games are rare. Of course, you may remember GORILLA.BAS or DONKEY.BAS, co-written with Bill Gates himself, or the iconic first-person shooters Doom and Quake. But these are rather exceptions.

However, many years later, some developers still decided to release the source code of their games. Most of them have already been rewritten in SDL, making them portable to almost any modern platform, but I was wondering how difficult it is to compile real binaries for DOS?

You ask why do this? Because, well… mmm. Let’s just do it!

Mario & Luigi

Let’s start with this Mario clone written by Dutch developer Mike Wearing in 1994. It has convenient controls, smooth scrolling on a background with a parallax effect, and six levels. According to the author, Mario’s assets were just some kind of placeholder for an engine that was later supposed to be used for other games. Perhaps some of the olds will remember the games Sint Nicolaas or Charlie the Duck from the same author.

Although unofficial, it was the only Mario game available under DOS, so it spread quickly on compilation discs and through the early internet. Even Tiger Woods got to her!

The author shared the source code on his website in 2008. It is written in Pascal and can be easily compiled with Turbo Pascal 5.5 or higher. Just run TPC /M /L MARIOand you’re done! Check the code for some super secret cheat codes!

Links:

Mr. boom

The game was released in 1999 and, to my surprise, is still popular.

She continues to live as core libretro, and you can even install it through package managers on most operating systems. I did not see a link to the original source from the official sites, but someone luckily posted it on github.

The source code is written in Turbo Assembler, you will need the Watcom assembler and the PMODE/W extender, which can be easily found on the Internet. First you need to compile SS\REMDY-PM.ASM And P.ASMlink them and run IFF/MAKE.BAT And GFX/MAKE.BATto package the data into an executable:

CD SS
TASMX /mu /m9 /q REMDY-PM.ASM
CD ..
TASMX /mu /m9 /q P.ASM
WLINK @X:\PMW133\PMODEW.LNK system pmodew file P.OBJ , SS\REMDY-PM.OBJ

CD IFF
CALL MAKE.BAT
CD ..
CD GFX
CALL MAKE.BAT
CD ..

Unfortunately, the resulting executable hangs after player selection unless you disable monsters (argument -M), so either something is wrong with the code, or I’m just missing something. Sound also doesn’t work and I couldn’t get it working with the original binary.

Links

Cyberdogs

Reminiscent of the Chaos Engine, True Lies and Alien Breed series, this top-down shooter was released in 1994 by Swedish developer Ronnie Vester and was distributed free of charge.

For a solo project, this is a surprisingly coherent game – you have to go through various missions where you need to shoot cyborgs and collect items, and between missions you can buy weapons and various bonus items. There is also a two-player co-op mode with a very interesting split-screen mechanic: players use one screen, but when they move far apart, the screen splits.

The source code is written in Turbo Pascal 7 and released in 2000. It is available at the Internet Archive at now defunct personal website of the author. Two then-commercial libraries for graphics and sound processing are not included in the original package, but both can now be found on the Internet.

First, let’s take a look at the DSMI sound library. According to the author, it has been licensed for several commercial DOS games, including Disney’s Lion King and Aladdin. I suspect Cannon Fodder 2 also uses it because it stores music in a special AMF DSMI format. Use CASM.BAT to compile all assembler code into object files, and then compile Pascal module files with extension TPC -B DSMI.PAS.

The SPX library was distributed in binary form. According to the README, the source code could be bought for “a low price of $220″… Anyway, we can just tell the compiler the unit files for version 7.0 and build the game:

COPY DSMI\DSMI.INC
TPC -B -UX:\TP7\UNITS;SPX\TPU70;DSMI -ODSMI DOGS.PAS

Links

C-Dogs

C-Dogs is the sequel to Cyberdogs released in 1997. Tired of the limitations of the 16-bit mode, the author completely rewrote the game on Watcom C. In fact, this is the same game, but with a lot of improvements. In particular, joystick support, an editor, the addition of a “dog fight” in which two players fight each other, more weapons, and a lot of gameplay tweaks.

Unlike the previous game, there are no third party libraries and the source code even includes a Makefile! So, if your Watcom C is configured correctly, the game can be compiled by simply running WMAKE. Definitely the easiest compilation process in our selection.

Links

Jump ‘n Bump

This single-screen game, in which cute rabbits smash each other to bloody scraps, was developed by the Swedish Brainchild Design team of four people in 1998. Its source code was published a year later. The first Linux port to use the SDL graphics library was released in 2001 and is still supported today.

When I found the original release, I sadly discovered that the library that handles graphics and sound subroutines is only provided as a compiled static library. But the rest of the code can be compiled using the NASM and DJGPP compilers:

nasm -f coff -o gfx.obj gfx.s
gcc -I. -c main.c menu.c interrpt.c gfx.c
gcc -I. -L. -o jump.exe interrpt.o main.o menu.o gfx.o gfx.obj -ldj

Links

Avalon

The critically acclaimed but greatly underrated role-playing game Avalon was released in 1998 and distributed free of charge. It has mediocre graphics, but the game has its own charm. It has sound effects and tons of music, a large scrollable world, and puzzles.

Its source code baffled me. All third-party libraries are provided as Turbo Pascal unit files, so there are no sources. Googling the names, I found that some TPUs are from Mike Chapin’s MODEX library (MXPRPAS), some are from MiGTracker (where they are also unsourced), some are from the obscure tucgpl12 sound library and you’ll need an object file from another the MODEX library written by Matt Pritchard. There is another TPU CTVOICE.TPU, whose origin I could not determine.

In any case, since they are all included in the Avalon source code, compilation is easy:

TPC -B -U..\TPU -OMXPRPAS AVALON.PAS

You just need to use Turbo Pascal 7.0, because that seems to be the version that was used to compile TPU.

Links

payback time 2

Paybacktime 2 is an MS-DOS turn-based tactical game for up to 4 players (some players can be replaced by AI) inspired by X-COM: Enemy Unknown. The game was originally created in 1994-1997 by Finnish developers Niko Nevatie and Kari Luojus, and later, in 2014, its source code, written in Turbo Pascal and Turbo Assembler, was released to github. The Makefile is missing and most of the batch files are broken/missing, however the batch file TP.BAT hints at what needs to be done. For some reason, I was only able to compile the TASM assembler files included with Borland C++ v3.1. No other versions of TASM worked (it was a lot of fun to install Borland C++ from 15 floppy disks!).

Links

Wet Spot 2

This game is special! It is the only one on the list written in Basic! More precisely, QuickBasic 4.5. It has some advanced stuff like getting around QBasic’s 64KB limit by splitting the code into multiple modules using EMS, sound and music, etc.

Plus, it’s a really addictive game! The gameplay seems to be inspired by the arcade game Pengo, but with improved graphics. It is somewhat reminiscent of Goof Troop on the SNES. Also in the game there is a co-op for two players!

If you want to compile the game, the easiest way to do it is through the QBasic IDE with the default fast library included ( QB.EXE /L). Open WETSPOT2.PAS and create an executable from the Run menu. The sound driver SBMIDI.exe is supplied with the official Sound Blaster installation disc. By the way, this game has also been ported to pure C and SDL, so if you want to play it normally, then this is probably the best option.

Links

Keen Dreams

This game is also often referred to as “Kin’s Lost Episode”. The origin story is quite interesting. The game, written by iD software, was owned by Softdisk until Flat Rock Software purchased the entire Softdisk catalog. In 2014, there was a successful crowdfunding campaign to buy the rights and code from Flat Rock and make them public. Source code now available on github under the GPL license.

The code includes a project file for Turbo C++, so we can easily build the executable through the IDE. There are several versions of the game, you will need the one with the code 1.93. However, the game crashes with a terrible error CAL_CacheSprite: Bad shifts number!. It seems to Keen Wiki There is some information on this topic, but I do not really want to dig into it.

A much more interesting project called omnispeak, which is a modern open source version of the Goodbye engine, Galaxy! And the coolest thing is that it compiles for DOS!

But not on DOS itself. The project uses modern MinGW and djgpp compilers to cross-compile the code into a DOS executable. No idea about MinGW, but compiling with latest version of djgpp went without problems. Just run make PLATFORM=dos or simply make for the SDL version.

Links

abuse

Abuse is a futuristic run-and-gun platform game released in 1996 for DOS and GNU/Linux. You navigate with the keyboard, aim and shoot with the mouse, and explore a dark sci-fi world infested with aliens.

The source code was released two years later and the game has since been ported to multiple platforms. It is written in C++ and uses the Watcom compiler. Although the project includes Watcom makefiles, compilation is not as easy as running wmake. I’m not too familiar with Watcom, but it seems that some linker files are missing. Also, despite my best efforts, I was unable to compile with IPX network support.

One library called Sound Operating System Version 4.0 by Human Machine (which can be used in over 150 games) is not included in the code. At first I thought that she had disappeared from the Internet altogether, but in the end I found her in the sources of the canceled sequel game Corridor 7 .

I won’t list all the steps I had to take to build, but I created a patch that does everything it needs to compile (and nothing else). After applying it, all you have to do is copy the SOS library to the root folder, then run wmake /f makefile.wat in imlib and abuse . You can find a patch on my gist.

Please note that there is multiple versions of the game. Source code for version 2.00. It also works with fRaBs (Free Abuse) data.

Links

Also worthy of mention

Some classic open source DOS games didn’t make the list. For example, Tyrian and Tyrian 2000 by Jason Emery. These awesome vertical shooters were originally open source, but with nuances. The author only entrusted the Pascal/ASM source code to a small group of developers who ported it to C and SDL before releasing it as a source port of OpenTyrian. However, the original sources are not publicly available.

A similar fate befell another hugely popular game, Liero. In this case, the Pascal source code was lost due to a hard disk failure. In the meantime, the open source community developed a remake called OpenLiero, and later received a blessing from the author to use the original name, dropping Open from the name.

Scavenger is another game that I really liked, but the source code of which became open source only after being converted to SDL.

Links

That’s all. I was very surprised how smoothly everything went, given how difficult it is sometimes to work with code that was written only a couple of years ago.


What else is interesting in the Cloud4Y blog

→ The Michelangelo Virus is 30 years old

→ Make Linux look like Windows 95

→ How not to let technical debt get the better of you

→ WD-40: a tool that can do almost everything

→ Top 30 Python projects on GitHub for early 2022

Subscribe to our Telegram-channel, so as not to miss the next article. We only write about business.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *