60FPS Inflight hook

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderator: JeremyaFr

Re: 60FPS Inflight hook

gazzawazza
Cadet 4th Class
Posts: 14
Joined: Sat May 05, 2007 11:01 pm

Post by gazzawazza » Wed Feb 06, 2019 5:25 pm

keiranhalcyon7 wrote:
Tue Feb 05, 2019 7:15 am
gazzawazza wrote:
Tue Feb 05, 2019 1:27 am
Oh and the rudder control on my joystick (thrustmaster hotas-x) is the roll axis and the x axis is the yaw control - grrrrr.
That, sadly, is just how the X-Wing series was written from the start.
ok thanks for confirming.

I'm gradually getting used to it.

The alternative is to i believe create a virtual joystick then use universal joystick (or controller) remapper to configure everything and swap the axes over.

i vaguely remember doing this previously. it was a faff!

gazzawazza
Cadet 4th Class
Posts: 14
Joined: Sat May 05, 2007 11:01 pm

Post by gazzawazza » Wed Feb 06, 2019 5:27 pm

JeremyaFr wrote:
Tue Feb 05, 2019 7:54 am
gazzawazza wrote:
Mon Feb 04, 2019 12:43 am
Replacing all hooks and configs with those downloaded (using xwahookssetup)
“ “’triangling to infinity’ patch” is not correctly initialized “
You need to disable the 'triangling to infinity' patch with Xwa Exe Patcher.
what happens if i don't?

is disabling going to just stop the error or is there a problem with the patch? Does it for example damage performance?


Thanks.

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Wed Feb 06, 2019 5:42 pm

gazzawazza wrote:
Wed Feb 06, 2019 5:27 pm
JeremyaFr wrote:
Tue Feb 05, 2019 7:54 am
You need to disable the 'triangling to infinity' patch with Xwa Exe Patcher.
what happens if i don't?

is disabling going to just stop the error or is there a problem with the patch? Does it for example damage performance?


Thanks.
The problem is that the patch and the hook are in conflict. They do the same thing, just in slightly different ways. I had the same issue when I updated the hooks. Not removing the triangling patch will lead the root hook to stop loading further hooks once it sees the error. So you might end up losing functionality introduced by other hooks.

gazzawazza
Cadet 4th Class
Posts: 14
Joined: Sat May 05, 2007 11:01 pm

Post by gazzawazza » Wed Feb 06, 2019 5:56 pm

Reimar wrote:
Tue Feb 05, 2019 8:37 pm
gazzawazza wrote:
Tue Feb 05, 2019 1:27 am
only thing I've not got to work is vsync - tried forcing through nvidia control panel. didn't seem to work
Which way did you try to force it? The ddraw.dll (all versions) requests vsync by default.
If it's not working it's either forced of in driver settings or somehow broken.
nvidia global settings are "use the 3d application setting"

xwa wasn't listed in the nvidia program settings tab, so i pointed to "xwingalliance.exe" and forced vsync on.

I also tried triple buffering (both on and off).

Got what looks like tearing both before and after trying to change anything in the nvidia control panel.

also used xwahacker to limit to 79 (so hopefully i can stay at 60 or above) - i know that fps can be damaged if vsync is on and fps drops below monitor refresh rates.

Used msi afterburner and rivatuner to check FPS. Aside from the odd drop, etc. It stabilised at 60fps (when vsync was supposedly on).

just as a test, i actively disabled vsync too. Still stayed at 60fps and still got tearing.



Cheers,

Gary

gazzawazza
Cadet 4th Class
Posts: 14
Joined: Sat May 05, 2007 11:01 pm

Post by gazzawazza » Wed Feb 06, 2019 5:59 pm

Justagai wrote:
Tue Feb 05, 2019 11:27 pm
I just want to throw this out there but the in game FPS display does not display the FPS accurately above 60FPS. Visual Studio's profiling tools or an external FPS display will give a more accurate display.
interesting.

I've tried msi afterburner and rivatuner. They give slightly different readings e.g. 60fps instead of 56fps reported by the xwahacker code.

Doesn't go higher though, almost as though vsync is on (though visually it doesn't look like it is) - my monitor is 60hz

gazzawazza
Cadet 4th Class
Posts: 14
Joined: Sat May 05, 2007 11:01 pm

Post by gazzawazza » Wed Feb 06, 2019 6:00 pm

keiranhalcyon7 wrote:
Wed Feb 06, 2019 5:42 pm
gazzawazza wrote:
Wed Feb 06, 2019 5:27 pm
JeremyaFr wrote:
Tue Feb 05, 2019 7:54 am
You need to disable the 'triangling to infinity' patch with Xwa Exe Patcher.
what happens if i don't?

is disabling going to just stop the error or is there a problem with the patch? Does it for example damage performance?


Thanks.
The problem is that the patch and the hook are in conflict. They do the same thing, just in slightly different ways. I had the same issue when I updated the hooks. Not removing the triangling patch will lead the root hook to stop loading further hooks once it sees the error. So you might end up losing functionality introduced by other hooks.
wow thank you for the helpful post.

How do i do remove the triangling patch?

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Wed Feb 06, 2019 7:15 pm

gazzawazza wrote:
Wed Feb 06, 2019 6:00 pm
wow thank you for the helpful post.

How do i do remove the triangling patch?
XwaExePatcher, available on the download page.

gazzawazza
Cadet 4th Class
Posts: 14
Joined: Sat May 05, 2007 11:01 pm

Post by gazzawazza » Wed Feb 06, 2019 11:01 pm

keiranhalcyon7 wrote:
Wed Feb 06, 2019 7:15 pm
gazzawazza wrote:
Wed Feb 06, 2019 6:00 pm
wow thank you for the helpful post.

How do i do remove the triangling patch?
XwaExePatcher, available on the download page.
ty.

Should i use it before or after xwahacker?

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Wed Feb 06, 2019 11:07 pm

Either order should work fine.

User avatar
Trevor
Lieutenant JG
Posts: 541
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Wed Feb 06, 2019 11:10 pm

v-sync is supposed to limit frame refresh to monitor refresh (or integer divisions thereof)
eg, 60/1 = 60
60/2 = 30
60/3 = 20

so if framerate drops to 59 then 30 is used since it is the next integer division (monitor shows the same frame twice)

Trev

gazzawazza
Cadet 4th Class
Posts: 14
Joined: Sat May 05, 2007 11:01 pm

Post by gazzawazza » Wed Feb 06, 2019 11:51 pm

keiranhalcyon7 wrote:
Wed Feb 06, 2019 11:07 pm
Either order should work fine.
ty.

this is pre-removal:

Image

I'm presuming "restore" could be read as "remove"?

gazzawazza
Cadet 4th Class
Posts: 14
Joined: Sat May 05, 2007 11:01 pm

Post by gazzawazza » Wed Feb 06, 2019 11:52 pm

Trevor wrote:
Wed Feb 06, 2019 11:10 pm
v-sync is supposed to limit frame refresh to monitor refresh (or integer divisions thereof)
eg, 60/1 = 60
60/2 = 30
60/3 = 20

so if framerate drops to 59 then 30 is used since it is the next integer division (monitor shows the same frame twice)

Trev
agreed

So, i might see a significant framerate drop / loss in smoothness but i shouldn't see tearing.

gazzawazza
Cadet 4th Class
Posts: 14
Joined: Sat May 05, 2007 11:01 pm

Post by gazzawazza » Wed Feb 06, 2019 11:57 pm

grrrrr removing the triangling patch has stopped that error.

now i'm getting the "to call the hook that sets full FPS is not correctly initialized" error.

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Thu Feb 07, 2019 12:30 am

Yeah, Jeremy and Reimar need to have a chat about that one. Most of the frame rate values in Reimar's xwahacker conflict with Jeremy's time hook. Just set that field back to the original setting in xwahacker for now.

gazzawazza
Cadet 4th Class
Posts: 14
Joined: Sat May 05, 2007 11:01 pm

Post by gazzawazza » Thu Feb 07, 2019 1:13 am

keiranhalcyon7 wrote:
Thu Feb 07, 2019 12:30 am
Yeah, Jeremy and Reimar need to have a chat about that one. Most of the frame rate values in Reimar's xwahacker conflict with Jeremy's time hook. Just set that field back to the original setting in xwahacker for now.
tyvm for your patience with my questions / struggles.

i set to 30fps via xwahacker.

no errors now.

The fps fluctuates loads now inflight though.

Managed to finish the mission though (more luck than skill i think).

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Jun 20, 2019 5:06 pm

Would anyone know if it's possible to set the fps to 90 or above? I've tried doing it through xwahacker; but it causes a conflict with Hook_Time.dll. If I disable that Hook, I still get 60fps max.

Justagai
Cadet 1st Class
Posts: 218
Joined: Mon Dec 08, 2014 10:59 pm

Post by Justagai » Fri Jun 21, 2019 9:29 pm

Quoting from the other thread:
If you are basing the FPS off of the in-game FPS counter, there is an issue where it can only read up to 60FPS. Use Visual Studio's Performance profiler to get the real FPS. I've managed to get up to 85FPS on my machine.

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sat Jun 22, 2019 1:23 am

Thanks for the answer, Justagai; however, I'm using nVidia's GeForce experience to get the FPS, and it does look like it's in the 45-60fps range. It often stutters down to 20fps too. I'll repeat the test with Visual Studio's profiler, though. Thanks for the suggestion.

So, other than using xwahacker, is there anything else I can try? xwahacker seems to cause conflicts with the time Hook.

Justagai
Cadet 1st Class
Posts: 218
Joined: Mon Dec 08, 2014 10:59 pm

Post by Justagai » Sat Jun 22, 2019 1:56 am

EDIT: I would not be able to get around with the conflict of the time hook with another hook or patch. Jeremy will have to take care of any additions for FPS. Also I think it would have the same problem here if xwahacker didn't work (not going past 60FPS).

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Jun 22, 2019 2:00 pm

Hello,
I will see if I can fix the conflict.

For now, I achieved to get more than 60 fps:
xwa_fps_more_60.PNG

For some reasons, the game engine limits the fps to 59. I've found how to remove this limit.
You do not have the required permissions to view the files attached to this post.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Jun 22, 2019 2:43 pm

JeremyaFr wrote:
Sat Jun 22, 2019 2:00 pm
I will see if I can fix the conflict.
There is a conflict because Justagai's hook limits the fps to 59 (236/4) where mine limits the fps to 118 (236/2).

Justagai
Cadet 1st Class
Posts: 218
Joined: Mon Dec 08, 2014 10:59 pm

Post by Justagai » Sat Jun 22, 2019 7:31 pm

It sounds like everything should be good for 90+ FPS if using the time hook.

Not sure why it wouldn't be 60+ in blue_max's case...maybe the VS performance profiler will show different results for him.
Last edited by Justagai on Sat Jun 22, 2019 8:12 pm, edited 2 times in total.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Jun 22, 2019 7:52 pm

Hello,
To remove the limit of 59 fps, the following patch is required:

Code: Select all

At offset 0F739C, replace 730A with EB0A.
At offset 10FD86, replace 7D07 with EB07.
At offset 11034C, replace 7D07 with EB07.
I've included it in the time hook.

Justagai
Cadet 1st Class
Posts: 218
Joined: Mon Dec 08, 2014 10:59 pm

Post by Justagai » Sat Jun 22, 2019 8:13 pm

Nice! Great work!

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sat Jun 22, 2019 8:41 pm

So Justagai, will you have to alter your tour hook to remove the FPS stuff and leave it to Jeremy's time hook to sort that out?
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

Post Reply