I recently installed the game Jedi Knight: Dark Forces II. The game works fine (well, all the cutscenes have graphical glitches), except for the fact that I can't use 3D acceration. When I enable it, the graphics are all messed up to the point where the game is unplayable. I tried all the patches that are supposed to fix it and they don't. Someone suggested that I try DxWnd.
I downloaded the latest version, unpacked it, added the Jedi Knight EXE file, left all the options on the defaults, ran the game from DxWnd's window and I see absolutely no difference. I don't mean that 3D acceleration is still messed up (it is), but the game still runs fullscreen and I see absolutely no difference than running it without DxWnd.
What I doing wrong?
I'm using Windows XP if that makes a difference. Yes, I know it's no longer supported and I'll get a new computer some day, but for now, this is what I have.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
XP is fine, it is a perfect platform to run old games.
The problem is Jedi Knight, a game with some tricks to be applied.
You could read the tutorial in the help section of last release, in short you should import the configuration already written in the "Star Wars Jedi Knight II (singleplayer).dxw" file and update the game paths according to your installation.
The tricky part is that the Jedi Knight EXE is not the ACTUAL game but only a frontend: to have the game run properly you have to hook jk2sp.exe
If you'll have difficulties, don't hesitate to write again, I'll give you more detailed instructions.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I started getting nostalgic and kind of wanted to play the whole series again in sequence. I played the original Dark Forces a while back in DOSBox and now I'm working my way through the second game. Originally I was hoping to install the various mods to make the game look better, but I can't even get the 3D acceleration working.
Last edit: Rekrul 2018-01-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for the misunderstanding.
That one wasn't included in the list of supported files yet (it will be from now on!). The game can't be installed with its original setup.exe on modern platforms, so I made a little test following the instructions in the attached text file. The game worked with default options and with 3D acceleration enabled (I only set the backbuffer in system memory but I don't know if that is relevant), so if you still have problems please read the other tutorial about how to grab logs and send me some logs.
As a second step, since the game CD has audio tracks, it will be interesting to see if I can use dxWnd cd audio emulation to recover that music as well.
Hint: if your problem is the game not being windowized, that could depend on compatibility modes (or shims) set automatically upon the executable. try removing them either manually or with DxWnd "Tools->Clear compatibility flags" command that you have in the "expert" mode.
See also "Help->View help" the Tutorials / Beginner's page.
I just tried enabling logs as per the tutorial, but it doesn't write any. Jedi Knight's directory is writeable, but there's no log. I also ran a search of my entire C: drive for dxwnd.log and there was nothing. :(
I did have Windows 95 compatibility mode set because the game is kind of unstable without it. It often crashes when loading saved games or sometimes just pausing the game to go to the main menu. Regardless, I unchecked that option, but there wasn't any change when run through DxWnd. I still don't get a windowed display and 3D acceleration still doesn't work.
I also tried deleting the existing entry and importing the DXW file attached to your message. I made sure to modify it and set the correct path to JK.exe, but that did exactly the same thing. I tried running the game by double-clicking the entry, by selecting Run from the File menu, and by right-clicking and selecting Run > Hooked. All methods behave the same; Fullscreen display, 3D acceleration is messed up.
Since I'm using XP, I was able to install the game using the original installer. I made the following changes; I applied the 1.01 official patch, I copied all the video files to the hard drive, I added a third-party JK .CD file that fools it into loading all the videos from the HD (if you copy the one off the discs, it only works for the levels that reference that particular disk), and I applied the "high detail" mod that prevents the game from using lower quality, blurry textures at a distance. None of these should affect the actual EXE, other than the official patch. I'm not using the music patch to pay OGG files or any other enhancements.
To be clear, I don't necessarily want to run the game in a window, but I figured that would be a clear indication that DxWnd was working. I could be wrong, but it looks to me like the game is just running nromally and for whatever reason, DxWnd isn't doing anything.
I'm using DxWnd v2_04_59h_build.rar. Is this version definitely compatible with XP?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I did have Windows 95 compatibility mode set because the game is kind of unstable without it.
That is the cause. On WinXP the Win95 emulation runs the game inside a sort of virtual machine so that the process JK.EXE doesn't really exist (you should be able to check this with task manager) and can't be hooked by DxWnd.
This explain the null DxWnd effect, including the impossibility to generate logs.
You have to eliminate the Win95 compatibility before trying DxWnd. Hopefully, the game could be stable enough to run without any problem.
BTW this holds only for Win95 / Win98-ME emulation in WinXP. Other compatibility flags on XP and even (in some cases) Win95 compatibility on Win10 (where the platform emulation is made quite differently) may work perfectly.
Once done that, it the game still has problems, you should be able to capture logs and I'll help fixing them.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Partial success! DxWnd is now active, but 3D acceleration is still messed up.
Clearing the Win95 compatibility mode in the JK.exe properties wasn't enough. I had actually tried that before without success. I had to actually rename the file to make it work. I remembered this from discussions about the Steam/GOG versions so I figured it couldn't hurt to try it. It will now run in a window, or fullscreen with DxWnd active and logging. Unfortunately when I enable 3D acceleration, with or without the Backbuffer option and with or without Texture Hack (suggested by someone on the VOGONS forum), I still get a messed up display.
Attached is a screenshot of what happens with 3D acceleration. This was taken with everything (except logging) on default.
I'll attach a zip file with two logs. One I simply loaded the game to the main menu, selected my player and then immediately quit. I don't know if that's enough to tell you anything (probably not), but I was following the instructions to spend as little time in the game as possible. The second log file, I actually started a new game, skipped the opening cutscene and then quit the game as soon as the actual level appeared. Hopefully that will tell you something.
If nothing else, running the game through DxWnd fixed the cutscenes. Without it, all the Smacker videos have ugly black blocks in them, like it's not setting the proper background color, so anywhere it would show up is just black. With DxWnd, they seem to look perfect. :)
Having to rename the executable probably means that the game is associated to "shims", compatibility flags that are defined in a system database and that you can't easily update. Sometimes the DxWnd command "Tools->Clear Compatibility flags" works, sometimes it is necessary to rename the game executable, a thing that fixed the problem.
The game uses a very old 3D programming style, the first release of D3D with methods like Direct3DDevice::execute that disappeared in later Direct3D releases. Unfortunately, when this type of problems happen, it is not so clear what you could do to avoid them, and MS documentation is very scarce. In a less dramatic way, but the same thing happens to me (see screenshot) with Z processing problems and objects behind the walls.
But this is good news, sharing the same problem surely help.
Luckily the problem doesn't occur without hardware acceleration and the loss of quality is not so high.
If it's going to be a lot of trouble, please don't knock yourself out on my account. I'm already halfway through the game and I'm not sure how many times I'll replay it under XP. I gather that other fixes exist for Win7-10 and I'll probably get a new system at some point in the not too distant future. I'm running into more and more stuff that won't run at all under XP. Most emulators no longer support it.
I mean, if you want to figure it out so that DxWnd can fully support it, that's great, I just don't want to be the cause of you pulling your hair out. :)
Oh, one little oddity I noticed; When I right-click on an entry in DxWnd, I have to select whatever option I want from the popup menu twice. The first time it doesn't register. It doesn't really affect anything, it's just strange.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Don't worry, I'm not knocking to anyone's account, I'm just puzzled on a problem that is apparently so stupid (why a modern super-full-fledged GPU card should not be able to properly manage a bunch of small textures of an old game?) and seems with no solution yet.
I tried some trick to tell Direct3D that the video card has no hardware acceleration support (for such a game and such a card, the result should be better than telling the game to use its own software emulation) and look at the results (screenshots z2 and z3): there's a misunderstanding about color depth (32 vs. 16 bpp) but z3 shows that the zorder problems of transparent walls are gone! Maybe this is the good path?
About the oddity, I noticed it. It seems that right-click doesn't automatically select the item. You need not right-click twice, if you left-click (select) and right-click (open) the problem doesn't occur, but this is not going to be a solution. It depends on MFC component behaviour, I don't know if it is possible to modify this annoying behaviour.
Very strange. Would talking to the author of DgVoodoo be any help? Apparently his DgVoodoo 2.x includes a DirectX wrapper that can be used to get the 3D acceleration working on newer systems. Unfortunately, versions 2.0 and above don't work under XP.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Some effect pretending that the zbuffer bit depth is much higher than in reality: the transparent wall effect disappears, but the zbuffer processing probably has overflows and pixels gets stuck on screen. Interesting ...
The other day I was using DxWnd to play Jedi Knight in fullscreen. I figured even if it didn't help with 3D acceleration, at least the cutscenes would play properly. Unfortunately, without Win95 compatibility mode, it tends to crash fairly often while loading saved games. As I'm not the world's greatest FPS player, I tend to rely on quicksaving quite often, and load those saves when I screw up.
With no compatibility mode set, what often happens is that the game will go through the motions of loading the save, but when the screen goes black and the game is supposed to appear, instead I get a window telling me that the game has stopped working and needs to close. It seems to happen more frequently if I double-click the save, rather than just clicking the name and then clicking OK to load it, but even that crashes some of the time.
I tried the Win95 mode in DxWnd's expert options, but that doesn't seem to help.
With Win95 compatibility mode set (different copy of the EXE), it's never crashed on me.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
DxWnd Win95 mode is not at all equivalent to MS Win95 compatibility mode: it just let the program believe that it's running on Win95 when asked, but nothing else. The load/save crash is a serious problem and probably requires some patching in system calls for I/O or whatever causes it.
I'll try to track the problem, but it won't be easy because I should catch the error while saving the game in a debugger session, and here the game here is surprisingly stable, it crashed while saving only once in several days.
So, wish me bad luck and hope my gaming session will fail! ;)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Out of all the problems I've seen people mention in regard to running the game on newer systems, crashing wasn't one of them. I'll admit that I probably load saves more often than others, but it even crashed a couple times when just loading the last save after running the game.
I'd offer to send you the crash details, but naturally it won't let me copy the text and although it says a text file was created in local settings\temp, there isn't one. :(
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, it's a kind offer, but I have to decline: I need to be the pilot at the debugging session since, once the crash will happen, I'll have to wander to and fro in search for clues. :(
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, the problem happens also on my Win10, it just happens much less frequently, which makes it a little harder to catch. But do not desperate, sooner or later it will be trapped. :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I recently installed the game Jedi Knight: Dark Forces II. The game works fine (well, all the cutscenes have graphical glitches), except for the fact that I can't use 3D acceration. When I enable it, the graphics are all messed up to the point where the game is unplayable. I tried all the patches that are supposed to fix it and they don't. Someone suggested that I try DxWnd.
I downloaded the latest version, unpacked it, added the Jedi Knight EXE file, left all the options on the defaults, ran the game from DxWnd's window and I see absolutely no difference. I don't mean that 3D acceleration is still messed up (it is), but the game still runs fullscreen and I see absolutely no difference than running it without DxWnd.
What I doing wrong?
I'm using Windows XP if that makes a difference. Yes, I know it's no longer supported and I'll get a new computer some day, but for now, this is what I have.
XP is fine, it is a perfect platform to run old games.
The problem is Jedi Knight, a game with some tricks to be applied.
You could read the tutorial in the help section of last release, in short you should import the configuration already written in the "Star Wars Jedi Knight II (singleplayer).dxw" file and update the game paths according to your installation.
The tricky part is that the Jedi Knight EXE is not the ACTUAL game but only a frontend: to have the game run properly you have to hook jk2sp.exe
If you'll have difficulties, don't hesitate to write again, I'll give you more detailed instructions.
I'm talking about Jedi Knight from 1997, not Jedi Knight II from 2002. This game;
http://www.mobygames.com/game/star-wars-jedi-knight-dark-forces-ii
I started getting nostalgic and kind of wanted to play the whole series again in sequence. I played the original Dark Forces a while back in DOSBox and now I'm working my way through the second game. Originally I was hoping to install the various mods to make the game look better, but I can't even get the 3D acceleration working.
Last edit: Rekrul 2018-01-02
Sorry for the misunderstanding.
That one wasn't included in the list of supported files yet (it will be from now on!). The game can't be installed with its original setup.exe on modern platforms, so I made a little test following the instructions in the attached text file. The game worked with default options and with 3D acceleration enabled (I only set the backbuffer in system memory but I don't know if that is relevant), so if you still have problems please read the other tutorial about how to grab logs and send me some logs.
As a second step, since the game CD has audio tracks, it will be interesting to see if I can use dxWnd cd audio emulation to recover that music as well.
Hint: if your problem is the game not being windowized, that could depend on compatibility modes (or shims) set automatically upon the executable. try removing them either manually or with DxWnd "Tools->Clear compatibility flags" command that you have in the "expert" mode.
See also "Help->View help" the Tutorials / Beginner's page.
Last edit: gho 2018-01-02
I just tried enabling logs as per the tutorial, but it doesn't write any. Jedi Knight's directory is writeable, but there's no log. I also ran a search of my entire C: drive for dxwnd.log and there was nothing. :(
I did have Windows 95 compatibility mode set because the game is kind of unstable without it. It often crashes when loading saved games or sometimes just pausing the game to go to the main menu. Regardless, I unchecked that option, but there wasn't any change when run through DxWnd. I still don't get a windowed display and 3D acceleration still doesn't work.
I also tried deleting the existing entry and importing the DXW file attached to your message. I made sure to modify it and set the correct path to JK.exe, but that did exactly the same thing. I tried running the game by double-clicking the entry, by selecting Run from the File menu, and by right-clicking and selecting Run > Hooked. All methods behave the same; Fullscreen display, 3D acceleration is messed up.
Since I'm using XP, I was able to install the game using the original installer. I made the following changes; I applied the 1.01 official patch, I copied all the video files to the hard drive, I added a third-party JK .CD file that fools it into loading all the videos from the HD (if you copy the one off the discs, it only works for the levels that reference that particular disk), and I applied the "high detail" mod that prevents the game from using lower quality, blurry textures at a distance. None of these should affect the actual EXE, other than the official patch. I'm not using the music patch to pay OGG files or any other enhancements.
To be clear, I don't necessarily want to run the game in a window, but I figured that would be a clear indication that DxWnd was working. I could be wrong, but it looks to me like the game is just running nromally and for whatever reason, DxWnd isn't doing anything.
I'm using DxWnd v2_04_59h_build.rar. Is this version definitely compatible with XP?
That is the cause. On WinXP the Win95 emulation runs the game inside a sort of virtual machine so that the process JK.EXE doesn't really exist (you should be able to check this with task manager) and can't be hooked by DxWnd.
This explain the null DxWnd effect, including the impossibility to generate logs.
You have to eliminate the Win95 compatibility before trying DxWnd. Hopefully, the game could be stable enough to run without any problem.
BTW this holds only for Win95 / Win98-ME emulation in WinXP. Other compatibility flags on XP and even (in some cases) Win95 compatibility on Win10 (where the platform emulation is made quite differently) may work perfectly.
Once done that, it the game still has problems, you should be able to capture logs and I'll help fixing them.
Partial success! DxWnd is now active, but 3D acceleration is still messed up.
Clearing the Win95 compatibility mode in the JK.exe properties wasn't enough. I had actually tried that before without success. I had to actually rename the file to make it work. I remembered this from discussions about the Steam/GOG versions so I figured it couldn't hurt to try it. It will now run in a window, or fullscreen with DxWnd active and logging. Unfortunately when I enable 3D acceleration, with or without the Backbuffer option and with or without Texture Hack (suggested by someone on the VOGONS forum), I still get a messed up display.
Attached is a screenshot of what happens with 3D acceleration. This was taken with everything (except logging) on default.
I'll attach a zip file with two logs. One I simply loaded the game to the main menu, selected my player and then immediately quit. I don't know if that's enough to tell you anything (probably not), but I was following the instructions to spend as little time in the game as possible. The second log file, I actually started a new game, skipped the opening cutscene and then quit the game as soon as the actual level appeared. Hopefully that will tell you something.
If nothing else, running the game through DxWnd fixed the cutscenes. Without it, all the Smacker videos have ugly black blocks in them, like it's not setting the proper background color, so anywhere it would show up is just black. With DxWnd, they seem to look perfect. :)
Last edit: Rekrul 2018-01-04
Having to rename the executable probably means that the game is associated to "shims", compatibility flags that are defined in a system database and that you can't easily update. Sometimes the DxWnd command "Tools->Clear Compatibility flags" works, sometimes it is necessary to rename the game executable, a thing that fixed the problem.
The game uses a very old 3D programming style, the first release of D3D with methods like Direct3DDevice::execute that disappeared in later Direct3D releases. Unfortunately, when this type of problems happen, it is not so clear what you could do to avoid them, and MS documentation is very scarce. In a less dramatic way, but the same thing happens to me (see screenshot) with Z processing problems and objects behind the walls.
But this is good news, sharing the same problem surely help.
Luckily the problem doesn't occur without hardware acceleration and the loss of quality is not so high.
Well, I'll see what I can do ...
Last edit: gho 2018-01-04
Thank you for looking into this.
If it's going to be a lot of trouble, please don't knock yourself out on my account. I'm already halfway through the game and I'm not sure how many times I'll replay it under XP. I gather that other fixes exist for Win7-10 and I'll probably get a new system at some point in the not too distant future. I'm running into more and more stuff that won't run at all under XP. Most emulators no longer support it.
I mean, if you want to figure it out so that DxWnd can fully support it, that's great, I just don't want to be the cause of you pulling your hair out. :)
Oh, one little oddity I noticed; When I right-click on an entry in DxWnd, I have to select whatever option I want from the popup menu twice. The first time it doesn't register. It doesn't really affect anything, it's just strange.
Don't worry, I'm not knocking to anyone's account, I'm just puzzled on a problem that is apparently so stupid (why a modern super-full-fledged GPU card should not be able to properly manage a bunch of small textures of an old game?) and seems with no solution yet.
I tried some trick to tell Direct3D that the video card has no hardware acceleration support (for such a game and such a card, the result should be better than telling the game to use its own software emulation) and look at the results (screenshots z2 and z3): there's a misunderstanding about color depth (32 vs. 16 bpp) but z3 shows that the zorder problems of transparent walls are gone! Maybe this is the good path?
About the oddity, I noticed it. It seems that right-click doesn't automatically select the item. You need not right-click twice, if you left-click (select) and right-click (open) the problem doesn't occur, but this is not going to be a solution. It depends on MFC component behaviour, I don't know if it is possible to modify this annoying behaviour.
Very strange. Would talking to the author of DgVoodoo be any help? Apparently his DgVoodoo 2.x includes a DirectX wrapper that can be used to get the 3D acceleration working on newer systems. Unfortunately, versions 2.0 and above don't work under XP.
Probably yes. Do you know how to contact and convince him? I fear that most of his work is not public ... Maybe I should investigate a little more.
You can contact him on vogons.
Some effect pretending that the zbuffer bit depth is much higher than in reality: the transparent wall effect disappears, but the zbuffer processing probably has overflows and pixels gets stuck on screen. Interesting ...
The other day I was using DxWnd to play Jedi Knight in fullscreen. I figured even if it didn't help with 3D acceleration, at least the cutscenes would play properly. Unfortunately, without Win95 compatibility mode, it tends to crash fairly often while loading saved games. As I'm not the world's greatest FPS player, I tend to rely on quicksaving quite often, and load those saves when I screw up.
With no compatibility mode set, what often happens is that the game will go through the motions of loading the save, but when the screen goes black and the game is supposed to appear, instead I get a window telling me that the game has stopped working and needs to close. It seems to happen more frequently if I double-click the save, rather than just clicking the name and then clicking OK to load it, but even that crashes some of the time.
I tried the Win95 mode in DxWnd's expert options, but that doesn't seem to help.
With Win95 compatibility mode set (different copy of the EXE), it's never crashed on me.
DxWnd Win95 mode is not at all equivalent to MS Win95 compatibility mode: it just let the program believe that it's running on Win95 when asked, but nothing else. The load/save crash is a serious problem and probably requires some patching in system calls for I/O or whatever causes it.
I'll try to track the problem, but it won't be easy because I should catch the error while saving the game in a debugger session, and here the game here is surprisingly stable, it crashed while saving only once in several days.
So, wish me bad luck and hope my gaming session will fail! ;)
Out of all the problems I've seen people mention in regard to running the game on newer systems, crashing wasn't one of them. I'll admit that I probably load saves more often than others, but it even crashed a couple times when just loading the last save after running the game.
I'd offer to send you the crash details, but naturally it won't let me copy the text and although it says a text file was created in local settings\temp, there isn't one. :(
Yes, it's a kind offer, but I have to decline: I need to be the pilot at the debugging session since, once the crash will happen, I'll have to wander to and fro in search for clues. :(
It could be something specific to XP, or my hardware, or even my graphic card drivers. :(
Last edit: Rekrul 2018-01-08
No, the problem happens also on my Win10, it just happens much less frequently, which makes it a little harder to catch. But do not desperate, sooner or later it will be trapped. :)
I appreciate your efforts to fix this game.
Want to see something really trippy looking? Install the Jedi Knight Enhanced files and run the game in software mode. :)