I open this thread to have here some discussion on the features of next release. Please, do not spread comments about the new features on game threads because the discussion may become confused this way.
Also, there are several things to talk about, so I'll add them one at a time.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It proved to be quite useful to try running a game with DxWnd also adding some Microsoft shims to test which one of them fixed some specific problem. To make this operation easier (and possibly add it into a game configuration) DxWnd now will have a field in the Hook panel to add shims.
More shims can be used separated by a space (see screenshot).
I'm trying to find a way to list the available shims strings in some support menu (like what I did with codepages), though it doesn't seem so easy and could be impossible.
The operation uses the trick of setting the __COMPAT_LAYER environment variable before running the game and, obviously, works only when the game is run from the DxWnd interface.
@gho
Hmm nice and I like it but in this way only shim layers can be applied and not individual shim as written by dippy dipper here https://sourceforge.net/p/dxwnd/discussion/general/thread/0d852410/?limit=25&page=35#9edf
(=Compatibility Modes in this list https://ss64.org/viewtopic.php?pid=8968)
There are more individual shims than layers (and they are more interesting).
However, I think it could make sense anyway, for example, compatibility with XP can be set up this way conveniently without interfering with the system.
Update:
Hmm I tried Magical Chase with a 16BitColor shim and it didn't seem to work, but then I tried 256Color and the screen really switched to 256 colors, but the game didn't believe it.
Maybe is it in conflict with the Video-Initial virtual color setting?
Update2:
Entomorph, on the other hand, was completely happy and didn't write anything about the 256 color requirement when I set the 256Color shim, although the window redraw was some bad, but that wasn't the goal of the test.
Last edit: huh 2021-02-26
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, yes, I was aware that this trick has limitations, but setting individual shims seemed quite a bit out of reach. Last time I tried to handle shims I coded the "View -> Shims" menu command, but its behavior never fully convinced me. The idea is to have a way to apply shims dynamically, just for the DxWnd run session and without impacting on the program settings, that can be easily done by setting the __COMPAT_LAYER environment. But I agree, if there's a way to apply single shims programmatically I have to find how!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
On this thread https://sourceforge.net/p/dxwnd/discussion/general/thread/0d6009cacc/#3358 we tried to set a time stretching value that was somewhere in the middle of the currently available values. So in this release the time stretching has a "Custom" flag (almost hidden, but I was in doubt of placing it in the Timing tab or hide it further in the Debug tab...) that allows experimenting very precise stretching values, such as floating point numbers with many decimal digits. The same could help trying very low or very high stretching values.
The flag usage is a little cumbersome, but it was intended for experimental use only, so at the moment it seems ok. To activate the custom stretching, in addition of setting this flag and the "time stretching" flag, it is also necessary to manually add a key value in dxwnd.ini, like these two lines:
[debug]timeshift=0.75
the value for the timeshift entry will be a multiplier for all values in the slider scale, so that for instance 1x, 2x, 4x ... in this case will become 0.75x, 1,5x, 3x ....
As you can see in the "Gunmetal" discussion the flag proved to be almost useless, but it's there and who knows?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logging the file I/O operation can be quite useful, for instance when trying to build a game RIP, perhaps using the DxWnd virtual CD folder. So far, I suggested the trick of setting a unused fake HD device (like a fake HD z:\ mapped to z:) to enable the hooks for some file I/O operations, but the trick worked for only a subset of operations and it was necessary to remember to clear it when no longer useful.
The "Logs / File I/O op." flag now enables the logging for all the file I/O operations.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Perfect, this feature will be very useful (for me for sure) if will works properly. I think I missed it in DxWnd, but I never fully realized it. Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here is a preliminary version. The flash time-bomb defuse is activated by the "patch:DefuseFlashBomb" tweak. There is only a little problem: it seems that the defusing takes place a little too late, so that the very first flash animation still has the timebomb. In "Ultimate Baja Madness" I see the nuked flash, but if I get back to the same screen (for instance, starting a race and getting back to main menu) all following flash are defused. In theory the trick should work also in the first run, but who knows, maybe is because of some Windows caching. It would be interesting to know if the same happens with other games or on other Window releases (this was on Win10-64).
I tested this version and conclusions:
Maja the Bee with this patch does not work at all, crashing at startup and even with the "Inject suspended process" and "Hot patch" options, the exception code is 0xc062 (or 0xc05 after enabling the "Handle Exceptions" option), SOFTWARE_NX_FAULT is given as FAILURE_BUCKET_ID (or NULL_INSTRUCTION_PTR if the "hook: DisableDEP" tweak is enabled)
Gra Piłkarska Pepsi, as it worked before, still works just as well
Pasaż Tesco works, but despite this patch it still doesn't use DxWnd hooks, maybe the problem is the "Pasaż Tesco zaprasza" board that displays every time you start the game
BackPacker Junior continues to show script error when trying to start a game. Perhaps the game uses some 16-bit library (?)
Pac-Man from Albion (edition from the Polish CyberMycha magazine) works, but the mouse does not work in it, despite this new patch
However, in the case of Warn Buster Zero, this patch (and the "Inject suspended process" together with the "Hot patch") made the mouse in the game started working, it's just a pity that the highlighting of the options in the menu on average matches the current position of the mouse
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I checked more games and Zozola Skejt still does not work even with this patch, and Bakuś games (I mean "Nowe odlotowe gry bakusiowe" or something like that) with this patch and "Inject suspended process" and "Hot patch" work OK, although you can get scared by running them by this program because they hide the taskbar so that this one is transparent. But otherwise it's OK. Link to games - https://mirror.polish-abandonware.pl/Gry/Nowe%20odlotowe%20gry%20bakusiowe%20PL.7z
Last edit: MrPepka 2021-03-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I also tested the Minuit Fantome with this patch and it's downright terrible here. Playing with this patch (+ "Inject suspended process" and "Hot patch" options) displays a black screen in its window and in the other window there is also a black screen that flickers every now and then. Any idea what's wrong with this patch?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Another game I tested with this patch is Amber: Journeys Beyond. Playing with this patch and with "Inject suspended process" and "Hot patch" is showing bad. Only a small window is displayed where the game image does not fit, and moving the mouse down in this window causes the window to move to the bottom of the screen. It is impossible to change the position of this window other than just downwards, which makes navigation in the game very difficult
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is an attempt to recover and bring some order in the very confusing handling of 3d options.
This is the idea:
Direct3D Tab: holds flags that are specific for Microsoft Direct3D libraries
3D Tab: holds flags relative to generic 3D functions that should be mapped on all possible 3D renderers, like Direct3D, OpenGL, SDL etc.
In addition, some features are "static", that is having a fixed configuration for the whole game run, while a few others (when possible and with limitations) could be "dynamic", that is update on the fly through a slider in a control panel. So far the experiment is about fogging, next could be lighting maybe ...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A few wrappers and features use the system call Sleep to delay some operations. Now it is known that Sleep has a theorical grain of 1 mSec but can't grant a precision greater than the scheduler interval, about 20mSec (if I recall correctly) so it's no use to try delay values below that value, the timing becomes easily unreliable.
In this release there's a flag to apply a nanosleep routine whole (theorical) grain is 100nSec, that is 10.000 times smaller, that uses system events to ensure a higher precision. All this probably also means a higher CPU usage, but it's worth trying. So far the "nanosleep" flag only affects the wrapper of the stretched Sleep call, but it could be interesting to try it with the CPU speed flags ("CPU slow down" and "CPU max usage"). Maybe we could get a smoother slow down.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think I discovered a rather interesting bug in DxWnd. Namely, a certain game has an icon with such colors that trying to add this game to DxWnd ends up crashing (and also the WerFault.exe process crashes, which is strange). This game can be downloaded from here - https://remcodek.home.xs4all.nl/down_games.html
@Gho is there a chance for you to take a look at this game and see what's wrong?
Oh, and the game is called Witches like something
Last edit: MrPepka 2021-03-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay, now the whole program crashed and at startup I only have a message that the application was not properly initialized and I have the code 0xc0000142. What I should do now? Reinstalling the application does not help :(
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Phew, I already know where these crashes came from. I just ran out of space to add new games (I have 255 on my list). It turns out that the range of integers is overrun (I think I've seen it somewhere before. Oh yeah - https://en.wikipedia.org/wiki/Integer_overflow)
@Gho did you know about this bug before?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's not a full bug because the 255 limit is hardcoded in DxWnd to avoid a too heavy impact on the system.
The problem is that a windows hook like that used by DxWnd needs that the system compares every window creation with the pathname of the owner task, so we can have up to 255 string compares per window creation and this seemed reasonably high.
But of course the expected behavior wan to to crash the game: instead, DxWnd should have warned you and politely refuse to add a 256th game. I'll check the problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I think I made too many changes to this release. Before it's too late and I get crazy I posted the v2.05.56 out on SF download area, let's hope everything is ok.
In effect, I suspect that it's not all settled, I've got some troubles with "Space Clash", but that game is cursed, everything is possible with it.
From tomorrow on I'll have to struggle trying to recover some possible mess from this release. Oh, damn!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@MrPepka: why do you blame this patch for "Amber Journey Beyond"? That game never worked satisfactorily neither with this patch nor with any former DxWnd release. It took me a dedicated patch to stop this annoying movement of the game window downward and to the right. You can find it here, but it takes the upgrade of both DxWnd.exe and dxwnd.dll to get the new tweak "win:LockAllWindows" that fixes the movement once and for all. This should make the game stable enough to start the hunting of other possible (likely) minor defects. Enjoy.
I open this thread to have here some discussion on the features of next release. Please, do not spread comments about the new features on game threads because the discussion may become confused this way.
Also, there are several things to talk about, so I'll add them one at a time.
1) MS Shims
It proved to be quite useful to try running a game with DxWnd also adding some Microsoft shims to test which one of them fixed some specific problem. To make this operation easier (and possibly add it into a game configuration) DxWnd now will have a field in the Hook panel to add shims.
More shims can be used separated by a space (see screenshot).
I'm trying to find a way to list the available shims strings in some support menu (like what I did with codepages), though it doesn't seem so easy and could be impossible.
The operation uses the trick of setting the __COMPAT_LAYER environment variable before running the game and, obviously, works only when the game is run from the DxWnd interface.
Last edit: gho 2021-02-26
Will fixes for the games listed below also be released in version 2.05.65?
https://sourceforge.net/p/dxwnd/discussion/general/thread/ee871f4826/
https://sourceforge.net/p/dxwnd/discussion/general/thread/6843e420cc/
https://sourceforge.net/p/dxwnd/discussion/general/thread/226a492c69/
https://sourceforge.net/p/dxwnd/discussion/general/thread/63eff8db3d/
https://sourceforge.net/p/dxwnd/discussion/general/thread/ae8635e0ab/
Last edit: MrPepka 2021-02-26
So it seems sure that v2.05.65 won't leave me unemployed ...
Last edit: gho 2021-02-26
As for Torrente 3, it was about the image freeze while playing the game, and you have confirmed it on your own. Well, unless some other patch implemented by you fixed it
I still remembered about the Potato game I wrote about here - https://sourceforge.net/p/dxwnd/discussion/general/thread/456fe38937/?page=6&limit=25#be0a
@gho
Hmm nice and I like it but in this way only shim layers can be applied and not individual shim as written by dippy dipper here
https://sourceforge.net/p/dxwnd/discussion/general/thread/0d852410/?limit=25&page=35#9edf
(=Compatibility Modes in this list https://ss64.org/viewtopic.php?pid=8968)
There are more individual shims than layers (and they are more interesting).
However, I think it could make sense anyway, for example, compatibility with XP can be set up this way conveniently without interfering with the system.
Update:
Hmm I tried Magical Chase with a 16BitColor shim and it didn't seem to work, but then I tried 256Color and the screen really switched to 256 colors, but the game didn't believe it.
Maybe is it in conflict with the Video-Initial virtual color setting?
Update2:
Entomorph, on the other hand, was completely happy and didn't write anything about the 256 color requirement when I set the 256Color shim, although the window redraw was some bad, but that wasn't the goal of the test.
Last edit: huh 2021-02-26
Well, yes, I was aware that this trick has limitations, but setting individual shims seemed quite a bit out of reach. Last time I tried to handle shims I coded the "View -> Shims" menu command, but its behavior never fully convinced me. The idea is to have a way to apply shims dynamically, just for the DxWnd run session and without impacting on the program settings, that can be easily done by setting the __COMPAT_LAYER environment. But I agree, if there's a way to apply single shims programmatically I have to find how!
2) Custom time stretch
On this thread https://sourceforge.net/p/dxwnd/discussion/general/thread/0d6009cacc/#3358 we tried to set a time stretching value that was somewhere in the middle of the currently available values. So in this release the time stretching has a "Custom" flag (almost hidden, but I was in doubt of placing it in the Timing tab or hide it further in the Debug tab...) that allows experimenting very precise stretching values, such as floating point numbers with many decimal digits. The same could help trying very low or very high stretching values.
The flag usage is a little cumbersome, but it was intended for experimental use only, so at the moment it seems ok. To activate the custom stretching, in addition of setting this flag and the "time stretching" flag, it is also necessary to manually add a key value in dxwnd.ini, like these two lines:
the value for the timeshift entry will be a multiplier for all values in the slider scale, so that for instance 1x, 2x, 4x ... in this case will become 0.75x, 1,5x, 3x ....
As you can see in the "Gunmetal" discussion the flag proved to be almost useless, but it's there and who knows?
3) OUTFILEIO logging flag
Logging the file I/O operation can be quite useful, for instance when trying to build a game RIP, perhaps using the DxWnd virtual CD folder. So far, I suggested the trick of setting a unused fake HD device (like a fake HD z:\ mapped to z:) to enable the hooks for some file I/O operations, but the trick worked for only a subset of operations and it was necessary to remember to clear it when no longer useful.
The "Logs / File I/O op." flag now enables the logging for all the file I/O operations.
Perfect, this feature will be very useful (for me for sure) if will works properly. I think I missed it in DxWnd, but I never fully realized it. Thanks!
4) Flash defused
currently work in progress, but close enough ...
Here is a preliminary version. The flash time-bomb defuse is activated by the "patch:DefuseFlashBomb" tweak. There is only a little problem: it seems that the defusing takes place a little too late, so that the very first flash animation still has the timebomb. In "Ultimate Baja Madness" I see the nuked flash, but if I get back to the same screen (for instance, starting a race and getting back to main menu) all following flash are defused. In theory the trick should work also in the first run, but who knows, maybe is because of some Windows caching. It would be interesting to know if the same happens with other games or on other Window releases (this was on Win10-64).
I tested this version and conclusions:
Maja the Bee with this patch does not work at all, crashing at startup and even with the "Inject suspended process" and "Hot patch" options, the exception code is 0xc062 (or 0xc05 after enabling the "Handle Exceptions" option), SOFTWARE_NX_FAULT is given as FAILURE_BUCKET_ID (or NULL_INSTRUCTION_PTR if the "hook: DisableDEP" tweak is enabled)
Gra Piłkarska Pepsi, as it worked before, still works just as well
Pasaż Tesco works, but despite this patch it still doesn't use DxWnd hooks, maybe the problem is the "Pasaż Tesco zaprasza" board that displays every time you start the game
BackPacker Junior continues to show script error when trying to start a game. Perhaps the game uses some 16-bit library (?)
Pac-Man from Albion (edition from the Polish CyberMycha magazine) works, but the mouse does not work in it, despite this new patch
However, in the case of Warn Buster Zero, this patch (and the "Inject suspended process" together with the "Hot patch") made the mouse in the game started working, it's just a pity that the highlighting of the options in the menu on average matches the current position of the mouse
I checked more games and Zozola Skejt still does not work even with this patch, and Bakuś games (I mean "Nowe odlotowe gry bakusiowe" or something like that) with this patch and "Inject suspended process" and "Hot patch" work OK, although you can get scared by running them by this program because they hide the taskbar so that this one is transparent. But otherwise it's OK. Link to games - https://mirror.polish-abandonware.pl/Gry/Nowe%20odlotowe%20gry%20bakusiowe%20PL.7z
Last edit: MrPepka 2021-03-02
I also tested the Minuit Fantome with this patch and it's downright terrible here. Playing with this patch (+ "Inject suspended process" and "Hot patch" options) displays a black screen in its window and in the other window there is also a black screen that flickers every now and then. Any idea what's wrong with this patch?
Another game I tested with this patch is Amber: Journeys Beyond. Playing with this patch and with "Inject suspended process" and "Hot patch" is showing bad. Only a small window is displayed where the game image does not fit, and moving the mouse down in this window causes the window to move to the bottom of the screen. It is impossible to change the position of this window other than just downwards, which makes navigation in the game very difficult
The patch has been tested on subsequent flash games. Conclusions:
Drużyna Actimela works OK - https://mirror.polish-abandonware.pl/Gry/Dru%C5%BCyna%20Actimel%20kontra%20Mikroby%20PL.7z
Ekologia czyli jak chronić ziemię, starts and works, but after turning on some options, the dialogs are displayed, but they are on a black background, the window with the game glitches in a strange way - https://mirror.polish-abandonware.pl/Gry/EKOLOGIA%20czyli%20jak%20chroni%C4%87%20ZIEMI%C4%98%20-%20Nasz%20DOM%20PL.7z
Discovery Oceany and Discovery Wulkany, on the other hand, don't even work with this patch. Both games display a message that they cannot create files allegedly due to lack of disk space (no, this is not true), and when you turn on Fake HD, the games show a message that INI file not found - https://mirror.polish-abandonware.pl/Gry/Discovery%20Oceany%20PL.7z https://mirror.polish-abandonware.pl/Gry/Discovery%20Wulkany%20PL.7z
5) 3D panel and dynamic fog control
This is an attempt to recover and bring some order in the very confusing handling of 3d options.
This is the idea:
Direct3D Tab: holds flags that are specific for Microsoft Direct3D libraries
3D Tab: holds flags relative to generic 3D functions that should be mapped on all possible 3D renderers, like Direct3D, OpenGL, SDL etc.
In addition, some features are "static", that is having a fixed configuration for the whole game run, while a few others (when possible and with limitations) could be "dynamic", that is update on the fly through a slider in a control panel. So far the experiment is about fogging, next could be lighting maybe ...
6) nanosleep
A few wrappers and features use the system call Sleep to delay some operations. Now it is known that Sleep has a theorical grain of 1 mSec but can't grant a precision greater than the scheduler interval, about 20mSec (if I recall correctly) so it's no use to try delay values below that value, the timing becomes easily unreliable.
In this release there's a flag to apply a nanosleep routine whole (theorical) grain is 100nSec, that is 10.000 times smaller, that uses system events to ensure a higher precision. All this probably also means a higher CPU usage, but it's worth trying. So far the "nanosleep" flag only affects the wrapper of the stretched Sleep call, but it could be interesting to try it with the CPU speed flags ("CPU slow down" and "CPU max usage"). Maybe we could get a smoother slow down.
I think I discovered a rather interesting bug in DxWnd. Namely, a certain game has an icon with such colors that trying to add this game to DxWnd ends up crashing (and also the WerFault.exe process crashes, which is strange). This game can be downloaded from here - https://remcodek.home.xs4all.nl/down_games.html
@Gho is there a chance for you to take a look at this game and see what's wrong?
Oh, and the game is called Witches like something
Last edit: MrPepka 2021-03-01
Okay, now the whole program crashed and at startup I only have a message that the application was not properly initialized and I have the code 0xc0000142. What I should do now? Reinstalling the application does not help :(
Phew, I already know where these crashes came from. I just ran out of space to add new games (I have 255 on my list). It turns out that the range of integers is overrun (I think I've seen it somewhere before. Oh yeah - https://en.wikipedia.org/wiki/Integer_overflow)
@Gho did you know about this bug before?
It's not a full bug because the 255 limit is hardcoded in DxWnd to avoid a too heavy impact on the system.
The problem is that a windows hook like that used by DxWnd needs that the system compares every window creation with the pathname of the owner task, so we can have up to 255 string compares per window creation and this seemed reasonably high.
But of course the expected behavior wan to to crash the game: instead, DxWnd should have warned you and politely refuse to add a 256th game. I'll check the problem.
Ok, I think I made too many changes to this release. Before it's too late and I get crazy I posted the v2.05.56 out on SF download area, let's hope everything is ok.
In effect, I suspect that it's not all settled, I've got some troubles with "Space Clash", but that game is cursed, everything is possible with it.
From tomorrow on I'll have to struggle trying to recover some possible mess from this release. Oh, damn!
@MrPepka: why do you blame this patch for "Amber Journey Beyond"? That game never worked satisfactorily neither with this patch nor with any former DxWnd release. It took me a dedicated patch to stop this annoying movement of the game window downward and to the right. You can find it here, but it takes the upgrade of both DxWnd.exe and dxwnd.dll to get the new tweak "win:LockAllWindows" that fixes the movement once and for all. This should make the game stable enough to start the hunting of other possible (likely) minor defects. Enjoy.