Quake 1.01 / Shareware

Quake Shareware CD

I saw this pop up while cruising archive.org, and I thought it’d be fun to play with.  The shareware version of Quake on this CD image is version 1.01, which corresponds with the crack dot com leak of the Quake source code.  Searching around revels that the leak was aptly named “Quake101leakedsource.zip”, which wasn’t so hard to track down.

The source code is, naturally, in the process of being ported to Linux, and the makefiles reflect this.  I used my MinGW to DJGPP cross compiler toolchain that is close to era specific.

I had a single issue with the code, d_copy.s the following line was giving me trouble:

movl	$2,%al

changing it to the following however, let my version of GAS happily assemble it.

movb $2,%al

After a while of messing with the Makefile, and adding in the DOS components, it was easy enough to get an executable.  And even better it’ll run with the data/music from the demo disc!

I used Daemon tools to mount the MDS/MDF image, and just pointed DOSBox to the CD drive letter with a simple:

mount d: f:\ -t cdrom

And now when I fired up Quake, it’ll play the music tracks from the CD.

Quake 101 on DOSBox

One thing that caught my interest was that when you exit the game, I get the “couldn’t load endscreen.” message.

Well it turns out that someone was naughty and had modified common.c on January 20th 1997,  and made the following addition:

if (h == -1)
{
Con_Printf ("Playing shareware version.\n");
// if (com_modified)
// Sys_Error ("You must have the registered version to use modified games");
// /*return;*/
}

So yeah, since they had double commented out that return statement, it’ll fall out the logic, and set the game to registered, which is why the endscreen message is missing.  Uncommenting them all will restore the default execution behavior.  Speaking of registered, on the CD there is a file QUAKE.MJ3, which is 25MB, which looks like an encrypted version of the registered game.  I guess it’d be ‘neat’ to have version 1.01, although the Steam version I have is 1.06 and I don’t know how much difference it’d really make.   Although I guess 22 years later it doesn’t matter much.

On the one hand I’m really impressed that it works.  For anyone who is slightly interested I guess, you can find my re-build of the source here:

Quake101-djgpp2.zip

Building MAME 0.1 for MS-DOS / DJGPP

So as promised, a while back I had built a GCC 2.7.2.3 / Binutils 2.8.1 cross compiler toolchain suitable for building old Allegro based programs, such as MAME.  Of course the #1 reason why I’d want such a thing is that being able to do native builds on modern machines means that things compile in seconds, rather than an hour + compiling inside of DOSBox.

Why not use a more up to date version of both GCC/Binutils?  Well the problem is that the pre EGCS tools ended up with macro and inline assembly directives that were dumped along the way so that later versions simply will not assemble any of the later video code in Allegro, and a lot of the C needs updating too.  And it was easier to just get the older tool chain working.

It took a bit of messing around building certain portions inside of each step of the tools, but after a while I had a satisfactory chain capable of building what I had needed.

So for our fun, we will need my cross DJGPP v2 tool chain for win32, MAME 0.1, Allegro 3.12 and Synthetic Audio Library (SEAL) Development Kit 1.0.7 .

Lib Allegro is already pre-built in my cross compiler tool chain, all that I needed to add was SEAL, with only one change, 1.0.7 is expecting an EGCS compiler, which this is not, so the -mpentium flag won’t work, however -m486 will work fine.

Otherwise, in MAME all I did was alter some include paths to pickup both Allegro and SEAL, and in no time I had an executable.  And the best part is checking via DOSBox, it runs, with sound!

MAME 0.1 on DOSBox PACMAN hiding

Thankfully MAME has been really good about preserving prior releases, along with their source tree, and it’s pretty cool to be able to rebuild this using the era correct vintage tools, and I can’t stress how much more tolerable it is to build on faster equipment.

dosdoom 0.2 recovered

While cruising around at doomworld.com looking for something else, I saw this thread: ‘Recovered’ DOSDoom 0.2.

So I quickly built it with my MinGW32-DJGPP using GCC 3.4.5.  And this version needs the Allegro library as it has sound effects audio!  Although building Allegro needed GCC 2.7.2.1 and Binutils 2.8.1.  Using other versions just led to nothing but trouble.  I ended up just installing DJGPP on DOSBox to build Allegro which took … a whlie to build.  Although being able to cross compile dosdoom from Windows was far far far quicker.

So yeah, it runs.  With sound.  It’s great.  Allegro integration isn’t anywhere as near complete at this point it’s just the sound files.  I took a much later version of dosdoom’s MIDI code, which required the Allegro timer, which interfered with my older timer IRQ hook.  Converting the whole thing to use the Allegro timer, and keyboard wasn’t too difficult, and that gives my DooM source fork a really full feeling when using DJGPP v2.

Although I’m having issues uploading from China at the moment.

Links 386 Pro

Out on the course

Links 386 is one of those programs that is very easy to love to hate.  It was 1992, and PC’s were mostly being used for business, and high powered 32-bit machines were still insanely expensive.  And then Links 386 happened.  Before there was DooM, Links 386 was the ‘must have’ executive ball clacking device.  And the specs that you needed to run this game were really over the top.  At it’s heart was the Phar Lap 386 Dos extender, along with the virtual memory module.. Which most people would have to rely on.  Links 386 really needs over 8MB of RAM to run.  Yes, that is correct, in 1992 you were recommended to get 8MB (which should have been about $400-800 USD) So you can golf at your desk.  But as the name implies you also needed a 386 classed computer, although ideally you would have one of those new 486’s!  Links 386 also pushed the edge by wanting a VESA capable SVGA card that could use mode 101, 103, or 105.  Although the higher resolutions modes just ended up with logos everywhere, it really didn’t take enough advantage of the higher resolution modes.

Another interesting thing is not only does Links 386 have sound drivers (which means you need a sound card!) but it’ll do voice through the AdLib card.  Also it has a driver model, the WLZ, which I don’t know if they ever published or if people wrote additional sound drivers.

Links 386 installer

The installer is kind of cute, in that it’s flat shading is so old it’s now modern.  How’s that for crazy?

Installation is a snap, at only four diskettes.  They sold additional courses, and I only have one additional course, although oddly enough finding others online is pretty trivial.  However I had far less luck finding the program.  One nice tip to Infocom is that the courses include a score card, like the ones you would get on actual courses.  It really tied the package together.

Don’t copy that floppy!

Although for me, I really bought it for the manual.

Pebble Beach

And I have to admit it, Access Software did a great job.  Even all these years later, it looks great.  But no doubt scaling and placing all the textures is SLOW.  Incredibly slow.

Back in the 90’s I had a lowly support job, and I’d get flown all over the country to help out with issues, and it’d never fail that the regional director would have ‘issues at home’ and amazingly they’d always ask about running Links 386 Pro.  No doubt a lot of people upgraded machines, and got to brag to their buddies on how fast Links would now load.  Running at actual 386 speeds will take nearly a minute to render the screen between shots.

The DOS Extender was forever very touchy.  It took a bit of work to get around it’s issues, with the continuous conflicts with TSR’s, drivers, sound cards, video cards.. It was a nightmare of compatibility issues.  Not to mention that although Phar Lap 4.1 was DPMI compatible, it really didn’t play that nice with OS/2 or Windows.  Microsoft would later come to the rescue for this costed gamer market in the form of buying Links away from Access software, and putting out Microsoft Golf.  And much like SimCity, being able to run this under Windows make it immensely popular in the workplace, as all you needed to find were Windows drivers for your hardware, which vendors did actually support, unlike games.

It’s amazing how companies like Phar Lap, or Rational never did try to make an actual gaming platform for their extenders, leaving it all up to individuals.  My older self says that Microsoft’s rise to prominence in the 90’s was mostly due to their competitors incompetence, rather than their brilliance.

Although DOS Extenders like Phar Lap have been around since the introduction of the 80386, Links 386 Pro is the oldest one I know of.  If you like programs that try their best to bend the limits of what you can or should do, certainly check out Links 386 Pro!

EtherDFS

I saw this the other day, although haven’t had a chance to write about it.

EtherDFS just needs a packet driver on MS-DOS, and it implements it’s own re-director to communicate with a Linux file-server, using it’s own raw protocol.

It certainly looks cool, and looking at how it works, it should be possible to write other drivers to read/write other filesystems for MS-DOS.  It’d be more interesting (to me anyways) if you can write an INT 14 re-director using a 32bit DOS extender to make things easier regarding filesystem ports.

When I get back home, I’ll have to test this on my retro machine, as the idea of just needing a packet driver + TSR sure sounds like a LOT less memory than the Microsoft re-director.

Porting Catacomb3D to MS-DOS (DJGPP v1/GO32).

Catacomb 3-D for GO32

No really, it’s Catacomb 3-D: The Descent.  First ported to 32-bit SDL by NotStiller.  Me being the person I am, I fixed a slight bug regarding binary files on Windows, and MS-DOS, then cleaned up some of the C++ syntax (yuck!) making it far more C89 friendly.  And of course, hot off the heels of DooM for GO32 DPMI, I was able to get it to build and run using GCC 1.39 and GO32.

I know most people really won’t care, but I found it kind of interesting.  I should try to see if it’ll run on actual hardware, just as a comparison of tightly optimized Borland C++ / Assembly vs 100% pure C on DJGPP.  The best tech of 1991 for sure!

At current I just put the source up, you can git it here.

Uploaded my cross DJGPP v1 environment to sourceforge

project is here.

I also put up the source for my ‘null doom‘, for anyone who ever needs some massaged source to DooM that will compile with a C compiler, instead of needing something that can understand C++ style comments, although I know in cccp.c there is the ability to turn on cplusplus style processing.  However since I did want something that would compile without altering the compiler (too much) I thought it was best to just change all the comments.

And a quick download link to the zip file with the source & binaries.
Download crossdjgppv1
Download crossdjgppv1

Epyx Rogue 1.48

Rouge 1.48 title screen

Rouge 1.48 title screen

A while back while looking for old Rogue source, and resources I came across this page, which includes a lot of old versions, and source code, and the file rog11src.zip. But looking at the source in this directory the file rogue.h reveals that it is actually 1.48!

#define REV 1
#define VER 48

And the source is all timestamped from late 1984, and throughout 1985.  Well isn’t that exciting!  Also on the same site is rogue-1.48.zip, a binary distribution of Rogue 1.48.  So I thought I’d give it a shot to build it.  The source mentions needing the MANX C compiler, which of course a quick google search yields an ad:

Manx Aztec C86

Manx Aztec C86

Which has all kinds of fascinating information, such as the ability to cross compile from VAX BSD, or PDP-11 BSD, the Amiga, CP/M etc but they don’t actually give any information about versions.

There is, however an Aztec C museum, that hosts several versions.   And they do have the versions, along with the years to show that the C86 compiler that they had for 1985 would be 3.4b

Version 3.4b
Compiler Aztec C 8086 3.40a 7-3-86
(C) 1982,83,84,85 by Manx Software Systems, Inc.

And conveniently, they do have a download link for the comiler here: az8634b.zip

Now, since I’m on Windows 10 x64 I can’t easily run MS-DOS based compilers from 1985 at my native CLI, without a tool, and I chose Takeda Toshiya’s MSDOS.  I was able to ‘bind’ the azmake utility which then could call the needed compiler, assembler, and linker to build an executable without too much work.  I just created a command file, ‘build.cmd’ in the src directory, to setup the paths and needed variables to quickly compile Rogue from the command line.  And a quick attempt at playing it showed that although it does compile, it is unplayable!

Killed

Killed by the Copy Protection Mafia

Well isn’t that great.  There is a copy protection scheme.  But wait, we have source so can’t we just by pass it?  Yes we can!  In the file dos.asm there is some checks for the variables hit_mul & goodchk.  So I did the logical thing, which is before it checks them I just set them to good values.

; fake copy protection
mov hit_mul_, 1
mov goodchk_, 0D0DH

And the good news is that I would no longer get killed by the Mafia, but I couldn’t progress down any levels.  So in the file oprotec.asm, I saw there is some disk check routine called protect, that I went ahead and bypassed by having it immediately jump down to the ‘good’ label. Everything compiles but it still locks up going down a level.  So finally I check rogue.h and commend the #define PROTECT statement, and now it’ll run!

I don’t know if anyone would even care, but I added the PDF manual and all the zip files that I used to source this version.  You can download it here:

rogue-148_binary+source.7z

If you don’t want to run it under MS-DOS, or something like DOSBox, you can use msdos to run it.  The title screen is garbled as it doesn’t emulate CGA, but as the rest is just text mode, it’ll run just fine.

EMX GCC 2.5.8 for Windows

Continuing in my quest of useless stuff, here is GCC 2.5.8 for EMX as a native Win32 executable set.

With some weirdness of inline not being recognized, I just commented that out.  The GCC driver program does have some issues though, and Im just not in the mood to fully figure out why either the EMX or MS-DOS versions can’t correctly  capture return codes, or if it was better to just use -pipe and _pipe with _O_TEXT mode set, but again how to figure out if the pipe closed cleanly or with errors?  So for now it’ll always assume everything worked, but it will still print errors.  Sigh.

With that said, the CC1, CC1OBJ, CC1PLUS drivers all built, so you can use C, ObjectiveC, and C++. yay.

The functional version of this is EMX 0.8H, with the gcc 2.5.8 update.  Maybe I’ll put this all on sourceforge so people don’t have to deal with my crappy download system, but for now it’s on my site.

Here is my build, along with binaries:

emx_gcc_258_phase1_xgcc_cccp_cc1_cc1obj_cc1plus.7z

And the un touched source code, as provided in the 0.8H update

emx_gcc_258_virgin.7z

I’ve only tested it with MS-DOS, and PDOS.  I’m also using the ancient binutils from my GCC 1.40 on Windows experiment.