The following is a guest post / wrap-up of the Q2DOS adventure byÂ [HCI]Mara’akate.
In the last update sezero and I([HCI]Mara’akate) tied up most loose ends with regards to Q2DOS.Â Specifically: adding in DXE support for mods and cleaning up some code from the early efforts.Â During this time, a forum user by the name of ggorts (strogg spelled backwards!) mentioned the possibility of using an old Mesa version with 3DFX support in DOS. I worked on separating the ref_soft from being statically linked into a DXE form and sezero cleaned up any potential problems there.
I mentioned the possibility of attempting the Mesa port to sezero and he thought it was probably a wasted effort and thought making a ref_glide depending only on glide3x.dxe would be a better way to go with less overhead.Â I started some initial work on it but quickly abandoned this side-project as I have no real glide (or even OpenGL) knowledge and didn’t have enough time on my hands to play around with it.
Around this time, we also separated the GameSpy browser code into a separate DXE for potential legal issues.Â The GameSpy code was publicly released, but never officially GPL’d.Â Using this method, other port authors could link against a gamespy.dll to add in the browser capabilities that connect to my GameSpy master server emulator (see QDOS branch for source code to that particular project).
Ggorts also came up with some code for us to be able to finally use the banked modes and Mode-X 320×240.Â Though 320×240 Mode-X seems to have some issues with certain emulator configurations, for the most part it works OK.Â This also helped us to get some ASM rendering code in from Q1 and help clean up the original mess that was the SVGA driver; a lot of unused code from Q1 was removed and sezero found a clever way to send the video modes list between the game binary and renderer DXE.
In any event, one night I figured I’d take a stab at trying to get Mesa working in Q2DOS.Â Checking out the Mesa3d FTP and researching the various changelogs it appears as if Mesa 5 series was the last true effort with Mesa 6.4.x series being the last maintained version with 3DFX specific code.Â I got everything to compile but ran into hard-lock issues no matter what I attempted.Â During this time, ggorts found out some various small, but now obvious issues. Including increasing the stack size to 1MB and he hard-coded the ref_gl to only work in 640×480.Â It took a lot of pleading but eventually he released his source with a static compile for Voodoo 1 cards only as he was testing this on emulators like DOSBox with glide support and PCem dev branch.
I worked on cleaning up the source and he produced some glide3x libraries for me for Voodoo 2 and Voodoo 5 as these were the only cards I personally owned.Â Imagine my surprise as I first loaded it up and it actually worked!Â And it was smooth with no rendering issues!
At this point, sezero became involved and worked very hard to clean up the Mesa compile issues, including various scary warnings and helped to update us to the final glide3x commit pushed to the development branch and Mesa v6.4.3 which was an unreleased maintenance update for Mesa v6.4.2.
It was a long journey to get the code all working together just right, and a big thanks goes out to the early Mesa crew including Brian Paul, Daniel Borca, and “KoolSmoky” and the mysterious ggorts fellow who pushed hard for this feature.
To recap, Q2DOS from the last time we talked now has:
- 3DFX Rendering with Mesa v6.4.3 for all Voodoo cards.
- Separated renderer so it is no longer statically linked.
- GameSpy is now a DXE.
- WAV streaming, which is practically free as opposed to the OGG format.
We are about at the end of our Q2DOS journey.Â A few odds and ends with Mesa and Voodoo 5 SLI issues remain (though nothing too show stopping) and there’s a small wishlist of some unnecessary features but it’s come a long way from the initial null driver effort!
I have to say it is simply incredible to see how Q2DOS went from a very primitive ‘wow it works’ port to a full featured port. Â Simply amazing!