Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Army Men RTS bright issue with Dd7to9 #265

Closed
SAM1430B opened this issue Apr 2, 2024 · 27 comments
Closed

Army Men RTS bright issue with Dd7to9 #265

SAM1430B opened this issue Apr 2, 2024 · 27 comments

Comments

@SAM1430B
Copy link

SAM1430B commented Apr 2, 2024

Hi,

The game looks like brighter than it should be.

Not sure if there are better settings or i'm messing something and i've tried all the options and it seems the problem still there.

I have copied ddraw.dll and dxwrapper.dll & .ini .

Thank you for your efforts and this awesome project.

ArmyMenRTS
ArmyMenRTS2

@elishacloud
Copy link
Owner

Can you upload the dxwrapper log file?

@SAM1430B
Copy link
Author

SAM1430B commented Apr 3, 2024

Sure thing.
dxwrapper-amrts.log.txt

@elishacloud
Copy link
Owner

Try with this update and let me know if you see any difference: dxwrapper.zip

@SAM1430B
Copy link
Author

SAM1430B commented Apr 3, 2024

Yeah thank you, i've got better result.

i'm gonna test Dd7to9 combined with DDrawCompat next week and post a report.

Have a good night✨

@elishacloud
Copy link
Owner

Ok, very good. I am glad it is working better.

BTW: DDrawCompat cannot be combined with Dd7to9.

@SAM1430B
Copy link
Author

I said next week but time flies so fast lol. Anyway after long play test it was flawless getting 60fps which is the most part i like. Except the smoke/dust look more dense.
Army_Men_RTS_Screenshot_2024 04 17_-_22 38 08 36

Also i wanted to set a windowed screen with 1920x1080 size (which the game doesn't support it) tried DdrawOverrideWidth/Height seems making black frame rather than a stretched window, even DdrawCustomWidth/Height and DdrawClippedWidth/Height they seem not effecting anything.

@elishacloud
Copy link
Owner

Anyway after long play test it was flawless getting 60fps which is the most part i like.

Great. Very good.

Except the smoke/dust look more dense.

This could be because I have not added MipMap support.

Also i wanted to set a windowed screen with 1920x1080 size (which the game doesn't support it)

Yeah, those options are mainly for 2D games. I have not updated them for 3D games yet. It is not a high priority for me at this time. I am trying to finish the implementation of all DirectDraw/Driect3D functions first.

@SAM1430B
Copy link
Author

Cool, we wish the best and everything goes smoothly.

@elishacloud
Copy link
Owner

Except the smoke/dust look more dense.

This could be because I have not added MipMap support.

I added MipMap support. See if this fixes the smoke/dust issue: dxwrapper.zip

@SAM1430B
Copy link
Author

Seemed to be darker and smoke/dust issue still there.
Screenshot_2024-05-13

@elishacloud
Copy link
Owner

That dark issue is a MipMap issue. I guess it is an autogen issue. I need to collect some logs. Can you use the below build and send me the logs?

dxwrapper.zip

@SAM1430B
Copy link
Author

Sure as you wish.
dxwrapper-amrts.log.txt

@elishacloud
Copy link
Owner

That is weird. I am not seeing any of the new logs. Did you run the game long enough to see the issue? Can you try with this one? Make sure you play the game long enough to see any issue.

dxwrapper.zip

@SAM1430B
Copy link
Author

You're right it wasn't long play.
I wish this would be what you want.
dxwrapper-amrts.log.txt

@elishacloud
Copy link
Owner

Ok, I think this one should fix the dark issue: dxwrapper.zip

@elishacloud
Copy link
Owner

This should fix everything in this game except the resizing. There is another issue on that already.

@SAM1430B
Copy link
Author

Yes, except these two issues which one of them you're already going to add it (Resizing) in the future ✨.

@elishacloud
Copy link
Owner

I can see the same (I believe it is the same) smoke issue with Dark Reign 2. I have not looked into it yet, but I will check it out.

@SAM1430B
Copy link
Author

Yes, they made by the same engine.

@elishacloud
Copy link
Owner

I know what the issue is but I don't know what is causing it or how best to fix it. The issue is that the game calls SetTextureStageState and sets D3DTSS_ALPHAOP to D3DTOP_SELECTARG1 when dd7to9 is enabled. However, when using the native DirectDraw the game sets D3DTSS_ALPHAOP to D3DTOP_MODULATE.

If I overwrite the game and force the setting to D3DTOP_MODULATE when using dd7to9 it solves the issue. However, that would break other games and is not a proper fix. I am not quite sure why the game behaves differently here.

@SAM1430B
Copy link
Author

Yes, i've mentioned this before the game behaves different (e.g dd7to9 caps fps to 60, native to 30 fps) but this was in Windows 10 (not sure if this related).

Anyway i think the alternative way to fix it by making option to force D3DTOP_MODULATE (in the config file maybe).

@elishacloud
Copy link
Owner

Anyway i think the alternative way to fix it by making option to force D3DTOP_MODULATE (in the config file maybe).

Yes, I thought about that. However, the issue is that there is a whole list of options that are available for D3DTSS_ALPHAOP. In fact the game could send hundreds or thousands of requests to set that option per second. How do I know which ones to force to D3DTOP_MODULATE and which ones should not?

I could just force D3DTOP_SELECTARG1 to be D3DTOP_MODULATE. That would probably work for this game and for Dark Reign 2. But I am not sure how many other games this would work for, Also, I prefer to fix this right the first time. Once this is fixed correctly, the option won't be needed any more. I hate to add an option and then remove it at some point when it is no longer needed. But maybe I will do that for now.

@SAM1430B
Copy link
Author

I see your point and i think you don't have to be in a hurry at the moment, you might figure a way to find a better solution in the future to set it up. ✨

@elishacloud
Copy link
Owner

This issue is caused by a failed call to ValidateDevice(). I am looking for a solution.

@elishacloud
Copy link
Owner

Ok, this update should fix the issue: dxwrapper.zip

@SAM1430B
Copy link
Author

SAM1430B commented Sep 8, 2024

Nice thank you, works flawless 🩶

PS: there are additional steps to run the Army men RTS with DxWrapper on some devices:

1 - An error message could occur something about dbgeng.dll .

Fix: rename dbghelp.dll to something else, it's stored in \Army Men RTS\library\dbg folder.

2 - Issue where the game crashes at the startup without getting any error message.

Fix: go to Control Panel\Hardware and Sound\Devices and Printers , right click your device select Properties, on Hardware tab scroll down to the bottom, will find USB Input Device click Properties then Change settings and Disable Device on Driver tab. I think this is an uncommon issue that happens to Army Men RTS,
Commandos 2 Men of Courage and Commandos 3 Destination Berlin

@elishacloud
Copy link
Owner

Very good. Closing the issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants