-
Notifications
You must be signed in to change notification settings - Fork 34
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
60fpsFixes: add patch to improve framelimiter above 60FPS #50
base: master
Are you sure you want to change the base?
Conversation
Great work so far!
I imagined this would be a problem lol Also, I was going to push a commit to allow people to change the FPS without having to go back to the main menu, since this restriction doesn't appear to make sense:
Seems to work fine if I use it with the vanilla FPS list, but it.. forcefully closes the options screen if the custom FPS list is enabled. Not sure why. Feel free to add that in if you can find the problem. Edit: Today I learned that my RX 590 cant handle RE4 at 144 fps, lol Guess we found a test case for the Edit2: not sure what is bottlenecking my game, since the gpu load never goes past 50% and the flag removal doesn't change anything. Hmm. Edit3: Trash d3d9 AMD drivers probably play a part in this, since I'm getting a performance boost using DXVK. Oh well. |
I see that it's already on the TODO list, but it's not just the footstep sounds. Every footstep sounds like it's multiplied and repeats like an echo, but so do other things too such as Amazing work! Really can't wait to replay RE4 in 120fps mode and with fully remastered textures as well. This is what Capcom should've done in the first place. Once the bugs have been fixed, this'll be the ultimate way to play RE4, I can't wait! :D |
Gotta say I'm seeing a surprisingly low ammount of bugs at 144 fps. Nice! Most notable ones were the slower aim speed (for which I pushed a fix), and sound issues like this one: 2022-01-30.19-41-50.mp4This plaga sound kept looping after I killed it, for some reason. And yeah, I'm also getting the "echoed" sounds @Crucially-Ultrawide spoke of. It doesn't happen every time, but some sounds appear to be playing twice at the sime time or something like that. Noticed it the most with the ganado voices. Some other issues I noticed while playing Mercenaries: This guy's crossbow is emitting waaaay more light than it should: 2022-01-30.19-51-26.mp4The famous bouncy grenade is back at it again, although this time it doesn't look like it happens every time? 2022-01-30.19-53-01.mp4Footsteps end up sounding way too loud for some reason: 2022-01-30.20-01-47.mp4Looks like the plagas don't disappear when you kill them. It was hard to get footage of this, but you can see it here: 2022-01-30.20-06-56.mp4Might be the reason the plaga sound was looping on my first video? The sniper scope takes many more scrolls to zoom in. Not sure if it makes controller zooming slower too, but it probably doesn't. It is probably a side effect of the wheel->RS code being funky. Moving the sniper when aiming is much slower too. |
@nipkownix those are all with 144Hz right? Have you tried with 120Hz at all? Could be that some of those issues were because of 144Hz not being multiple of 30. About the sounds and other things being duplicated (some people on Steam forum mentioned things like chickens dropping 2x eggs), IIRC I mentioned in one of these github posts before that main game loop seemed to be running at half the games framerate, (seemed like 60Hz = 30Hz game loop, so maybe 120Hz = 60Hz), wonder if that could be causing some of these issues. E: hm not really sure how to go about changing the timing, seems it's relying on something waiting on the render thread.. E2: darn, tried slowing it down by making Maybe changing WinMain speed isn't right way to do this, seems that it works fine at 15Hz and 30Hz, so I'd think fixing code for things to work at other speeds should be possible.
Wonder if D3D12 would perform better for you at all, I did a quick test of making the game use D3D9On12 but for me it just resulted in a huge performance loss (from ~180FPS down to ~80...), I think I've heard AMD is usually better than NV at running D3D12 though, so maybe wouldn't be as bad. |
I've tried Josh's whatever it is he named his dll and got a huge performance loss too. Also some geometry was pitch black for some reason. Guess it was shader-related. DXVK is working nicely though. Still can't maintain 144 fps in every area, but oh well.
Ah yeah. I'll do some more testing and see if I can reproduce those issues at 120 fps. Edit: Plaga issue doesn't seem to happen at 120 fps: 2022-01-31.18-56-45.mp42022-01-31.18-53-38.mp4Crossbow one still does: 2022-01-31.18-54-21.mp4 |
Hm, just noticed There's also a big chunk of PadRead that only seems to be used when framerate == 60, no idea what it's doing in there though. |
Not sure if my aiming patches affect that stuff. I wasn't aware there were checks in place. Maybe I should start to check it more often in IDA. My current patch just tries to make the mouse delta values be consistent regardless of the frame rate, but I did notice it isn't perfect. Maybe the checks you mentioned are messing with it somehow. Seems like there are three calls to Not sure what they're supposed to do. I'm seeing no change when forcing the game to call those sections. Hmm. |
That repeating/echoing effect occurs with the neck cracking sound after a suplex, even in 60fps. |
Would like to update this to latest master but a lot of conflicts there.. @nipkownix maybe it's worth merging the aiming/mouse turning/FixSniperFocus stuff into master seperately of this PR? or have those already been merged maybe? |
Will now update list with the custom refresh rate so graphics menu code can work with it fine.
…alue is lower with higher FPS. Try to make it more consistent (still not perfect though) Fixes the scope aiming speed (+the binocular speed, probably)
bfaf4fc
to
769c14b
Compare
Well, they haven't, but they're not really necessary unless we go above 60 fps. Meh. |
Ahh right, wasn't sure if there was anything here that might have applied for 60FPS too. Thanks for the rebase! Here's a build for anyone that wants to try it out: E: here's a version with the debug console hidden: Make sure to use the included INI with that too - if you have issues running above 60 try toggling fullscreen in-game, or edit your games config.ini so first line ends with your desired framerate, eg. Like I mentioned on Steam thread I haven't seen any major gamebreaking issues with this yet, mostly seems to just be audio related surprisingly, and there might be an issue with grenades exploding too (but that might only happen at 144Hz or other non-divisible-by-30 framerates) Would still be interested in hearing of any other weirdness that it might cause though. |
BTW if anyone finds any duplicated-sounds which can be triggered somehow (eg. moving into certain area triggers it, or pressing a button or something) please let me know, would help a lot with finding what causes that... (or is that not a problem with 120FPS, only 144?) |
It happens at 120fps as well. Breaking objects such as the vases and boxes repeats as well as the footsteps etc. Been a while since I checked but I’ll try to get back to it and look for other audio issues while playing when I get back home. |
Will update this PR soon. The master branch is now hooking the mouse delta stuff as well, so I'll need to adapt the aiming speed fixes here to fit there. (these shouldn't even be needed when using raw input though) |
Updated to include the latest raw input work: The mouse aiming speed fixes ended up being needed even with raw input. Meh. Shouldn't cause any issues though. |
I'm sure you already know this, |
Changing the AFAIK the loop that holds that Sleep call is what handles audio in the game, seems to be running in a seperate thread & runs at whatever your CPU can handle though, changing variableframerate didn't seem to affect speed of it at that loop at all, but somehow changing the value for that Fortunately the game seems to use XAudio / XACT3 for audio here so no awful CRI stuff to deal with, but looks like they do have a ton of code for processing the audio themselves before handing it to XAudio (which itself is pretty different to the GC/PS2/VR code), unfortunately haven't found much related to framerate there yet though :/ |
Wow, although it still has its bugs, playing through the game with 120FPS + raw input feels AMAZING. So smooth and responsive! No longer do I think the Wii version has the best controls 😅 If you guys manage to perfect both these tweaks, imo the gameplay would be superior to even the RE5 PC port(which doesn't have as nice mouse turning as yours). Here are some bugs that I noticed on a 120FPS Professional playthrough, hopefully there's something that helps: -certain enemies get stuck in animation loop Animation.Loop.Bug.mp4-audio glitches such as multiplied audio(this happens with 60fps too) or skipping if too fast Audio.Bug.mp4-some attacks do less damage than on 30/60fps(these guys always die with 3 lanterns) Less.Damage.Bug.mp4-harder to run up elevations like these Momentum.Bug.mp4-some enemy attacks do more damage than on 30/60fps More.Damage.Bug.mp4-game is slow-motion in more demanding areas Slow.Motion.Bug.mp4-character/environment models don't pop up correctly during cutscenes and such Cinematics.Bug.mp4Even with these issues, this is still my new preferred way to play, it's just so fluid... I'm hoping you guys manage to work out all the kinks eventually 🙏 |
Here's a build of 1.7.5 with the framelimiter & aim speed fixes added, seems to still work as it did before: |
Is there one without console? 🥺 |
i have a rtx 3080 / 12900 ks @ 5.4 ghz and using the above fix with hd project and the re 4 tweaks i run 1440p 270 hz gsync and was geting out of sync shooting . now its working 270 hz perfectly sao far even when they throw dynomight no fps slow downs ! ill keep this updated |
any updates ? |
@emoose, got a weird enemy loop here: They get stuck trying to get bombs to throw. Happens after a couple of successful throws at 240 fps. The function looping is It loops here, because This section in the same func is supposed to set up It works fine at first, but then |
Maybe it's not clearing up older EmWep instances properly, and ends up hitting Em limit, is the count shown inside Em Manager near the max limit shown there? |
Ah 60 is the default CNS value baked into the EXE afaik, might mean the room doesn't have a CNS value defined for it - maybe worth testing with that default value increased (int at 0xBFC044 in 1.1.0) and see if it still ends up breaking or not (changing that to something like 180 before loading in should be fine, seen other rooms using that at least) Maybe there's some ceiling it reaches where it would start to dispose of them, but ends up hitting that tiny 60 limit before it. (E: seems not, just keeps increasing, weird) Still kinda strange that increased framerate makes so many of them spawn though, maybe there's an issue with it running that em10MakeWeapon code in multiple frames when it should have only really been ran once. |
an y updates on this ? any updates on no fps lock fixes on higher fps |
It's been 18 months. |
same the last update i can play@360 hz @ 360 fps ona14900 ks and rtx 4090 with minmal bugs just fastswitching invintory and some audio bugs but shes like 90 % perfect |
What is the lastest FPS unlock build? |
Continued from older PR #25
(with the new framelimiter &
UseDynamicFrametime
setting in latest re4_tweaks most of this PR is no longer needed, the code that updates the settings menu with new framerates might still be useful in future though, so for now will probably just leave this PR as a draft.There are still many issues with
UseDynamicFrametime
though, seems a lot of the game code is set up to only work properly when the frametime is exactly the same between frames, maybe some way of decoupling the graphics rendering from the deltaTime var would be good to look into...)Hooks the
ConfigReadINI
call so we can update frametime used for framelimiter based on thevariableframetime
variable - with this it seems framerates above 60 can work without being too broken, likely many issues to be found (and hopefully fixed) though of course.If anyone wants to try it out, here's a build with this PR:
(E: latest build can be found at #50 (comment))
re4_tweaks1.7.3_framelimit-fix-v2b.zip
(old)
re4_tweaks1.7.3_framelimit-fix-v2.zip
re4_tweaks1.7.3_framelimit-fix.zip
In v2 the ingame settings now includes extra framerates (30/60/90/120/144) - if you want even higher you can edit your RE4 config.ini file.
Framerate should probably be a multiple of 30, but maybe others will work fine too, who knows.
You may need to set
DisableVsync
in re4_tweaks dinput8.ini if the new framerates don't work for you, or unset fullscreen mode in game settings (or in config.ini) - hopefully if your monitor supports the refresh rate natively it should just work though.If re4_tweaks shows a message about framerate setting, set
IgnoreFPSWarning
to true in dinput8.ini (should already be set in the above ZIP)If you notice anything weird please let us know about it here - most problems are likely things that were set for 30FPS timings, game probably also had the same issue at 60FPS too, but running at higher framerates makes things much more apparent (try using
variableframerate 200
if you want to go on a bug hunt :)TODO(both should be working in latest commit)ConfigWriteINI
as well to also update framelimiter after user changed settings (done via hooking settings menu code)Framerate TODO
Should note that this is different to the other
FixSlowdown
PR, that one tries allowing game to see the true delta-time between frames, instead of locking the delta-time to an expected FPS - which fixes the slowdown issue when the expected FPS can't be reached, but also exposes a lot of issues in a game that wasn't developed to work like it - if enough time is spent to understand the games animation system I'm sure those could be worked around, but right now there's not really enough known unfortunately.(RE4VR might give us some clues about that, doubtful that they maintain the full 120FPS+ required for VR at all times, so likely they probably added improvements to allow delta-times, finding where those improvements were made would probably help us a lot - RE4VR was actually built on top of the QLOC port, so a lot of the fixes might transfer over pretty well)
Meanwhile all this PR does is allow game to also make use of 90/120/144Hz frametimes - without fixing the deltaTime issue at all - this seems to allow game to play at higher framerates without as many issues, but still means the slowdown issue happens when the expected FPS can't be reached.
At higher framerates like 90/120/144+ it's much more likely that game will miss the framerate target too, so I wouldn't really consider this a proper fix, mostly just something useful for showing what happens when higher framerates are used.