elishacloud / dxwrapper

Fixes compatibility issues with older games running on Windows 10/11 by wrapping DirectX dlls. Also allows loading custom libraries with the file extension .asi into game processes.
zlib License
1.16k stars 83 forks source link

Missing environment cube map when playing Freelancer (2003) on modern OS/DirectX 8 version #136

Open BC46 opened 2 years ago

BC46 commented 2 years ago

In the game Freelancer (2003) the space ships are supposed to have a somewhat-shiny front window. This shininess is achieved in the game by applying an environment cube map on top of all ship windows. This is what the cube map looks like: image

Unfortunately after some DirectX 8 update this particular cube map stopped working completely which caused all front ship windows to lose their shininess. The exact update where this started to occur is unknown. Though it's certain that it happened a very long time ago since this issue is present on Windows 7 and even on the latest Windows XP service pack.

The only known way of getting the cube map to work on modern operating systems is to launch the game using dgVoodoo. It would be nice if this could also be fixed in DxWrapper, or possibly d3d8to9.

Windows 10: image

dgVoodoo: image

BC46 commented 1 year ago

I've updated the content of this issue because one major part of the mentioned problem has already been fixed during this discussion: https://github.com/elishacloud/dxwrapper/issues/134.

elishacloud commented 1 year ago

Do you have an older system setup where this works? If so can you send me a d3d9 Microsoft PIX output file of that frame working correctly?

BC46 commented 1 year ago

I happen to have an ancient Windows XP laptop lying around. Might be a while before I can get that thing running again...

BC46 commented 1 year ago

Managed to get the game running on the laptop. There's two problems though. First of all, for some reason even on this system the cube map does not work. I tried installing the DirectX version that was shipped with the game, but to no avail.

The second problem is that I can't get d3d8to9 to work on the laptop. It says a file named "MSVCP140.dll" is missing. Installing the VC++ 12.0 redistributable package did not do the trick unfortunately.

mirh commented 1 year ago

140 is visual studio 2015 (hoping that crosire used the XP version of the toolchain)

elishacloud commented 1 year ago

Here is a version complied for Windows XP with the runtimes built-in: d3d8.zip

BC46 commented 1 year ago

140 is visual studio 2015

Ah, I didn't know the number at the end represents the VC++ version.

Here is a version complied for Windows XP with the runtimes built-in: d3d8.zip

Thank you for this build! Running the game with it no longer showed the error message, but it did crash right after launch. ModName: d3d8.dll Offset: 00013809

I tried installing a VC++ 14 Redistributable package that was still supported on XP. After that the official d3d8to9 release dll did load, but got the same crash as above, this time with a different crash offset: 00013f53.

elishacloud commented 1 year ago

This issue might be related to issue #75

elishacloud commented 1 year ago

Ok, here is a quick test build to see if this will fix the missing items: dxwrapper.zip

BC46 commented 1 year ago

It seems that didn't do the trick unfortunately: image

elishacloud commented 1 year ago

I see. It was worth a try. Thanks for checking.