Dynaverse.net

Taldrenites => Starfleet Command Mission Scripting => Topic started by: Ken_Birdwell on February 08, 2003, 03:07:28 am

Title: SFC3 API and the current MS DX8.1 SDK problem.
Post by: Ken_Birdwell on February 08, 2003, 03:07:28 am
I downloaded the SFC3 API last week, along with the latest DX8.1 SDK from Microsoft and it seems they're not longer compatible.

The initial problem is that the interface to InterlockedCompareExchange() has changed and common\thread\optex.cpp won't compile. The change is minor, just removing the void casts makes everything at least compile, except now there's an additional problem in that SFC3 no longer runs even unmodified; it crashes with an unhandeled exception error in d3d8.dll.

I ended up doing a system restore (Win XP) back to before I installed the Microsoft dX8.1 SDK, and SFC3 started running again just fine.

Before I spend too much time tracking down what evil things the DX8.1 SDK install is doing to my machine, what version of the DX8.1 SDK should I look for, and also, what service packs should I install for VC6 to match the original dev environment?

Sorry if this is a repeat question, I looked for similar postings but didn't see anything obvious.  I posted the same question yesterday on the gamespy SFC Modding forums, and the nice folks there sent me here.  
Title: Re: SFC3 API and the current MS DX8.1 SDK problem.
Post by: mbday on February 09, 2003, 05:00:42 am
THe API for SFC3 is for the Patched version of SFC3 which is not out as of yet. That is way you are having crashes.
As for the DX try DX9.
Title: Re: SFC3 API and the current MS DX8.1 SDK problem.
Post by: Ken_Birdwell on February 09, 2003, 06:18:06 am
Well, the crash happens without running any modified code.  I've copied over no recompiled .scr's, I'm running just what shipped on the original SFC3 install.   Running from a pristine, working, SFC3 install, if I then install the latest DX8.1 SDK from microsoft SFC3 no longer runs.  

If you've tried this - installing the latest SDK from microsoft - and it works on your machines at Taldren then it's probably just something funky about my dev environment or some nasty driver issue with my ATI Radeon 9700.
Title: Re: SFC3 API and the current MS DX8.1 SDK problem.
Post by: Toasty0 on February 10, 2003, 05:45:26 am
Are you using MC++.Net2002 per chance?

Best,
Jerry  
Title: Re: SFC3 API and the current MS DX8.1 SDK problem.
Post by: RogueJedi_XC on February 10, 2003, 11:35:46 am
Ok, stupid question here, but are you sure it's the "latest" DX8.1" drivers, or is it the new DX9? If it's DX9, there's a patch from Activision you need to install.
 
Title: Re: SFC3 API and the current MS DX8.1 SDK problem.
Post by: Syntax on February 10, 2003, 07:29:32 pm
Well, the SDK and DX drivers are 2 different things. The SDK should not mess with the drivers, but the drivers could affect whether or not the SDK works. Anyway, I have just recently done the same thing... downloaded and installed the SFC3 API and then the DirectX 8.1 SDK, and my game still works fine. (Windows 2000) I am not really sure what suggestions to give you that might help the situation... but I hope it can be resolved without too much trouble.  
Title: Re: SFC3 API and the current MS DX8.1 SDK problem.
Post by: zaniwhoop2 on February 10, 2003, 07:43:36 pm
If the game not working after the DX8.1 SDK, try either installing the DX9SDK, or install the DX8.1SDK without installing the debug DLLs. When I had the DX8.1 debug DLLs, the Unreal Tournament 2003 demo would not run the Capture the Flag map, but when I used the retail (non-debug) DX8 dlls, it worked. The debug DX9 dlls also worked.  
Title: Re: SFC3 API and the current MS DX8.1 SDK problem.
Post by: Syntax on February 10, 2003, 07:59:02 pm
Have they released the DX9SDK??
Title: Re: SFC3 API and the current MS DX8.1 SDK problem.
Post by: Rod O'neal on February 10, 2003, 11:11:08 pm
Quote:

Have they released the DX9SDK??  




http://download.microsoft.com/download/8/0/e/80ebbf72-fc51-4799-a2f4-7fcca37b8bb3/dx9sdk.exe

I think so  I hope you got DSL though. It's rather L-A-R-G-E  
Title: Re: SFC3 API and the current MS DX8.1 SDK problem.
Post by: Toasty0 on February 11, 2003, 02:43:42 pm
Ken,

Is this the error you're getting?

Code:
c:\....\Desktop\SFC_Scriptor\SFC3_Scripting_API\Projects\Taldren\Projects\SFCTNG\Scripts\Shared\Source\Taldren\Common\Thread\optex.cpp(379): error C2664: 'InterlockedCompareExchange' : cannot convert parameter 1 from 'void ** ' to 'volatile LONG *'



And the IDE tracks to the following line of code?
Code:
thisThreadOwnsTheOptex = (0 == ::InterlockedCompareExchange( (void**) &fSharedInfo.fLockCount,(void*) 1, 0) );



I don't think it's the SDK in this instance as I have DX9 installed. I believe it's something to do with VC++.Net2002 dislike for legacy C code as this IDE is more ISO compliant than VC++6.

Mag has given me a few suggestions that might possibly address and fix this problem, but so far no luck.

Best,
Jerry  
Title: Re: SFC3 API and the current MS DX8.1 SDK problem.
Post by: Ken_Birdwell on February 13, 2003, 12:23:15 am
This is part of it.   In the latest DX8.1 SDK the calling conventions for InterlockedCompareExchange() have changed and the casts are no longer needed.  If you remove them, it'll compile just fine.

The next problem. and the one I'm stuck on, is that with the SDK installed a pristine, unmodified, unrecompiled SFC3 won't run at all, it just crashes in dxd8.dll
 
Title: Re: SFC3 API and the current MS DX8.1 SDK problem.
Post by: Doctor Quest on January 28, 2010, 01:34:14 pm
Sorry, I'm not a C++ guru.

What do you mean "remove the casts"?

Thanks!