Quake was the only game to support DOS and Win95 with TCP/IP multiplayer in one executable—deep dive explains how id Software did it
3 hours ago
5
(Image credit: id Software)
The mid-90s was arguably the period in PC history with the most whiplash-inducing changes. The arrival of 3D acceleration cards, the transition from plain-textbox DOS to fancy Windows 95, and the advent of the Internet all . This rapidly shifting landscape posed quite the challenge for game developers, as they had to consider writing their games for DOS, Windows 95, or both.
In an exceedingly detailed writeup, Fabien Sanglard explains how the OG Quake got its support for TCP/IP and was arguably the only game that used the same executable with native support for both operating systems.
Many games of the era, like Fallout, Grand Theft Auto, and Mortal Kombat 3, would ship separate executables for DOS and Windows 95. However, id Software wanted Quake to use nearly the same executable (and codebase), and it wanted the game to have support for TCP/IP, the Internet communications protocol. Playing remotely with more than one person was the fresh new thing back then; true multiplayer was often limited to home or office networks.
Fulfilling both requirements at once was no easy feat for Quake. DOS was long in the tooth by the time of the game's development and needed a ton of hacks to use all of the hardware capabilities of the time, namely but not only more than 640 KB of memory.
To get around DOS' limitations, games started including DPMI (DOS Protected Mode Interface) extenders like Watcom's DOS/4GW or CWSDPMI. These extenders offered a standardized memory interface, multitasking, and other capabilities. The extender technically served as a micro-kernel, so think of it as a DOS replacement. Typically, games would ship with a target DPMI server and be their single client.
During Quake's development, id wanted to shift from the (at-the-time) proprietary Watcom compiler used in Doom to the open-source djgpp toolkit in a bid to make cross-platform development far easier. Heck, Quake even had a DEC Alpha port, if anyone remembers those. In a shift from the usual arrangement, id asked djgpp's engineers to ensure that its DPMI client supported Windows 95's included DPMI server in addition to CWSDPMI.
The problem was that although DPMI was a standard, its specification was not finalized until the late 90s. That meant that in practice, client software was normally beholden to one specific server. But the djgpp team delivered, and senior Microsoft kernel engineer Raymond Chen put it plainly:
Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.
"The fact that programs seem to run mostly okay in spite of running under a foreign extender is either completely astonishing or totally obvious, depending on your point of view."
Quake had native TCP/IP support coded in, yes, but since it was cross-platform, it needed a way to interact with Windows 95's Winsock TCP/IP layer. Additionally, in-game match/server browsers were a new concept at the time, so id killed two grunts with one rocket by enlisting the help of Mpath Interactive and integrating its Mplayer match-making software into Quake.
Mplayer's software comprised two pieces: a "Gizmo" game browser that would autodetect any Mplayer-compatible games you had installed and list game rooms for them, and a solution called the "Chunnel", the component that would actually talk to Windows' TCP/IP stack.
To round out cross-compatibility, Quake also shipped with Mpath's genvxd.dll. This is a virtual device driver that translated DOS networking functionality (that itself uses the now-standard BSD socket function calls) to Windows 95's Winsock. Once that was fitted in, the journey was finally complete, and Quake would run seamlessly in both DOS or Windows, without needing separate installers or executables.
Bruno Ferreira is a contributing writer for Tom's Hardware. He has decades of experience with PC hardware and assorted sundries, alongside a career as a developer. He's obsessed with detail and has a tendency to ramble on the topics he loves. When not doing that, he's usually playing games, or at live music shows and festivals.