Retroarch (FBNeo) Latency

The place for all discussion on gaming hardware
Post Reply
User avatar
solidus
Posts: 25
Joined: Sun Oct 13, 2019 11:34 pm

Retroarch (FBNeo) Latency

Post by solidus »

Hey all! not sure if this should be in the hardware forum or not but Ill give it a shot here. So I have been playing a lot of shmups (mainly Striker 1945) recently via FBNeo on Retroarch. I use a wired Hori Fightstick V3. I had all settings default and only after messing with built in latency settings realized that I was playing with major latency. Not having played these actual arcades in over a decade.. I guess I forgot how responsive the games should be. Now that I realized how sluggish everything was behaving.. I am on a quest to get my latency as low as I can. I have been playing around with Hard GPU Sync, Audio Latency, Frame Delay, and Retroarchs newer "Run Ahead" feature quite a bit and getting various degrees of improvement. Although sometimes bumping one setting just a ms or 2 up can totally destroy my audio or make frames skip and be unplayable.

Do any of you have advice on which settings I should be most concerned with, and which are just too demanding on my CPU for very little gain? Looking to get my settings as perfect as I can before getting my ass kicked in some of the tougher games because of lag.
User avatar
WelshMegalodon
Posts: 1225
Joined: Fri Dec 11, 2015 5:09 am

Re: Retroarch (FBNeo) Latency

Post by WelshMegalodon »

RetroArch is a sham and runahead is a gross hack. Use GroovyMAME instead.

http://forum.arcadecontrols.com/index.p ... 459.0.html
Indie hipsters: "Arcades are so dead"
Finite Continues? Ain't that some shit.
RBelmont wrote:A little math shows that if you overclock a Pi3 to about 3.4 GHz you'll start to be competitive with PCs from 2002. And you'll also set your house on fire
el_rika
Posts: 346
Joined: Sun Oct 30, 2016 8:44 pm

Re: Retroarch (FBNeo) Latency

Post by el_rika »

I find Fbn and runahead an excellent combo for lag reduction (and overall Retroarch to be the best emulation enviroment, with many many useful audio/video options).

I find it strange that you have issues with speed while using runahead. I can shave off 2 frames on my mobile phone and still have full speed in Strikers. What is your set up?

edit: also try Vulkan renderer, it is supposed to reduce lag by 1 frame, and could even give room for more.
Bassa-Bassa
Posts: 1172
Joined: Tue Mar 12, 2019 5:18 pm

Re: Retroarch (FBNeo) Latency

Post by Bassa-Bassa »

el_rika wrote:I find Fbn and runahead an excellent combo for lag reduction
That's because it is. But it's also an excellent combo for incorrect emulation and perverting the original game behaviour. Likely the best fit for a mobile phone, indeed.
User avatar
tomwhite2004
Posts: 319
Joined: Fri Mar 08, 2013 12:13 pm
Location: UK

Re: Retroarch (FBNeo) Latency

Post by tomwhite2004 »

el_rika wrote:edit: also try Vulkan renderer, it is supposed to reduce lag by 1 frame, and could even give room for more.
Using Vulcan means you don’t have to use hard GPU sync as you do with gl to achieve the same level of latency, this means the CPU requirements are slightly lower but that’s the only advantage to using it. In my experience the frame pacing with Vulcan is a lot worse than gl, especially outside of 8 and 16 bit systems so not worth using unless you are really struggling for performance.
User avatar
Tatsuya79
Posts: 149
Joined: Tue Jan 07, 2014 10:29 am

Re: Retroarch (FBNeo) Latency

Post by Tatsuya79 »

Like said above, using vulkan and setting "Max swapchain images" to 2 in the latency menu gives you the equivalent of hard sync for gl without the cpu cost (10% was it?).

Then you use the method explained there to determine how many frames you can remove from a game with run ahead:
https://docs.libretro.com/guides/runahe ... -run-ahead

You need to enable "use 2nd instance" for FBNeo I think to avoid some sound issues.

The other options such as frame delay won't give you much more and can vary from game to game, I don't bother with that personally.

Run ahead is an awesome hack, next frame response in every FBNeo supported game.
User avatar
solidus
Posts: 25
Joined: Sun Oct 13, 2019 11:34 pm

Re: Retroarch (FBNeo) Latency

Post by solidus »

el_rika wrote:I find Fbn and runahead an excellent combo for lag reduction (and overall Retroarch to be the best emulation enviroment, with many many useful audio/video options).

I find it strange that you have issues with speed while using runahead. I can shave off 2 frames on my mobile phone and still have full speed in Strikers. What is your set up?

edit: also try Vulkan renderer, it is supposed to reduce lag by 1 frame, and could even give room for more.
Well honestly Im not totally sure what causes things to go to shit :) It may be setting frame delay too high, or maybe setting the runahead too high. It seems like just one or 2 increments up on either setting can go from seemingly great to unplayable.

Currently on a linux Mint desktop, using Retroarch via Retropie/EmulationStation installed as an application. Its a i5 3470 CPU and a fairly old R7 240 AMD GPU. I think my biggest issue is not having a frame of reference of what near perfect should be. At first I thought the mega lag I was getting was normal... and only realized how bad it was after fiddling. So now when things start to speed up I dont know how far to push it before things start to seem unnaturally fast and 'skippy'. I guess I am looking for the simplest bang for my buck settings to reduce lag without killing performance or just messing up the game.

I am currently using the GL renderer only because I had heard that Vulkan drivers are hit or mess depending on the core/game. Is that no longer the case? Is it safe to just go with Vulkan across the board for all emulators at this point?

My current settings are:

GPU Hard Sync: ON
Hard GPU Sync Frames: 0
Frame Delay: (messing around with 0 - 6)
Audio Latency: 16
Run Ahead: On
Run Ahead Frames: 1 or 2
Runahead 2nd Instance: Off

Also I believe I use the Pulse audio driver, if that matters

This SEEMS to give me no noticeable issues and very reduced lag vs default settings. But Im not sure if I am in the sweet spot
User avatar
tomwhite2004
Posts: 319
Joined: Fri Mar 08, 2013 12:13 pm
Location: UK

Re: Retroarch (FBNeo) Latency

Post by tomwhite2004 »

Your audio latency is far too low, most setups won’t support anything like that value, set it to 64 for now. Turn on second instance to improve performance and forget frame delay for the time being, it’s a very small improvement for the CPU cost. Get everything stable then start lowering audio latency and increasing frame delay until you find the sweet spot.

This stuff should really be discussed in the hardware section though....
User avatar
solidus
Posts: 25
Joined: Sun Oct 13, 2019 11:34 pm

Re: Retroarch (FBNeo) Latency

Post by solidus »

tomwhite2004 wrote:Your audio latency is far too low, most setups won’t support anything like that value, set it to 64 for now. Turn on second instance to improve performance and forget frame delay for the time being, it’s a very small improvement for the CPU cost. Get everything stable then start lowering audio latency and increasing frame delay until you find the sweet spot.

This stuff should really be discussed in the hardware section though....
Ok great thanks.

What do you think about GL vs Vulkan at this point? Does it make sense to go to Vulkan, and shut Hard GPU Sync off? Or leave GL on with Hard Sync?
User avatar
tomwhite2004
Posts: 319
Joined: Fri Mar 08, 2013 12:13 pm
Location: UK

Re: Retroarch (FBNeo) Latency

Post by tomwhite2004 »

Vulcan doesn’t use hard gpu sync at all, that’s a gl option which is why we talked about the lower cpu cost for the same latency. For me and what I emulate gl works best because of the frame pacing but for you Vulcan may be best, there is no one set of settings that will work best for everyone given how variable hardware is, you have to work that out yourself.
User avatar
solidus
Posts: 25
Joined: Sun Oct 13, 2019 11:34 pm

Re: Retroarch (FBNeo) Latency

Post by solidus »

tomwhite2004 wrote:Vulcan doesn’t use hard gpu sync at all, that’s a gl option which is why we talked about the lower cpu cost for the same latency. For me and what I emulate gl works best because of the frame pacing but for you Vulcan may be best, there is no one set of settings that will work best for everyone given how variable hardware is, you have to work that out yourself.
Understood. Makes sense. Thanks so much for the tips
el_rika
Posts: 346
Joined: Sun Oct 30, 2016 8:44 pm

Re: Retroarch (FBNeo) Latency

Post by el_rika »

Also, regarding Strikers series in Fbn, go to Core Options and enable Speed Hack. It gives ~ 20% performance increase.
User avatar
solidus
Posts: 25
Joined: Sun Oct 13, 2019 11:34 pm

Re: Retroarch (FBNeo) Latency

Post by solidus »

el_rika wrote:Also, regarding Strikers series in Fbn, go to Core Options and enable Speed Hack. It gives ~ 20% performance increase.
Interesting.. is that something that the FBneo core does or is it specific to the S1945 ROM?
el_rika
Posts: 346
Joined: Sun Oct 30, 2016 8:44 pm

Re: Retroarch (FBNeo) Latency

Post by el_rika »

It is driver based. So if there is a driver that has built in hacks, that option will work. I know for a fact that the Strikers games have a speed hack.

Another thing you can do, is use the fba2012 core, which had faster drivers for Strikers/Gunbird2/Dragon Blaze (all with a higher pitch sound).
Post Reply