narzoul / DDrawCompat

DirectDraw and Direct3D 1-7 compatibility, performance and visual enhancements for Windows Vista, 7, 8, 10 and 11
BSD Zero Clause License
880 stars 67 forks source link

Please, help on "Sid Meiers SimGolf" #247

Closed ghotik closed 8 months ago

ghotik commented 8 months ago

There's one thing that drives me crazy. This game can work perfectly (at least, on certain conditions and machines) in native fullscreen mode, but when I try to set it in window mode with DxWnd, in the game screen some textures seem to lose their transparency and the scene becomes mostly black. The game is a cumbersome mix of ddraw, GDI and OpenGL, so probably this is the cause, but I can't figure out how it could be possible to recover. Could you, please, give me some advice? This game has been my nightmare for years ... simgolf

narzoul commented 8 months ago

This game seems to do nothing with DirectDraw apart from playing the movies. I have no experience with OpenGL whatsoever, so I don't think I can help with this.

ghotik commented 8 months ago

I don't want to push you, but I just wanted to tell you that the OpenGL dependency is a sort of red herring: though opengl32.dll is the only graphic library statically linked, it is used only marginally. The game loads ddraw.dll dynamically to create a DirectDraw session, then the game uses a troublesome combination of DirectDraw textures and gdi32 DIB sections, with transparent tiles over maybe missing backgrounds. If this triggers your curiosity, I can provide more details ....

narzoul commented 8 months ago

I must be using a different version of the game then. I renamed the intro video (Flics\SMSG_IntroFinal.bik), and the game doesn't load ddraw.dll at all, not even after loading a save game to enter a map. I verified with Process Explorer. Yet everything seems to be rendered correctly, natively.

I also tried with the intro video intact, using DDrawCompat's debug logging, but still no DirectDraw surfaces were created, except for 2 primaries: one for the intro video, one for the outro when exiting. Definitely no sign of any Direct3D involvement. When running natively (with the intro intact), d3dim.dll and d3dim700.dll aren't even loaded, and it's impossible to use Direct3D without those.

Is there some option to switch to Direct3D rendering that I'm missing? Are you using the v1.02 patch?

ghotik commented 8 months ago

Sorry, it seems that I was baffled by the intro videos. In any case, you are right: the troublesome part that I showed in the screenshot has no ddraw contribution, it seems a co-work of opengl32 textures and some DIBs handled in gdi32. I have to do more research, but not in the ddraw area. About versioning, since the game is copy-protected by the unsupported safedisk I was constrained to use unprotected files. They don't show clearly any version number, but I believe I used 1.02 and 1.03 (that should be an unofficial patch) but the game behavior in window mode is always the same. So, I apologize for pulling you into this "affair", but it seems it's none of DDrawCompat business. Thank you for your attention and patience. Gho