Any DOS coders around? (compiling Quake 1 source)

Announcements, advice, random banter, unrelated discussion, et cetera.

Any DOS coders around? (compiling Quake 1 source)

Postby leileilol » 2009-9-21 @ 08:52

Can anyone compile standard DOS quake binary right from q1source.zip? What build environment and compiler would I need?

I can compile the Win32 version fine, it's just I want to see if the DOS version is even working. Only two Quake engines I know can compile for DOS:
QIP Engine
Hammer of Thyrion (Hexen II, but still Quake at its heart)

Stupid ideas i want to try:
- EGA mode support (320x200/640x200/640x350)
in theory this could be a table that remaps gfx/palette.lmp to the EGA palette
as well as the colormap, to make color tables picking for lighting even faster
- Low detail mode (half pixels horizontally)
- OPL3 support for music
by the way, DOSBox is not for running Windows 9x
User avatar
leileilol
l33t++
 
Posts: 9826
Joined: 2006-12-16 @ 18:03

Re: Any DOS coders around?

Postby akula65 » 2009-9-21 @ 11:18

Open Watcom is a free C/C++ compiler that can generate 16-bit DOS executables (and binaries for other platforms as well):

http://www.openwatcom.org/

I have used it for quick-and-dirty projects where I wanted to generate binaries for DOS, Win32, and OS/2 platforms from common source code. The only thing I had to do was use the right command line options to generate code for a particular platform.

John Carmack indicates the following in your source code package:

The projects have been tested with visual C++ 6.0, but masm is also required
to build the assembly language files. It is possible to change a #define and
build with only C code, but the software rendering versions lose almost half
its speed. The OpenGL versions will not be effected very much. The
gas2masm tool was created to allow us to use the same source for the dos,
linux, and windows versions, but I don't really recommend anyone mess
with the asm code.

The original dos version of Quake should also be buildable from these
sources, but we didn't bother trying.


The MASM (Microsoft Macro Assembler) is what will likely give you grief. Microsoft used to make a 32-bit version of MASM available for free, but the 16-bit version was something you always had to buy as far as I know. If memory serves, Open Watcom has an assembler, but I don't know if it is MASM compatible. Some assemblers (commercial and otherwise) claim to be MASM-compatible, and that is what you will apparently need if you want to assemble this source.
User avatar
akula65
Oldbie
 
Posts: 543
Joined: 2004-9-28 @ 01:29
Location: North Carolina

Re: Any DOS coders around?

Postby ih8registrations » 2009-9-21 @ 12:17

A quick search says the original DOS version of Quake was compiled with DJGPP.
ih8registrations
Oldbie
 
Posts: 931
Joined: 2003-7-25 @ 17:20

Re: Any DOS coders around?

Postby HunterZ » 2009-9-21 @ 16:41

DJGPP was the first popular 32-bit DOS port of the GNU C++ compiler (gcc I guess). Executables compiled with DJGPP needed a DPMI host for 32-bit protected mode memory management, so you can usually spot games/apps that use DJGPP by checking whether they're bundled with CWSDPMI.EXE.

Also, I don't remember Quake having any music, but rather it would play audio tracks from an inserted CD.
User avatar
HunterZ
l33t++
 
Posts: 6100
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: Any DOS coders around?

Postby Miki Maus » 2009-9-21 @ 19:31

An old version of MASM 6.14 along with a 16 bit linker is available by courtesy of our beloved Microsoft:

ftp://ftp.microsoft.com/Softlib/MSLFILES/ml614.exe
ftp://ftp.microsoft.com/Softlib/MSLFILES/LNK563.EXE
User avatar
Miki Maus
Member
 
Posts: 197
Joined: 2004-10-18 @ 22:19
Location: Cave

Re: Any DOS coders around?

Postby akula65 » 2009-9-21 @ 22:28

Since Quake requires 8 MB of memory in DOS, it must require the 32-bit DOS support mentioned by HunterZ.
User avatar
akula65
Oldbie
 
Posts: 543
Joined: 2004-9-28 @ 01:29
Location: North Carolina

Re: Any DOS coders around?

Postby HunterZ » 2009-9-21 @ 22:36

akula65 wrote:Since Quake requires 8 MB of memory in DOS, it must require the 32-bit DOS support mentioned by HunterZ.

Yes. I think Doom was built with Watcom and used the DOS4GW extender, while Quake was built with DJGPP and used CWSDPMI.

Note that Win9x also provides DPMI to DOS sessions launched from within Win9x, so CWSDPMI is not needed if you run Quake that way. DJGPP binaries have a stub linked in that looks for CWSDPMI in the event that another DPMI host is not already present.
User avatar
HunterZ
l33t++
 
Posts: 6100
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: Any DOS coders around?

Postby leileilol » 2009-9-22 @ 05:01

Ok got my djgpp environment working (in a 98 vm).The huge problem here is the lack of a DOS makefile
by the way, DOSBox is not for running Windows 9x
User avatar
leileilol
l33t++
 
Posts: 9826
Joined: 2006-12-16 @ 18:03

Re: Any DOS coders around? (compiling Quake 1 source)

Postby leileilol » 2009-9-27 @ 14:10

Basing off QIP again instead. If you're curious this is the result so far

http://leileilol.mancubus.net/quakestuff/tn/tn023.zip

For MIDI i might have a great quest into integrating Allegro.
by the way, DOSBox is not for running Windows 9x
User avatar
leileilol
l33t++
 
Posts: 9826
Joined: 2006-12-16 @ 18:03

Re: Any DOS coders around? (compiling Quake 1 source)

Postby leileilol » 2009-10-05 @ 07:03

EGA version so far:
Image
by the way, DOSBox is not for running Windows 9x
User avatar
leileilol
l33t++
 
Posts: 9826
Joined: 2006-12-16 @ 18:03

Re: Any DOS coders around? (compiling Quake 1 source)

Postby Harekiet » 2009-10-05 @ 07:46

EGA cats plz
User avatar
Harekiet
DOSBox Author
 
Posts: 1050
Joined: 2002-7-01 @ 07:14
Location: Fryslan

Re: Any DOS coders around? (compiling Quake 1 source)

Postby HunterZ » 2009-10-05 @ 16:59

lol well I guess that's something. Highly interested to see if you can get it working. I've seen EGA versions of Wolf3D-style rendering, but Quake is true texture mapped full polygon 3D.
You're perfect, yes it's true...but without me, you're only you.
User avatar
HunterZ
l33t++
 
Posts: 6100
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: Any DOS coders around? (compiling Quake 1 source)

Postby gerwin » 2009-10-05 @ 17:14

There is also a Text Mode Quake so EGA should also be doable. (The style of that web page is very amusing :lol: )
I am looking forward to try the EGA version when its done!
User avatar
gerwin
l33t
 
Posts: 2720
Joined: 2004-5-07 @ 19:21
Location: NL

Re: Any DOS coders around? (compiling Quake 1 source)

Postby leileilol » 2009-10-06 @ 09:29

Text mode Quake isn't a quake engine, it only blitters to aalib output on linux. Not the same thing.

More progress, I need to learn how to bring the bpp down and translate to a 256x4 egamap.lmp :(
Image

The source for it so far is here
by the way, DOSBox is not for running Windows 9x
User avatar
leileilol
l33t++
 
Posts: 9826
Joined: 2006-12-16 @ 18:03

Re: Any DOS coders around? (compiling Quake 1 source)

Postby HunterZ » 2009-10-06 @ 14:48

At least there's something recognizable on the screen now.
You're perfect, yes it's true...but without me, you're only you.
User avatar
HunterZ
l33t++
 
Posts: 6100
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: Any DOS coders around? (compiling Quake 1 source)

Postby butterfly » 2009-10-07 @ 05:49

Uhm. Doesn't a DOS version exist already?
User avatar
butterfly
Member
 
Posts: 388
Joined: 2004-2-13 @ 10:36
Location: Italy

Re: Any DOS coders around? (compiling Quake 1 source)

Postby DosFreak » 2009-10-07 @ 10:37

Yes but according to Carmack above they didn't try to compile a DOS ver using the source code they released.
User avatar
DosFreak
l33t++
 
Posts: 10491
Joined: 2002-6-30 @ 16:35
Location: Your Head

Re: Any DOS coders around? (compiling Quake 1 source)

Postby HunterZ » 2009-10-07 @ 15:46

And there's never been an EGA version in any case :P
You're perfect, yes it's true...but without me, you're only you.
User avatar
HunterZ
l33t++
 
Posts: 6100
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: Any DOS coders around? (compiling Quake 1 source)

Postby Rugxulo » 2009-11-03 @ 21:17

I know I'm a bit late to this topic (not sure how I even found it, not a frequent reader of these forums), but ...

http://rugxulo.googlepages.com/quakemak.txt

That's from my weak attempt about a year or two or three ago at compiling it. It seemed to work for me in DOSBox at the time (but I'm not a huge Quake fan, so I don't have it currently installed, honestly). A quick relook shows -O9 (eh? PGCC??) and optional -gstabs (GCC 2.8.1+). Actually, -march=pentium is probably not ideal either (although neither is the still-default -mtune=pentium, meh). Not to plug my own weird hacks too much, but a very small package of DJGPP is my own mess called djgpp203.7z (GCC 2.95.3, BinUtils 2.16.1, DJDEV 2.03p2, Gmake 3.79.1). If you don't have 7-zip, get 7zdec.zip too.

Anyways, long story short, yes it used DJGPP as they reluctantly wanted to target the DOS/Win95 market at the time (1996). They also cross-compiled it (GCC 2.7.2) from some weird platform (Alpha?). In fact, they initially wanted to use GCC as a compiler for mods / add-ons but eventually wrote their own wimpy compiler.

Quake 1 was released in 1996, developed for over a year by several people including Michael Abrash (heavy FPU optimizations biased towards Intel Pentium making Cyrix 6x86 users unhappy). It used DJGPP 2.00 beta 3 (I think) and CWSDPMI r1. Any more specific info will probably have to come from CWS himself. IIRC, he said he helped port it to work in (buggy) Win95 w/ only 16 MB RAM but NT would've needed another month (bugs that were never fixed, no support for nearptrs) so that's why it doesn't run natively in XP etc. (Same for DOS Doom re-ports, almost all of which are also dead, and only CDoom runs in WinXP for me ... and without sound). Hardware acceleration was the main killjoy for DOS games, I think (or so people claimed). Oh well.
Rugxulo
Newbie
 
Posts: 5
Joined: 2009-11-03 @ 21:06
Location: USA

Re: Any DOS coders around? (compiling Quake 1 source)

Postby Rugxulo » 2009-11-03 @ 21:20

a very small package of DJGPP is my own mess called djgpp203.7z (GCC 2.95.3, BinUtils 2.16.1, DJDEV 2.03p2, Gmake 3.79.1). If you don't have 7-zip, get 7zdec.zip too.


Bah, of course no edit. Oh well. Anyways, hope this helps somehow.
Rugxulo
Newbie
 
Posts: 5
Joined: 2009-11-03 @ 21:06
Location: USA

Next

Return to Milliways

Who is online

Users browsing this forum: No registered users and 2 guests