Forum

Compiling DOS Quake?

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Compiling DOS Quake?

Postby Baker » Tue Sep 16, 2014 3:46 am

I found this engine by Maraakate, has some interesting features. Even has protocol 666 support.

http://dk.toastednet.org/QDOS/

Looks like it uses djgpp, I'd like to graft a couple of things into it to see if DOS can handle it or if it blows up.

I have the pre-requisites to compile it, but I'm not sure what exactly to do. Do I need to compile with within DOSBox or what kind of environment is required to run the make file?

Can gcc actually compile DOS Quake?
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3662
Joined: Tue Mar 14, 2006 5:15 am

Re: Compiling DOS Quake?

Postby leileilol » Tue Sep 16, 2014 4:05 am

Q1source.zip is missing the proper makefile, QIP fixes that with a new one (but unfortunately QIP also uses long file names which breaks compiling it on pure dos (non win9x) systems).
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Compiling DOS Quake?

Postby mankrip » Tue Sep 16, 2014 6:00 am

leileilol wrote:long file names [...] breaks compiling it on pure dos (non win9x) systems

DOSLFN to the rescue. And a fork of it (which seems to be included in FreeDOS).
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Re: Compiling DOS Quake?

Postby Baker » Tue Sep 16, 2014 10:07 am

Thanks for the information.

(Explains why Maraakate's files were all uppercase 8.3 file names.)
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3662
Joined: Tue Mar 14, 2006 5:15 am

Re: Compiling DOS Quake?

Postby qbism » Wed Sep 17, 2014 1:15 am

Someone on Vogons has advanced a super8 port that builds cleanly with djgpp running on dosbox. Could use it for guidance if you get stuck.

I wonder if the video acceleration mentioned on QDOS site works in dosbox.
User avatar
qbism
 
Posts: 1235
Joined: Thu Nov 04, 2004 5:51 am

Re: Compiling DOS Quake?

Postby Baker » Wed Sep 17, 2014 1:26 am

qbism wrote:Someone on Vogons has advanced a super8 port that builds cleanly with djgpp running on dosbox. Could use it for guidance if you get stuck.

I wonder if the video acceleration mentioned on QDOS site works in dosbox.
Not sure, but It seems to be a remarkably high quality engine. The readme indicates it has at least one of the pesky typical "modded WinQuake with extras" issues like crashing when going into water.

He seems to have done a pretty thorough job with it, according to the docs tested not only the QWDOS but also the QDOS online.

A couple of years ago, Maraakate took the Undergate single player selector map I made and made a rather sophisticated Quakeworld coop mod that used it (he's very strong in QuakeC, etc.)
qbism wrote:Someone on Vogons has advanced a super8 port
Pretty cool. :D
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3662
Joined: Tue Mar 14, 2006 5:15 am

Re: Compiling DOS Quake?

Postby qbism » Wed Sep 17, 2014 3:11 am

Amazing feature list... FQ protocol, OK no problem, but nehahra!? In related news jsDosBox v3 was released a few days ago.
User avatar
qbism
 
Posts: 1235
Joined: Thu Nov 04, 2004 5:51 am

Re: Compiling DOS Quake?

Postby Baker » Wed Sep 17, 2014 6:54 am

qbism wrote: FQ protocol, OK no problem, but nehahra!?


Image

I dunno, maybe. I did this 2 months ago or so. Loads the skyboxes, sprite32s, etc.

Code: Select all
static   int   sprite_version;
/*
=================
Mod_LoadSpriteFrame
=================
*/
void * Mod_LoadSpriteFrame (void * pin, mspriteframe_t **ppframe, int framenum)
{
   dspriteframe_t      *pinframe;
   mspriteframe_t      *pspriteframe;
   int               width, height, size, origin[2];
   byte* input_source = NULL;
   byte* usage_source = NULL;

   pinframe = (dspriteframe_t *)pin;

   width = LittleLong (pinframe->width);
   height = LittleLong (pinframe->height);

   input_source = (byte *)(pinframe + 1);
   size = width * height;

   if (sprite_version == SPRITE32_VERSION)
   {
      // Baker: Time to perform surgery
      // Convert the pixels to QPAL
      // Then use the alpha channel as a mask
      // If alpha == 0, make the QPAL for the pixel 255
      usage_source = Image_RGBA_To_QPAL_On_Alpha_Alloc (input_source, width, height, 30);
   }
   else usage_source = input_source;

   pspriteframe = (mspriteframe_t *)Hunk_AllocName (sizeof (mspriteframe_t)
      + size
      , loadname);

   // memset (pspriteframe, 0, sizeof (mspriteframe_t) + size);
   // Baker: commented above out since Hunk_Alloc does this for us 
   *ppframe = pspriteframe;

   pspriteframe->width = width;
   pspriteframe->height = height;
   origin[0] = LittleLong (pinframe->origin[0]);
   origin[1] = LittleLong (pinframe->origin[1]);

   pspriteframe->up = origin[1];
   pspriteframe->down = origin[1] - height;
   pspriteframe->left = origin[0];
   pspriteframe->right = width + origin[0];


   memcpy (&pspriteframe->pixels[0], usage_source, size);

   if (sprite_version == SPRITE32_VERSION)
      free (usage_source);

   return (void *)((byte *)pinframe + sizeof (dspriteframe_t) + size);
}
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3662
Joined: Tue Mar 14, 2006 5:15 am

Re: Compiling DOS Quake?

Postby revelator » Mon Oct 13, 2014 5:11 pm

Could probably also use Open Watcom with the super8 port :) it supports dos as well as windows os2 and linux.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2527
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Compiling DOS Quake?

Postby Maraakate » Sat Dec 31, 2016 6:06 pm

Baker wrote:
qbism wrote:Someone on Vogons has advanced a super8 port that builds cleanly with djgpp running on dosbox. Could use it for guidance if you get stuck.

I wonder if the video acceleration mentioned on QDOS site works in dosbox.
Not sure, but It seems to be a remarkably high quality engine. The readme indicates it has at least one of the pesky typical "modded WinQuake with extras" issues like crashing when going into water.

He seems to have done a pretty thorough job with it, according to the docs tested not only the QWDOS but also the QDOS online.

A couple of years ago, Maraakate took the Undergate single player selector map I made and made a rather sophisticated Quakeworld coop mod that used it (he's very strong in QuakeC, etc.)
qbism wrote:Someone on Vogons has advanced a super8 port
Pretty cool. :D


Huge bump, but hey Baker. Thanks for the kind words!

There has been some very thorough testing, especially in online play. I personally play on the QWCOOP server I run with my client and occasionally play on quake.shmack.net. In the early dev period (2012) I was letting it spectate for literally days on multiple machines spectating that huge custom TF coop server. Found a lot of bugs that way. :)

Your posts are from 2014, but in the past two years Sezero and I were able to get 3dfx rendering working with fxMesa, Mesa 5 and Sage drivers with the glide3x project. Luckily, this stuff already had DJGPP build environments from dborcas efforts in the early-2000s. Sezero did port Sage to DJGPP. Stack limit needed to be raised to 1MB to enable the OpenGL rendering.

Another addition was converting the entire engine to use Quake 2's CVAR system. This allows me to use +set ,etc. at startup and reading stuff like that early. Previously, it relied on special parsing code Sezero wrote for HoT to deal with that issue.

The sprite code looks interesting; I'll have to add that and check it out sometime. I haven't done too much testing in Nehahra specifically, and some of that code to enable that was in my earlier efforts from a couple of years ago.

The QWCOOP mod was mostly coded by Freewill, with some additions by me; so I can't take most of the credit for that praise. I now currently maintain the QC code for QWCOOP. But most of the ent file fixes and all the checkpoints were mostly done by me as well. I also modded MVDSV_XE (which we're unfortunately using atm for the mod) to fix some bugs that we came across using that mod as well as adding QuakeForge HTTP DL support (also is there any other QW engines that support HTTP DL? Q2 has a very easy to implement HTTP DL solution for clients and servers).

If you think all of that stuff was cool, I'm particularly proud of Q2DOS. Even compiled for Windows it's a very viable client. It uses the Yamagi Q2 game code and I've been working close with Caedes and Yamagi when new bugs are found in their game code. And it also has the HTTP downloading, a server browser, and other cool stuff. Currently it is even running as a dedicated server (in Windows!) to host a coop server that supports Vanilla and the other mission packs in one self-contained game DLL. :)
Maraakate
 
Posts: 5
Joined: Sun May 31, 2015 9:37 am

Re: Compiling DOS Quake?

Postby Maraakate » Sat Dec 31, 2016 6:13 pm

Also, if you're interested in still hacking it you can get mingqw under Windows 32-bit (64-bit mingw cross-compilers for DJGPP seem to be generating bad binaries and I haven't investigated that issue); or you can cross-compile very easily in Linux.

I saw a post by you mentioning reasons for not using Linux as a full-time OS and I agree on the same points. With that said, I use Oracle VirtualBox with Debian and with this I can do make -j 8 on my i7 4790K and cross-compile QDOS and Q2DOS ridiculously fast. A lot easier than trying to dual-boot Windows 32-bit as I currently have "finally" upgraded to Windows 7 64-bit.
Maraakate
 
Posts: 5
Joined: Sun May 31, 2015 9:37 am

Re: Compiling DOS Quake?

Postby Baker » Wed Jan 04, 2017 4:35 pm

Maraakate wrote:Also, if you're interested in still hacking it you can get mingqw under Windows 32-bit (64-bit mingw cross-compilers for DJGPP seem to be generating bad binaries and I haven't investigated that issue); or you can cross-compile very easily in Linux.


Hey Maraakate,

Two thoughts ...

a) You might be interested in this thread. http://celephais.net/board/view_thread.php?id=61375 Has a very refined software renderer.

b) Is the source code for your Undergate experiments available? I'm largely interested in any changes or adjustments you needed to make for any of the maps for coop.

But yeah, I thought your work on DOSQuake was cool. Although I must admit, the ways that modern maps require hordes of memory and like to use really long files names has somewhat deterred the thought of me thinking too much about building for DOS.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3662
Joined: Tue Mar 14, 2006 5:15 am

Re: Compiling DOS Quake?

Postby Maraakate » Wed Jan 04, 2017 5:13 pm

Source code for the mod is available at: https://bitbucket.org/maraakate/hci-und ... -maraakate

If you need the source code for MVDSV_XE let me know and I'll make it available to you. Has some server specific code that I added that contains some server-sensitive info and I haven't found time to clean that up yet.

Thanks for the link to the engine. I'm not interested right now in overhauling the software renderer with special effects. But, if they are ASM and run well I may be interested.

I can personally play warpspasm on my P3 800 with 512MB RAM at a decent speed. Can't give you specific ballpark figure, but it's playable. Someone with a modern PC, using doslfn on a flash drive should be able to play the new huge ones just fine. I can play them on that machine, but it's usually like 10-20fps. Bordering on completely unplayable :).
Maraakate
 
Posts: 5
Joined: Sun May 31, 2015 9:37 am

Re: Compiling DOS Quake?

Postby Baker » Thu Jan 05, 2017 4:19 am

Thanks for the refined Undergate modifications link.

Maybe I'll be able to mine some gems out of what live server testing discovered.

I've cooped it plenty of times myself. And on your server a few occasions. But never made any notes about potential coop-killer issues :biggrin:
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3662
Joined: Tue Mar 14, 2006 5:15 am

Re: Compiling DOS Quake?

Postby Maraakate » Sat Jan 07, 2017 7:32 pm

I believe it was you who had the idea of setting players temporarily as SOLID_NOTs during respawn. I added this idea to my Q2 Coop mod as part of the respawn protection. Works very well for maps that have no info_player_coop spawns. Really need to get that into the QW mod at some point.
Maraakate
 
Posts: 5
Joined: Sun May 31, 2015 9:37 am

Next

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests