There is this game "Phantom Sol" and it's rather obscure, like if you need it for testing just tell me. What I get here is nothing with SetWindowsHook (not reacting to any configuration) and with Inject suspended process I get an error as shown on the screenshot.
Game requires .NET framework 4-something, 4.7.2 Runtime worked for me. The PS_ConfigTool.exe is all in Japanese, it doesn't need system locale set, and will be automatically launched first time to create the settings file (Gamedata.dat). Default are good enough and the biggest button at the bottom then launches the game.
There is no default fullscreen option, but it can be switched to with Alt+Tab while running. Resolution looks like 800x600, I would like it different in any case. Can DxWnd hook to it somehow or whatever is blocking it can't be bypassed so easily?
It's difficult, not impossible. I was reading some stuff, like this http://jacquelin.potier.free.fr/winapioverride32/doc/net.htm but very likely commercial games will be of the worst kind to be hooked. Anyway, if you suggest me some link I may surely start some investigation from this case, you never know...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I sent you a link to have a look at this one. I guess it can be called a commercial game but looks like it didn't make the headlines... it would be nice if DxWnd could be implemented here somehow.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The game is a .NET executable that has a format rather different from what DxWnd is able to parse and hook. But despite that, the .NET classes are rendering to video through D3D11 and this library can be hooked with "hot patch" injection.
This way I miss some important hook (for instance, to intercept the window creation to resize it), but all D3D11/DXGI method can be captured.
The screenshot in attach shows the effect of a hook on the viewport that enlarges the image. It's nothing useful, but it demonstrates that we can manage these objects. Now I have to learn how to fix the methods in the correct way!
Another interesting news: as a side effect of hooking the game with an odd configuration ("Fullscreen only" on and "Run in window" off!) the game window becomes resizeable, so you can stretch it to take the position and site that you like best. Unfortunately, the operation is manual and is not saved for the next run, but there's work in progress here ....
Really impressed with this... actually, I tried a few minor changes to this configuration and pretty much got it to work exactly as I'd like it: that is fullscreen on desktop (here 1280x800) and other DxWnd functions acceptable (Timing for instance works just fine).
There is a catch though, when the game is launched (I do it through DxWnd interface), it starts of windowed as normal, at this point I switch it to fullscreen with Alt+Tab, where it still changes the resolution to it's native 800x600 and then after switching back to window (Alt+Tab for a second time) it renders full stretched as intended (screenshot).
I think this would work for other display settings as well, should anyone want to keep the aspect ratio for example. Anyway, very nice indeed, I had some look how all this works and that's no simple stuff to say the least.
(edit)
One thing is that when I close the game (both with Alt+F4 and normally in-game) it throws a generic error how the application stopped working, just after closing in fact. This happens each time (with this configuration, the game running clean doesn't give this error) and has no real influence on gameplay or "quality of life" but the error might be of some information.
Probably the fact that this game has a .NET PE header makes DxWnd hook it only partially and this is the culprit for some strange behavior and side effects. This just to say that maybe any improvement in the game hooking could break the delicate balance that makes it working now.
Looking at the logs I found a flaw in the current release: the object type IID_IDXGIFactory1 doesn't get hooked and this would prevent hooking the swap chain. The game tries to find and use different object types (using the QueryInterface method) so this flaw may or may not have effect on a given configuration. Anyway, the attached release fixes the problem and could work better (you never know ...).
Regarding the object type your referring to (IID_IDXGIFactory1 ) are there any more hints to what this can affect? I doesn't tell me much, even in general (area of game would be video, audio, controls, etc.?).
I didn't run into problems in 2.05.27, though I also didn't play the entire game in all possible manners, would there be something to look out for?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, let me try to explain.
First, I have to admit that I don't know DXGI deeply, so I may easily say some bullshit.
In D3D11 hooking, you can control the rendering by setting the swap chain object, so you have to be able to hook methods like CreteDeviceAndSwapChain.
But these methods belong to the Factory objects, like IID_IDXGIFactory, IID_IDXGIFactory1 or IID_IDXGIFactory2, then you have to hook these objects as well in order to reach the swap chain.
Now, a game usually start creating a D3D session and then tries to create a factory object of the different types, chosing the best one available in the system: IID_IDXGIFactory2 if available, otherwise IID_IDXGIFactory1 or IID_IDXGIFactory in the worst case. So, not knowing in advance which type will be used, you have to hook them all because missing a hook may break the chain of connections that allow DxWnd to reach the target swap chain.
So, the final effect would be that the swap chain would be hooked or not depending on the fact that IID_IDXGIFactory1 is used or not.
Maybe ...
Last edit: gho 2019-09-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The log would not display any error, but there are invocations to the ddraw BltFast method that seems to be giving troubles in different video reviews games as nicely.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, thanks, it seems that BltFast became a real problem since some recent Windows updates. Fortunately the method can be mapped to ordinary the Blt method, I fear I'll have to add some code and a new compatibility flag ....
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
erm... please excuse me but isn't Mr/Ms @assass spamming to sell some basketball shoes? On the great "Phantom Sol" thread, opened by me no less. Outrageous ; )
I'll take the opportunity to mention "Terra Arcadia" - an identically build game on .NET framework but it has a significant issue: replay desync. This isn't a DxWnd concern because replays desync always, I'm bringing this only in hope someone can at least confirm the error. It seems like no man ever played this game.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The only info seems at doujinstyle.com (the site has 2 sections for music/games, in games you'll find it by title). Please take your time, especially regarding "replay desync" problem - it might take a moment to explain and test it. Unless of course you already have some idea what I mean (it's a "bullet hell" shooting game type).
Last edit: gho 2021-02-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here's my late export, it's "late" because the Alt+Tab trick doesn't work anymore (window coordinates are wrong). Here are some notes from this profile:
After launch Alt+Tab twice (switching back from fullscreen renders stretched).
!game/replay out of sync by default, even worse when running game alone
(from start on 1st Stage, with DxWnd breaks at 2nd Stage)
Maybe from some DxWnd version this workaround method stopped working but that's not so important as the other issue. The game is supposed to automatically record and save play (by input I assume). You'd have advance somewhat, lose (or go through all 6 stages), later you may see what's recorded is not what was actually played.
But this seems even worse than ordinary replay desync on other game engines, I observed how the number of "Extends" (extra lifes/continues) continually rises for no reason, falls down to 0 at some point during play and starts rising again (it's the bar on screenshot). I found no explanation why it would behave this strange way, it seems like the game process is simply completely messed...
I only wonder how nobody would ever notice or ask to fix this. I know this is not the game of the year but nothing on developers page indicates a problem was ever reported (no patch, no note, etc.). So does it happen only on Win7 or even only to me?
Hi.
There is this game "Phantom Sol" and it's rather obscure, like if you need it for testing just tell me. What I get here is nothing with SetWindowsHook (not reacting to any configuration) and with Inject suspended process I get an error as shown on the screenshot.
Game requires .NET framework 4-something, 4.7.2 Runtime worked for me. The PS_ConfigTool.exe is all in Japanese, it doesn't need system locale set, and will be automatically launched first time to create the settings file (Gamedata.dat). Default are good enough and the biggest button at the bottom then launches the game.
There is no default fullscreen option, but it can be switched to with Alt+Tab while running. Resolution looks like 800x600, I would like it different in any case. Can DxWnd hook to it somehow or whatever is blocking it can't be bypassed so easily?
DxWnd is currently unable to hook any .NET program, I don't even know if that's possible.
In any case it can',t be in near future, sorry.
I didn't knew it can't be done, thanks for the info.
It's difficult, not impossible. I was reading some stuff, like this http://jacquelin.potier.free.fr/winapioverride32/doc/net.htm but very likely commercial games will be of the worst kind to be hooked. Anyway, if you suggest me some link I may surely start some investigation from this case, you never know...
I sent you a link to have a look at this one. I guess it can be called a commercial game but looks like it didn't make the headlines... it would be nice if DxWnd could be implemented here somehow.
Thanks. I suppose I should try to seek and hook something in the middle of this mess ... time to go back to development school!
Last edit: gho 2019-09-18
Some interesting news.
The game is a .NET executable that has a format rather different from what DxWnd is able to parse and hook. But despite that, the .NET classes are rendering to video through D3D11 and this library can be hooked with "hot patch" injection.
This way I miss some important hook (for instance, to intercept the window creation to resize it), but all D3D11/DXGI method can be captured.
The screenshot in attach shows the effect of a hook on the viewport that enlarges the image. It's nothing useful, but it demonstrates that we can manage these objects. Now I have to learn how to fix the methods in the correct way!
Another interesting news: as a side effect of hooking the game with an odd configuration ("Fullscreen only" on and "Run in window" off!) the game window becomes resizeable, so you can stretch it to take the position and site that you like best. Unfortunately, the operation is manual and is not saved for the next run, but there's work in progress here ....
Last edit: gho 2019-09-18
here some (maybe) useful resources:
https://stackoverflow.com/questions/28095798/how-to-change-window-size-in-directx-11-desktop-application
https://gamedev.stackexchange.com/questions/74526/directx-11-updating-resolution
https://www.unknowncheats.me/forum/direct3d/159760-d3d11-handling-window-resize.html
Last edit: gho 2019-09-18
Really impressed with this... actually, I tried a few minor changes to this configuration and pretty much got it to work exactly as I'd like it: that is fullscreen on desktop (here 1280x800) and other DxWnd functions acceptable (Timing for instance works just fine).
There is a catch though, when the game is launched (I do it through DxWnd interface), it starts of windowed as normal, at this point I switch it to fullscreen with Alt+Tab, where it still changes the resolution to it's native 800x600 and then after switching back to window (Alt+Tab for a second time) it renders full stretched as intended (screenshot).
I think this would work for other display settings as well, should anyone want to keep the aspect ratio for example. Anyway, very nice indeed, I had some look how all this works and that's no simple stuff to say the least.
(edit)
One thing is that when I close the game (both with Alt+F4 and normally in-game) it throws a generic error how the application stopped working, just after closing in fact. This happens each time (with this configuration, the game running clean doesn't give this error) and has no real influence on gameplay or "quality of life" but the error might be of some information.
Last edit: White 2019-09-18
Probably the fact that this game has a .NET PE header makes DxWnd hook it only partially and this is the culprit for some strange behavior and side effects. This just to say that maybe any improvement in the game hooking could break the delicate balance that makes it working now.
Looking at the logs I found a flaw in the current release: the object type IID_IDXGIFactory1 doesn't get hooked and this would prevent hooking the swap chain. The game tries to find and use different object types (using the QueryInterface method) so this flaw may or may not have effect on a given configuration. Anyway, the attached release fixes the problem and could work better (you never know ...).
Regarding the object type your referring to (IID_IDXGIFactory1 ) are there any more hints to what this can affect? I doesn't tell me much, even in general (area of game would be video, audio, controls, etc.?).
I didn't run into problems in 2.05.27, though I also didn't play the entire game in all possible manners, would there be something to look out for?
Well, let me try to explain.
First, I have to admit that I don't know DXGI deeply, so I may easily say some bullshit.
In D3D11 hooking, you can control the rendering by setting the swap chain object, so you have to be able to hook methods like CreteDeviceAndSwapChain.
But these methods belong to the Factory objects, like IID_IDXGIFactory, IID_IDXGIFactory1 or IID_IDXGIFactory2, then you have to hook these objects as well in order to reach the swap chain.
Now, a game usually start creating a D3D session and then tries to create a factory object of the different types, chosing the best one available in the system: IID_IDXGIFactory2 if available, otherwise IID_IDXGIFactory1 or IID_IDXGIFactory in the worst case. So, not knowing in advance which type will be used, you have to hook them all because missing a hook may break the chain of connections that allow DxWnd to reach the target swap chain.
So, the final effect would be that the swap chain would be hooked or not depending on the fact that IID_IDXGIFactory1 is used or not.
Maybe ...
Last edit: gho 2019-09-20
The log would not display any error, but there are invocations to the ddraw BltFast method that seems to be giving troubles in different video reviews games as nicely.
Yes, thanks, it seems that BltFast became a real problem since some recent Windows updates. Fortunately the method can be mapped to ordinary the Blt method, I fear I'll have to add some code and a new compatibility flag ....
erm... please excuse me but isn't Mr/Ms @assass spamming to sell some basketball shoes? On the great "Phantom Sol" thread, opened by me no less. Outrageous ; )
I'll take the opportunity to mention "Terra Arcadia" - an identically build game on .NET framework but it has a significant issue: replay desync. This isn't a DxWnd concern because replays desync always, I'm bringing this only in hope someone can at least confirm the error. It seems like no man ever played this game.
no wonder, it's hard even to find some info on the web. Do you have some link about the game?
The only info seems at doujinstyle.com (the site has 2 sections for music/games, in games you'll find it by title). Please take your time, especially regarding "replay desync" problem - it might take a moment to explain and test it. Unless of course you already have some idea what I mean (it's a "bullet hell" shooting game type).
Last edit: gho 2021-02-03
Here's my late export, it's "late" because the Alt+Tab trick doesn't work anymore (window coordinates are wrong). Here are some notes from this profile:
After launch Alt+Tab twice (switching back from fullscreen renders stretched).
!game/replay out of sync by default, even worse when running game alone
(from start on 1st Stage, with DxWnd breaks at 2nd Stage)
Maybe from some DxWnd version this workaround method stopped working but that's not so important as the other issue. The game is supposed to automatically record and save play (by input I assume). You'd have advance somewhat, lose (or go through all 6 stages), later you may see what's recorded is not what was actually played.
But this seems even worse than ordinary replay desync on other game engines, I observed how the number of "Extends" (extra lifes/continues) continually rises for no reason, falls down to 0 at some point during play and starts rising again (it's the bar on screenshot). I found no explanation why it would behave this strange way, it seems like the game process is simply completely messed...
I only wonder how nobody would ever notice or ask to fix this. I know this is not the game of the year but nothing on developers page indicates a problem was ever reported (no patch, no note, etc.). So does it happen only on Win7 or even only to me?