It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
This winmm.dll solves a couple of issues that GoG's CD wrapper had.
It seems to have been based on hifi's ogg-winmm project, so I made a few changes to fix things

Fixed:
-Each level plays a track further than it should have
-Music volume would not change
-Music took about half a second to stop when going back to main menu/starting a cutscene

Get it here: http://www.mediafire.com/download/s5lypg970azzdmp/fixed_winmm_win10.zip

Just drop winmm.dll into your Jedi Knight directory to have it overwrite the old one. Cheers.

Note that the game is scripted to turn off the music in Level 1 until you walk out of the bar. In the GoG release, this did not happen until this fix, because volume was not supported. So if you start a new game and don't hear the music, don't panic just yet.

If any GoG staffer wants to see the code changes for possible inclusion in the official release, here's the git repo.
Post edited October 25, 2015 by Tarvis
avatar
Tarvis: Fixed:
-Each level plays a track further than it should have
-Music playlist would not restart unless player stands still a few seconds/ enters then leaves esc menu
-Music volume would not change
-Music took about half a second to stop when going back to main menu/starting a cutscene
That all sounds great to me; thanks for making it. I'll definitely be trying it later today!

The only issue (I have) left in the re-release is some texture/model LOD problems.

It's very noticeable that textures de-blur as they're approached.

It's especially noticeable with the stormtrooper models as they switch between low/high quality.

I'll have to try an alternate 3DFX fix.
avatar
Tarvis: Note that the game is scripted to turn off the music in Level 1 until you walk out of the bar. In the GoG release, this did not happen until this fix, because volume was not supported. So if you start a new game and don't hear the music, don't panic just yet.
Is that the only occurrence of such a script? My memory is too foggy to remember!


EDIT Oh dear! An error! (see pic)

Don't worry though - easily fixed - add this file into both game folders:
libgcc_s_dw2-1.dll

I took that .dll file from here

Your music fix looks to be working perfectly ;)
Attachments:
error.png (24 Kb)
Post edited February 14, 2015 by mwnn
Drat, there is something I forgot about, some levels jump back to an earlier track when its playlist completes, I forgot to account for that. I'll fix it soon.

Also thanks, I forgot to throw in that dependency. It's statically linked now so nobody should need to get that .dll separately.
Post edited February 14, 2015 by Tarvis
avatar
Tarvis: This winmm.dll solves a couple of issues that GoG's CD wrapper had.

Fixed:
-Each level plays a track further than it should have
-Music playlist would not restart unless player stands still a few seconds/ enters then leaves esc menu
-Music volume would not change
-Music took about half a second to stop when going back to main menu/starting a cutscene
...

Note that the game is scripted to turn off the music in Level 1 until you walk out of the bar. In the GoG release, this did not happen until this fix, because volume was not supported. So if you start a new game and don't hear the music, don't panic just yet.
Are you sure of all those issues with the GOG version? For me, the music in the first level didn't start until I went up the ramp out of the bar, just as it is meant to. I've also not had to go back to the menu then return to game in order to get the music to loop. The volume doesn't seem to change though, but I haven't rigorously tested that as I haven't really minded the volume of the music.

Maybe it is because I'm on an older OS (Vista x64) and these issues only show up on Win7 an 8?
avatar
korell: Are you sure of all those issues with the GOG version? For me, the music in the first level didn't start until I went up the ramp out of the bar, just as it is meant to. I've also not had to go back to the menu then return to game in order to get the music to loop. The volume doesn't seem to change though, but I haven't rigorously tested that as I haven't really minded the volume of the music.

Maybe it is because I'm on an older OS (Vista x64) and these issues only show up on Win7 an 8?
I'm definitely affected by at least the music looping problem as a Win 7 user.

I fairly sure the music did play from the start of the opening level too!

I thought GoG would've fixed it - [url=http://pcgamingwiki.com/wiki/Star_Wars:_Jedi_Knight_%E2%80%93_Dark_Forces_II#Music_does_not_loop]as it's listed on the wiki[/url] - but I guess not ?!?

I'm having a bit of trouble with the texture/model LOD as well - the attached screenshot is an extreme example.
Attachments:
Sadly this didn't fix the windows 10 issues.
I don't know what's going on underneath, all I know is the exec starts and sucks up CPU time, but doesn't do anything. My assumption is it's stuck in a circle because a call changed in Windows 10 or somethin'
avatar
korell: Maybe it is because I'm on an older OS (Vista x64) and these issues only show up on Win7 an 8?
This is very possible. I'll try testing it myself. I'll also try XP just because. But in 7 and up, CD music fails to loop.

I just don't quite get how...Jedi Knight plays through a playlist, then calls to check the status of the playing music. If it returns as "Not playing", then it restarts the playlist (or in many cases starts a different playlist, depending on the level, due to how the music system works)

But the problem is Jedi Knight just doesn't seem to call that status check except at very long intervals or when the player is standing still doing nothing. If this is the result of an OS audio system change, I'm sure it can be fixed in the dll. Maybe the play function originally was supposed to return something to indicate completion? Could have to do with system timers as well.

I'll log dll calls in both OSes to see what happens.
Post edited February 15, 2015 by Tarvis
avatar
Tarvis:
Well, regardless of your findings I'm still looking forwards to an updated version of your replacement DLL file as then I'll know I'm getting the correct tracks played too, and have the option of a volume control.
I'm hoping and praying for a Windows 10 fix. I know it's still in beta, but dangit I like it!
avatar
mwnn: I'm having a bit of trouble with the texture/model LOD as well - the attached screenshot is an extreme example.
I've tried comparing that with videos on YouTube and it doesn't look too dissimilar. Here's an example (it is a bit fast and jumps about a bit, but near the start you can see the texture pop-in in the same area as your screenshot.

https://www.youtube.com/watch?v=SpoR7JDfGRU

I have noticed that when using a high resolution texture pack that my pop-in was reduced. I guess because there were more textures available for the engine to use.

EDIT: Here's another and it looks just like your screenshot, but it was taken a year ago on a Win7 machine so may just be replicating what you are seeing.

https://www.youtube.com/watch?v=7ewPTZWufe8

However, I think it may be normal.
Post edited February 16, 2015 by korell
avatar
korell: I've also not had to go back to the menu then return to game in order to get the music to loop.
Okay, I just tested it on an XP machine. The looping is still faulty.

Here is the reason why looping seems so inconsistent for different people: it only loops if you are standing still doing nothing at any point after the music stops playing. Most people probably tested if music loops by starting a level and then standing there, which triggers the loop because they're doing nothing. But if you're running around blasting things, the music won't loop until you stop moving and sit there for a few seconds.

The best level to test music looping is Level 2 - The Lost Disk. It plays Track 3, then when looping, goes to Track 2.

If you're on Vista, try this: playing the game normally, making sure to never stop moving at any point. You will notice that new music won't start until you stand still.

This leads me to the conclusion that this "bug" is built into the game, and not any OS specific issue.

Unfortunately it also means that without the game's source code it probably won't get an elegant fix. Currently my winmm.dll patch just makes it so it updates the music playlist even if you stand still while music is currently playing. Before that it only checked for that AFTER music stops playing. This means that over the course of normal playthrough the new music playlist is much more likely to be queued.
avatar
mwnn: Is that the only occurrence of such a script? My memory is too foggy to remember!
The only other music volume changes called by scripts are turning down the music in the boss intros so you can hear Rahn talking better
Post edited February 16, 2015 by Tarvis
avatar
korell: I've also not had to go back to the menu then return to game in order to get the music to loop.
avatar
Tarvis: Here is the reason why looping seems so inconsistent for different people: it only loops if you are standing still doing nothing at any point after the music stops playing. Most people probably tested if music loops by starting a level and then standing there, which triggers the loop because they're doing nothing. But if you're running around blasting things, the music won't loop until you stop moving and sit there for a few seconds.
Well, I can't say I've actively stood still just to hear the music, but I'm not a fast player so I could have just been looking around at the time.

avatar
mwnn: Is that the only occurrence of such a script? My memory is too foggy to remember!
avatar
Tarvis: The only other music volume changes called by scripts are turning down the music in the boss intros so you can hear Rahn talking better
Now this I can relate to. Having done the first Dark Jedi fight last night (Yun the Dark Youth), I found it hard to hear what Rahn was saying as the music volume didn't change. But at the start of the game the music definitely doesn't kick in until I leave the bar, as it is intended due to the cantina music playing in-game in the bar itself.
avatar
korell: I've tried comparing that with videos on YouTube and it doesn't look too dissimilar. Here's an example (it is a bit fast and jumps about a bit, but near the start you can see the texture pop-in in the same area as your screenshot.

https://www.youtube.com/watch?v=SpoR7JDfGRU

I have noticed that when using a high resolution texture pack that my pop-in was reduced. I guess because there were more textures available for the engine to use.
You could well be right - I've been spoiled by 32bit colour and modern super high resolutions! =D

It could well be related to (modern) screen & (low) texture resolution which would greatly exacerbate the switching effect.

I certainly wouldn't have been running this game @ 1920x1080 back in 1997; I likely thought that 16bit @ 1024x768 on a weighty CRT was cutting edge ;)


I wanted to avoid modding; too many aesthetic changes for my liking - trying to make Jedi Knight look like Jedi Academy seems a bit futile to me.

Have you noticed the models switching? Stormtrooper models look so blocky when you more than a few feet away.
Attachments:
Post edited February 16, 2015 by mwnn
avatar
mwnn: I wanted to avoid modding; too many aesthetic changes for my liking - trying to make Jedi Knight look like Jedi Academy seems a bit futile to me.

Have you noticed the models switching? Stormtrooper models look so blocky when you more than a few feet away.
I'll take a look next time I boot up Mysteries of the Sith (as I can check that from a new game just as per your screenshot).

The only mod I've used is a higher resolution texture pack. I've not used the Jedi Knight Enhanced mod as that can bring other issues at present. The texture pack I have used you might want to give a try to see if it helps. It certainly made a difference in the first two levels of the base game as I did a like for like comparison and the texture pop-in on the distant walls was massively reduced. Here is the link:

http://www.jkhub.net/project/get.php?id=1674

Just extract the file to the Resources folder in the Jedi Knight installation and it works.

There is one for Mysteries of the Sith, too, but that one requires a mod folder to be set up and then you have to run the game from your own shortcut, so you lose the fixes GOG made with the GOGLauncher. :(
avatar
mwnn: Have you noticed the models switching? Stormtrooper models look so blocky when you more than a few feet away.
EDIT: Yes, having just booted up and started a new MotS game, those Stormtroopers do have square heads at a certain distance (and not all that far) that then become more pointed as you go up next to them, just like your screenshot. But that is just the model polygons, I don't think their textures change. This is something that Jedi Knight Enhanced will solve, but I'm not using that myself.
Post edited February 16, 2015 by korell
avatar
korell: http://www.jkhub.net/project/get.php?id=1674
Just extract the file to the Resources folder in the Jedi Knight installation and it works.
I get really funky results with the texture pack =O

First shot is GoG default.

Second shot is the texture pack.

If I add in the enhanced JK.exe & .dll taken from the other thread - I get an instant crash =D

This might be the only time Vista has beaten Windows 7! =P
Attachments:
default.jpg (404 Kb)