kcat / dsoal

A DirectSound DLL replacer that enables surround sound, HRTF, and EAX support via OpenAL Soft
GNU Lesser General Public License v2.1
373 stars 49 forks source link

Windows 11 Support #34

Open MarioTainaka opened 2 years ago

MarioTainaka commented 2 years ago

Hello there, i'd like to report that neither DSOAL nor Creative Alchemy are working on Windows 11. Almost like dsound.dll isn't being loaded at all. I've already modified the registry with the following entries:

[HKEY_CURRENT_USER\Software\Classes\CLSID{47D4D946-62E8-11CF-93BC-444553540000}\InprocServer32] @="dsound.dll"

[HKEY_CURRENT_USER\Software\Classes\CLSID{3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}\InprocServer32] @="dsound.dll"

[HKEY_CURRENT_USER\Software\Classes\WOW6432Node\CLSID{47D4D946-62E8-11CF-93BC-444553540000}\InprocServer32] @="dsound.dll"

[HKEY_CURRENT_USER\Software\Classes\WOW6432Node\CLSID{3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}\InprocServer32] @="dsound.dll".

But these do nothing., neither does installing Alchemy. It would be great if you could look at adding Windows 11 support in the future.

Thank you!

Kappa971 commented 2 years ago

Hi, I also have Windows 11 and both Creative Alchemy 1.45.20 and DSOAL work (I have a Sound Blaster Z with the latest drivers), so there must be something wrong with your system.

deton24 commented 2 years ago

Did you actually add the game in Alchemy app instead of just dragging and dropping dsound.dll and ini? Somehow, it is recommended in the description here: https://www.youtube.com/watch?v=fY7i6X41T7U

I'm also curious whether it's possible to inject dsoal renaming dsound.dll to something else, but I doubt. The first when I'd start is: run the game, open Process Explorer>Properties>Threads and check for possible dll names.

Maybe you can also try out these solutions which may also work for DSOAL: https://www.indirectsound.com/registryIssues.html

MarioTainaka commented 2 years ago

Did you actually add the game in Alchemy app instead of just dragging and dropping dsound.dll and ini? Somehow, it is recommended in the description here: https://www.youtube.com/watch?v=fY7i6X41T7U

I'm also curious whether it's possible to inject dsoal renaming dsound.dll to something else, but I doubt. The first when I'd start is: run the game, open Process Explorer>Properties>Threads and check for possible dll names.

Maybe you can also try out these solutions which may also work for DSOAL: https://www.indirectsound.com/registryIssues.html

Yup that's the first thing I did. doesn't matter if you use registery settings or use the dir option. Usually on Windows 10 that would do it for me.

deton24 commented 2 years ago

ASUS card? Check out if it's not the case https://steamcommunity.com/app/21090/discussions/0/1739980540129531970/?l=turkish&ctp=2#c1643166649097084726

niedz., 26 gru 2021, 03:14 użytkownik MarioTainaka @.***> napisał:

Did you actually add the game in Alchemy app instead of just dragging and dropping dsound.dll and ini? Somehow, it is recommended in the description here: https://www.youtube.com/watch?v=fY7i6X41T7U

I'm also curious whether it's possible to inject dsoal renaming dsound.dll to something else, but I doubt. The first when I'd start is: run the game, open Process Explorer>Properties>Threads and check for possible dll names.

Maybe you can also try out these solutions which may also work for DSOAL: https://www.indirectsound.com/registryIssues.html

Yup that's the first thing I did. doesn't matter if you use registery settings or use the dir option. Usually on Windows 10 that would do it for me.

— Reply to this email directly, view it on GitHub https://github.com/kcat/dsoal/issues/34#issuecomment-1001094996, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIJ3EHEGVWHBLEJSA3C2PQTUSZ3BZANCNFSM5J3JSD2Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

Kappa971 commented 2 years ago

What sound card do you have? As mentioned, I have a Sound Blaster Z with Windows 11 and ALchemy (and DSOAL) works. I would try to reinstall the drivers.

MarioTainaka commented 2 years ago

Realtek

What sound card do you have? As mentioned, I have a Sound Blaster Z with Windows 11 and ALchemy (and DSOAL) works. I would try to reinstall the drivers.

Realtek HD Audio still. On the same setting with Windows 10 installed the above steps just work.

deton24 commented 2 years ago

Probably I'm just running out of ideas, but maybe try different drivers.

  1. These attached on your motherboard vendor site
  2. These from Realtek site
  3. Assuming you have just automatically installed by Windows (generic HD Audio?)

You can still wipe out your current drivers using DDU I suppose.

mirh commented 2 years ago

Drivers have nothing to do with directsound. https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order#standard-search-order-for-desktop-applications Try to check if safe dll search mode is disabled.

deton24 commented 2 years ago

JFYI, out of curiosity, I tried two alternative methods of injecting DSOAL, but to no avail:

kcat commented 2 years ago

proxy via DXwrapper (dxwrapper.ini>LoadCustomDllPath) (logs shows dsoal is injected but there's no HRTF applied)

Whether or not HRTF is applied depends on OpenAL Soft enabling it. And it only does that if the output device is reported as Stereo Headphones or Headset, and the DLL is built with the HRTF data set built-in (which it is for normal builds). And it wasn't disabled in OpenAL Soft's config file. DSOAL isn't strictly about enabling HRTF for DSound, it's about using OpenAL and its capabilities for DSound. This can be for HRTF, but it can also be for normal speakers (including surround sound, and limited with-height setups through 3D7.1, this hopefully expanding in the future to proper with-height setups), or UHJ for having a surround sound mix in stereo, as well as using EFX to implement EAX.

MarioTainaka commented 2 years ago

JFYI, out of curiosity, I tried two alternative methods of injecting DSOAL, but to no avail:

  • proxy via DXwrapper (dxwrapper.ini>LoadCustomDllPath) (logs shows dsoal is injected but there's no HRTF applied)
  • Simple DLL Loader - fork of ASI Loader (still nothing)
  • enbinjector (only works with ENB)

I'll try all these methods within the week.

If I use creative alchemy for example the log files do show that the dll is being loaded..

Kappa971 commented 2 years ago

You're running Windows 11, that's not the problem. Not even Realtek drivers. You don't have a Sound Blaster so you are probably using an "unlocked" version of ALchemy, maybe it doesn't work. DSOAL should work though. Where did you download DSOAL? How are you installing it? Which game do you want to use with it? As pointed out by @deton24, you can use Process Explorer (https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer) to check if dsound.dll is loaded by the game. You can have DSOAL create a log file when the game starts, to see if there are any errors (play only a few minutes because the file can get very large). To the Windows environment variables you need to add: DSOAL_LOGLEVEL=3 DSOAL_LOGFILE=dsoal_log.txt

I think you can set DSOAL_LOGLEVEL=1 to view errors only.

MarioTainaka commented 2 years ago

You're running Windows 11, that's not the problem. Not even Realtek drivers. You don't have a Sound Blaster so you are probably using an "unlocked" version of ALchemy, maybe it doesn't work. DSOAL should work though. Where did you download DSOAL? How are you installing it? Which game do you want to use with it? As pointed out by @deton24, you can use Process Explorer (https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer) to check if dsound.dll is loaded by the game. You can have DSOAL create a log file when the game starts, to see if there are any errors (play only a few minutes because the file can get very large). To the Windows environment variables you need to add: DSOAL_LOGLEVEL=3 DSOAL_LOGFILE=dsoal_log.txt

I think you can set DSOAL_LOGLEVEL=1 to view errors only.

That's the issue DSOAL does NOT work at all. I can't even select EAX. The game I usually use to test to see if everything is working is Prince Of Persia The Two Thrones.

I usually grab it from moddb.

deton24 commented 2 years ago

I completely understand, kcat. It was oversimplification. Of course, I also attached normally working dsoal-aldrv.dll and alsoft.ini with HRTF set with parameters you mention (and HRTF worked when dsound.dll was injected directly from root directory by placing the library near the game's executable, just not when set as a dxwrapper proxy from other location or renamed).

Kappa971 commented 2 years ago

That's the issue DSOAL does NOT work at all. I can't even select EAX. The game I usually use to test to see if everything is working is Prince Of Persia The Two Thrones.

I usually grab it from moddb.

Try downloading it from here: http://vaporeon.io/hosted/dsoal-builds/

As already mentioned, make sure that a log file is created.

ThreeDeeJay commented 2 years ago

That's the issue DSOAL does NOT work at all. I can't even select EAX. The game I usually use to test to see if everything is working is Prince Of Persia The Two Thrones. I usually grab it from moddb.

Try downloading it from here: http://vaporeon.io/hosted/dsoal-builds/

As already mentioned, make sure that a log file is created.

Just tried the dsoal-latest.7z with this alsoft.ini and HRTF works in RightMark 3D Sound, but EAX options are greyed out whether [eax]enable is set to true or false. Running on a Windows 11 virtual machine fresh install (no registry edits): https://i.imgur.com/RxVvwue.mp4

mirh commented 2 years ago

Remind me again why you'd be supposed to edit CLSIDs sometimes?

Kappa971 commented 2 years ago

You need to add the following registry keys: CURRENT_USER - Add dsound.zip This is DSOAL + OpenAL Soft compiled from source DSOAL.zip, EAX runs on Windows 11 (also on build 22621 which will be released in October) so this issue should be closed to avoid confusion.

ThreeDeeJay commented 2 years ago

Beginning with Windows 8 some games won't use IndirectSound even if the dsound.dll is in the correct location. To fix this the Windows registry must be changed. (Some Windows updates may also make it necessary to repeat these changes.)

(One way that games can use DirectSound is to ask Windows for an interface to it by specifying the CLSID. In Windows 8 or later if a game does this Windows will always give an interface to the official Microsoft version of DirectSound. By making these registry changes you are telling Windows to first look for dsound.dll in the same directory that the game is in before it looks for the official Microsoft version.)

@mirh You mean this? It's in the page you linked. Unless you're asking why only some games do it. Maybe it depends on how games call DirectSound, idk. Perhaps @kcat knows and more importantly, if this could be bypassed on DSOAL's end so people don't have to do it manually, especially if Windows updates constantly reset it.

@Kappa971 I'm working on a script to update all relevant registry keys, but just noticed we also need to take ownership of some registry keys even if we're on the current administrator account, which is even less user-friendly than merging a key, let alone adding it manually. On the bright side, I found a tool that allows taking ownership programmatically so I'll add it to the script.

Kappa971 commented 2 years ago

@ThreeDeeJay, I don't think you need a script, just run the .reg file I put in the link and it should work.

mirh commented 2 years ago

Unless you're asking why only some games do it. Maybe it depends on how games call DirectSound, idk.

I'm missing out what other factor exists other than just the normal dll loading order, yes.

ThreeDeeJay commented 2 years ago

There is a good chance that if you try to edit this value Windows will show an error message and refuse to accept the change. If this happens it is probably because your account doesn't have the permission required to change the registry key. If you search the internet you can discover how to change the key's permissions.

@Kappa971 I think if the game is run as administrator (many old games require it), it might use one of the protected registry keys, which require manually taking ownership before adding/editing it, as explained above. Otherwise, it'll probably just use the system dsound.dll, thus ignoring DSOAL, unless maybe you replace the system one with DSOAL, which IIRC is not recommended. Simply merging registry key doesn't actually update the protected ones because by default, only the SYSTEM/TrustedInstaller "users" can make modifications: image vmplayer_LN27tqIT7D

Kappa971 commented 2 years ago

Ok so for games that don't require to be run as administrator my .reg works. What games require to be run as an administrator? I have tried several games: Max Payne, GTA 3, Vice City, San Andreas, Far Cry, Unreal Gold, Splinter Cell, they seem to work without being run as an administrator (I only use d3d8to9 in Ultimate ASI Loader or Dgvoodoo2 and Widescreen patches). Maybe I'm lucky? 😁

ThreeDeeJay commented 2 years ago

@mirh Other than what I've mentioned, I've got no clue so that's probably a question for kcat.

@Kappa971 IIRC Splinter Cell Pandora Tomorrow requires running as admin for it to load the .ini (where we can force EAX) from the regular folder instead of the VirtualStore one which can confuse people. But generally running as admin can solve compatibility issues with XP-era games when there was no UAC.

Anyhow, this should hopefully fix registry-related DSOAL issues on Windows 11 (or previous versions for that matter) Register dsound.dll.zip vmplayer_hHKSrG2R8y I'm still not sure why EAX options are still greyed out in RightMark 3DSound Positioning Accuracy test on Windows 11 🤔

Kappa971 commented 2 years ago

@Kappa971 IIRC Splinter Cell Pandora Tomorrow requires running as admin for it to load the .ini (where we can force EAX) from the regular folder instead of the VirtualStore one which can confuse people. But generally running as admin can solve compatibility issues with XP-era games when there was no UAC.

Anyhow, this should hopefully fix registry-related DSOAL issues on Windows 11 (or previous versions for that matter) Register dsound.dll.zip

I'm still not sure why EAX options are still greyed out in RightMark 3DSound Positioning Accuracy test on Windows 11 thinking

I think I tried Splinter Cell Pandora Tomorrow and it worked even without being run as administrator. However, I have found a game that needs to run in Windows XP SP2 compatibility mode, which automatically runs the game as administrator: Mafia 1. When run as administrator (or Win XP SP2), DSOAL doesn't work, so this is definitely one of the cases you described. Therefore, the keys in HKEY_LOCAL_MACHINE must also be changed. I would like to know what SetACL32.exe and SetACL64.exe do. Isn't a batch script running as administrator enough to change the keys in HKEY_LOCAL_MACHINE? (reg add etc...).

EDIT It appears that SetACL32.exe and SetACL64.exe are changing permissions to allow modification of registry keys in HKEY_LOCAL_MACHINE, right? Did you write these programs yourself?

mirh commented 2 years ago

Mafia has a shim in W10. Maybe even the other odd games have the compatibility engine to disturb them? mafia

Kappa971 commented 2 years ago

So, SetACL is a utility that you can download from the internet. Here is a detailed guide that helped me understand: https://www.askvg.com/windows-tip-take-ownership-permission-of-registry-keys-from-command-line/.

Other keys are indicated on the Indirectsound website:

 There are additional CLSIDs used to create other DirectSound interfaces. IndirectSound does not currently implement these interfaces, but they are listed here for completeness:

    {B0210780-89CD-11D0-AF08-00A0C925CD16} (DirectSoundCapture Object)
    {E4BCAC13-7F99-4908-9A8E-74E3BF24B6E1} (DirectSoundCapture 8.0 Object)
    {FEA4300C-7959-4147-B26A-2377B9E7A91D} (DirectSoundFullDuplex Object)
    {11AB3EC0-25EC-11D1-A4D8-00C04FC28ACA} (CLSID_DirectSoundPrivate)
        (This last one will likely not be listed in the registry)

but I don't know if they are needed for DSOAL.

However, I wonder what approach Creative Alchemy took to work.

ThreeDeeJay commented 2 years ago

Yeah, SetACL is what I used to modify registry key ownership so people don't have to do it themselves since there's no batch command to do it programmatically AFAIK. I didn't program SetACL myself (just the .bat), but I got permission to redistribute it.

And yeah, XP compatibility mode (also required for many old games) also runs as administrator so those games are probably affected as well.

I also wonder if compatibility mode makes DirectSound calls behave differently. I usually run XP games with the respective compatibility mode when suggested for other compatibility reasons but I'm yet to notice DSOAL behaving differently with and without it.

mirh commented 2 years ago

Aaand there you have it. https://lbvenkatesh.wordpress.com/2011/09/18/how-does-a-com-dll-get-loaded/ https://www.vogons.org/viewtopic.php?t=39499&start=320#p692601

Also, idk what's confusing about virtualstore. If the game tries to write to a path outside its privileges, it's already a miracle that microsoft has a mechanism for the thing to still more or less work somehow. If you want the "proper handling" either launch it with admin privileges like it always assumed, or have its folder be unprivileged (or I guess there are also fixes for games to write to the documents folder, but I digress).

Kappa971 commented 2 years ago

Anyway I confirm that by modifying the keys in HKEY_LOCAL_MACHINE, DSOAL also works by running Mafia as administrator.

However, the title of this issue should be changed as it refers to versions of Windows from Vista and later.

Kappa971 commented 2 years ago

Aaand there you have it. https://lbvenkatesh.wordpress.com/2011/09/18/how-does-a-com-dll-get-loaded/ https://www.vogons.org/viewtopic.php?t=39499&start=320#p692601

Also, idk what's confusing about virtualstore. If the game tries to write to a path outside its privileges, it's already a miracle that microsoft has a mechanism for the thing to still more or less work somehow. If you want the "proper handling" either launch it with admin privileges like it always assumed, or have its folder be unprivileged (or I guess there are also fixes for games to write to the documents folder, but I digress).

So the keys to be changed are these:

HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}
HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{47D4D946-62E8-11CF-93BC-444553540000}
HKEY_LOCAL_MACHINE\Software\Classes\WOW6432Node\CLSID\{3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}
HKEY_LOCAL_MACHINE\Software\Classes\WOW6432Node\CLSID\{47D4D946-62E8-11CF-93BC-444553540000}

HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{B0210780-89CD-11d0-AF08-00A0C925CD16}
HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{B2F586D4-5558-49D1-A07B-3249DBBB33C2}
HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{E4BCAC13-7F99-4908-9A8E-74E3BF24B6E1}
HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{FEA4300C-7959-4147-B26A-2377B9E7A91D}
HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{11AB3EC0-25EC-11D1-A4D8-00C04FC28ACA}
HKEY_LOCAL_MACHINE\Software\Classes\WOW6432Node\CLSID\{B0210780-89CD-11d0-AF08-00A0C925CD16}
HKEY_LOCAL_MACHINE\Software\Classes\WOW6432Node\CLSID\{B2F586D4-5558-49D1-A07B-3249DBBB33C2}
HKEY_LOCAL_MACHINE\Software\Classes\WOW6432Node\CLSID\{E4BCAC13-7F99-4908-9A8E-74E3BF24B6E1}
HKEY_LOCAL_MACHINE\Software\Classes\WOW6432Node\CLSID\{FEA4300C-7959-4147-B26A-2377B9E7A91D}
HKEY_LOCAL_MACHINE\Software\Classes\WOW6432Node\CLSID\{11AB3EC0-25EC-11D1-A4D8-00C04FC28ACA}

Running the games as an administrator, so you don't need to change the keys in HKEY_CURRENT_USER (I think). Also, these keys aren't present by default.

EDIT This is a very simple batch (it's not as sophisticated as @ThreeDeeJay's 😅) that changes all the necessary registry keys: ScriptDSOAL.zip

mirh commented 2 years ago

However, the title of this issue should be changed as it refers to versions of Windows from Vista and later.

I don't remember anybody having problems before 8/10. And according to OP 11 should have had other changes too.

But even with all of this premised, something is still eluding me. I just checked those keys in W7 (or at least its iso, at sources\install.wim\1\Windows\System32\config\SOFTWARE). They have the same values/paths. Was it just perhaps that in the past, if you were shrewd enough to know, test and report indirectsound/dsoal.. chances are you had also installed alchemy in your past, thus automagically fixing those keys unbeknownst to you?

https://docs.microsoft.com/en-us/windows/win32/sysinfo/hkey-classes-root-key Btw take note that it's only with non-UAC-aware apps run as administrator that the HCU hive doesn't work.

ThreeDeeJay commented 2 years ago

Also, idk what's confusing about virtualstore. If the game tries to write to a path outside its privileges, it's already a miracle that microsoft has a mechanism for the thing to still more or less work somehow.

@mirh In the case of Pandora Tomorrow, DSOAL works but EAX requires manually forcing via C:\Program Files (x86)\Ubisoft\Splinter Cell Pandora Tomorrow\offline\system\SplinterCell2User.ini (same folder as the .exe), but if the game's not run as admin, it'll instead use %LOCALAPPDATA%\VirtualStore\Program Files (x86)\Ubisoft\Splinter Cell Pandora Tomorrow\offline\system\SplinterCell2User.ini. The confusing part is that (for someone who doesn't know about VirtualStore), editing the wrong SplinterCell2User.ini won't work and AFAIK there's no explicit warning about the game using VirtualStore or where it's located, other than PCGamingWiki footer notes, which is how I found out about VS to begin with lol

Anyhow, good! I'll add missing registry keys to my script, if any. I already have a Windows 11 fresh install VM backup I can quickly restore to test DSOAL and will try to monitor ALchemy's actions with Process Monitor to see what else it's doing. 🤔

mirh commented 2 years ago

And why does SCPT require manual forcing? You would think developers would test at least once settings? Let alone this was sponsored by creative too. It's either some implementation quirk (like good old official openal router being biased for creative hardware) or game bug. Likely the later.

ThreeDeeJay commented 2 years ago

@mirh I'm not sure what the reason is, but I just tested again with the SCPT demo on Windows 11 fresh VM and the EAX option is still greyed with just DSOAL. So to make it work, I also have to also force EAX in the INI, run as administrator and click Reset for the EAX option to activate. https://youtu.be/GPdQEZ-vwQ0

P.S.: I didn't need registry tweaks and according to my old notes here, this also happens with ALchemy: https://airtable.com/shrtTsUtiAJQ7wFGI/tblNOTdmp5nHXfFGU/viwjDPuKOjBnIQunv/recWL0EpYoIdRrDMk

Kappa971 commented 2 years ago

With the full version of Splinter Cell Pandora Tomorrow I have no problems: Splinter Cell  Pandora Tomorrow Screenshot 2022 05 26 - 21 25 49 96 Immagine 2022-05-26 212731 However, my installation path is not in C:

You can find the full version on Archive.org (As far as I'm concerned, games older than 15 years should be free).

ThreeDeeJay commented 2 years ago

games older than 15 years should be free

lol tell that to Nintendo and CoD publishers But anyhow, I'll keep the method I used just in case, cuz I found it when helping someone (who I assume was using the full version) get it working and it did. I can't be too sure till I figure out the cause for this behavior.

P.S.: Just tested the demo in Windows XP and:

Kappa971 commented 2 years ago

It's weird, but I've never had any problems with SCPT. Alchemy also worked (although it suffered from some bugs, for example the audio that crashed in the first level).

mirh commented 2 years ago

Or you can blame the game for being overly sensitive. And it may be version 1.31, demo and gog have some different assumption. Anyhow, this seems worth its own bug to be investigated.

Back in topic, should we just assume @MarioTainaka had problems because of missing the HKLM keys?

Kappa971 commented 2 years ago

Or you can blame the game for being overly sensitive. And it may be version 1.31, demo and gog have some different assumption. Anyhow, this seems worth its own bug to be investigated.

I only installed the 1.31 patch if I remember correctly (and the no-cd). The multiplayer mode doesn't start, only the single player mode works. I was wondering if patch 1.31 is cumulative...

Back in topic, should we just assume @MarioTainaka had problems because of missing the HKLM keys?

Probably... Maybe he just added the keys in HKEY_CURRENT_USER and he was running the game as administrator = as we found out, DSOAL just doesn't work. Also if you run the games as administrator or in Windows XP compatibility mode, I found that you don't need to add the keys in HKEY_CURRENT_USER, the ones in HKEY_LOCAL_MACHINE are enough.

ThreeDeeJay commented 2 years ago

should we just assume @MarioTainaka had problems because of missing the HKLM keys?

@mirh On a fresh windows 11 install, the HKEY_CURRENT_USER keys from here are missing. Only the keys in the alternative method section (HKEY_LOCAL_MACHINE) and all these are present. image So the HKLM keys are probably not missing, but they might lack the edits required to load dsound.dll/DSOAL and according to the OP, only HKCU were edited so perhaps @MarioTainaka just needs to follow the alternate method guide like Kappa971 suggested.

Alternatively, someone could try Prince Of Persia The Two Thrones (the game they mentioned having issues with) on Windows 11. I own the game but it refuses to recognize the virtual machine emulated GPU, even with dgvoodoo.

mirh commented 2 years ago

I only installed the 1.31 patch if I remember correctly (and the no-cd).

Now it's your job to try to break it :) Demo? Rtm? Perhaps you could even try the official exe with daemon/alchol and forcing back the old safedisc driver.

he was running the game as administrator

*old game as administrator. You should be able to see if windows is happy about the application manifest or not, by checking the "UAC virtualization" column in the task manager.

I found that you don't need to add the keys in HKEY_CURRENT_USER, the ones in HKEY_LOCAL_MACHINE are enough.

That's what my msdn link foreshadowed too..

So the HKLM keys are probably not missing, but they might lack the edits

Yes that's what I meant.

On a fresh windows 11 install, the HKEY_CURRENT_USER keys from here are missing.

I'm kinda wondering if those weren't just made up by jonpol in order not to require users overconvoluted ACL tinkering. https://www.vogons.org/viewtopic.php?f=8&t=36870&start=40#p631525 I guess I was too busy trying to soften him on remaking the wrapper based around openal, to pay attention to those details.

There's still this thing about absolute paths also being present in W7 that eludes me though. @UCyborg

ThreeDeeJay commented 2 years ago

@mirh @Kappa971 While updating my script, I noticed HKEY_CURRENT_USER edits are immediately and automatically forwarded to HKEY_CLASSES_ROOT, which is what ALchemy modifies, according to this, unless it just modifies HKCU and they just noticed the changes on HKCR or something like that. vmplayer_rqZZJkuGpl

So here's the updated script, now it includes every single CLSID from here and here and it creates a backup .reg to easily restore all modifications made by the tool.

DirectSound wrapper registry patcher v1.0.zip

ThreeDeeJay commented 2 years ago

Eureka! Turns out Prince of Persia: The Two Thrones has 2 issues:

@MarioTainaka So just extract this to the game folder and run the patcher from my previous message and you should be good to go. POPT2T-DSOAL.zip You probably just need the dsound.dll but I included the config (alsoft.ini), OpenAL Soft (dsoal-aldrv.dll) and EAX Unified v4 (eax.dll) cuz why not. https://youtu.be/qN9EX33mcYU

mirh commented 2 years ago

I noticed HKEY_CURRENT_USER edits are immediately and automatically forwarded to HKEY_CLASSES_ROOT, which is what ALchemy modifies, unless it just modifies HKCU and they just noticed the changes on HKCR or something like that.

Well, yeah. It's the merged view for a reason. Could be it was creative the first one to just touch HCU, because they didn't want to bother too much with complexity (by the time 8 released alchemy was already on life support anyway)?

So here's the updated script, now it includes every single CLSID from here and here and it creates a backup .reg to easily restore all modifications made by the tool.

I mean, you could as well just search for "dsound.dll" and see what else is left. P.s. regini.exe is a built-in command that you could use to avoid shipping an extra executable

Kappa971 commented 2 years ago

P.s. regini.exe is a built-in command that you could use to avoid shipping an extra executable

Regini.exe can't change the owner of the registry key, so it will not be able to set full control to "administrator".

Latest DSOAL has broken EAX (similar to Hitman except it's just unselectable, can be fixed by using DSOAL 1.0.27 instead of 1.0.28.

The latest version of DSOAL works perfectly, you have to use the latest version of OpenAL Soft (which added EAX extensions that the new version of DSOAL uses). You can download the package I shared above: https://github.com/kcat/dsoal/issues/34#issuecomment-1137627560

EDIT

@mirh @Kappa971 While updating my script, I noticed HKEY_CURRENT_USER edits are immediately and automatically forwarded to HKEY_CLASSES_ROOT, which is what ALchemy modifies

The keys in HKEY_CURRENT_USER don't exist by default. I have only changed the keys in HKEY_LOCAL_MACHINE and these seem to change those in HKEY_CLASSES_ROOT as well.

mirh commented 2 years ago

Regini.exe can't change the owner of the registry key, so it will not be able to set full control to "administrator".

Mhh, I see, right. So you either find some magic to launch the batch file with the trustedinstaller account, or you have to somehow change ownership (I think powershell has a command for that, but personally I hate it). ... What about this? (here if you don't want to register)

The keys in HKEY_CURRENT_USER don't exist by default. I have only changed the keys in HKEY_LOCAL_MACHINE and these seem to change those in HKEY_CLASSES_ROOT as well.

And the keys in HKLM also change HKEY_CLASSES_ROOT, again see documentation. Actually, try to avoid altogether referring and using HKCR references since they are ambiguous.

Kappa971 commented 2 years ago

What about this? (here if you don't want to register)

Too complex for me, I prefer SetACL 😅

And the keys in HKLM also change HKEY_CLASSES_ROOT, again see documentation.

That's what I said.

Actually, try to avoid altogether referring and using HKCR references since they are ambiguous.

In fact I'm only changing the keys in HKEY_LOCAL_MACHINE.

ThreeDeeJay commented 2 years ago

The latest version of DSOAL works perfectly, you have to use the latest version of OpenAL Soft (which added EAX extensions that the new version of DSOAL uses). You can download the package I shared above: https://github.com/kcat/dsoal/issues/34#issuecomment-1137627560

@Kappa971 I did use the latest version of OpenAL Soft from AppVeyor as of last night, but I've narrowed down the issue. My alsoft.ini is basically alsoftrc.sample with a few tweaks like HRTF forced on, but the problem seems to be the sends flag. By default it's set to 6, but I also tried values down to 0 and EAX would still be unselectable in PoP:T2T. Removing the line altogether makes EAX selectable again, not a clue why. https://youtu.be/BsQPvPwTjgQ

@kcat might wanna look into it. Here are the logs of a run with sends=6 (EAX unselectable) in Prince of Persia: The Two Thrones: dsoal_error.txt - alsoft_error.txt

The keys in HKEY_CURRENT_USER don't exist by default. I have only changed the keys in HKEY_LOCAL_MACHINE and these seem to change those in HKEY_CLASSES_ROOT as well.

And the keys in HKLM also change HKEY_CLASSES_ROOT, again see documentation. Actually, try to avoid altogether referring and using HKCR references since they are ambiguous.

Yeah, I think modifying HKCU changes HKCR, but if HKCU is deleted, HKCR will use HKLM values, which seem to act as the stock/default backup. Don't quote me on that tho.

What about this? (here if you don't want to register)

Good find, but it screams unoptimized/hardcoded spaghetti code, and that's coming from me lol If I ever find issues with SetACL, I might give it a chance, tho. 👍

Kappa971 commented 2 years ago

@Kappa971 I did use the latest version of OpenAL Soft from AppVeyor as of last night, but I've narrowed down the issue. My alsoft.ini is basically alsoftrc.sample with a few tweaks like HRTF forced on, but the problem seems to be the sends flag. By default it's set to 6, but I also tried values down to 0 and EAX would still be unselectable in PoP:T2T. Removing the line altogether makes EAX selectable again, not a clue why. https://youtu.be/BsQPvPwTjgQ

@kcat might wanna look into it. Here are the logs of a run with sends=6 (EAX unselectable) in Prince of Persia: The Two Thrones: dsoal_error.txt - alsoft_error.txt

This could also explain the problems you had with SCPT. What exactly does sends=6 do?

Yeah, I think modifying HKCU changes HKCR, but if HKCU is deleted, HKCR will use HKLM values, which seem to act as the stock/default backup. Don't quote me on that tho.

According to my research: HKEY_CURRENT_USER Contains configuration information for the user profile. HKEY_LOCAL_MACHINE Contains computer-specific configuration information (so the registry keys present here are valid for all system users). HKEY_CLASSES_ROOT merges HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE for programs designed for older versions of Windows.

So if you are running a game as administrator, maybe the game "checks" HKEY_LOCAL_MACHINE because you are not using the user profile but the administrator one.

game (user profile) --> HKCU (or HKLM if it can't find the key in HKCU) game (as administrator) --> HKLM This is what I understand. If this is proved, it would be enough to change only the keys in HKLM. In HKCU they don't exist by default so the game would always look at HKLM whether you run it normally or as administrator.