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:
Stay On the Cutting Edge: Get the Tom's Hardware Newsletter Get Tom's Hardware's best news and in-depth reviews, straight to your inbox. Contact me with news and offers from other Future brands Receive email from us on behalf of our trusted partners or sponsors
"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.
... continue reading