VOGONS

Common searches


Quake 2 DOS Port WIP

Topic actions

First post, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

http://virtuallyfun.superglobalmegacorp.com/2 … -to-ms-dos-pt1/

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 1 of 61, by leileilol

User metadata
Rank l33t++
Rank
l33t++

I think the biggest hurdle would be handling all the game module code given they're all native Win32 DLLs and so are all those mods. To work around that would mean some hell of a mini Win32 VM, otherwise as a DOS game it's stuck at baseq2 only.

Also that 320x200 aspect needs to be fixed by forcing 320x240 calculation for the fovs, though ripping out video init code from Quake would be more ideal to get actual 320x240 and the rest.

(also a comment mentioned a q3/oa dos port idea.... that's more possible given the QVM system to handle the game, and the OpenGL stuff would have to be reworked with using ResidualVM's TinyGL and a lot of shaders would need prepreocessed loading like this to get around blend limitations for more software rendering performance.... or Glide output 😀 For a seemingly more modern game it's not an entirely outofthisworld idea.)

apsosig.png
long live PCem

Reply 3 of 61, by neozeed

User metadata
Rank Newbie
Rank
Newbie

Hey there!

Right now we are at the 'OMG it links' phase.. the 320x200 is in there as it is the quickest and easiest mode to support without implementing VESA support (well that and I'll want to do some OS/2 version, and 2.0 only really does 320x200....)

I think there is some stuff we can do *if* there is source out there for other gamex86.dll stuff, I just haven't tried DLM for DLL support just yet, as I didn't want to start porting with so many moving parts. Otherwise I guess Japheth's HX DOS can always load Win32 DLL's but I never did see a good way to be mostly MS-DOS with some Win32 functionality but its too late to ask him about that.

It still has some issues, right now my test version runs out of memory far too quickly under Qemu, while DOSBox runs fine. But for networking we'll need a packet driver which kind of rules out DOSBox.

Even stuck at 320x200 its still cool to see running.

Reply 4 of 61, by Lo Wang

User metadata
Rank Member
Rank
Member

I remember a lil over 12 years ago, the last time I attempted to run Quake II in software mode, I couldn't find a command that would enable vsync, so the framerate being practically incontrollable even at higher resolutions, made perceived movement stutter.

Just throwing that thing there. Vsync would make this port more stable on faster DOS rigs.

Anyways, very interesting project. Looking forward to a stable release at some point.

"That if thou shalt confess with thy mouth the Lord Jesus, and shalt believe in thine heart that God hath raised him from the dead, thou shalt be saved" - Romans 10:9

Reply 5 of 61, by leileilol

User metadata
Rank l33t++
Rank
l33t++

How's the assembly btw?

Quake2 had inline MASM IIRC, don't know how DJGPP can handle that. Most of the common wall span drawer functions should be unchanged from Quake and portable from that.

apsosig.png
long live PCem

Reply 6 of 61, by neozeed

User metadata
Rank Newbie
Rank
Newbie

Right now I'm building without any of the inline assembly. There are a bunch of crash issues I want to take care of first, plus taking a stab at the DLL thing before going down the assembly road. We will probably lean on the Linux implementation's assembly since it's already in something GAS can deal with.

$ i586-pc-msdosdjgpp-gcc -x assembler-with-cpp linux/*a.s -c
$ file *.o
d_polysa.o: 80386 COFF executable not stripped - version 30821
r_aclipa.o: 80386 COFF executable not stripped - version 30821
r_drawa.o: 80386 COFF executable not stripped - version 30821
r_edgea.o: 80386 COFF executable not stripped - version 30821
r_scana.o: 80386 COFF executable not stripped - version 30821
r_varsa.o: 80386 COFF executable not stripped - version 30821
snd_mixa.o: 80386 COFF executable not stripped - version 30821
sys_dosa.o: 80386 COFF executable not stripped - version 30821

So at least there is hope we can basically plug this stuff in and get something that works!

Reply 7 of 61, by gerwin

User metadata
Rank l33t
Rank
l33t
neozeed wrote:

Even stuck at 320x200 its still cool to see running.

Definitely cool, and that already after part 1 of the article.

If somehow you need any help with VESA video modes, I just worked on that last year and the result is in the MBF 2.04 (doom) source package. The Modded Allegro 3.0 used there is an option for sound. Also the sound drivers in Quake (1) are very reliable and compact, though rather limited in hardware support (SB series + GUS, without Midi or FM).

--> ISA Soundcard Overview // Doom MBF 2.04 // SetMul

Reply 9 of 61, by leileilol

User metadata
Rank l33t++
Rank
l33t++
gerwin wrote:

Also the sound drivers in Quake (1) are very reliable and compact, though rather limited in hardware support (SB series + GUS, without Midi or FM).

i'll second that. quake2 was almost unchanged with regards to Quake's sound system (one major change being allowing reinitializing, and changing rate on the fly)

BTW someone mentioned allegro in a comment. I've had bad results with using Allegro in a Quake engine before with its timer, had it once affect the game's framerate to lock to 17fps when music is initialized and playing a MIDI for example, on a real system (but not in dosbox)...
Using the Quake sound system from DOS is sufficient enough for Quake2.

apsosig.png
long live PCem

Reply 10 of 61, by neozeed

User metadata
Rank Newbie
Rank
Newbie

we got sound working.. .the assembly mixer stuff helps a LOT with the overall sound quality.

Networking was just a minor recompile away. It really goes to show how strong WATTCP is.

Reply 11 of 61, by leileilol

User metadata
Rank l33t++
Rank
l33t++

another random brainfart - using the mesa3D's old 3dfx driver and reworking that as a DOS module for Glide support to get DOS Q2 working through GL for 3dfx's DOS Glide? 😀

apsosig.png
long live PCem

Reply 12 of 61, by neozeed

User metadata
Rank Newbie
Rank
Newbie
leileilol wrote:

another random brainfart - using the mesa3D's old 3dfx driver and reworking that as a DOS module for Glide support to get DOS Q2 working through GL for 3dfx's DOS Glide? 😀

Wow that's super fringe!~ know where to get a SDK?

Reply 13 of 61, by leileilol

User metadata
Rank l33t++
Rank
l33t++

Mesa 7.x source may be most relevant for having a DOS compiling path and a Glide dirver (not for DOS though)

If getting Glide Mesa3D'd in DOS isn't viable then there's always this approach:

q2engoo.png

apsosig.png
long live PCem

Reply 14 of 61, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

http://virtuallyfun.superglobalmegacorp.com/2 … -to-ms-dos-pt3/

Binaries available! Works suprisingly well.

Benched the first alpha yesterday. 47fps in 320x on my i7 930 using DOSBox 0.74.

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 15 of 61, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

Amazing. I wonder if he can hack a DOS Glide version like leilei mentioned 😁

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 16 of 61, by neozeed

User metadata
Rank Newbie
Rank
Newbie
DosFreak wrote:

http://virtuallyfun.superglobalmegacorp.com/2 … -to-ms-dos-pt3/

Binaries available! Works suprisingly well.

Benched the first alpha yesterday. 47fps in 320x on my i7 930 using DOSBox 0.74.

Now you need the dosbox with ne2000 support, or Qemu so you can experience online play!

Reply 18 of 61, by RayeR

User metadata
Rank Member
Rank
Member
neozeed wrote:

I think there is some stuff we can do *if* there is source out there for other gamex86.dll stuff, I just haven't tried DLM for DLL support just yet, as I didn't want to start porting with so many moving parts. Otherwise I guess Japheth's HX DOS can always load Win32 DLL's but I never did see a good way to be mostly MS-DOS with some Win32 functionality but its too late to ask him about that.

Cool project, it would be nice to have native port.
I remember that before ~8 years I was successfully played Quake 2 (including sound on my SBLive but using older MB where the SB emulation worked yet) under plain DOS via famous HXDOS. So I guess it's not heavily bonded with win32 system and with some limitations all needed API could be implemented.
BTW anybody knows what happened to Japhet? Even his website has gone so I mirror the latest HX...

gerwin wrote:

The Modded Allegro 3.0 used there is an option for sound. Also the sound drivers in Quake (1) are very reliable and compact, though rather limited in hardware support (SB series + GUS, without Midi or FM).

Is there some Allegro mod that support newer soundcards?
You game porters, did you think about of using WSS http://rayer.g6.cz/download/wss.zip library for DJGPP (it's not my work, I just added some PCI IDs) that supports a lot of new intel HDAs? It was successfully used in mplayer dos port...

Gigabyte GA-P67-DS3-B3, Core i7-2600K @4,5GHz, 4GB DDR3, 128GB SSD, GTX670(GF7900GT), SB Audigy + YMF724F + DreamBlaster combo

Reply 19 of 61, by neozeed

User metadata
Rank Newbie
Rank
Newbie

oh I tried WSS, and it crashed out HARD... I just haven't had time to even start to see where it all goes wrong. it also locks on QEMU, and I haven't tested actual hardware yet.