Hi, I have tried applying DxWnd with Empire Earth I but it will crash at splash screen, with an Visual C++ Runtime Error reading "This application has requested the runtime to terminate in an unusual way. Please contact ...
I am using Windows 7 x64.
What logs do you need? A total log is 22MB large.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had a look, and I must say that this game promises to be "interesting"!
It seems to use a mix of GDI graphis, d3d8 and ddraw7 surfaces not easy to understand.
I don't think it will be an easy one....
On my PC the game crashes after the intro movie (that, by the way, is not visible...) so if the problem is similar to yours, I should be able to replicate all the logs by myself.
If you want to post them anyway, just remember to compress them: there's a lot of duplicated info in there, so the compression rate should be very high and the result should be no problem to upload. Anyway, the suggested log flags are "Enable trace", "DxWnd" and "Debug".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Finally some little progress.
Empire Earth is using one of the worst nightmares a graphic programmer could dip into: directdraw 7, with all its intricacies.
Not happy with that, first thing it does is to create a test window sized 16x16 pixels in the upper-left screen corner, and within that area it tries to sample the directdraw capabilities.
Using dxwnd the operations in that area don't satisfy its logic, and this is why it keeps greating multiple test windows while the main screen stays black.
So, the problem now is to find out what goes wrong within this test operation and emulate a positive result. Once understood, I'm sure it will be easy to fix. But so far, it's like searching in the fog.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Another little step: discovered that the game enquiries the primary surface with GetAttachedSurface looking for a DDSCAPS_FLIP capability: in window that has to be emulated and should return the backbuffer surface.
This done, the intro movie finally shows, and that's it for now! The game hangs right after the end of the movie. Also, the mess of the several sample surfaces is still present, garbaging your desktop.
If you're curious, here in attach all the needed to have a look by yourself.
Hm... seems to be a pretty nasty problem. Interesting though that you can kinda run EE with D3DViewer, but that program is neither developed any further nor it worked pretty well. Most of time it stayed black and froze, but wild clicking actually sometimes had the effect that you can even see the main menu of EE. But still it will freeze relatively soon afterwards, never made it to actually start a game in window mode with it.
I guess you use some different approach to force windows mode, but maybe you'll find things out that've done in D3DViewer and use them in DxWnd.
If this actually works one day, you would help many people that enjoy EE now in the new-recreated lobby again where everybody is just waiting for a way out of full screen mode.
(YouTube video of D3DViewer: /watch?v=CNgov5epRvw)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had a look at the D3DViewer assembly, but as far as I could see it seems to link a non-open-source code injection library, so I lost interest in it.
Too bad that the source code of the rest is not available! It would be interesting to compare it with DxWnd to improve it.
I made some more progresses: in direct surface mode, the problem seems to be that right after the intro movies the ddraw TestCooperativeLevel method keeps failing, maybe because of a screen resolution change. How is it possible to fix this problem?
Then, in surface emulation mode, surfaces with MIPMAP properties had to be properly handled: so far I got the game running, but with the screen just black, apart from some GDI text and the textured cursor. Not enough to be playable, but encouraging!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After fixing a few bugs, now the game starts and runs, altough you can't see any image (sic!).
There are two behaviour modes with their own problems:
in surface emulation mode, the log shows no significant errors, but the screen stays black, or just shows the GDI text and the cursor. What broke off?
in direct mode, after the intro movies the game switches resolution (I guess) and this cause a DDERR_WRONGMODE error in the TestCooperativeLevel and Restore methods.
In the meanwhile, in both situations the game plays music and (if you can guess the correct spot) intercepts mouse clicks and runs.
If anyone is curious, he can use the debug release in attach.
Please, whish me some good luck.
Last edit: gho 2013-11-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Got it!
It's incredible: by sheer luck, I set the desktop screen to 16BPP color depth and the game started to work!
Look at some screenshots in attach.
The mode that does the trick is the direct surface mode, but you have to set the desktop to 16BPP, while the DxWnd options to do that don't seem to be working. I'll check for that, I hope it should be fairly simple....
The behaviour is still far from perfect: the intro movies don't intercept the mouse clicks (suggestion: remove or rename the movie files, if you don't want to watch the whole intro all the times!), alt-tabbing the program may cause it to blit directly on the screenoutside the window, sometimes the cursor disappear.... but handling the game with care, it seems perfectly playable!
A small update: you can play the game both on 16 and 32 color depth: the trick is simply to run the game without dxwnd, to set the game at the desired color depth (see options in the main game menu) that corresponds to the desktop color value and then save, exit and run the game again but windowed through dxwnd.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Another small fix. Now you need not to put the desktop in 16BPP color depth: the
color "Forces 16BPP desktop" flag is working.
Here comes a preview of v2.02.43 release and EE import file.
There are still problems with the mouse and with the "focus": when the window loses control (the mouse seems to produce no effect...) you can try to recover by minimizing and restoring the game window.
Release v2.02.43 is now uploaded in the sourceforge portal.
Since the preliminary version above, I had to fix a couple of problems, so you're invited to use the new one.
Empire Eart is now greatly improved, but still there are at lease a couple of nasty problems:
1) the game sometimes loses control of the mouse: it shows the main menu, is responsive to several window commands such as window resize or move, but the texturex cursor is stuck and there's no way to interact with the menu. Sometimes (but not always!) minimizing and restoring fixes the problem.
2) the textured cursor sometimes is not properly cleares as it moves on the screen
3) fake-fullscreen modes seem to be not working
4) when you alt-tab between windows, the game start blitting on the upper-left corner of the screen
So, there's still much to do, but if you're lucky and the game starts properly, then it is perfectly playable!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Wow that's phantastic, it really works. What I observed with the cursor control issues:
It won't react at all if you don't keep the window focus during the startup. When you start EE and click on the window while it is still black, it will gain mouse controle.
Alt+Tab doesn't work for me actually. Even when the window doesn't have the focus any more, the cursor will be only visible within the window and apply to the game even though it doesn't have the focus.
And finally, you cannot click with the mouse any more (but it reacts well to movements) when pressing "Multiplayer". It would be nice to use Multiplayer as well since my project is doing exactly that. Maybe that hint helps you: it seems that pressing on Multiplayer creates a new window.
All in all: great work so far!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What do you mean exactly?
On my PC, the only serious obstacle to the multiplayer game seems the need of the CD key (see screenshot). Not a major issue, I just have to recover the game box/leaflet from the cellar, it will just require some time to search it...
Did you get past this screen?
About the click to gain focus, I noticed a similar effect. I wonder if anyone can suggest a programmatic way to do the same effect.
Ach! Something strange is happening....
I retrieved the box of my EE The Art of Conquest expansion with the internal label holding a legal CD key. I tried to enter it to upgrade and run the net game through the internet server, but the key is reported to be invalid, both in the screenshot I just uploaded (before applying the patches) and in the v2.0 patch that is requesting the CD key!
My CD box is italian, while the ISO I mounted wak UK: could it make the difference?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not really, the languages don't matter. Basic Empire Earth 1 on version 1.0 has the old interface of your screenshot while the AOC expansion and the EE 2.0 patch both have the new interface inside Multiplayer. You should be able to enter that interface even without any valid CD-key, it will only ask you for a CD-key after hitting login (which is not possible since the official multiplayer servers are gone and the inofficial ones require another patch to make them available again). If DxWnd works with the AOC interface, it surely can also deal with EE 2.0.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I got everything set up.
EE release 2.0 multiplayer screen shows as depicted and there's no way to initialize the connection to any server.
Things go pretty well until you try to hit the "Other Multiplayer" button, that doesn't show the next screen.
I guess this is the broken toy.
Last minute update: I did some more experiments and, despite the fact I didn't understand fully what was going on, I discovered that launching the game with 0,0 screen size (which means use the resolution coordinates...) the Other Multiplayer screen is showing. So, what's next?
Hi, I have tried applying DxWnd with Empire Earth I but it will crash at splash screen, with an Visual C++ Runtime Error reading "This application has requested the runtime to terminate in an unusual way. Please contact ...
I am using Windows 7 x64.
What logs do you need? A total log is 22MB large.
I had a look, and I must say that this game promises to be "interesting"!
It seems to use a mix of GDI graphis, d3d8 and ddraw7 surfaces not easy to understand.
I don't think it will be an easy one....
On my PC the game crashes after the intro movie (that, by the way, is not visible...) so if the problem is similar to yours, I should be able to replicate all the logs by myself.
If you want to post them anyway, just remember to compress them: there's a lot of duplicated info in there, so the compression rate should be very high and the result should be no problem to upload. Anyway, the suggested log flags are "Enable trace", "DxWnd" and "Debug".
Here is the logs I am getting
Finally some little progress.
Empire Earth is using one of the worst nightmares a graphic programmer could dip into: directdraw 7, with all its intricacies.
Not happy with that, first thing it does is to create a test window sized 16x16 pixels in the upper-left screen corner, and within that area it tries to sample the directdraw capabilities.
Using dxwnd the operations in that area don't satisfy its logic, and this is why it keeps greating multiple test windows while the main screen stays black.
So, the problem now is to find out what goes wrong within this test operation and emulate a positive result. Once understood, I'm sure it will be easy to fix. But so far, it's like searching in the fog.
Another little step: discovered that the game enquiries the primary surface with GetAttachedSurface looking for a DDSCAPS_FLIP capability: in window that has to be emulated and should return the backbuffer surface.
This done, the intro movie finally shows, and that's it for now! The game hangs right after the end of the movie. Also, the mess of the several sample surfaces is still present, garbaging your desktop.
If you're curious, here in attach all the needed to have a look by yourself.
Last edit: gho 2013-11-17
Hm... seems to be a pretty nasty problem. Interesting though that you can kinda run EE with D3DViewer, but that program is neither developed any further nor it worked pretty well. Most of time it stayed black and froze, but wild clicking actually sometimes had the effect that you can even see the main menu of EE. But still it will freeze relatively soon afterwards, never made it to actually start a game in window mode with it.
I guess you use some different approach to force windows mode, but maybe you'll find things out that've done in D3DViewer and use them in DxWnd.
If this actually works one day, you would help many people that enjoy EE now in the new-recreated lobby again where everybody is just waiting for a way out of full screen mode.
(YouTube video of D3DViewer: /watch?v=CNgov5epRvw)
I had a look at the D3DViewer assembly, but as far as I could see it seems to link a non-open-source code injection library, so I lost interest in it.
Too bad that the source code of the rest is not available! It would be interesting to compare it with DxWnd to improve it.
I made some more progresses: in direct surface mode, the problem seems to be that right after the intro movies the ddraw TestCooperativeLevel method keeps failing, maybe because of a screen resolution change. How is it possible to fix this problem?
Then, in surface emulation mode, surfaces with MIPMAP properties had to be properly handled: so far I got the game running, but with the screen just black, apart from some GDI text and the textured cursor. Not enough to be playable, but encouraging!
Damn it, I got so close....
After fixing a few bugs, now the game starts and runs, altough you can't see any image (sic!).
There are two behaviour modes with their own problems:
in surface emulation mode, the log shows no significant errors, but the screen stays black, or just shows the GDI text and the cursor. What broke off?
in direct mode, after the intro movies the game switches resolution (I guess) and this cause a DDERR_WRONGMODE error in the TestCooperativeLevel and Restore methods.
In the meanwhile, in both situations the game plays music and (if you can guess the correct spot) intercepts mouse clicks and runs.
If anyone is curious, he can use the debug release in attach.
Please, whish me some good luck.
Last edit: gho 2013-11-20
Got it!
It's incredible: by sheer luck, I set the desktop screen to 16BPP color depth and the game started to work!
Look at some screenshots in attach.
The mode that does the trick is the direct surface mode, but you have to set the desktop to 16BPP, while the DxWnd options to do that don't seem to be working. I'll check for that, I hope it should be fairly simple....
The behaviour is still far from perfect: the intro movies don't intercept the mouse clicks (suggestion: remove or rename the movie files, if you don't want to watch the whole intro all the times!), alt-tabbing the program may cause it to blit directly on the screenoutside the window, sometimes the cursor disappear.... but handling the game with care, it seems perfectly playable!
Last edit: gho 2013-11-21
A small update: you can play the game both on 16 and 32 color depth: the trick is simply to run the game without dxwnd, to set the game at the desired color depth (see options in the main game menu) that corresponds to the desktop color value and then save, exit and run the game again but windowed through dxwnd.
Another small fix. Now you need not to put the desktop in 16BPP color depth: the
color "Forces 16BPP desktop" flag is working.
Here comes a preview of v2.02.43 release and EE import file.
There are still problems with the mouse and with the "focus": when the window loses control (the mouse seems to produce no effect...) you can try to recover by minimizing and restoring the game window.
Last edit: gho 2013-11-22
Release v2.02.43 is now uploaded in the sourceforge portal.
Since the preliminary version above, I had to fix a couple of problems, so you're invited to use the new one.
Empire Eart is now greatly improved, but still there are at lease a couple of nasty problems:
1) the game sometimes loses control of the mouse: it shows the main menu, is responsive to several window commands such as window resize or move, but the texturex cursor is stuck and there's no way to interact with the menu. Sometimes (but not always!) minimizing and restoring fixes the problem.
2) the textured cursor sometimes is not properly cleares as it moves on the screen
3) fake-fullscreen modes seem to be not working
4) when you alt-tab between windows, the game start blitting on the upper-left corner of the screen
So, there's still much to do, but if you're lucky and the game starts properly, then it is perfectly playable!
Wow that's phantastic, it really works. What I observed with the cursor control issues:
It won't react at all if you don't keep the window focus during the startup. When you start EE and click on the window while it is still black, it will gain mouse controle.
Alt+Tab doesn't work for me actually. Even when the window doesn't have the focus any more, the cursor will be only visible within the window and apply to the game even though it doesn't have the focus.
And finally, you cannot click with the mouse any more (but it reacts well to movements) when pressing "Multiplayer". It would be nice to use Multiplayer as well since my project is doing exactly that. Maybe that hint helps you: it seems that pressing on Multiplayer creates a new window.
All in all: great work so far!
What do you mean exactly?
On my PC, the only serious obstacle to the multiplayer game seems the need of the CD key (see screenshot). Not a major issue, I just have to recover the game box/leaflet from the cellar, it will just require some time to search it...
Did you get past this screen?
About the click to gain focus, I noticed a similar effect. I wonder if anyone can suggest a programmatic way to do the same effect.
Last edit: gho 2013-11-24
Oh, sorry, yes, I forgot to tell you that Empire Earth got newer versions back when it was officially sold (1.0.0 --> 1.0.4 --> 2.0.0)
You find them here (install in right order): http://ee.heavengames.com/downloads/lister.php?category=patches
After you got them, your screen after clicking multiplayer looks different. The rest of the game graphics shouldn't be affected.
Ach! Something strange is happening....
I retrieved the box of my EE The Art of Conquest expansion with the internal label holding a legal CD key. I tried to enter it to upgrade and run the net game through the internet server, but the key is reported to be invalid, both in the screenshot I just uploaded (before applying the patches) and in the v2.0 patch that is requesting the CD key!
My CD box is italian, while the ISO I mounted wak UK: could it make the difference?
Not really, the languages don't matter. Basic Empire Earth 1 on version 1.0 has the old interface of your screenshot while the AOC expansion and the EE 2.0 patch both have the new interface inside Multiplayer. You should be able to enter that interface even without any valid CD-key, it will only ask you for a CD-key after hitting login (which is not possible since the official multiplayer servers are gone and the inofficial ones require another patch to make them available again). If DxWnd works with the AOC interface, it surely can also deal with EE 2.0.
Ok, I got everything set up.
EE release 2.0 multiplayer screen shows as depicted and there's no way to initialize the connection to any server.
Things go pretty well until you try to hit the "Other Multiplayer" button, that doesn't show the next screen.
I guess this is the broken toy.
Last edit: gho 2013-11-29
Last minute update: I did some more experiments and, despite the fact I didn't understand fully what was going on, I discovered that launching the game with 0,0 screen size (which means use the resolution coordinates...) the Other Multiplayer screen is showing. So, what's next?
Last edit: gho 2013-11-29