November 17, 2025
How quake.exe got its TCP/IP stack
Released in June 1996, Earthquake It faced three technological shock-waves during its lifetime. In addition to the emergence of 3D hardware accelerator cards and the development of the Internet, changes in operating systems put game developers in a difficult position.
Microsoft was replacing its older PC operating system, MS-DOS, with an emphasis on Windows 95 and Windows NT. From 1996 to 1997, DOS’s market share declined by 50%. Some developers like Blizzard North took a leap of faith and wrote exclusive titles like Windows 95-Diablo. ID Software, on the other hand, went through the effort of creating a single binary, quake.exeCapable of running on both DOS and Windows.
What’s even more impressive is that she managed to create an ID Earthquake Better when the Windows 95 TCP/IP stack was available. Here’s how they did it.
quake.exe 101
quake.exe Is a DOS executable. id software was used Watcom Compiler for DOOM but they switched to named GCC port djgpp[1] cross-compile Earthquake On alpha server.
$ file quake.exe quake.exe: MS-DOS executable, COFF for MS-DOS, DJGPP go32 DOS extender
alike watcom‘S DOS/4GW, djgpp Developers were offered an extender that allowed programs to be written with flat 32-bit addressing instead of the hellish 16-bit near/far real-mode mandated by DOS. An extender works with a client and a server. in the matter of Earthquake Extender client built-in quake.exe while the server is running cwsdpmi.exe,
From the very beginning of development, id requested djgpp engineers that their DPMI clients will be able to run djgppDPMI Server of but also Windows 95 DPMI Server.
|
|
|
It may not be clear how much of a tour-de-force this was. djgpp To get your DPMI client to work with another DPMI server, but knowing a little about how it works, it surprises me. Raymond Chen, a Microsoft kernel engineer at the time, had the best understanding of this situation.
The client application was written with the assumption that it was using the MS-DOS extender included with the application, but in reality it is talking to the DPMI host that comes with Windows.
The fact that programs mostly run fine despite running under foreign extenders is either completely surprising or completely obvious, depending on your point of view.
This is completely surprising because, well, you’re writing a program to run in one environment, and running it in a different environment. Or it’s completely obvious because they are using the same DPMI interface, and as long as the behavior of the interface is the same, naturally the program will continue to work, because that’s why we have interfaces!
What was it like to be able to run with Windows 95 DPMI Server quake.exe The ability to run under both DOS and Windows 95 was removed.
quake.exe under DOS
DOOM only requires two files to run, doom.exe And doom.wad But there are several files that came with Quake.
$ find quake ./mgenvxd.vxd ./genvxd.dll ./qlaunch.exe ./id1/pak0.pak ./pdipx.com ./cwsdpmi.exe ./q95.bat ./id1/config.cfg ./quake.exe ./quakeudp.dll
At first glance it seems like a mess but only four files are required to run Quake under DOS. Namely, the game engine quake.execonfiguration file config.cfgproperty file pak0.pakand DOS Extender Server cwsdpmi.exe,
./mgenvxd.vxd ./genvxd.dll ./qlaunch.exe ./id1/pak0.pak ./pdipx.com ./cwsdpmi.exe ./q95.bat ./id1/config.cfg ./quake.exe ./quakeudp.dll
quake.exe under DOS: multiplayer

Quake supported four types of multiplayer protocols.
Two modes allowed gamers to enter into duels (1v1). Both modes expected a device to be plugged into a PC’s COM port. A modem allows calls to an opponent’s phone number (hello $$$), while a nullmodem cable (called a “direct connect” here) requires both computers to be a few feet apart.
Both IPX and TCP/IP allowed for more interesting deathmatches of up to 16 players. IPX technology was intended for LANs where all machines were a few feet apart, while TCP/IP allowed access to anyone around the world.
Note how, under DOS, by default, both IPX and TCP modes were disabled (grayed out).
quake.exe under DOS: multiplayer mode grayed out

Quake came along PDIPX.EXE Which loaded the IPX DOS TSR. That TSR communicated with a packet driver which in turn hit the network card. Quake was able to detect that DOS TSR and allowed players to select IPX when detected.
It was almost impossible to use TCP/IP. DOS did not come with a TCP/IP stack and it was so complex that only one vendor provided a TSR for it on DOS.
The name of TSR was BWNFS. created by beam and whitesideIt cost $395 in 1996 ($830 in 2025!)[3]It is logical to say that some gamers have used TCP/IP on DOS to play QUAKE,
quake.exe under Windows 95
start quake.exe Windows 95 works like a charm. The executable is loaded into a Windows 95 “DOS-box”[4] which virtualizes memory, interrupts and signals[5]The game played exactly like DOS, with the same multiplayer options available, This was convenient because users did not need to load or set up any mouse drivers, BLASTER Environment variables to make the sound card functional.
However, this is much less convenient, as Quake requires 16 MiB of RAM to run in this manner. Quake only requires 8 MIB but adds quite a bit of overhead to Windows 95! The same files used when running from DOS are used here as well, except cwsdpmi.exeBecause the DJGPP client detects and uses Windows’ built-in DPMI server.
./mgenvxd.vxd ./genvxd.dll ./qlaunch.exe ./id1/pak0.pak ./pdipx.com ./cwsdpmi.exe ./q95.bat ./id1/config.cfg ./quake.exe ./quakeudp.dll
it’s impressive to see Earthquake Run at full speed, knowing that Windows 95 runs DOS executables in a virtual machine. My guess is that, in full screen, VGA is given direct access to the hardware to preserve memory write and read performance.
magical q95.bat script

start quake.exe There are not only two options to run DOS or Windows EarthquakeThere is also a third one to be launched q95.bat,
In this case, a window “Launching Quake” briefly pops up on the Windows 95 desktop.
The text gives hints as to what is happening. Quake is loaded with Winsock, a tunnel for Microsoft’s TCP/IP stack. There are other signs too What He is, “Powered by mPath”. But there’s nothing more to explain How It all works.
mpath
MPath Interactive was a company dedicated to online gaming. They provided subscription services to help gamers find each other, but also acted as an ISP reseller.[6]Larry Hastings, an employee of mPath at the time, recalls that it was in his interest to help gaming companies release titles that allowed play over the Internet,
At that time, in the primitive age of the Internet, which was the mid-90s, online multiplayer was still in its infancy. If you want to play multiplayer games over the Internet, you either need to have clear host and port information, or you need to use an online multiplayer gaming service. And in 1995 there were only two: us, and Total Entertainment Network. You might think that game creators would come to us and say “Please put my game on your service!”, but… no! Not only did we have a licensing team that went out and got contracts to license games for our service, but we also had to pay the vendor for the right to license their game, which was often an exclusive. So, we had Quake and Unreal; TEN got Duke Nukem 3D and NASCAR.
The user experience of MPlayer was as follows. First, you would run “Gizmo”, which was a Windows program that acted as a type of game browser. It knew which compatible games you had installed, and it would let you browse the multiplayer games offered for each game; The metaphor we used for this was a “room”. Quake had drop-in, so you could easily find a running game and jump into it right away – not many games had this feature at the time. Alternatively, you can find a “room” where someone is proposing to launch a game soon. Or you can create your own. You set the room name, and the MPlayer gizmo has some per-game UI that lets you set settings for the game (which map, which features, etc.). The rooms included text and audio chat and even a shared “whiteboard”, a simple paint program. Once the owner of the “room” “launches” the game, everyone’s Gizmos will automatically start the game for them, and the game will automatically join that online game and begin playing.
In order for a game to run on mPlayer, it must be integrated with the mPlayer software stack. Much of this integration work was done by MPath engineers; We will get the source code from the game developer and “porting engineers” will run it on MPlayer. This often involves modifying both the client and the server, so that both can talk through Mplayer’s servers.
The initial version of Quake was DOS only, and used channels to talk to the Windows 95 TCP/IP stack. (Which, in retrospect, makes “Channel” a kind of “thunk” like Microsoft’s “Win32s”.) I think the deal was that we licensed Channel to id, and in return we got Quake on MPlayer. Therefore, DOS Quake supported running on mPlayer through channels, in addition to connecting to open game servers on the Internet through hosts and ports.
– Larry Hastings (email conversation)
Larry was kind enough to share some Quake anecdotes.
One afternoon shortly after receiving the first build of the game, we played a round of deathmatch with the id team on the Internet. We were in a building on Bandelli Drive (now a “fitness center” for Apple employees) in Cupertino, CA. They were definitely in Mesquite TX. Yes, it was a match to the death on the Internet–very exciting!
The only ID employee I remember in the game was Tim Willits. He owned us, not only because he was so addicted to Quake, but also because he knew where all the secrets were. At one point I saw him come out of a secret door with a rocket launcher. And either he did not see me, or I died soon after.
– Larry Hastings (email conversation)
As far as explaining how the channel works, I was out of luck.
I did not work on the channel. He was mainly a British guy named Henry but I don’t remember his last name, it was thirty years ago. All I remember about him was how he looked, and the fact that he drove a great car, a white Merkur XR4Ti.
– Larry Hastings (email conversation)
Ghidra
When all else fails, we still have the amazing community of Ghidra and Doomworld (thanks xttl[7]After much decompiling and negotiation, it was discovered that all the previously ignored files were part of mPath’s “channels”.
./mgenvxd.vxd ./genvxd.dll ./qlaunch.exe ./id1/pak0.pak ./pdipx.com ./cwsdpmi.exe ./q95.bat ./id1/config.cfg ./quake.exe ./quakeudp.dll
q95.bat Just a small script to launch mpath’s main program. qlauncher.exe It includes all MPlayer functions. However the role of this executable is limited.
it only loads quakeudp.dllDespite its confusing name, this DLL is the heart of the Quake Channel, It is a bridge to the Microsoft TCP/UDP/IP stack (wsock32.dllIt also starts with Quake -path Parameters to make it load the BSD Network Socket API sys/socket.hFinally, it also loads the Virtual Device Driver Manager genvxd.dll,
Virtual devices are the trick that allows a DOS executable running inside a Windows 95 DOS box to communicate with Win32. genvxd.dll Dynamic library loads a virtual device driver[8] Name GENVXD.VXD that sets itself up to respond to disruption 0x48,
The final piece of the puzzle is on the Quake side. BSD implementation sys/socket.h, mpplc.cHere is the code provided by mPath. This takes care of marshalling each BSD socket function call, then uses the DPMI client to trigger software interrupts that are received in Win32 land. The data is passed to the pipeline we described earlier until it is unmarshaled. genvxd.dll and headed towards wsock32.dllNote the symmetry of the functions found in mplib.c Marshalling and the symbols found in it genvxd.dll Unmarshaling.

It seems that John Cash was involved in compiling the content of mPath. We can find his name in the symbols of mgenvxd.vxd,
F:\cashcode\GENVXD\bin\Mgenvxd.pdb
The source code of mgenvxd.vxd, genvxd.dll, qlaunch.exe and quakeudp.dll was never released. This was MPath’s proprietary, patented technology. It’s possible that the ID is only allowed to be issued client side.
As far as I understand it, this is how Quake was able to send TCP and UDP packets over IP. This complex construct became obsolete when id stopped shipping DOS executables (the last one) vquake.exeAfter December 1996, winquake.exe, glquake.exeAnd all Quakeworld binaries were win32 exclusive with direct access wsock32.dll,
Reference