Common searches

First post, by kjliew

User metadata
Rank Oldbie

With an unreasonable 1-month ban, finally back with some fresh air ... 😁

This is the outcome of playing games on WinXP VM. I thought it may also be useful for non-VM use cases, too. So let VOGONS archived it. Here's the story ...

For early Windows games that make use of Smacker Video for opening intro and FMV cutscenes, the Smacker Video API went through a reshuffle of API ordinal numbering from 2.x to 3.x and onwards. This made DLL substitution from older version of SMACKW32.DLL to newer version of SMACKW32.DLL just wouldn't work, even though the exported APIs were exactly identical. The older version of SMACKW32.DLL (all 2.x DLLs and some 3.x DLLs) have video playback problem on WinXP VM. Well, most of those games had never been tested on WinXP and they were meant to be played on Win95/98. The video would indeed playback perfectly on Win98 VM.

Here's the list of games that are affected that I had tested:
- Star Wars Jedi Knight Dark Forces II (Smacker 2.2i)
- Shogo Mobile Armor Division (Smacker 3.0j)
- Blood II The Chosen (Smacker 3.0j)

For Smacker 3.x it would be as easy as replacing the DLL with a newer version. No proxy/wrapper DLL is required. The two Monolith LithTech games that I tested also use runtime linking that resolves API symbols dynamically and that makes it safe for any future DLL versions. Unfortunately for Smacker 2.x as used in Dark Forces II, it makes matter worse by using build-time linking with ordinal, so that makes the original DLL irreplaceable.

So the solution to Dark Forces II is to make a proxy DLL that exports the same API symbols with exactly the same ordinal numbering. The proxy DLL would then forward the APIs to the real, updated and more recent version of Smacker DLL renamed as SMACKWXX.DLL. It is fairly easy to do this nowadays with modern GCC toolchain for Windows with absolutely zero line of C code to write.

JK.EXE -> SMACKW32.DLL (proxy) -> SMACKWXX.DLL (real)

By having the proxy DLL redirecting to a more recent version of Smacker DLL (3.2j to be exact, from Rage Expendable), Dark Forces II intro and in-game FMV cutscenes now playback perfectly. I was forced to do this because WinXP VM runs so much better with Ryzen APU and MacBook Air M1 compared to Win98 VM. I just got to play the games on WinXP VM. 😁 I guess this could also be the solution for others not having GOG version such as Jedi Knight: Dark Forces II cutscenes run choppy. It makes the gameplay more enjoyable and immersive without having to skip the videos and watch it later. 😁

Let me know if this also fixed other Smacker 2.x games other than Dark Forces II. And good for Marvin folks who built Win98 gaming machines, none of such craps would ever be required. Emulation/Virtualization just suck! 🤣


  • Filename
    File size
    6.55 KiB
    File license
    Fair use/fair dealing exception

Reply 1 of 3, by aqrit

User metadata
Rank Member

Your proxy dll forwards `_SmackToScreen@24` but the Smacker Version: 3.2j from DosFreak's archive exports `_SmackToScreen@28`.
This is interesting since "3.2j from Rage Expendable" would appear to be different.

edit: this may be common...

Reply 2 of 3, by kjliew

User metadata
Rank Oldbie

No, the 3.2j from Rage Expendable also exports '_SmackToScreen@28'. So I guess then if any Smacker Video 2.x games actually import '_SmackToScreen@24', then it would fail. Either the DLL failed to load or the main EXE would trap in exception when the function was called. Jedi Knight Dark Forces II JK.EXE does not import that function.

It is interesting to find other games that actually import that function. The wrapper can always be updated with additional C code to supplement the additional argument.