Since the last update we got some help in a few fields that have really fleshed out this ‘experimental’ port into a full fledged port. Â First RayerR helped us with the fun of getting us onto the latest deployment of DJGPP, 2.05 (rc1). Â It’s always nice to be in the latest available release. Â Next in a passing comment,Â Ruslan Starodubov had mentioned that he had gotten a much older build of our QDOSÂ to support the Intel HDA sound chipset via theÂ Â MPXPlay sound library. Â I wrote to the author of MPXPlay, PÃ¡dÃ¡r AttilaÂ asking for us to distribute his source in our project, and he granted permission.
So at this point things were looking good. Â The only ‘feature’ that modern OS’s really held over us was the ability to dynamically load and unload game modules on the fly. Â I had tried to use DLM, but it stripped the DPMI functionality out of the MS-DOS Extender making the port really useless. Â I tried to build the newer DXE3 support but had no luck. Â I suspect now my native tool chain was interfering with the build process. ButÂ Maraakate managed to get it to not only build, but to run!
Adding in DX3 support was relatively painless.Â I first looked at DJGPP’s FAQ and downloaded the example code.Â In the example code there was small helper functions to make unions and check the symbols.Â If they didn’t exist a printf was spit out to alert you about it.Â To resolve the issue you simply just add DXE_EXPORT to the other list of missing exports.
Compiling the game code was easy, again referring to the example I saw that basically they compiled it the same, but at link time you use DX3GEN and -U flag to ignore unresolved symbols.
The biggest head scratcher was the Sys_GetGameAPI failing to find GetGameAPI from the DX3.Â After some piddling around I noticed that it listed GetGameAPI as _GetGameAPI inside the DX3 itself.Â I added the underscore and it worked!
Other things that were relatively to easy to import was R1Q2’s HTTP downloading code.Â Compiling CURL was kind of tricky because of the linking order, but thankfully neozeed figured it out quickly.
All of Yamagi’s Quake 2 updated game DLLs were all diff’d by hand using BeyondCompare to make sure I didn’t clash using some newer functions that weren’t available in DJGPP.Â I also merged their Zaero code with their baseq2 code by comparing Zaeros code to the Quake 2 SDK, marking every thing that was changed.Â The result is a really stable Zaero game code.Â If you haven’t played Zaero check it out.Â I think it’s a lot better than Rogue, but Xatrix is probably my favourite (even over stock Q2).
Other cool things I’m glad to get into the code was the GameSpy Browser.Â It took me quite a bit of work to get it where it is, but it’s really nice to just be able to ping to a master server (a custom GameSpy emulator I wrote specifically for Q2DOS.Â Source is not finalized yet, but will be available soon for those curious), pick a server and go!Â All in DOS!
So here we are at the end of the journey. Â Or at least safe enough for a 1.0 release.
To recap, we have:
* VGA * SVGA (LFB modes only) * Mouse * Keyboard * SoundBlaster and Gravis UltraSound Family * CD-ROM music * OGG music * Networking (You need a packet driver) * Loading/unloading game DLLs in DX3 format. * Intel HDA support -hda * Mouse wheel support with -mwheel
And I should add, that it works GREAT on my MSI Z87 motherboard.
Don’t forget you can always make bootable USB stick with DOS, or CD-ROMs.
Continued in Part 5!