Page 1 of 1

XWAU 1.4 frame drop

Posted: Thu Aug 31, 2017 4:03 pm
by kodamcity
Hi, i have frame drop issue in XWAU 1.4.
In the XWAU 1.3, I had never frame drop issue. In XWAU 1.4, however, having severe frame drops and especially more in Battle of Endor.

Battle 7 Mission 2 frames remain below 10~18. And in hangar camera 8 or 9 frames 18~28.
If i disabled Hook_time, frames slghtly increase. but Battle of Endor still remains below 18.

I've aleady formatted my computer and installed in SSD, but nothing changed.

what do i do? just play 1.3?
please help me.

OS : Windows 10 x64
CPU : I5 2500K
GPU : GTX 770
RAM : 12 GB

Re: XWAU 1.4 frame drop

Posted: Fri Sep 01, 2017 11:54 pm
by Darksaber
Done a little testing with this

I assume you know how to use Jeremy's XwaExePatchers since you've applied the "Show Framerate" patch, right?

Like I said I've done a little testing, disabling and enabling the various offsets one by one, and I believe by having the "Pilot Mesh Animations" offsets enabled they reduce the frame rate by around half

Once I disabled this set of offsets the framerates increased

I skipped through a few mission disabling and enabling the Pilot Animations and each mission I disabled them on the framerate increased

Disabled and the highest framerate I saw was 29 FPS while flying the mission
Enabled and the highest framerate was around 18.5 FPS while flying the mission

And my system is slower than yours

OS : Windows 7 x64
CPU : Intel Quad Core 2.66Ghz
GPU : AMD Radeon HD 5700 Series
RAM : 8 GB

No disrespect to Jeremy but disabling the Pilot animations isn't a great loss, to be honest they are a little obsolete while flying a mission and in the hangar they just add a little more realism to the hangar craft.

I'll have to put together a New XWAUCP/DSUCP version which you have the option to install the Pilot animations or not

Re: XWAU 1.4 frame drop

Posted: Sat Sep 02, 2017 3:17 am
by kodamcity
Darksaber wrote:Done a little testing with this

I assume you know how to use Jeremy's XwaExePatchers since you've applied the "Show Framerate" patch, right?

Like I said I've done a little testing, disabling and enabling the various offsets one by one, and I believe by having the "Pilot Mesh Animations" offsets enabled they reduce the frame rate by around half

Once I disabled this set of offsets the framerates increased

I skipped through a few mission disabling and enabling the Pilot Animations and each mission I disabled them on the framerate increased

Disabled and the highest framerate I saw was 29 FPS while flying the mission
Enabled and the highest framerate was around 18.5 FPS while flying the mission

And my system is slower than yours

OS : Windows 7 x64
CPU : Intel Quad Core 2.66Ghz
GPU : AMD Radeon HD 5700 Series
RAM : 8 GB

No disrespect to Jeremy but disabling the Pilot animations isn't a great loss, to be honest they are a little obsolete while flying a mission and in the hangar they just add a little more realism to the hangar craft.

I'll have to put together a New XWAUCP/DSUCP version which you have the option to install the Pilot animations or not


Thanks to your reply. I've been waiting for reply for a few days.
I've using BeHexEditor to disabled Hook_time. And used XwaHacker to applied Show FPS.

Anyway, like what you said, i had disable to Hook_Pilot and confirmed increased frame rate, but still Battle 7 Mission 2 frames are severe drop when seeing two Home One type cruisers. There seems to be a problem elsewhere.

Is there a problem with the steam version or the Korean operating system?

Re: XWAU 1.4 frame drop

Posted: Mon Sep 04, 2017 11:19 am
by JeremyaFr
Hello,
As more and more hooks and files are involved, the performance decreases.
I will modify the code to improve performance.

Re: XWAU 1.4 frame drop

Posted: Mon Sep 04, 2017 6:13 pm
by Darksaber
Thank you :)

Re: XWAU 1.4 frame drop

Posted: Tue Sep 05, 2017 8:30 am
by JeremyaFr
I've modified the code.
Please redownload all the hooks.
Only the dll and readme files are modified. The exe patches are not changed.

Re: XWAU 1.4 frame drop

Posted: Tue Sep 05, 2017 10:11 am
by Darksaber
Thanks Jeremy :D

Quick test

13.5/29.5 FPS in the Hangar
18.5/29.5 FPS in mission (Battle 7 Mission 3)

Re: XWAU 1.4 frame drop

Posted: Tue Sep 05, 2017 8:23 pm
by Reimar
Just curious: have you considered making the hooks patch the binary at runtime?
It would mean you didn't have to modify the (on-disk) binary to activate the hooks and the hooks could be called directly and properly, no indirection via DirectInputCreateA and stack tricks.
Not that hacking the binary at runtime doesn't have its own issues (e.g. avoiding to patch a still encrypted Steam binary).
Just seems like it might be a fun low-level hacking project to come up with a fancier (and easier to use) way to install those hooks.

Re: XWAU 1.4 frame drop

Posted: Sat Sep 09, 2017 8:08 pm
by JeremyaFr
Hello,
I will enable auto patching in the next version of the hooks.
It will be no longer needed to patch the exe manually or from the patcher. The exe will be patched at runtime from the dlls.
The file Dinput_Hooks.lst will no longer be needed. The main hook (dinput.dll) will search the dlls that start with "hook_"
or "Hook_".

Re: XWAU 1.4 frame drop

Posted: Sun Sep 10, 2017 6:37 pm
by Reimar
Ha, sounds like to do it really thoroughly!
Feel free to close my pull request then, I just thought you might not have time for it and I'd at least show feasibility and maybe help out.
Btw. I think currently the hooks are installed at library load time. While that has the advantage of being really early, doing it later (e.g. when the DirectInput device is created) would allow it to work with the unmodified Steam binary (it seems to run its decryption only after all libraries have been loaded).
Not much real value in that I guess, but might be interesting to know anyway...

Re: XWAU 1.4 frame drop

Posted: Mon Sep 11, 2017 12:51 pm
by JeremyaFr
Thank you for the suggestion.

Re: XWAU 1.4 frame drop

Posted: Thu Sep 14, 2017 8:29 pm
by JeremyaFr
UPDATE
Please redownload all the hooks.

Now, you no longer need to patch the exe. The patches are applied at runtime by the hooks DLLs.
The file Dinput_Hooks.lst is no longer needed. The main hook (dinput.dll) searches for the hooks and applies the patches.
To setup the main hook or a hook, you only have to drop the dll next to the exe.

Re: XWAU 1.4 frame drop

Posted: Thu Sep 14, 2017 9:29 pm
by Darksaber
Wow that was really lucky!! I made *.202 files for each hook to patch the exe instead of including all the offset changes in one big patch, all I have to do in the installer script is to remove a few lines. Happy chappy :D :D

Well done mate

EDIT: Well I can confirm it all works just fine :D

Re: XWAU 1.4 frame drop

Posted: Sat Sep 16, 2017 8:42 pm
by XDragon
Stupid question...but where can i re download these hooks? I'm having the same frame rate drops and its making my custom campaign im working on neigh impossible to play

Re: XWAU 1.4 frame drop

Posted: Sat Sep 16, 2017 9:00 pm
by JeremyaFr
XDragon wrote:where can i re download these hooks?
Hello,
It's explained here:
http://www.xwaupgrade.com/phpBB3008/vie ... =9&t=11772

Re: XWAU 1.4 frame drop

Posted: Fri Nov 10, 2017 10:57 pm
by FBK
Hello I have downloaded the latest hook's version anbd still not able to get more that 26-27 FPS.
PS spces:
Processor: i7-4790 K
RAM= 16GB
Nvidia GTX-770 OC (driver updated)
Resolution 4000x1024
I have tried different resolutions (4:3, 16:9 ...) and changing the video options in game.
I have already tried the XWAexepatcher but no changes
No changes, allways 24-25 fps in game, 29 fps in hangar with all the different options.

Any idea?

Re: XWAU 1.4 frame drop

Posted: Fri Nov 17, 2017 8:29 am
by FBK
When I play with colleagues (same installation darksaber 2.4, default options) the framerate drops bellow 10.
My inet conexion is 300Mb an I use yo have Pings bellow 10-15.

I don't known what is going on with this dcsup 2.4, we have no problems with the others versions.

Anyone has the same problem?
Any solution?

Re: XWAU 1.4 frame drop

Posted: Tue Nov 21, 2017 2:01 pm
by Q
I have DSUCP v2.4 installed and I noticed a major drop in frame rates after installing. The older DSUCP version I had ran far better. After doing some digging I found the problem was related to my version of DDraw.dll. I swapped out the newer DDraw.dll that came with DSUCP v2.4 for a much older version from 2008 that is more compatible with my older system and the problems went away! I have no idea what is going on with this file to make such a difference, but this single file was the cause!

Re: XWAU 1.4 frame drop

Posted: Tue Nov 21, 2017 9:33 pm
by Reimar
First, anyone having performance issues it would be useful information on whether the CPU or the GPU is the issue, which one is at 100% load (for CPU, only one core will be used by the game, so the load of that core is all that matters).
Q wrote:I have DSUCP v2.4 installed and I noticed a major drop in frame rates after installing. The older DSUCP version I had ran far better. After doing some digging I found the problem was related to my version of DDraw.dll. I swapped out the newer DDraw.dll that came with DSUCP v2.4 for a much older version from 2008 that is more compatible with my older system and the problems went away! I have no idea what is going on with this file to make such a difference for me but this single file was the cause!
There is also a 1.5.1 version that MIGHT be newer than what is include in DSUCP (not sure) https://github.com/rdoeffinger/xwa_ddraw_d3d11/releases
There is also a lot of settings that can be changed.
If neither helps, going through the releases and finding out which one was the first showing an issue would be very useful information for potentially fixing it.
But if you used a file from 2008 that doesn't have anything to do with the ddraw.dll from above project and you probably could have gotten the same effect more easily by deleting the ddraw.dll.
The purpose of the ddraw.dll in DSUCP and available on that web page is:
- Fixing compatibility issues with newer graphics cards (by using DirectX 11)
- Drawing at native desktop resolution no matter what that is instead of being limited to the game's lower resolutions
- Enabling features like anti-aliasing, anisotropic texture filtering etc (can be disabled in the ddraw.ini file though)
- A few other random compatibility fixes
So on an old system, if your graphics card is not good at DirectX 11, your desktop resolution is higher than the resolution you selected in the game or your graphics card has too little or slow RAM to handle anti-aliasing then being slower is the expected result, at least until you adjust some of the settings in ddraw.ini/your desktop resolution.
If it's slow on a modern-ish system that can play 3D-games from the last few years fine then there something wrong with the ddraw.dll though.