crosire / d3d8to9

A D3D8 pseudo-driver which converts API calls and bytecode shaders to equivalent D3D9 ones.
BSD 2-Clause "Simplified" License
880 stars 78 forks source link

[Silent Hill 2] red tinted cutscenes #42

Closed scorutw closed 6 years ago

scorutw commented 6 years ago

heyo. recently beat first silent hill, hell of a job to emulate, but now im having trouble setting up the PC director's cut with the widescreen fix every cutscene ingame looks like this 29591878-c32aab30-8766-11e7-8153-c1f1cd3749b8-1 its pretty annoying and i havent seem to find any success in fixing it. i think it might have something to do with the fact that i use integrated graphics but id like to know if there's a way to combat this and have it working properly with the widescreen fix. i looked through this thread but didnt find anything https://github.com/crosire/d3d8to9/issues/24 thanks

elishacloud commented 6 years ago

Yes, this seems to be an issue that only happens when using d3d8to9 and an Intel GPU. I believe it is a problem with d3d8to9 but I have not been able to find the issue yet.

As far as a work around you can use WineD3D to fix this issue. There are two options for you:

  1. If you are using the Widescreen Fixes Pack for Silent Hill 2 you can use the LoadWineD3D ASI that I created. Simply copy the LoadWineD3D.asi + d3d9.dll + wine3d.dll + libwine.dll into the 'scripts' folder.

  2. Otherwise you can simply copy the WineD3D files (d3d9.dll + wine3d.dll + libwine.dll) into the Silent Hill 2 folder.

Also take a look at the Silent Hill 2 Fix Page. This has a bunch of stuff for Silent Hill 2 that will make the experience better.

I hope to eventually put a fix into d3d8to9 for this red tint issue but using WineD3D completely solves the issue for now.

scorutw commented 6 years ago

hey i tried that loadwined3d asi fix but it didnt work :( this is my silent hill /scripts/ folder 9d7d2f9a3c9da3a09d55b5fe22a3badf this is my regular outfront silent hill 2 folder 70f3f0b56d5d2b25640054d1aac4c793-1 pls help, really eager to play this darn game

scorutw commented 6 years ago

i put copied the files out of the scripts folder and into the out 'n open silent hill 2 folder and it cleared up the red issue but that kind of lagged my game

elishacloud commented 6 years ago

Yes, WineD3D requires a more powerful graphics card. I see the same issue on my laptop (though my desktop runs fine). You can try lowering the in-game graphic settings. This may make the game playable until the red tint issue can be fixed and WineD3D is no longer needed.

themasterofunlocking commented 6 years ago

@elishacloud has there been any further developments on this at all? I followed your instructions perfectly, but I've had no real success.

If the files are only in the scripts folder, it now plays in colour, but the entire FMV is now in 4:3, and the entire game plays in that resolution too, rather than 16:9 and looking beautiful. However if they're in both like you suggested, then nothing at all happens. The problem persists.

Could you help us out further? I really want to fix this so I can get my girlfriend to play Silent Hill 2, it's my favourite game and I really want to share it with her on the big screen.

Thank you

elishacloud commented 6 years ago

I have not looked into this more than a few minutes. Franky I am not quite sure what is going on. I need to spend some time to troubleshoot this more, but it is not on the top of my list.

Have you tried following the steps from the Silent Hill 2 Widescreen Fix? This has step-by-step instructions to get the game working on all three GPUs (Intel, Nvidia and ATI).

themasterofunlocking commented 6 years ago

@elishacloud Hey, yeah I followed it verbatim.

The only thing I can tell, is it's directly tied to d3d8.dll, when this is removed from the game folder the problem doesn't happen, however the cutscenes, and the games resolution return to 4:3.

Do I need to download the folder "LoadWineD3D-ASI-master" and do something with that additionally?Or is it just literally the addition of placing the "LoadWineD3D.asi" file in script folder.

Also should the (d3d9.dll + wine3d.dll + libwine.dll) be in both folders, or just now moved exclusively to the scripts folder?

I've included the information from the log file of the LoadWine3D3.log below, just incase it's any help?

13:40:55.230 Checking C:\Program Files (x86)\Konami\Silent Hill 2\scripts\d3d8.dll 13:40:55.230 Found d3d8.dll! 13:40:55.230 C:\WINDOWS\system32\d3d8.dll addr=6E8D0000 13:40:55.230 Checking Direct3DCreate8 ... 13:40:55.230 Hooked Direct3DCreate8 count 1 addr=6E8DBFC0 13:40:55.230 Checking ValidatePixelShader ... 13:40:55.230 Hooked ValidatePixelShader count 2 addr=6E907630 13:40:55.230 Checking ValidateVertexShader ... 13:40:55.230 Hooked ValidateVertexShader count 3 addr=6E909A60 13:40:55.230 Checking D3D8GetSWInfo ... 13:40:55.230 GetProcAddress: EXCEPTION module=D3D8GetSWInfo Failed to get address. Code=c0000005 13:40:55.230 GetProcAddress: Could not find D3D8GetSWInfo. 13:40:55.230 Checking C:\Program Files (x86)\Konami\Silent Hill 2\scripts\d3d9.dll 13:40:55.230 Checking C:\Program Files (x86)\Konami\Silent Hill 2\scripts\d3d10.dll 13:40:55.230 Checking C:\Program Files (x86)\Konami\Silent Hill 2\scripts\d3d10core.dll 13:40:55.230 Checking C:\Program Files (x86)\Konami\Silent Hill 2\scripts\d3d11.dll 13:40:55.230 Checking C:\Program Files (x86)\Konami\Silent Hill 2\scripts\ddraw.dll 13:40:55.230 Checking C:\Program Files (x86)\Konami\Silent Hill 2\scripts\dxgi.dll 13:41:19.032 Unhooking procs... 13:41:19.032 Unloading dlls... 13:41:19.032 Quiting

elishacloud commented 6 years ago

Try deleting the LoadWineD3D.asi from the "scripts" folder and moving the WineD3D files (d3d9.dll + wine3d.dll + libwine.dll) out of the "scripts" folder and into the "Silent Hill 2" folder.

Also you will want to put d3d8.dll from d3d8to9 into the "Silent Hill 2" folder.

So you will end up with the following 4 files in the "Silent Hill 2" folder:

themasterofunlocking commented 6 years ago

@elishacloud Thank you for your back and forth on this, I really am appreciative about you spending this time to try and help me resolve this issue, just wanted to take a moment to say that.

Unfortunately, this seems to have not only made the video be displayed in 4:3, but that it's also now displaying in Red. The game also runs in that aspect ratio.

Just incase it's any additional help, I'll link to what my folders currently look like, and I'll list some brief specs on my Laptop below.

OS: Windows 10 Processor: Intel i5 - 5200U CPU @ 2.20 GHz Ram: 8GB System 64 bit Display: Intel HD Graphics 5500

folders

Thanks again, I really appreciate the help.

elishacloud commented 6 years ago

@themasterofunlocking, I did a bit more troubleshooting and I have an idea what the red tint issue is coming from. It looks like Intel allows a particular D3D format to be used but does not handle it correctly, whereas neither ATI nor Nvidia will allow that format to be used. I just put a fix in to prevent Intel from using that format also.

I created a patch for d3d8to9 that should address this issue. I will look at getting a permanent fix for this when I get a chance. You can download the patch here: d3d8.zip

  1. Unzip this to your "Silent Hill 2" folder.
  2. You can delete the WineD3D files (d3d9.dll + wine3d.dll + libwine.dll) since they are not needed with this patch.

Please let me know if this works for you or not. Thanks.

elishacloud commented 6 years ago

Note: it looks like Intel has had issues with these same formats in the past. See here. Also take a look at how WineD3D tests for this issue.

themasterofunlocking commented 6 years ago

@elishacloud

I'm absolutely thrilled to let you know, that seems to have fixed the issue and it's working as intended! Thank you so bloody much.

Now I just need to figure out how to get the game to run in full-screen again, with full-screen cutscenes and we're completely golden, any idea on that front at all?

elishacloud commented 6 years ago

I noticed that you have both dinput.dll and dinput8.dll and they are the same. You should not need both of them. I recommend deleting them and redownloading the SH2 Widescreen Fix. This fix should have a fresh copy of the dinput8.dll.

Also I would update the global.ini file that is located in the "scripts" folder and set UseD3D8to9 to '0':

[GlobalSets]
UseD3D8to9=0
elishacloud commented 6 years ago

This issue can be closed, it has been fixed with #77.

themasterofunlocking commented 6 years ago

@elishacloud Thank you so much for your work, I really appreciate it. It's nice to be able to finally enjoy the game.