elishacloud / Silent-Hill-2-Enhancements

A project designed to enhance Silent Hill 2 (SH2) graphics and audio for the PC. It also includes scripts to build or modify SH2 audio files (SFX, BGM and Dialog).
http://www.enhanced.townofsilenthill.com/SH2/
zlib License
596 stars 42 forks source link

[Guide] Steam Deck Guide and Unofficial Support #505

Open umbrellacorp53 opened 2 years ago

umbrellacorp53 commented 2 years ago

See here in the below thread for the SHS2EE Guide for the Steam Deck.


Hey everyone. I checked all the issues, open and closed, and I didn't see any mention of the possibility of SH2EE working on the Steam Deck. I'd love to hear whether or not you have any plans in this regard. Not sure if any of the devs have a Steam Deck or plan on getting one, but I'd be thrilled to play SH2EE on the Deck without having to sacrifice the OS and try and dual boot Windows.

I was a Q1 week 2 recipient of the SD and I've really been enjoying it so far. I was curious whether this would "just work" as a lot of games have. I have Silent Hill 2 on the Deck and installed your enhancements just to see how things go. The good news is that Silent Hill 2 - using your exe - works out of the box using "Proton Experimental", but no enhancements are active. I am able to play and use the built in controller (I believe it's emulating keyboard/mouse), but it is in a completely pre-EE state, including the audio loop bug and 4:3 aspect ratio.

When I use any other version of Proton, I've tried all of them, I either get an unresponsive white screen that hangs until I force close the game, or an instant CTD or crash to SteamOS depending on which mode I'm in. Performance is the same in desktop and SteamOS.

I'm curious if anyone has any insights as to how the project interacts with the exe and why it might not be having the intended effect.

I know my best hope is that someone in charge has a great deal of interest in the Deck or is planning on getting one themselves. That being said, I am willing to do any testing, share files, explain what's happening, post videos, screenshots, or anything else that might be helpful. This might not be something totally necessary for SH2EE, but having it run on the Deck would be a dream.

umbrellacorp53 commented 2 years ago

Ok, great! We are making progress. Now let's try installing the following packages from the website and see if it still works:

  1. Install Enhanced Edition Essential Files
  2. Install Image Enhancement Pack
  3. Install FMV Enhancement Pack
  4. Install Audio Enhancement Pack

I downloaded these modules straight from the site and extracted the files into the game folder. The game still launches 100% of the time with these files in the folder. (However I am not testing that they are working. Just following your instructions step by step.)

Next, there are also several settings that I disabled/changed in this ini file. You can try re-enabling these one-by-one to see if any of these cause an issue:

d3d8to9 = 1
AdjustColorTemp = 1
RestoreBrightnessSelector = 1
FixGPUAntiAliasing = 1
AnisotropicFiltering = 1
AutoUpdateModule = 1
UseCustomModFolder = 1
UseCustomFonts = 1

Alright, I'll be enabling these settings one at a time. After each I will boot the game 5 times to ensure that it is actually consistent. Letting you know now where I'm at since this could take some time and I'm not sure how long you'll be on. I'll be back in a sec.

umbrellacorp53 commented 2 years ago
d3d8to9 = 1

The game launches successfully 5 out of 5 attempts. (If it's relevant, once in game all that is visible is geometry on a grey screen.) Screenshot_20220409_223203

umbrellacorp53 commented 2 years ago

(5/5 success) AdjustColorTemp = 1 (0/5 fail!) RestoreBrightnessSelector = 1 (5/5 success) FixGPUAntiAliasing = 1 (5/5 success) AnisotropicFiltering = 1 (5/5 success) AutoUpdateModule = 1 (5/5 success) UseCustomModFolder = 1 (5/5 success) UseCustomFonts = 1

RestoreBrightnessSelector = 1 caused the game to crash. I've tried it 15 times and it has a 100% crash rate.

If I leave d3d8to9 = 0 and RestoreBrightnessSelector = 0 then the game launches and is playable with all the other settings listed above turned on. It launches 100% of the time. The issue is obviously I'd be playing with d3d8, and the color looks 16 bit or something. I'll post a screenshot of the menu.

If I turn d3d8to9 = 1 back on then the main menu and videos look correct and really good, but the gameplay looks grey as seen above.

Screenshot_20220409_232644 Here is the game menu with d3d8to9 turned to 0. Not glorious.

umbrellacorp53 commented 2 years ago

Screenshot_20220409_233221 For comparison, here it is with d3d8to9 turned to 1. Much nicer and easier to see,

Polymega commented 2 years ago

Here is the game menu with d3d8to9 turned to 0. Not glorious.

The game's default brightness selector works when playing in ScreenMode = 3 and RestoreBrightnessSelector = 0. Maybe the brightness is set to 0 for your first screenshot here?

umbrellacorp53 commented 2 years ago

The game's default brightness selector works when playing in ScreenMode = 3 and RestoreBrightnessSelector = 0. Maybe the brightness is set to 0 for your first screenshot here?

Brightness was set to 2. Changing it to 3 or higher results in a more obvious color banding that is not present with d3d9. Screenshot_20220409_235048

umbrellacorp53 commented 2 years ago

Feels so close though. Elisha is doing magic behind the scenes. The grey screen and floating lines thing is pretty amazing.

elishacloud commented 2 years ago
d3d8to9 = 1

The game launches successfully 5 out of 5 attempts. (If it's relevant, once in game all that is visible is geometry on a grey screen.)

This sounds like missing or faulty d3dx9 APIs. Try downloading the D3DX9.zip file and unzipping it into the Silent Hill 2 folder.

RestoreBrightnessSelector = 1 caused the game to crash. I've tried it 15 times and it has a 100% crash rate.

This is using a shader and it seems like there may be an issue with that. The D3DX9 from above might help here also. What about the AdjustColorTemp = 1? Does this have an issue?

BTW: both RestoreBrightnessSelector and AdjustColorTemp will be disabled when d3d8to9 is disabled.

elishacloud commented 2 years ago

When they cracked the binary they edited a lot more of it than just removing the DRM and CD check (more likely)

@Polymega, I checked the crack out in detail. It only contained two differences that mattered.

The first was in the CD check portion. They had better code than we had so I changed the project to match.

The second was more interesting, but I don't know what it does. This was in the v1.1 binary and it affects the game at address 0x008A2474.

Here is what the original binary has:

80 02 00 00 E0 01 00 00 20 03

Here is what the cracked binary has at this address:

00 05 00 00 20 03 00 00 20 03

I don't know what this address is used for or how this affects the game. The crack was done for a reason and I think it might be something useful for us, if we can figure out what it does.

umbrellacorp53 commented 2 years ago

This sounds like missing or faulty d3dx9 APIs. Try downloading the D3DX9.zip file and unzipping it into the Silent Hill 2 folder.

Good news! The game launches and appears to be applying all changes! Geometry was restored when this zip was extracted into the game folder. I haven't played extensively but I walked around the bathroom and pier and it seems to be good.

This is using a shader and it seems like there may be an issue with that. The D3DX9 from above might help here also. What about the AdjustColorTemp = 1? Does this have an issue?

AdjustColorTemp did not affect the game launch reliability. However, it may not have been doing anything at all if it required d3dx9 to work. Now that it launches and seems to be working fine I will enable AdjustColorTemp = 1 and RestoreBrightnessSelector = 1 and see if it's still working.

I do not know if I mentioned this, but when enabling d3dxto9 the weird extra 15 seconds that I mentioned is now gone from boot.

There is one noticeable issue now though, the game has bad crackling audio. As soon as I start the game after selecting difficulty, it crackles pretty intensely. I just tested again with d3d8to9 set to 0 and the issue persisted. Sometimes the game start sound effect plays without issue, other times it crackles. Also, if I move the cursor quickly on the main menu it does have audio popping.

Unfortunately I'm not sure at what point in troubleshooting that these audio issues came back. I have played without noticeable audio issues, though this could also be an issue that is affected by chance.

elishacloud commented 2 years ago

There is one noticeable issue now though, the game has bad crackling audio.

You could check if this is related to the new audio files. Try renaming sh2e\sound to something else, like sh2e\sound-backup. This will disable the new sound files. You can always rename it back if that does not help.

Edit: the issue could also be related to DSOAL, if you added that. You could rename/delete the dsound.dll file if it exists.

efigr commented 2 years ago

I've followed the thread up to this point, I also have a Steam Deck and have had the same issues. I also now have audio crackling issues - despite renaming sh2e\sound to sh2e\sound-backup with no DSOAL.

umbrellacorp53 commented 2 years ago

Edit: the issue could also be related to DSOAL, if you added that. You could rename/delete the dsound.dll file if it exists.

I haven't added DSOAL back since I wanted to make sure I was following your troubleshooting steps to a T.

Just now though I tested the game with UseCustomModFolder = 0 and the audio crackle was still present.

umbrellacorp53 commented 2 years ago

I've followed the thread up to this point, I also have a Steam Deck and have had the same issues. I also now have audio crackling issues - despite renaming sh2e\sound to sh2e\sound-backup with no DSOAL.

Thanks for testing as well. It's good to know this isn't just a quirk with my Deck, like a corrupted file or a bad compatdata folder.

umbrellacorp53 commented 2 years ago

Testing a few settings individually.

AudioClipDetection = Crackling present regardless of value. EnableSFXAddrHack = Crackling present regardless of value. (Note: If UseCustomModFolder = 1 when EnableSFXAddrHack = 0 then there is a warning to reinstall Silent Hill 2 due to missing files, or the game locks, hangs, or crashes.) SpecificSoundLoopFix = Crackling present regardless of value.

All of these have been tested individually. After each value was tested I reset it back to the initial value(s).

umbrellacorp53 commented 2 years ago

Could this be an issue with the game using multiple cores?

umbrellacorp53 commented 2 years ago

I still have an essentially functional install (the crapshoot install). It's the one I gathered all the screenshots from. It launches successfully maybe 1 in 5 times, but once it's running it actually does not have audio issues. The only possible audio issue I could find is if I quickly hover the mouse over the menu options it will crackle, but if you're using a gamepad or arrow keys its much harder to move at the speed required to get it to do this.

I could share the exe, ini and dll files if you'd like to compare them. I believe it's the first exe you modified to point to d3dx, and d3dx files you sent later that you said I could try to reenable settings on. Probably better to show than tell, but I'll hold off.

elishacloud commented 2 years ago

This issue seems kind of weird. But there are a few things you can try:

  1. Try adding a line to the ini that says this: SingleCoreAffinityLegacy = 1

  2. Try replacing the sh2pc.exe with this new hacked one. sh2pc.zip When you do this you need to set: NoCDPatch = 1. Note: the old hacked one was based on the v1.1 binary and this new hacked one is based on v1.0 binary.

  3. You could try adding the d3dx.dll file and the d3dx.ini file to your "crapshoot install" to see if this makes it be able to launch more predicatively and solves the audio issues.

Note: you may want to backup any files before overwriting them so you can put them back if any one of these options don't work.

umbrellacorp53 commented 2 years ago

This issue seems kind of weird.

I don't know the CPU power that was expected when SH2 was released, but is it possible that a single core CPU from the time was more capable than a single core of the Steam Deck? Maybe the answer is obvious, but it is a portable APU running at 15 watts TDP max. Could it just not have the single core performance necessary?

  • Try adding a line to the ini that says this: SingleCoreAffinityLegacy = 1

Unfortunately this did not help.

  • Try replacing the sh2pc.exe with this new hacked one. sh2pc.zip When you do this you need to set: NoCDPatch = 1. Note: the old hacked one was based on the v1.1 binary and this new hacked one is based on v1.0 binary.

Really interesting. I switched to this exe and wouldn't you know. Our audio issues are improved, possibly gone, but our issue with intermittent startup failure is back. I made sure to enable NoCDPatch = 1, and believe it or not it would actually start and play with or without this on. It was intermittent either way though.

So it seems that the issue is down to which binary is used. Ironically the 1.1 which you said was designed to fix audio issues is the one that's causing audio issues, and the 1.0 binary is causing the startup issues. I can sit here and swap between the two exe files and reproduce either issue reliably.

I had to edit my comment a bit. Basically I ran into some testing issues with the audio. It turns out that if I run the game on the native display at 800p it's harder to reproduce the audio issues reliably. All of my previous testing was done on a 1080p external display, mostly for convenience, since I was doing a lot of ini tweaks and moving files around. I went ahead and connected an external 1080p display just to make sure my testing was consistent, and it backed up what I discovered. The exe you just sent does not reliably launch, but the audio issues are improved. The audio issues with the affected exe are still necessary to solve though on the Deck since they do happen even on the native display, just not as frequently. To add, I just ran the reliable exe one more time on the native Deck display with no external display and the audio got caught in a really nasty loop before the first cutscene even ended.

umbrellacorp53 commented 2 years ago

3. You could try adding the d3dx.dll file and the d3dx.ini file to your "crapshoot install" to see if this makes it be able to launch more predicatively and solves the audio issues.

I just tried these d3d8 files with the reliable exe and the audio issues (crackling, looping, stuttering) persisted.

I just tried these d3d8 files with the most recent exe (built on the 1.0 binary) and it did not improve reliability. (I'm sure this was a given, since the exe brought this issue with it, but I figured I wouldn't leave a combination on the table untested.)

umbrellacorp53 commented 2 years ago

I still find it fascinating that the 1.0 binary works perfectly when it works, but it only works about 1 in 5 launches. I wonder if it would be possible to brute force the issue. haha... maybe not the best strategy.

efigr commented 2 years ago

Try replacing the sh2pc.exe with this new hacked one. sh2pc.zip When you do this you need to set: NoCDPatch = 1. Note: the old hacked one was based on the v1.1 binary and this new hacked one is based on v1.0 binary.

With this one, I can't get the game to launch on my end. Just a white screen. Will try a clean install again to see if it's maybe something I messed up.

efigr commented 2 years ago

Yeah, clean install. Added d3dx files, added the latest sh2pc.exe binary, can't launch it.

efigr commented 2 years ago

Also one more thing, the d3dx files with the previous sh2pc.exe binary and without the enhanced audio files causes inconsistent audio crackling. Sometimes when I launch it, it crackles. Sometimes it doesn't. Sometimes I get a really bad music loop, like previously reported. Very confusing.

umbrellacorp53 commented 2 years ago

Try replacing the sh2pc.exe with this new hacked one. sh2pc.zip When you do this you need to set: NoCDPatch = 1. Note: the old hacked one was based on the v1.1 binary and this new hacked one is based on v1.0 binary.

With this one, I can't get the game to launch on my end. Just a white screen. Will try a clean install again to see if it's maybe something I messed up.

You might try launching the game 10 more times and see if it eventually launches. That was my original issue. I believed that one setting or another was causing the game to launch but it turned out that it was just probability. Nothing I did actually affected anything, but because I was launching it over and over I eventually discovered that occasionally it would launch.

elishacloud commented 2 years ago

It seems like the version of the binary makes a difference. v1.0 seems to crash and not load consistently. The "Silent Hill 2 Modern Compatibility Fix" seems to have audio issues. Not sure if the issues are related to the community changes or the version of the sh2 binary file used.

Let's try with the native v1.1 and native vDC binaries to see if they have any effect. I have hacked all three of the native binaries to also load d3dx.dll, so they can be tested here.

v1.0 (d3dx.dll hack): sh2pc.zip v1.1 (d3dx.dll hack): sh2pc.zip vDC (d3dx.dll hack): sh2pc.zip

efigr commented 2 years ago

I can confirm that: v1.0 - White Screen, can't launch. v1.1 - Can launch, heavy audio stutters. vDC - Can launch, less stutters (but still stuttery at times) - although this one still suffers from the nasty audio loop bug after a bit of dialogue when you leave the bathroom.

umbrellacorp53 commented 2 years ago

v1.0 (d3dx.dll hack): sh2pc.zip

Failed to launch 5 times. Launched on the 6th time. Audio issues were also present. So this binary contained both issues.

v1.1 (d3dx.dll hack): sh2pc.zip

This launches consistently but it contains significant audio issues. Hard to tell if they are the same or worse than the audio issues with the previous binary because of the randomness.

vDC (d3dx.dll hack): sh2pc.zip

I was hoping for a Goldilocks moment, but this binary behaves similarly to the previous one. It launches consistently, slightly faster, but audio issues are present.

Also, the menu text here is different. It's plain white text as opposed to the bold black font with white highlights that was displayed in the other two. Not sure if that's relevant.

elishacloud commented 2 years ago

v1.0 (d3dx.dll hack): sh2pc.zip

Failed to launch 5 times. Launched on the 6th time. Audio issues were also present. So this binary contained both issues.

There is something wrong here because this is the exact same binary I gave you earlier that you said did not have audio issues. Now it does have audio issues. Maybe this is unrelated to the binary?

I wonder if this could be related to sound settings in the game? Can you try disabling Sound Virtualization under the Advanced Options menu? Also try turning down the game volume and see if that helps.

You could also try to disable LockSpeakerConfig = 0 in the ini file and then change the Speaker Config in the game's menu to Stereo or Mono, just to see if that makes any difference.

BTW: I think using the native v1.1 hacked binary is the best for testing here.

Also, the menu text here is different. It's plain white text as opposed to the bold black font with white highlights that was displayed in the other two.

That is normal. The DC version has a different menu. Not quite a pretty as the other versions.

It launches consistently, slightly faster,

Interesting. I did a test by checking the log files and the DC version was about 33% slower on my computer. v1.1 was the fastest for me.

umbrellacorp53 commented 2 years ago

There is something wrong here because this is the exact same binary I gave you earlier that you said did not have audio issues.

The audio issues do not seem as bad as with the other two but they are present. Since it takes several attempts to get it to launch its harder to be thorough. I will change the settings you mentioned and see if that fixes the issue.

umbrellacorp53 commented 2 years ago

I changed the settings from stereo to mono, and disabled Sound Virtualization. I also set the volume to 85%

I set LockSpeakerConfig = 0 and although I could change the setting from stereo to mono it wouldn't save that change.

None of this fixed the sound issue. It isn't as bad as the 1.1 binary but it is there. It takes more time to find a stutter or crackle, but when it does it is noticeable.

I think you may be correct that we should stick with testing the 1.1 binary since at least it launches consistently.

umbrellacorp53 commented 2 years ago

Silent Hill 2 intermittent launch, crackling audio.zip Silent Hill 2 intermittent launch, good audio.zip

So these zipped files I pulled directly from my two game folders. The one labeled as having bad audio is from the folder that all of our testing has taken place in.

The other is from my crapshoot folder. (gotta come up with a better name.)

They both, I believe, are using the same exact exe hash, but they have different ini files. They're very similar, but one has no audio issues. Both, again since they use the 1.0 binary have the issue of only running 1 in 5 times, if that.

umbrellacorp53 commented 2 years ago

I'll add. I just tried placing the "good audio" files with the binary:

v1.1 (d3dx.dll hack): sh2pc.zip

and the supporting d3d9 files (D3DCompiler_43.dll, and D3DX9_43.dll) and there were still audio issues. This time a part of Mary's monologue began looping.

efigr commented 2 years ago

and the supporting d3d9 files (D3DCompiler_43.dll, and D3DX9_43.dll) and there were still audio issues. This time a part of Mary's monologue began looping.

Yeah, this is what I'm pretty much always getting now.

elishacloud commented 2 years ago

The other is from my crapshoot folder.

Have you tried adding the v1.1 hacked binary into the crapshoot folder to see if the launch issues go away and the audio issues remain solved?

elishacloud commented 2 years ago

Silent Hill 2 intermittent launch, crackling audio.zip Silent Hill 2 intermittent launch, good audio.zip

BTW: I noticed that both of these logs show that alsoft.ini, dsoal-aldrv.dll and dsound.dll files exist in these two folders. These are part of DSOAL. I recommend removing these files for now while we troubleshoot this.

umbrellacorp53 commented 2 years ago

BTW: I noticed that both of these logs show that alsoft.ini, dsoal-aldrv.dll and dsound.dll files exist in these two folders. These are part of DSOAL. I recommend removing these files for now while we troubleshoot this.

Apologies, yeah I tried with and without the dsoal files but I can keep them out for consistency.

Have you tried adding the v1.1 hacked binary into the crapshoot folder to see if the launch issues go away and the audio issues remain solved?

This previous comment is where I added the hacked 1.1 binary to the crapshoot files. Was really hoping this would deal with all the issues at once, but the audio issues remained even with the ini files that seemed to resolve audio issues with the 1.0 binary.

I'll add. I just tried placing the "good audio" files with the binary:

v1.1 (d3dx.dll hack): sh2pc.zip

and the supporting d3d9 files (D3DCompiler_43.dll, and D3DX9_43.dll) and there were still audio issues. This time a part of Mary's monologue began looping.

elishacloud commented 2 years ago

I'm not quite sure what is happening here. My only thought (I hate to bring it up) is that we should try again from the beginning and see where the sound problem gets introduced.

My suggestion:

  1. Setup SH2 without EE and verify that sound works good.
  2. Add EE testing files (from above): sh2pc.zip
  3. Add packages from the website one-by-one.
  4. Enable settings listed here one-by-one.

For each of these steps test to see where the sound issues get introduced.

efigr commented 2 years ago

Testing results:

  1. Sound works fine.
  2. Crackling, audio loops after a bit of dialogue.
elishacloud commented 2 years ago

2. Crackling, audio loops after a bit of dialogue.

Ok, try using this update: d3dx.zip

efigr commented 2 years ago

Alright, I think that fixed the audio issues. Will try to continue adding the enhanced edition files.

efigr commented 2 years ago

Actually, I can't seem to get the Enhanced Edition menu to show up at all, just the default one.

Here's the log file: d3dx.log

umbrellacorp53 commented 2 years ago

I've tried to enable custom mod folder but it cases the game to say it's missing files. What is the minimum I can enable to test this?

umbrellacorp53 commented 2 years ago

I also am getting essentially a vanilla experience and there are no issues with the audio. I'm on the road though so I haven't started at square one by removing the EE files. Yet, no audio glitches. I want to start by enabling the bare minimum to ensure that the ini is actually having an effect. (After removing the rest of the EE files as you instructed)

elishacloud commented 2 years ago

I also am getting essentially a vanilla experience

Yes, that is because the update I gave you has pretty much all the settings disabled in the ini file. You won't get any EE enhancements until you start enabling the features. But this is good because it tells us that it is one of the features in the ini file that is causing this issue.

You will need to start enabling the features and see which ones cause the issue. I recommend that you start out by enabling these settings first, as without these settings the game could just crash:

EnableSFXAddrHack = 1
EnableTexAddrHack = 1

Then you can start enabling the larger features here (one-by-one) testing to see if the sound goes bad after any of these options are enabled. This is probably a good order to do this in:

FullscreenImages = 3
FullscreenVideos = 3
UseCustomModFolder = 1
UseCustomFonts = 1
UseCustomExeStr = 0
WidescreenFix = 1
Fix2D = 1
DynamicResolution = 1
d3d8to9 = 1
AdjustColorTemp = 1
RestoreBrightnessSelector = 1

Once you have those enabled you can go an enable the settings under [GAME FIXES]. For this there are a bunch of settings so you will want to enable 5 or 10 of them at a time.

umbrellacorp53 commented 2 years ago
EnableSFXAddrHack = 1
EnableTexAddrHack = 1

Enabled. No audio issues.

FullscreenImages = 3

No issues.

FullscreenVideos = 3

No issues.

UseCustomModFolder = 1

No issues.

UseCustomFonts = 1

No issues.

UseCustomExeStr = 0

Did you mean '1'? It was set to 0 already. I changed it to 1. No issues.

WidescreenFix = 1

No issues.

Fix2D = 1

Audio stuttered when James started walking to pier/railing. Minor and hardly noticeable.

DynamicResolution = 1

No issues.

d3d8to9 = 1

Audio stuttered at same spot. This time much worse. Also, as Mary started reading her voice stuttered/crackled bad, but audio recovered. No other issues after.

AdjustColorTemp = 1

No issues despite leaving all previous settings enabled.

RestoreBrightnessSelector = 1

Instant CTD every time.

Once you have those enabled you can go an enable the settings under [GAME FIXES]. For this there are a bunch of settings so you will want to enable 5 or 10 of them at a time.

I can start working on these next, but I'm going to try opening the game another 5 times and see how often the audio is stuttering. When everything was enabled @efigr and I were both experiencing extreme stutter at game launch, and looping audio on Mary's monologue.

I ran the game 5 more times with all previous settings enabled except for RestoreBrightnessSelector, and I have experienced no audio issues since the last stutter. Let me know if there is anything more specific you want me to do.

umbrellacorp53 commented 2 years ago
AudioClipDetection = 1
CatacombsMeatRoomFix = 1
ChangeClosetSpawn = 1
ClosetCutsceneFix = 1
CreateLocalFix = 1

No issues.

DisableHighDPIScaling = 1
DisableSafeMode = 1
EnableSFXAddrHack = 1
EnableSoftShadows = 1
EnableTexAddrHack = 1
FastTransitions = 1
Fix2D = 1
FixAptClockFlashlight = 1

No issues.

FixAudioThreadDeadlock = 1
FixChainsawSpawn = 1
FixCreatureVehicleSpawn = 1
FixDrawingTextLine = 1
FixHangOnEsc = 1
FixMemoFading = 1

No issues.

FixMissingWallChunks = 1
FixSaveBGImage = 1
FixTownWestGateEvent = 1
FlashlightFlickerFix = 1
FogFix = 1

No issues.

FogLayerFix = 1
FogParameterFix = 1
FogSpeedFix = 1
GameLoadFix = 1
HalogenLightFix = 1

No issues.

It was at this point that I realized. Since the game crashed when enabling RestoreBrightnessSelector, and since UseBestGraphics was disabled, the game would default to the lowest settings. This could be why I have not seen any stuttering since before the CTD.

I just enabled UseBestGraphics, and I am now experiencing the same level of stuttering as when I enabled d3d8to9. So I'm not sure how to proceed. I could roll back to that point, but I'm going to have to hold off on testing for a bit. Will probably come back to it later tonight.

umbrellacorp53 commented 2 years ago

After setting the in-game advanced graphics settings back down to their lowest settings the stutter is gone again. I will re-enable these settings one by one to see if one in particular is at fault.

umbrellacorp53 commented 2 years ago

Weird. I re-enabled the advanced graphics settings one by one without issue. I restarted the game and it locked up completely right before Mary's monologue starts. First time I've ever seen that. Does UseBestGraphics enable anything that isn't visible in the Advanced Graphics settings menu? I will restart the game but I doubt the issue will be reproduced. It's starting to feel like it's an issue of the load being put on the CPU. Like it's a cumulative effect.

elishacloud commented 2 years ago

I ran the game 5 more times with all previous settings enabled except for RestoreBrightnessSelector, and I have experienced no audio issues since the last stutter.

The RestoreBrightnessSelector uses a shader that requires extra GPU power.

I just enabled UseBestGraphics, and I am now experiencing the same level of stuttering as when I enabled d3d8to9.

After setting the in-game advanced graphics settings back down to their lowest settings the stutter is gone again.

Thanks for all your testing here! I was kind of afraid of this. It appears that the Steam Deck is not powerful enough to keep the sound buffer full with all the other things going on. Re-writting the ADX sound engine may fix this issue. See comment here.

In the meantime I recommend disabling the features that use extra CPU/GPU power and keeping the in-game settings low.

I created an update for you that uses the latest build and has all the CPU/GPU taxing features disabled: d3dx.zip

Below is a list of things that I disabled or set a particular way because they are not needed for your setup or they take a lot of CPU/GPU work for only subtle changes. This ini file should give you the best setup using the least amount of CPU/GPU overhead. I hope with these features disabled you should be able to use the Steam Deck and get the best experience without the sound issues.

WrapperType = d3d8.dll
ScreenMode = 3
d3d8to9 = 0
AdjustColorTemp = 0
RestoreBrightnessSelector = 0
DisableGameUX = 0
FixGPUAntiAliasing = 0
AnisotropicFiltering = 0
CheckCompatibilityMode = 0
CheckForAdminAccess = 0
DisableScreenSaver = 0
UseBestGraphics = 0
DisableHighDPIScaling = 0