VOGONS

Common searches


First post, by ripa

User metadata
Rank Oldbie
Rank
Oldbie

edit2: just enable Catalyst A.I. instead of the following hack 😉

Posting this in case it helps someone else in the future.

I couldn't get Soldier of Fortune II working on my computer (Windows XP, Radeon HD4650). Both single-player and multi-player executables would crash to desktop without any error pop-up immediately after the startup console window. According to web search results, the culprit is an AMD video driver update related to OpenGL (keyword: OpenGL extension limit), but that it is supposed to have been fixed in a newer version. All solutions I could find for this problem were unhelpful (upgrade/downgrade drivers or use some outdated OpenGL DLL).

Fortunately, I found a really easy fix that has worked for me:
- open SoF2.exe in a hex editor
- find the string beginning with "GL_EXTENSIONS:" (without the quotes)
- REPLACE (do not ADD or REMOVE) the five ASCII characters following the colon with five null bytes (= bytes with value 0, actually replacing just the first byte should be enough)
- repeat this for the "WGL_EXTENSIONS:" string
- save and repeat the same procedure for SoF2MP.exe
- enjoy(?) the game

Explanation:
- the game queries the OpenGL driver for a list of OpenGL extension names, of which there are more in newer drivers
- there seems to be a buffer overflow error related to printing the list (or a long string), which causes the crash
- terminating the print format string early with null bytes prevents the print function from parsing the %s specifier and triggering the error

edit: This might work for other Quake 3 / Id Tech 3 engine based games as long as the executable is unpacked.

Last edited by ripa on 2015-01-14, 20:39. Edited 1 time in total.

Reply 1 of 5, by Gamecollector

User metadata
Rank Oldbie
Rank
Oldbie

Q3 games suffer from the OGL extensions limit? Strange.
The proper way is to replace %s to %p.
If the game uses PunkBuster or something similar - it will fail the integrity check. Then you must use the most proper way - add this game to atiogl.xml and enable Catalyst A.I.
This is the entry in atiogl.xml for my Radeon HD2600 Pro Agp:

	<!-- SoF II - soldier of fortune II - Double Helix-->
<profile exename="SoF2.exe">
<maxExtensionsStringLength>3900</maxExtensionsStringLength>
</profile>
Last edited by Gamecollector on 2015-01-13, 23:42. Edited 3 times in total.

Asus P4P800 SE/Pentium4 3.2E/2 Gb DDR400B,
Radeon HD3850 Agp (Sapphire), Catalyst 14.4 (XpProSp3).
Voodoo2 12 MB SLI, Win2k drivers 1.02.00 (XpProSp3).

Reply 4 of 5, by ripa

User metadata
Rank Oldbie
Rank
Oldbie
Gamecollector wrote:
Q3 games suffer from the OGL extensions limit? Strange. The proper way is to replace %s to %p. If the game uses PunkBuster or so […]
Show full quote

Q3 games suffer from the OGL extensions limit? Strange.
The proper way is to replace %s to %p.
If the game uses PunkBuster or something similar - it will fail the integrity check. Then you must use the most proper way - add this game to atiogl.xml and enable Catalyst A.I.
This is the entry in atiogl.xml for my Radeon HD2600 Pro Agp:

	<!-- SoF II - soldier of fortune II - Double Helix-->
<profile exename="SoF2.exe">
<maxExtensionsStringLength>3900</maxExtensionsStringLength>
</profile>

Well hit me with the dummy stick, Catalyst A.I. fixes Sof2 without this exe patching hack. I didn't know if affects OpenGl compatibility. I had disabled it because I thought it just overrides the anti-aliasing/anisotropic filtering settings per application.

Also, thanks for the tip about atiogl.xml. I didn't know you could adjust OpenGl compatibility settings per application.

Reply 5 of 5, by Gamecollector

User metadata
Rank Oldbie
Rank
Oldbie

Atiogl.xml is used only if Catalyst A.I. is on. It looks like the SoF2 entry was already here for HD4650, you just disabled it.

Asus P4P800 SE/Pentium4 3.2E/2 Gb DDR400B,
Radeon HD3850 Agp (Sapphire), Catalyst 14.4 (XpProSp3).
Voodoo2 12 MB SLI, Win2k drivers 1.02.00 (XpProSp3).