VOGONS

Common searches


First post, by leileilol

User metadata
Rank l33t++
Rank
l33t++

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

apsosig.png
long live PCem

Reply 1 of 24, by akula65

User metadata
Rank Oldbie
Rank
Oldbie

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 possi […]
Show full quote

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.

Reply 3 of 24, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

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.

Reply 4 of 24, by Miki Maus

User metadata
Rank Member
Rank
Member

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

Reply 6 of 24, by HunterZ

User metadata
Rank l33t++
Rank
l33t++
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.

Reply 8 of 24, by leileilol

User metadata
Rank l33t++
Rank
l33t++

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.

apsosig.png
long live PCem

Reply 11 of 24, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

🤣 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.

Reply 12 of 24, by gerwin

User metadata
Rank l33t
Rank
l33t

There is also a Text Mode Quake so EGA should also be doable. (The style of that web page is very amusing 🤣 )
I am looking forward to try the EGA version when its done!

Reply 13 of 24, by leileilol

User metadata
Rank l33t++
Rank
l33t++

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 🙁
egake2.png

The source for it so far is here

apsosig.png
long live PCem

Reply 16 of 24, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Yes but according to Carmack above they didn't try to compile a DOS ver using the source code they released.

How To Ask Questions The Smart Way
Make your games work offline

Reply 18 of 24, by Rugxulo

User metadata
Rank Newbie
Rank
Newbie

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.

Reply 19 of 24, by Rugxulo

User metadata
Rank Newbie
Rank
Newbie

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.