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
597 stars 42 forks source link

Flashlight doesn't work in Parallels 16.5 Windows 10 Arm Macbook 13 M1 8 core 16gb d3d8to9=1 #432

Closed aminta closed 1 month ago

aminta commented 3 years ago

Hi all!

The game runs perfect on Windows 10 Arm, Parallels Desktop 16.5, Macbook 13 M1 8 core 16gb, the only problem is that flashlight doesn't work, making dark (and unplayable) the game :-(

I found that in the past a bug like this was fixed working on device.fix file (https://www.neoseeker.com/forums/796/t957620-silent-hill-2-flashlight-fix-mobile-intel-915/)...

If i set d3d8to9 to 0 flashlight works but the color of the light is red!

Here's the d3dd8.log:

6616 03:37:36.890 Starting Silent Hill 2 Enhancements! v1.8.1900.0 6616 03:37:36.890 Parallels Parallels ARM Virtual Machine 0.1 6616 03:37:36.890 Parallels Parallels ARM Virtual Platform 0.1 6616 03:37:36.905 Windows 10 Enterprise 64-bit (10.0.21370) 6616 03:37:36.905 "sh2pc.exe" (PID:2064) 6616 03:37:36.905 Game binary version: v1.0 6616 03:37:36.905 Checking for Compatibility Settings! 6616 03:37:36.905 Environment variable __COMPAT_LAYER = "DetectorsShimLog" 6616 03:37:36.905 Checking if administrator access is required. 6616 03:37:36.905 Detected relaunch with administrator rights! 6616 03:37:36.921 Running from: "C:\Program Files (x86)\Konami\Silent Hill 2\sh2pc.exe" 6616 03:37:36.921 Config file: "C:\Program Files (x86)\Konami\Silent Hill 2\d3d8.ini" 6616 03:37:36.921 |----------- SETTINGS ----------- 6616 03:37:36.937 |- ScreenMode: 1 6616 03:37:36.937 |- WndModeBorder: 0 6616 03:37:36.937 |- DynamicResolution: 1 6616 03:37:36.937 |- WidescreenFix: 1 6616 03:37:36.937 |- d3d8to9: 1 6616 03:37:36.937 |- AdjustColorTemp: 1 6616 03:37:36.937 |- EnableSMAA: 0 6616 03:37:36.937 |- RestoreBrightnessSelector: 1 6616 03:37:36.937 |- DisableGameUX: 1 6616 03:37:36.937 |- FixGPUAntiAliasing: 1 6616 03:37:36.937 |- SingleCoreAffinity: 2 6616 03:37:36.937 |- AnisotropicFiltering: 1 6616 03:37:36.937 |- AutoUpdateModule: 1 6616 03:37:36.937 |- CheckCompatibilityMode: 1 6616 03:37:36.937 |- CheckForAdminAccess: 1 6616 03:37:36.937 |- DisableScreenSaver: 1 6616 03:37:36.937 |- NoCDPatch: 1 6616 03:37:36.937 |- UseCustomModFolder: 1 6616 03:37:36.937 |- DPadMovementFix: 1 6616 03:37:36.937 |- GamepadControlsFix: 1 6616 03:37:36.937 |- PadNumber: 0 6616 03:37:36.937 |- RestoreSearchCamMovement: 1 6616 03:37:36.937 |- RestoreVibration: 1 6616 03:37:36.937 |- Southpaw: 0 6616 03:37:36.937 |- DisableRedCrossInCutScenes: 1 6616 03:37:36.937 |- DisableRedCross: 0 6616 03:37:36.937 |- IncreaseNoiseEffectRes: 768 6616 03:37:36.937 |- DisableCutsceneBorders: 1 6616 03:37:36.937 |- FMVWidescreenMode: 1 6616 03:37:36.937 |- ReduceCutsceneFOV: 1 6616 03:37:36.937 |- MainMenuFix: 1 6616 03:37:36.937 |- MainMenuTitlePerLang: 1 6616 03:37:36.937 |- LockScreenPosition: 1 6616 03:37:36.937 |- LockSpeakerConfig: 1 6616 03:37:36.937 |- UnlockJapLang: 0 6616 03:37:36.937 |- UseBestGraphics: 1 6616 03:37:36.937 |- UseCustomExeStr: 1 6616 03:37:36.937 |- AudioClipDetection: 1 6616 03:37:36.937 |- CatacombsMeatRoomFix: 1 6616 03:37:36.937 |- ClosetCutsceneFix: 1 6616 03:37:36.937 |- CreateLocalFix: 1 6616 03:37:36.937 |- DisableHighDPIScaling: 1 6616 03:37:36.937 |- DisableSafeMode: 1 6616 03:37:36.937 |- EnableSFXAddrHack: 1 6616 03:37:36.937 |- EnableSoftShadows: 0 6616 03:37:36.937 |- EnableTexAddrHack: 1 6616 03:37:36.937 |- FastTransitions: 1 6616 03:37:36.937 |- Fix2D: 1 6616 03:37:36.937 |- FixAptClockFlashlight: 0 6616 03:37:36.937 |- FixChainsawSpawn: 1 6616 03:37:36.937 |- FixCreatureVehicleSpawn: 1 6616 03:37:36.937 |- FixDrawingTextLine: 1 6616 03:37:36.937 |- FixHangOnEsc: 1 6616 03:37:36.937 |- FixMemoFading: 1 6616 03:37:36.937 |- FixMissingWallChunks: 1 6616 03:37:36.937 |- FixSaveBGImage: 1 6616 03:37:36.937 |- FixTownWestGateEvent: 1 6616 03:37:36.937 |- FlashlightFlickerFix: 0 6616 03:37:36.937 |- FogFix: 1 6616 03:37:36.937 |- FogLayerFix: 0 6616 03:37:36.937 |- FogParameterFix: 1 6616 03:37:36.937 |- FogSpeedFix: 1 6616 03:37:36.937 |- GameLoadFix: 1 6616 03:37:36.937 |- HalogenLightFix: 1 6616 03:37:36.937 |- HospitalChaseFix: 1 6616 03:37:36.937 |- HotelWaterFix: 1 6616 03:37:36.937 |- ImproveStorageSupport: 1 6616 03:37:36.937 |- IncreaseBlood: 1 6616 03:37:36.937 |- IncreaseDrawDistance: 1 6616 03:37:36.937 |- LightingFix: 1 6616 03:37:36.937 |- LightingTransitionFix: 1 6616 03:37:36.937 |- PauseScreenFix: 1 6616 03:37:36.937 |- PistonRoomFix: 1 6616 03:37:36.937 |- PS2CameraSpeed: 1 6616 03:37:36.937 |- PS2FlashlightBrightness: 1 6616 03:37:36.937 |- PS2StyleNoiseFilter: 1 6616 03:37:36.937 |- RemoveEnvironmentFlicker: 1 6616 03:37:36.937 |- RemoveEffectsFlicker: 1 6616 03:37:36.937 |- RestoreSpecialFX: 1 6616 03:37:36.937 |- Room312ShadowFix: 1 6616 03:37:36.937 |- RoomLightingFix: 1 6616 03:37:36.937 |- RowboatAnimationFix: 1 6616 03:37:36.937 |- SetBlackPillarBoxes: 1 6616 03:37:36.937 |- SpecularFix: 1 6616 03:37:36.937 |- SteamCrashFix: 1 6616 03:37:36.937 |- UsePS2LowResTextures: 0 6616 03:37:36.937 |- WhiteShaderFix: 1 6616 03:37:36.937 |- WoodsideRoom205Fix: 1 6616 03:37:36.937 |- fog_transparency_layer1: 128 6616 03:37:36.937 |- fog_transparency_layer2: 112 6616 03:37:36.937 |- fog_layer1_x1: 0.250 6616 03:37:36.937 |- fog_layer1_x2: 0.250 6616 03:37:36.937 |- fog_layer1_y1: 0.125 6616 03:37:36.937 |- fog_layer1_y2: 0.125 6616 03:37:36.937 |- fog_layer2_density_mult: 1.4 6616 03:37:36.937 |- fog_layer2_density_add: 100.0 6616 03:37:36.937 |- fog_layer2_complexity: 0.055 6616 03:37:36.937 |- UseCustomFonts: 1 6616 03:37:36.937 |- DisableEnlargedText: 1 6616 03:37:36.937 |- CustomFontCol: 100 6616 03:37:36.937 |- CustomFontRow: 14 6616 03:37:36.937 |- CustomFontCharWidth: 20 6616 03:37:36.937 |- CustomFontCharHeight: 32 6616 03:37:36.937 |- LetterSpacing: 2 6616 03:37:36.937 |- NormalFontWidth: 20 6616 03:37:36.937 |- NormalFontHeight: 30 6616 03:37:36.937 |- SmallFontWidth: 16 6616 03:37:36.937 |- SmallFontHeight: 24 6616 03:37:36.937 |- SpaceSize: 7 6616 03:37:36.937 |- LoadPlugins: 0 6616 03:37:36.937 |- LoadFromScriptsOnly: 0 6616 03:37:36.937 |- LoadD3d8FromScriptsFolder: 0 6616 03:37:36.937 |-------------------------------- 6616 03:37:36.937 |- 6616 03:37:36.937 |- Directory of "C:\Program Files (x86)\Konami\Silent Hill 2" 6616 03:37:36.937 |- 6616 03:37:36.937 |- 05/05/2021 05:58 PM <DIR> data 6616 03:37:36.937 |- 05/05/2021 07:54 PM <DIR> sh2e 6616 03:37:36.937 |- 05/10/2021 12:50 AM <DIR> Temporary removed from root 6616 03:37:36.937 |- 11/01/2020 02:23 PM 237 alsoft.ini 6616 03:37:36.937 |- 06/25/2002 09:50 AM 358,963 binkw32.dll 6616 03:37:36.937 |- 05/10/2021 01:14 AM 24 cin.dat 6616 03:37:36.937 |- 03/16/2021 04:25 PM 4,155,392 d3d8.dll 6616 03:37:36.937 |- 05/10/2021 03:24 AM 15,662 d3d8.ini 6616 03:37:36.937 |- 05/10/2021 03:37 AM d3d8.log 6616 03:37:36.937 |- 02/27/2021 02:12 PM 3,218 d3d8.res 6616 03:37:36.937 |- 05/10/2021 03:37 AM 12,562 device.fix 6616 03:37:36.937 |- 11/01/2020 10:00 AM 1,944,590 dsoal-aldrv.dll 6616 03:37:36.937 |- 05/21/2019 07:12 PM 272,398 dsound.dll 6616 03:37:36.937 |- 05/10/2021 12:45 AM 504 keyconf.dat 6616 03:37:36.937 |- 07/25/2002 11:02 AM 77 Konami Homepage.url 6616 03:37:36.937 |- 05/10/2021 03:29 AM 26 language.ini 6616 03:37:36.937 |- 08/25/2019 08:02 PM 37 local.fix 6616 03:37:36.937 |- 01/05/2002 11:40 AM 487,424 msvcp70.dll 6616 03:37:36.937 |- 06/07/2001 12:14 PM 339,968 msvcr70.dll 6616 03:37:36.937 |- 05/10/2021 03:29 AM 290 options.ini 6616 03:37:36.937 |- 10/01/2002 09:33 PM 35,574 Readme.htm 6616 03:37:36.937 |- 10/01/2002 09:33 PM 16,083 Readme.txt 6616 03:37:36.937 |- 05/10/2021 03:29 AM 433 settings.ini 6616 03:37:36.937 |- 08/16/2002 03:44 PM 2,238 sh2.ico 6616 03:37:36.937 |- 09/30/2002 11:41 AM 71,078 sh2logo.jpg 6616 03:37:36.937 |- 05/05/2021 06:01 PM 5,459,968 sh2pc.exe 6616 03:37:36.937 |-------------------------------- 6616 03:37:36.937 Hooking the FileSystem APIs... 6616 03:37:36.937 Hook::HotPatch Error: 'GetModuleFileNameA' is not patch aware at addr=75993430 6616 03:37:36.937 Bytes in memory are: \x00\xCC\xCC\xCC\xCC\x8B\xFF\x55\x8B\xEC\x5D\x90 6616 03:37:36.937 Hook::HotPatch Error: 'GetModuleFileNameW' is not patch aware at addr=75993440 6616 03:37:36.937 Bytes in memory are: \x00\xCC\xCC\xCC\xCC\x8B\xFF\x55\x8B\xEC\x5D\x90 6616 03:37:36.937 Hook::HotPatch Error: 'CreateFileA' is not patch aware at addr=75991B10 6616 03:37:36.937 Bytes in memory are: \x00\xCC\xCC\xCC\xCC\x8B\xFF\x55\x8B\xEC\x5D\x90 6616 03:37:36.937 Hook::HotPatch Error: 'CreateFileW' is not patch aware at addr=75991B80 6616 03:37:36.937 Bytes in memory are: \x00\xCC\xCC\xCC\xCC\x8B\xFF\x55\x8B\xEC\x5D\x90 6616 03:37:36.937 Hook::HotPatch Error: 'FindFirstFileA' is not patch aware at addr=759925D0 6616 03:37:36.937 Bytes in memory are: \x00\xCC\xCC\xCC\xCC\x8B\xFF\x55\x8B\xEC\x5D\x90 6616 03:37:36.937 Hook::HotPatch Error: 'FindNextFileA' is not patch aware at addr=759926D0 6616 03:37:36.937 Bytes in memory are: \x00\xCC\xCC\xCC\xCC\x8B\xFF\x55\x8B\xEC\x5D\x90 6616 03:37:36.937 Hook::HotPatch Error: 'GetPrivateProfileStringA' is not patch aware at addr=759936F0 6616 03:37:36.937 Bytes in memory are: \x00\xCC\xCC\xCC\xCC\x8B\xFF\x55\x8B\xEC\x5D\x90 6616 03:37:36.937 Hook::HotPatch Error: 'GetPrivateProfileStringW' is not patch aware at addr=75993700 6616 03:37:36.937 Bytes in memory are: \x00\xCC\xCC\xCC\xCC\x8B\xFF\x55\x8B\xEC\x5D\x90 6616 03:37:36.937 FAILED to hook the FileSystem APIs, disabling 'UseCustomModFolder'! 6616 03:37:36.937 Hooking the CreateProcess APIs... 6616 03:37:36.937 Hook::HotPatch Error: 'CreateProcessA' is not patch aware at addr=75991CE0 6616 03:37:36.937 Bytes in memory are: \x00\xCC\xCC\xCC\xCC\x8B\xFF\x55\x8B\xEC\x5D\x90 6616 03:37:36.937 Hook::HotPatch Error: 'CreateProcessW' is not patch aware at addr=75991D30 6616 03:37:36.937 Bytes in memory are: \x00\xCC\xCC\xCC\xCC\x8B\xFF\x55\x8B\xEC\x5D\x90 6616 03:37:36.937 CD patch already set! 6616 03:37:36.937 Patching binary... 6616 03:37:36.937 Finding SFX file locations... 6616 03:37:36.968 Updating SFX memory address locations... 6616 03:37:36.968 Allocating memory buffer for sddata.bin file... 6616 03:37:36.984 Setting texture buffer size: 4194496 6616 03:37:37.000 Updating Texture memory address locations... 6616 03:37:37.000 Disabling High DPI Scaling... 6616 03:37:37.000 Disabling Screensaver... 6616 03:37:37.000 Setting 2TB hard disk Fix... 6616 03:37:37.000 Setting PS2 Style Noise Filter... 6616 03:37:37.000 Increasing the Draw Distance... 6616 03:37:37.000 Setting Room Lighting Fix... 6616 03:37:37.000 Fixing tree lighting conditions... 6616 03:37:37.000 Setting Rowboat Animation Fix... 6616 03:37:37.000 Updating the Catacomb Meat Cold Rooms color... 6616 03:37:37.000 Updating Fog Parameters... 6616 03:37:37.000 Setting Piston Position Fix... 6616 03:37:37.000 Setting Hotel Room 312 Shadow Flicker Fix... 6616 03:37:37.000 Hiding Red Cross health indicator during cutscenes... 6616 03:37:37.000 Enabling PS2 Flashlight Fix... 6616 03:37:37.000 Fixing behavior of Lying Figures that are hiding under vehicles... 6616 03:37:37.000 Add fix to prevent chainsaw from spawning on first playthrough... 6616 03:37:37.000 Fixing memo brightness... 6616 03:37:37.000 Setting Pause Menu Fix... 6616 03:37:37.000 Enabling XInput Vibration Fix... 6616 03:37:37.031 PatchCustomFonts Error: Could not find font file 6616 03:37:37.031 Enabling Custom Exe Strings... 6616 03:37:37.031 Enabling Main Menu title selection by language... 6616 03:37:37.031 Enabling post Processing Special FX... 6616 03:37:37.031 Enabling Town West Gate Event Fix... 6616 03:37:37.031 Enabling Screen Position option lock... 6616 03:37:37.031 Enabling Save Background Images Fix... 6616 03:37:37.031 Enabling Best Graphics settings... 6616 03:37:37.031 Enabling Speaker Config Lock... 6616 03:37:37.031 Enabling Fog Fix... 6616 03:37:37.031 Loading the "WidescreenFixesPack" module... 6616 03:37:37.173 Set map scaling! 6616 03:37:37.173 Set texture scaling! 6616 03:37:37.173 Enabling Dynamic Resolution... 6616 03:37:37.173 Silent Hill 2 Enhancements module loaded! 6616 03:37:37.186 Redirecting 'DirectInput8Create' ... 6616 03:37:37.296 Redirecting 'Direct3DCreate8' ... 6616 03:37:37.296 Starting D3d8to9 v1.11.0.0 6616 03:37:37.296 Redirecting 'Direct3DCreate8' to --> 'Direct3DCreate9' (220) 6616 03:37:37.296 Loading d3d9.dll 6616 03:37:37.312 Initializing crosire's ReShade version '4.5.3.797' (32-bit) built on '2020-10-03 01:58:54' loaded ... 6616 03:37:37.374 Loaded "d3dx9_43.dll" 6616 03:37:37.421 |---------- VIDEO CARD ---------- 6616 03:37:37.421 | m_IDirect3D8::CreateDevice Using video card: Parallels Display Adapter (WDDM) (0x344c5250) 6616 03:37:37.421 |-------------------------------- 6616 03:37:37.421 Setting resolution: 1920x1080 6616 03:37:37.421 Setting Hotel Room 312 Resolution Fix... 6616 03:37:37.468 Running on Parallels Display Adapter (WDDM) Driver 506.92 6616 03:37:37.468 Recreated runtime environment on runtime 10948718. 6616 03:37:37.468 m_IDirect3D8::CreateDevice Created device! 6616 03:37:37.468 Setting SingleCoreAffinity... 6616 03:37:37.703 m_IDirectInput8A::CreateDevice Created device! 6616 03:37:37.703 |----------- GAMEPADS ----------- 6616 03:37:37.703 |-------------------------------- 6616 03:37:37.718 Redirecting 'DirectSoundCreate8' ... 6616 03:37:38.105 m_IDirectSound8::CreateSoundBuffer Created buffer! 2084 03:37:38.205 Latest release build found: 1900 2084 03:37:38.205 Using release build version! 6616 03:37:39.325 Setting Hotel Water Fix... 6616 03:37:39.325 Setting RPT Apartment Closet Cutscene Fix... 6616 03:37:39.325 Setting RPT Hospital Elevator Animation Fix... 6616 03:37:39.325 Fixing Esc while transition is active... 6616 03:37:39.325 Setting infinite rumble window hook... 6616 03:37:39.325 Enabling Lighting Transition Fix... 6616 03:37:39.325 Enabling Load Game Fix... 6616 03:37:39.325 Enabling Blood Size Fix... 6616 03:37:39.325 Fixing the rotating Mannequin glitch... 6616 03:37:39.325 Setting Fog Speed Fix... 4312 03:37:39.741 Successfully loaded SMAA.fx 6856 03:37:39.744 Successfully loaded MinimalColorGrading.fx 8460 03:37:39.745 Successfully loaded LiftGammaGain.fx 6616 03:37:39.745 Disabling technique: SMAA 6616 03:37:39.745 Enabling technique: MinimalColorGrading 6616 03:37:39.745 Enabling technique: LiftGammaGain 6616 03:37:39.824 Loading image files for textures ... 6616 03:37:47.104 GetDiskSpace Available disk space smaller than 2TBs: 98428716 6616 03:38:07.670 Unhooking library functions 6616 03:38:07.670 Reenabling Screensaver... 6616 03:38:07.681 Unloading Silent Hill 2 Enhancements!

elishacloud commented 3 years ago

Next time, please attach your log as a file, rather than pasting it in here.

I suspect that the issue is here:

6616 03:37:36.937 Hook::HotPatch Error: 'GetPrivateProfileStringW' is not patch aware at addr=75993700
6616 03:37:36.937 Bytes in memory are: \x00\xCC\xCC\xCC\xCC\x8B\xFF\x55\x8B\xEC\x5D\x90
6616 03:37:36.937 FAILED to hook the FileSystem APIs, disabling 'UseCustomModFolder'!

I fixed this hooking issue in the latest dev build: d3d8.zip

aminta commented 3 years ago

Thanks @elishacloud , now all looks very good but sadly the flashlight still doesn't work..

d3d8.log

elishacloud commented 3 years ago

This may be an issue with your video card. You could try disabling the follow settings:

If that does not work, it could take more troubleshooting. I don't have a Mac (well, at least not one made in the past decade) so I cannot test this out.

aminta commented 3 years ago

This may be an issue with your video card. You could try disabling the follow settings:

  • d3d8to9
  • FixGPUAntiAliasing

If that does not work, it could take more troubleshooting. I don't have a Mac (well, at least not one made in the past decade) so I cannot test this out.

Thanks @elishacloud , I confirm that with new files and d3d8to9 set to 0 flashlight works! However, now all texts are disappeared... :-(

elishacloud commented 3 years ago

However, now all texts are disappeared...

Try disabling UseCustomFonts.

aminta commented 3 years ago

It worked, thanks! I hope in a future release we can use d3dto9 and custom fonts together with flashlight also in Mac M1, thanks for your great work!

aminta commented 3 years ago

@elishacloud only to tell that your last patch works perfectly on Crossover 20.0.4 for Mac M1, even with d3dto9 and custom fonts active!

mauricio-ricalde commented 2 years ago

Hi, I just wanted to share the state of Silent Hill 2 Enhanced Edition on Crossover 21.1 for the Mac. I posted here before as DonQuinto, but now I have a more permanent account 🙂

With my configuration, the game is not as perfect as @aminta reports. The pause screen looks completely black. I can't use DSOAL, or the sound goes nuts. Shaders doesn't work. Specularity enhancements doesn't work either. However, the game is playable and the flashlight works. Except for the enhancements I mentioned, all of the Enhanced Edition additions work just fine.

I haven't tried the game on Parallels... not only is the app very expensive, but I hate Windows 11, and for now it's the only option available 🤢 I think Crossover is the way to go for Mac users. It's not perfect, unfortunately, but I hope it's going to be better on time, as the Crossover team perfects their app.

I'm very excited for the next update with the AI-enhanced videos! Thanks for all your work!

mauricio-ricalde commented 2 years ago

I found a config guide on the Codeweavers forum. It doesn't solve the graphics issues on Crossover, but it does help with the sound problems. I'll leave it here, in case someone is interested: https://www.codeweavers.com/support/forums/general/?t=27;forumcurPos=0;msg=252353