FAQ  •  Register  •  Login

Asking for help with old Quake mods

Moderator: Inside3D Admins

<<

gdiddy62

Posts: 51

Joined: Sat Jan 15, 2011 3:29 am

Post Wed Aug 24, 2011 3:45 am

Asking for help with old Quake mods

Hello everyone,
I hope someone here can help me with an issue I have. I like the modern graphics provided by the Darkplaces engine coupled with all of the new graphical enhancements, but I also like to play oldschool Quake once in a while. I recently upgraded to a new pc with the following specs:
AMD Athlon 7850
Nvidia gtx460 1gb with latest drivers
Windows xp sp3
2gb ram
My issue is that with the new specs some of my old Quake mods will not work now. I cannot get NPR Quake nor XWAR to even come up at all now. I click on the shortcuts and both will give a split second of black screen before dumping me back to my quake folder where the shortcuts are located. Some of my other old ones such as FQREAL still work wonderfully.
Can someone please help me troubleshoot and find a solution for this issue?
Any and all help greatly appreciated.
Regards
<<

daemonicky

User avatar

Posts: 185

Joined: Wed Apr 13, 2011 1:34 pm

Location: Czech Republic

Post Wed Aug 24, 2011 12:42 pm

Re: Asking for help with old Quake mods

gdiddy62 wrote:Hello everyone,
I hope someone here can help me with an issue I have. I like the modern graphics provided by the Darkplaces engine coupled with all of the new graphical enhancements, but I also like to play oldschool Quake once in a while. I recently upgraded to a new pc with the following specs:
AMD Athlon 7850
Nvidia gtx460 1gb with latest drivers
Windows xp sp3
2gb ram
My issue is that with the new specs some of my old Quake mods will not work now. I cannot get NPR Quake nor XWAR to even come up at all now. I click on the shortcuts and both will give a split second of black screen before dumping me back to my quake folder where the shortcuts are located. Some of my other old ones such as FQREAL still work wonderfully.
Can someone please help me troubleshoot and find a solution for this issue?
Any and all help greatly appreciated.
Regards


Try emulator? If it is DOS app then DosBox, if Windows app then Wine. (it might solve problem)
Shakespeare: Brevity is the soul of wit.

Think, touch, movetype, solid, traceline is what to understand first.

my digests:
of programming, graphics, gaming, tools ... http://j.mp/bundles/a397723/
<<

Spike

Posts: 2063

Joined: Fri Nov 05, 2004 3:12 am

Location: UK

Post Wed Aug 24, 2011 2:52 pm

there's a program called nhancer which can more easily change various profiles for things. one option its meant to expose is 'Driver Extension Limit'.
Many Quake engines will crash if the driver exposes its extension string as anything longer than 1023 bytes - your GPU supports too much.
<<

reckless

Posts: 1628

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Wed Aug 24, 2011 6:01 pm

keep in mind though that nhancer does not work on Win7 probably not even Vista. Also the developer who made it has dropped it so there wont be any new versions who will support Win7.
There is another tool though that works on Win7 but the name escapes
me so ill see if i can look it up.

edit: i see he has taken up development again ok np then :)

http://www.nhancer.com/
<<

dreadlorde

User avatar

Posts: 264

Joined: Tue Nov 24, 2009 2:20 am

Post Wed Aug 24, 2011 7:31 pm

Try qbism.
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.

Get off my lawn!
<<

Spike

Posts: 2063

Joined: Fri Nov 05, 2004 3:12 am

Location: UK

Post Wed Aug 24, 2011 8:12 pm

dreadlorde wrote:Try qbism.

or any engine that's been maintained in any way at all within the last 5 years.
<<

gdiddy62

Posts: 51

Joined: Sat Jan 15, 2011 3:29 am

Post Wed Aug 24, 2011 8:53 pm

Hey guys,
Thanks for responding. NPR has its own exe file and it must have info to use the dll's included with it as Qbism won't work. Xwar used a modified Tomaz engine and will NOT work with any other. I'll try the nHancer to see if that helps. Any other ideas welcome!! Perhaps if someone with similar specs could download nprquake and try to get it to work it could help? I tried nHancer but don't have any knowledge about how long a driver string should be so I don't know a value to place in that option. I am a complete novice with this !!
<<

Spirit

Posts: 853

Joined: Sat Nov 20, 2004 9:00 pm

Post Wed Aug 24, 2011 9:51 pm

I asked about that issue in #qc recently (after John Carmack mentioned it). I didn't know it got its way into later engines, thought only old glquake versions were affected. (Apparently because I did not read too well ;) )


<Spirit> at ~0:30 carmack said that video drivers check for early releases of glquake(?) since he wrote it with a buffer overflow for the extension strings. anyone got insight or more info on that?
<Spirit> http://www.youtube.com/watch?v=4zgYG-_ha28
<Dick> He's talking about a Com_Printf call in glquake (and quake 2, and a lot of quake/quake2-derived games)
<Dick> Where it just tries to print the entire extension list despite Com_Printf having a fairly small stack buffer that it va's shit into
<Spirit> and that really got hacked into the drivers (as giving a shorter list)?
<Dick> Yeah, most drivers have a generic "limit extension string" option for opengl
<Rick> lol :p
<Spirit> heh
<Spirit> do you know what binaries the drivers check for? or how else they prevent this
<Dick> nvidia seems to have hardcoded exe name checks
<Dick> Which have failed me before
<Dick> It didn't pick up on heretic 2 and it kept crashing on startup
<Dick> So I tried to make a specific profile for the exe and limit extension strings, and it still wasn't limiting extension strings when I'd run the game. I don't know what the issue was there.
<Dick> So I ended up just disassembling it in IDA and patching it myself to turn the call to com_printf into nop's
<Spirit> Dick: nice. thanks :D
(...)
<LordHavoc> <Spirit> at ~0:30 carmack said that video drivers check for early releases of glquake(?) since he wrote it with a buffer overflow for the extension strings. anyone got insight or more info on that?
<Rick> they talked about it earlier
<LordHavoc> Spirit: real simple - Con_Printf has a 1024 char buffer in it, the GL_EXTENSIONS string is around 5000-8000 chars at present
<Rick> drivers do detection via process name I guess?
<Rick> nvidia at least?
<Rick> oh
<LordHavoc> Spirit: so when it does sprintf, it overwrites a huge amount of stack memory and crashes
<Rick> you were answering
<LordHavoc> Rich: yeah process name
<LordHavoc> Spirit: using snprintf fixes the crash, using a larger buffer fixes the truncated extensions string
<LordHavoc> Spirit: darkplaces uses [16384] for all temporary char buffers (I call this MAX_INPUTLINE), including console text entry and everything else
<Rick> LordHavoc I assume you also sanely check input strings to make sure they fit
<Rick> (or use snprintf/etc)
(...)
<LordHavoc> <Rick> LordHavoc I assume you also sanely check input strings to make sure they fit
<LordHavoc> <Rick> (or use snprintf/etc)
<LordHavoc> Rick: snprintf (with intentional nul termination - remember the MSVC one doesn't necessarily put a nul at the end), strlcpy/strlcat (from BSD source code) because strncpy is trouble (no nul termination when truncating) and strncat is evil incarnate (no nul termination when truncating, no destination buffer size - the limit you provide is how many characters to copy, not dependent on how far it had to skip to get there),
<LordHavoc> Rich: to be clear the only safe string function ever created in the C language is asprintf
<Rick> oh I meant whatever equivilent
<Rick> not snprintf itself
<Rick> msvc has variants that are less dumb


So is this actually present in several custom engines? Does anyone which engines are affected?
<<

reckless

Posts: 1628

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Wed Aug 24, 2011 11:53 pm

as far as i can tell quite a few engines allready overcome this.
of my head darkplaces works so does rook's engine and fte seems to work just fine also. my own realm engine had this fixed for quite a few years and my recently updated TQX which is merely tq148 with a few things i been toying with works also. mh's directq also seems to work fine.

the one thing i found broke the older engines seems to be related to the old vsprintf (atleast on nvidia) replacing it with _vsnprintf and a fitting buffersize seems to works just fine. But then theres also a nasty bug in gl_vidnt.c in the video initialization code theres some printf functions overflowing the buffers which either needs to be made safe or removed.
removing them does not hurt anything as all they do is spam the console with info about your gfx card, but it seems to break the newer video drivers.
<<

Spike

Posts: 2063

Joined: Fri Nov 05, 2004 3:12 am

Location: UK

Post Thu Aug 25, 2011 12:38 am

or just don't even print it at all.
its not like the user even cares which extensions the gpu supports which the engine isn't even going to use.
<<

leileilol

User avatar

Posts: 2399

Joined: Fri Oct 15, 2004 3:23 am

Post Thu Aug 25, 2011 2:21 am

Re: Asking for help with old Quake mods

daemonicky wrote:Try emulator? If it is DOS app then DosBox, if Windows app then Wine. (it might solve problem)


No one makes DOS quake source ports


well, no one except maddes and I
<<

gdiddy62

Posts: 51

Joined: Sat Jan 15, 2011 3:29 am

Post Fri Aug 26, 2011 12:48 am

This is well above me and my limited knowledge. Spirit, if I'm understanding the info you posted the exe's for the two mods I mention would have to be altered in some way in order to work with the new drivers and cards of today??
Would someone be willing to tackle these two exes and share them and the "how-to" with us??
Regards
<<

reckless

Posts: 1628

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Fri Aug 26, 2011 11:48 am

Sure :) allthough i mostly use Codeblocks theses days i still got msvc so it should be fairly easy.

Ill post back when i have something working.
<<

reckless

Posts: 1628

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Fri Aug 26, 2011 12:26 pm

try this one and let me know if it works.

http://www.2shared.com/file/c9opqs-J/NPRquake.html

works here but i looked over the source and besides the dll support its plain old glquake so there might be other stuff broken with newer windows.
<<

reckless

Posts: 1628

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Fri Aug 26, 2011 1:58 pm

as for xwar i cant seem to dig up the source anywhere. I think you might need to use nhancer for that.

heres howto use nhancer

Run nHancer and open Quake profile while the game is not running. Go to Compatibility -> OpenGL, check "Conformant texture clamp" and set it to "Off", then check "Driver extesion limit" and type the value 11a8.

save and close now run your game :)
Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.
Icons provided by Aha Soft