Skip to content

Emulate old Steam.dll library (experimental)#315

Merged
Detanup01 merged 5 commits intoDetanup01:devfrom
otavepto:patch/lib-sold
Aug 21, 2025
Merged

Emulate old Steam.dll library (experimental)#315
Detanup01 merged 5 commits intoDetanup01:devfrom
otavepto:patch/lib-sold

Conversation

@otavepto
Copy link
Contributor

@otavepto otavepto commented Aug 1, 2025

Mainly to bypass checks in older games.

@UroshUchiha
Copy link

I just tested it on Ricochet Infinity and Ricochet Lost Worlds, works perfectly fine!
It, however, doesn't work on Plants Vs Zombies, Zuma dilogy and Peggle trilogy of games on Steam.
Including this file does work when added to extra_dlls directory for those games though. Don't remember where I got that .dll from but I've had it for a while on my external HDD. Could those two be merged?
steam.zip

@LuKeSt0rm
Copy link

Steam.dll is an original from a very old Steam installation (version).
You can also simply take a newer one from your Steam installation.

@otavepto
Copy link
Contributor Author

otavepto commented Aug 1, 2025

As mentioned in the new readme file for this stub dll, you should be able to inject it alongside the extra dll
I assume this is what you did already by placing it in the usual extra_dlls folder.

No need to merge these 2 dll files and complicate the code further.
In case you're interested why it wasn't implemented as part of the other dll is:

  • It doesn't really patch anything like the other dll, this just sends a positive reponse to the game (basic emulation)
  • It is standalone in its operation, it doesn't need an injector like the extra dll
  • It could be extended later on, to become a fully fledged emulator for that old library, hence no need to merge it with the extra dll

@UroshUchiha
Copy link

I see, so the proper way to use these is to place them where the games executable is, not inside of the extra_dlls directory. Fair enough. Thank you, as always, for providing these fixes and updates!
Would be lovely to have everything under a single umbrella for these old games, but as you said maybe it'll be expanded later on.

@otavepto
Copy link
Contributor Author

otavepto commented Aug 1, 2025

Hmmmmm you should be able to place it inside extra_dlls folder, that's what I did during testing, and let ColdClientLoader inject both dlls (steam_extra.dll + the new Steam.dll).
It supports both: being a standalone dll, and a dll used in injection.

Did that not work in your tests? If so just let me know the appid only.

@UroshUchiha
Copy link

Here's what I did, downloaded Plants Vs Zombies from Steam (AppID 3590), added ColdClientLoader to it, put the new Steam.dll that I got from here into extra_dlls directory and enabled it in ColdClientLoader.ini. Ran steamclient_loader_x32.exe and got "Unable to load Steam.dll" error. Naturally since it's an old game, using steamclient_extra_x32/64.dll does nothing.

Then I added the old steam.dll that I had, but I also tried the new from directly from my Steam installation directory like LuKeSt0rm suggested, replaced the Steam.dll from here inside of extra_dlls since they share the same name. Ran steamclient_loader_x32.exe and it worked.

Adding the games executable just in case. I also tried this with Zuma Deluxe (AppID 3330), Zuma's Revenge (AppID 3620), Peggle Deluxe (AppID 3480), Peggle Extreme (AppID 3483) and Peggle Nights (AppID 3540). Those are the games I specifically remember that require me to use the old steam.dll in order for them to work.
PlantsVsZombies.zip

@otavepto
Copy link
Contributor Author

otavepto commented Aug 1, 2025

Thanks @LuKeSt0rm and @UroshUchiha for your input, I definitely completely misunderstood the purpose of that old library, it seems more or less an older alternative/proxy to the steamclient.

I did this:

  • Place the original Steam.dll beside the .exe
  • Set ForceInjectSteamClient=1 in cold client loader ini file
  • Launch the game via cold client loader

The original Steam.dll seems to always call functions from steamclient.dll, I assumed it had more functionality, so this PR was a total waste of time 😄

I'll close this for now, sorry for the confusion/waste of time.

@otavepto otavepto closed this Aug 1, 2025
@GogoVang
Copy link
Contributor

GogoVang commented Aug 1, 2025

this PR was a total waste of time 😄

It totally wasn't, as @UroshUchiha mentioned - it works with apps 7450 and 7400. From my testing, app 7450 can only be played using this PR. It could potentially benefit other older games as well, we just haven’t tested enough yet. So I humbly ask you to consider reopening it.

@UroshUchiha
Copy link

Actually 7450 can be played if you use ForceInjectSteamClient=1 and put steam.dll from the legit steam directory either where the games executable is or where ColdClientLoader.ini is. I wasn't aware of that "option". But I do prefer the extra_dlls option more.

@LuKeSt0rm
Copy link

LuKeSt0rm commented Aug 1, 2025

@otavepto
It wasn't a waste of time. Games such as Call of Duty 1 and 2 (Steam version) require Steam.dll with pbIsAppSubscribed function -> stub steam.dll works fine!

@otavepto
Copy link
Contributor Author

otavepto commented Aug 2, 2025

I don't have that game for now but what happens if you copy the original Steam.dll beside the .exe and force inject steamclient.dll via cold client loader, similar to appid 7450 and 3590 ?

If that didn't work and this stub is absolutely needed, I guess I can reopen this PR and try implementing that old dll more accurately.

@LuKeSt0rm
Copy link

LuKeSt0rm commented Aug 2, 2025

CoD 1 and 2 (steam version) work with the older Steam.dll beside game exe posted by UroshUchiha. (without force inject steamclient.dll via coldclientloader)

Don't work with newer Steam.dll beside game exe or with force inject steamclient.dll via coldclientloader

These games use SteamIsAppSubscribed -> pbIsAppSubscribed as well as SteamStartup and SteamCleanup functions from Steam.dll. stub with pbIsAppSubscribed = 1 and return 1 for the other two functions work perfectly.

@otavepto
Copy link
Contributor Author

otavepto commented Aug 2, 2025

Didn't know they had different versions, this is very interesting since the one I used was from their official compatibility layer for Linux (~/.steam/steam/legacycompat/Steam.dll), so Linux users have an advantage somewhat.
Their newer Steam.dll (official Windows version) even attempts to request steamclient022 which isn't public yet, the official Linux one requests steamclient017.

This leads me to believe that the interface version doesn't really matter in the context of that dll, because games like Call of Duty 1 & 2, or appid 7450 and 3590, are too old to know about that interface version, yet that dll (newer and older ones) must ensure that these old games are still working.
I assume this would make it somewhat easier to emulate since we don't have to care about specific versions or depend on steam_interfaces.txt (I'm going to be proven wrong as soon as I test it later).

I'll keep this as a draft for now until I implement it more properly.
Thanks a lot for the input, really appreciate it.

@otavepto otavepto reopened this Aug 2, 2025
@otavepto otavepto marked this pull request as draft August 2, 2025 18:30
@otavepto otavepto changed the title Add new stub for old Steam.dll library WIP: Add new stub for old Steam.dll library Aug 2, 2025
@otavepto otavepto marked this pull request as ready for review August 8, 2025 01:13
@otavepto otavepto changed the title WIP: Add new stub for old Steam.dll library Emulate old Steam.dll library (experimental) Aug 8, 2025
@otavepto
Copy link
Contributor Author

otavepto commented Aug 8, 2025

I've added a more proper implementation, file-related functions are still not implemented since they need way more time but for now they're not necessary.
I won't add more functionality in this PR, so this is ready for review now.
Edit: appid 7450 does a sneaky ownership check for demo appid 7430 to ensure it's running in proper steam environment, this demo appid must be added to DLC list.

@NicknineTheEagle
Copy link
Contributor

I have a Steam.dll emulator forked from RevEmu, perhaps parts of it could be integrated into Goldberg: https://github.com/NicknineTheEagle/ReviveEmu

@Detanup01 Detanup01 assigned Detanup01 and unassigned Detanup01 Aug 17, 2025
@Detanup01 Detanup01 requested a review from universal963 August 17, 2025 17:55
@Detanup01 Detanup01 merged commit fcb0e7b into Detanup01:dev Aug 21, 2025
64 checks passed
@otavepto otavepto deleted the patch/lib-sold branch August 22, 2025 08:20
@Talos910
Copy link

Talos910 commented Feb 14, 2026

I just tested it on Ricochet Infinity and Ricochet Lost Worlds, works perfectly fine! It, however, doesn't work on Plants Vs Zombies, Zuma dilogy and Peggle trilogy of games on Steam. Including this file does work when added to extra_dlls directory for those games though. Don't remember where I got that .dll from but I've had it for a while on my external HDD. Could those two be merged? steam.zip

Lost Planet: Extreme Condition (not Colonies), the only one still available in Steam opens fine with latest goldberg fork experimental and this steam dll, the steam dll in the release also opens the game but you get user auth error, single player appears to work fine but the online mp crashes after you try to create a lobby, goldberg crash txt says this:

Unhandled exception:
code: 0xc0000005
@address = 0x6B88BCEF
*********** Stack trace ***********
[frame 1]: 0x6B88BCEF | SteamAPI_servernetadr_t_SetQueryPort
[frame 0]: 0x6B810F20 | SteamGameServer_RunCallbacks


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants