Retroarch... Arcade Perfect, even on LCD, at last?


#1

2nd quick edit :
:sunny: Now it’s official, we’re the closest to arcade we’ve ever been !* :blush: :sunny:
Input lag : OK !
Game Speed : OK !

see below in this post, and scroll to the last few posts to get full info

A/ edit about input lag correction :

FBA core has been updated, Runahead now works on FBA, I just needed 1 frame and I shot a couple vids to show it.
I had 4-5 frames for the input lag test with chun’s HK without runahead, I tried with 1 frame activated.
And now I have 3-4 frames which seems pretty accurate.
As reference, the input lag thread shows 3.6 frames for CPS3 as an average.
So, as far as I can tell, we’re good.

Ran the same with my old Hori EX2 and I have similar results.

Didn’t test Runahead for long though, I imagine if you get problems after a while, try turning the second core on.

EDIT : played one hour without any framedrops/sound issues. The second instance of Runahead option fails though, plus it will disable runahead altogether.

B/ Older edit about Game Speed :
Ok, quick edit for those who won’t scroll all the way :

I did some tests, here is a montage, showing you can replicate CPS3’s speed with specific settings in Retroarch, also, you can compare speed with OE and Shmupmame :

Street Fighter III : 3rd Strike - speed comparison CPS3 VS almost everything else

End results is we can now play 3S almost as on Arcade !

To get this more accurate game speed, you just need to change the “retroarch.cfg” video_refresh_rate = “59.299999” (also you should now use Vsynch as it is now what ensures good game speed)

I’ll have to check again the input lag on both FBA and Mame cores, but if I recall what I typed below, the FBA core doesn’t suffer input lag…


Original first message :

Came across this by accident…

  1. Input Lag Compensation to compensate for game’s internal lag?

and later, noticed this :

  1. Custom Refresh Rates on Windows

I had been using shmupmame for the past years as I have a LCD, so Groovymame was out of question and don’t even understand how to install that.
I had just read a bit about groovymame code being implemented in retroarch, which led me to point number 1.

First off, it seems that Groovymame’s Vsynch improved greatly latency or maybe it’s the “Hard GPU Synch” feature, but it is more responsive than Shmupmame ever was.

Then, I did some tests, using a 60fps camera and Chun’s HK and noticed the first frame would come out in 4 frames on my setup… Shaders on or off didn’t change the performance.
On Shmupmame it took 6 frames, maybe 7 with the HLSL filters.
Using the Runahed feature (point number 1 above) effectively removes one frame of lag.

Then I came across point number 2, custom refresh rates, and tried baking one at 59.583393Hz. I tried both with my Nvidia control panel and with the CRU utility cited in point number 2.
Both with no success : the FPS counter in retroarch kept showing 60.2 FPS.

Then I digged into the “retroarch.cfg” and it turns out that simply changing the “video_refresh_rate” manually works !

I fisrt set it to 59.583393, and got 59.8 FPS.
I thought that 59.583393 Hz = 59.58 FPS, please, correct me if I’m wrong.
So I fine tuned it to 59.350000, which retroarch rounded to 59.349998 and it gave me a solid 59.5 FPS (actually, there’s always a bit of leeway and it’s mostly 59.54 occasionally changing to 59.68 FPS, which I found good enough for now)

So, am I mistaken somewhere or, am I getting extremely close to arcade perfect ?
The runahead feature can possibly alleviate one’s setup lag… stick, screen… One frame seems to be enough for me (I’ll run more tests with the camera now that I got the game to run closer to the correct speed but this thing took me off work for a few days now :blush: )

Can someone clarify if the correct speed to get close to CP3 would be 59.6 FPS or 59.8 ?

Now if you want to try, a few things to know :

- First, correct the speed by editing the “video_refresh_rate” in the “retroarch.cfg” file, and test in game, FPs should get stable once you’ve chosen a character. Setting>Onscreen Display> Onscreen Notifications>Display Framerate & Display Statistics

- Runahead feature doesn’t work with the mame core (as it doesn’t support save states)

- Runahead works with FBA core, but is a bit broken specifically with FBA in the latest version of retroarch : it can’t use the “use second core” feature that lightens the hit on performance (works fine on my CPU, but it should be even better with this setting on). If you want to use it, don’t turn the “second core feature” on. And problem number two, after 20mins of playing the game gets choppy and slow, turning off runahead fixes the issue, but if you need to play with it, you’ll have to reload the content. I played Megaman X on snes9x for half an hour with no choppyness, so the issue is FBA specific, in this version of retroarch. Means it should be temporary.

- You should choose to use Runahead only after doing some tests with a 60FPS camera to know how much your setup lags… check the first post of Isotopez’s thread : 3rd Strike Lag/Speed Tests

Retroarch is a great effort, but I found it particularly non intuitive, and some things really had me scratching my head, so here are a few pointers :

  • Retroarch is designed to navigate with your stick/pad. On keyboard, you can use the arrows, enter and backspace, mouse seemed confusing and a good way to mess everything up
  • you can reset a value to it’s default pushing start button
  • Retroarch is the frontend, the emulator is libretro, and to run games it uses cores. Cores are emulators stripped and modded to work in retroarch.
  • First thing to do once installed, is downloading the cores you need (here, FBA) using the update feature
  • to launch a game, either load a core and then a content (aka rom), either load a content and specify which core to load when prompted… easy
  • since retroarch is designed for a snes gamepad navigation, it has two types of mapping, the retroarch mapping settings>Inputs>User 1 where you tell the program what are A,B,X,Y,L,R,Select,Start. Think of a SNES pad where L will be High Punch and R High Kick. the second mapping is reachable while a game is launched
  • I spent too much time having two keys mapped to a same button (LP and MK), the problem was the faulty driver I had chosen for the inputs, so if you have trouble, try changing that (Settings>Driver>Joypad Driver - NOT INPUT DRIVER)
  • a game’s emulation options can be accessed through the “Quick Menu”
  • you set a shader while a game is launched and settings can be saved for a core, or a rom folder, or for a single game.
  • for a while shaders wouldn’t work for me… because I had chosen the wrong video driver (same path for all drivers)
  • I haven’t found the perfect shader yet, but some light and decent ones with some tuning were crt-geom.glsl, or crt-pi.glsl
  • going in and out of full screen will wipe whatever unsaved graphic settings you had going
  • to access the test menu (to turn off regulation, set to freeplay, event, etc…) you need to set a hotkey in the game’s quickmenu>option>Diagnostic input
  • not sure runahead works on retropie

Well, that’s about it, the forums are dead, but whoever reads this, have fun.
I haven’t played on a cab in a while now, the arcade next to my place close a couple years ago, so I’m interested to know what more experienced players think, to me it feels extremely close, even on my LCD.


3rd Strike Lag/Speed Tests
#2

Ok, I finally made some more tests.
Also, to sum it up for those who don’t want to read the long post above :

  • if I remember correctly the things I read, it seems retroarch implemented some of groovymame’s code, which allow a better treatment of inputs along with a better synch speed between sound and video. Now Vsynch is a good thing.

  • recently a new feature has been implemented that allows to remove one or more frames of internal lag from the emulator, it’s called “Runahead”. This could allow a user to compensate for his laggy setup (laggy TV or laggy stick…). Currently that feature doesn’t work on FBA, it’s very recent and still in beta test. I tried it on SNES games, and it works !

  • Retroarch also allows to change the speed at which the game plays, in a finer manner than MAME (MAME could just change speed from 1 to 0.99, while Retroarch uses framerate with 6 numbers after the comma - at least 3 seem to count)

I rencently did @isotopez 's test (Chun’s HK repeatedly) on Shmupmame and Retroarch.
Please bear in mind I did these tests just for myself and the numbers here shouldn’t be taken as an exact truth that applies to everyone’s setup.
The figures apply to my own setup (my laggy screen…), and I didn’t take time to make a precise count.
Still, things are clear enough to get a few points straight.

  • Shmupmame with no filters but running at 0.99 speed resulted in 5frames counting one as the frame where my keyboard’s light would turn on. Result was quite steady, it rarely varied up to 6 frames.
  • Shmupmame wih HLSL filters running at 0.99 (%) speed resulted in mostly 6 frames and often 5 frames.
  • OE on Xbox360 resulted on 5 to 6 frames, but it’s harder to tell as I can’t tell for sure at which frame the button on my stick is pushed.
  • Retroarch with filters and the game paced at 59.299999 (Hz) gives a steady 4 frames and occasionally 5 frames. Framerate is oscillating between 59.54 and 59.63 if I recall.
    So far, the Runahead feature doesn’t work, bu I tested it on Super Mario World with my camera and it works ! So there’s no reason it wouldn’t work on s if needed at all.

settings and config :
Retroarch 1.7.3 - video driver gl - “retroarch.cfg” video_refresh_rate = “59.299999” - shaders glsl / crt_pi.glsl with some tunning - Hard GPU synch on, 3frames (no clue wether it does anything) - Vsynch on
Windows 7 64 bits - aero off

tldr ?
Is it worth changing emulators ?
I think so, as by doing so allows to play the game at a closer speed than MAME… and has even less lag, with fitlers activated. For now, I’ll change for 3S and keep Shmupmame for other games where I don’t care that much about latency.

One thing that could be great, would be to compare the game speed from CPS3 to retroarch. Maybe by keeping up pushed for a whole round and compare videos lengths and synch. This would allow to check if the jumps remain synched and to fine tune the refresh rate to a speed closest possible to CPS3.
I don’t have access to a cab anymore so I can’t film that. Is someone up to it ?..
If I’m sure I’m running the game a the most correct speed possible, I would do sharper tests.


#3

thanks for posting this. it works really well for me. i’m on windows 10 and schmupmame is a bit jittery. retroarch “feels” the same for me as OE and 30th Anniversary. i can do Oro juggles on shotos with the same timing as any of those. i didn’t test it with a camera or anything, but so far it works great with the settings you posted.


#4

Hey Poot, thanks for the reply, good for you if you like it better.

Just came back from Japan, I filmed Chun jumping for a whole round, other char almost (my gf had problem understanding the “do not touch anything” part) not moving.
Sadly, I only had a camera with 30fps capability, so it won’t be the best to compare, but good enough to see if I’m totally out of synch.
I don’t have much time now but I’ll post again when it’s done.

Tbh, it had been so long I didn’t play 3S, and so long I didn’t touch a cab, I can’t say if I just lost my timings or if I got used to bad ones but I missed a lot of easy parries playing on a cab.

I haven’t tried anniversary collection, but it would be nice to do some testings as well (someone told me it was pretty laggy, but it’s just hearsay and you seem to have a different opinion, sorry, didn’t fully read your thread so far)


#5

Ok, did some tests with the 30 fps camera I had at hand during holidays and now with Retroarch at the current settings I posted above.
Comparison is not absolute proof of anything since we’re shooting a 60 fps game at half speed, but it’s god enough to make some points.

Feel free to correct me, checking the videos by yourselves.

Link to the CPS3 video, shot at 30fps

Link to the Retroarch video with the above settings, shot at 30fps

It seems that the speed settings I proposed for Retroarch are pretty accurate.
The videos remain in perfect synch most of the time,there’s a few times Retroarch gets ahead and others CPS3 does.
Two possible explainations :

  1. the 30fps camera doesn’t capture the same exact frames and videos were’nt perfectly synched
  2. since sometimes RA is in advance, sometimes it’s the CPS3, I think RA is pretty steady but from what I saw checking the framerate, it slightly varies once in a while and thus is not perfectly stable

Conclusion, we’re pretty near arcade !

If anyone can provide a 60 fps vid of the CPS3 having chun jump straight up a full round, that would allow better comparison.

[I’ll provide the videos for anyone interested to make further comparisons as soon as I figure how to easily upload vids. Is youtube ok, or would it re-encode stuff and possibly mess up the vids ? I’ll edit once I figured that.]

EDIT : done.
If it’s needed I can provide dl links for the vids, but I’m sure everyone knows how to do that on youtube

Nota : to synchronise vids I cut the vids just after the “FIGHT” banner disapeared.
To play both vids synchronously, I used VLC 2.0 (strangely newer versions can’t do that) as follows :
media> open multiple files > show more options> play another media synchronously (make sure you allowed more than one instance by unchecking the 2 boxes that have to do with it in Tools>preferences>Interface)


#6

Ok, shot a few more vids (same setup, 30fps…) and very interesting results :
Smupmame running at 0.99
Retroarch running at 60Hz or so (59.89 something, didn’t have time to set it back to 60Hz)
OE (I had doubt on where to cut right after the Fight banner disappeared as it took a lot more idle frames. every other version starts jumping on next frame)

Shmupmame (speed set at 0.99) too slow, gets desynched very fast, ends 1 sec after CPS3

Retroarch at 60Hz, waaaay too fast, desynched very fast, ends 2 secs before CPS3

OE, even with the lack of precision on where to cut the vid, it gets desynched after 15 or so secs (don’t remember the exact count), and… timer is veeeery slow, ends 11 secs later than CPS3

Bottom line, Retroarch setup as above sounds a lot better rythm wise and input lag is non existent or next to (Runahead feature sounds useless for 3S if I recall my counts), even with scanlines filters.
Even if I’m a bit sloppy, it stays the best option we’ve ever had.
Maybe it could even be improved a bit and we defenetly are very close to CPS3.

I’ll upload the vids in a few days and edit this fast message at the same time.


#7

Ok, I did better than posting the vids, I made a montage, you can check it there :

Street Fighter III : 3rd Strike - speed comparison CPS3 VS almost everything else

End results is we can now play 3S almost as on Arcade !

I’ll have to check again the input lag on both FBA and Mame cores, but if I recall what I typed above, the FBA core doesn’t suffer input lag…


#8

wow that is the closest i’ve seen so far. OE seems too fast and shmupmame is a tad too slow. RetroArch is the winner for now. too bad no ggpo implementation but i wonder if that’s possible with the “runahead” feature?


#9

Ok, great news, I downloaded the latest FBA core update (v0.2.97.43) and now Runahead works !
As I had 4-5 frames for the input lag test with chun’s HK without runahead, I tried with 1 frame activated.
And now I have 3-4 frames which seems pretty accurate.
Here are the vids if someone wants to count for precise results, I just counted around 30 to get the general figure :

That’s great as now we have everything to get the closest we’ve ever been from CPS3 !
Didn’t test Runahead for long, I imagine if you get problems after a while, try turning the second core on.

EDIT : played one hour without any framedrops/sound issues. The second instance of Runahead option fails though, plus it will disable runahead altogether.


#10

Nice work!

I used the same setup on my PC, recorded with OBS and then compared my video to yours. The game speed is the same as the CPS3.

I would be really interested to see if this would work with black frame insertion on a 120hz LCD.


#11

Hey !
Thanks for the reply, glad to hear it helped someone !

Actually, we’re extremely close to the pace of the CPS3, but not identical !
But I guess it’s good enough compared to every other version (it takes around 95 secs, game time to get noticeably desynched if I recall).
I’m almost sure we could get even closer (maybe at the exact same speed)…
This would need more tinkering and a 60 fps vid of the CPS3 with chun jumping.
If someone sends me one, I’d be glad to try and fine tune that if it’s possible.

I imagine it must work with 120Hz and black frame insertion… You should just focus on getting as close as you can to 2x59.58fps, which should be 119.16 fps (I have no idea how this works so I may be worng…).
To get a more precise count of the fps, you can activate statistics :
Setting>Onscreen Display> Onscreen Notifications> Display Framerate & Display Statistics

Could you report the framerates you’re reading, please ? I’d like to make a comparison and see if it’s machine dependent (not very likely) or not.

For reference, for CPS3 games, I read 59.53/59.54 but once in a while it goes up to 59.67/59.68…
I’m just elaborating theories, but I don’t think this variation is a problem, the game seems very stable from playing and from the vid.
If you average these values, you en up with 59.60/59.61

@Pootnannies reported 59.32, 59.54, and 59.66

The Runahead feature defenetly works, but after a while, sound suddenly gets garbled and fps drop (before that it’s exactly as without runahead, fps wise). This is an early alpha feature, it’s nice enough to be able to use it even though you can’t use it for long. (If sound gets garbled, either turn off runahead, or exit an restart RA to use runahead again)

At the moment, I’m importing my other games, and setting them to better refresh rates on a machine by machine basis… I’m not so on point about fps as with CPS3, but it’s nice, ninja spirit is a lot more playable !
I’m not changing the refresh rate value in the main config file anymore (returned it to 60.000000 there).
Now, let’s say I want to play Ninja Spirit or another m72.c game, I drop the rom in a specific folder, I named mine “roms m72.c” (don’t forget BIOS files for specific games).
I load the game in RA, and save the game override “by folder content”.
This creates a confing file that will apply to all the games in the “roms m72.c” folder.
According to mame’s game info (when you push TAB running a game) m72.c games all refresh at 55.017606 hz.
I’ve read FBA has issues in RA with neogeo games, not sure about that and not sure if it applies to m72.c, so just in case, I run neo geo games and affiliates with the MAME core (I just won’t be able to use runahead)
Now, I close RA, go straight to :
RetroArch\config\MAME\roms m72.c.cfg
and paste
video_refresh_rate = “55.000000”
… this is not perfect, too fast actually (if I lower this number, I may get closer to 55 fps), but a lot better

I’m also making playlists as RA keeps dumping evrything in MAME or FBA.
I also load custom icons (as custom playlists will have big black squares for icons).


#12

Ninja Spirit from irem? i love that game but it’s super hard without save states.


#13

well, it’s still super hard !
At last I feel I can get past stage 3 without cheating… and with some efforts :stuck_out_tongue:
I also managed to make 4th Strike work, the first few simm files in the zip had incorrect names for FBA…, just had to rename them like all the other files.


#14

I got roughly the same frame rate, from 59.3 ~ 59.6, seemed stable around 59.53.

However after leaving it running in attract mode for maybe 10-15 minutes my fps dropped to 25~45… I’m not sure what’s about.

real fullscreen (not windowed)
refresh rate set to 59.299999
vsync off
vulcan driver
runahead on, 1 step.

I’ve got a pretty decent CPU, i5 4690K, and GPU, GTX 980.


#15

vsync needs to be on and fullscreen causes problems. that should fix things up a bit. you’ll still get random frame drops every 10 min or so, but it should go back to stable right away.


#16

Thanks for the replies guys !

What do you mean @Pootnannies , fullscreen causes problems ?
And you have frame drops every 10 mins ?
Even with Runahead off ?

In my experience, it’s the runahead feature that is broken right now.
It works, and doesn’t mess up frame rates or anything that I noticed, but for a variable time, 25, 45, 60 mins, and then you get instant frame drops and garbled sound (makes it easy to spot at least).
You can’t turn on the runahead second instance on FBA for the time being, it seems it fixed these kind of issues for the other cores.
So for now, either play without it, or play short sessions and quit and restart retroarch when sound gets garbled (or simply turn it off when you get sound probs, game will run fine but you won’t get this input correction).

Btw, I tried to find better settings for the filters and did some more input tests to see how hard it would impact process.

The filters I used are twaeks from 2 filters, first, Pass 3 of crt GTUv050 (no scanlines, just some contrast and black settings) and crt geom (disableed all screen curvature effects as it consumes a lot of power).
The scanlines of crt geom look good on my screen, combined with the contrast/black settings of GTUv050 Pass 3, it may be completely different on your end, or you could not like it.

The input test is chun’s HK, counting as 1 the first frame of video where the light on the keyboard turns on.
Remember these values are just results on my setup, it has no universal value.
Still we can learn some things there.

**Here are the results on my setup (LCD) : **
**FBA core unfiltered 4.11 frames **
FBA core filtered 4.54

MAME core unfiltered 4.96
MAME filtered 5.72

For refference, @Isotopez and @Lance3rd reported CPS3 3.6

What we learn is that FBA has roughly one less frame of input lag than MAME and that filters have a heavier impact on MAME (and you can’t use Runahead on MAME).
Will do a last test with runahed on and filters (but I already saw that it works and takes off one frame of lag)


#17

@alien_nose_job
fullscreen reset some of my settings to default last time i used it and it stopped using keyboard inputs while in the Main Menu. i don’t know what’s going on with that. i should probably test it more.

i get small hiccups every now and then, but they are like every ten minutes or so. i have runahead on but didn’t test it very much with it off.


#18

You have to use fullscreen in order to get rid of desktop window composition in Win8/10, dwm has built in vsync, and vsync adds latency, which is why I also disabled it in Retroarch.

I’d be interested in seeing how Gsync / Freesync works here.


#19

well i’m going off of alien’s earlier post which makes sense:

why i can land hard links more easily compared to any other port of 3S in retroarch, i don’t know. i have vsync on, windowed mode, and runahead set to 1. maybe runahead adds an extra buffer frame? or is the timing now match much closer to how it looks visually? not sure.

now all we need is ggpo integration (praying to God this is somehow possible)


#20

mmm

@pootnannies
Actually, I also think as @cribba said that you should get in full screen mode (or at least I don’t see why it would hurt) .
From what you said, I think the frame drops you have may be runahead malfunction… or something else on your PC, or it is not powerful enough.
In that case, you should forget runahead as it is quiet demanding, and see if you still encounter slowdowns. And also cut filters, some are instant slowdowns for my machine.

@cribba thanks for the reply.
As Poot said, I’m not so sure about what I read, it was long, a while ago and pretty technical, but I think now Vsynch is not the old plague it was and it’s one of the things that should ensure better gameplay.

With some distance now, I think I see what has improved with RA over older emus. Correct me if I’m wrong :

1/ inputs treatment coupled with refresh speed - Vsynch speed from groovymame imported in RA itself (not only the MAME core)

2/ FBA still has one less frame of input lag as it had ten years ago (really thought this had changed since)

3/ adjustable game speed that allows to play at the right pace for the very first time

4/ an early alpha feature that allows to remove one or more frames of input lag (sadly still a bit broken for arcade games atm)

5/ modulable graphic filters, some not adding so much input lag

6/ better plug and play for sticks (at last an emu that recognizes a stick, no matter on what port it is plugged)

The only downsides I found so far is I don’t know what’s up with FBA and Neo Geo games (and for some reason Ghouls’n Ghosts & Ghosts and Goblins… I have weird sound issues), and Mame doesn’t seem like the best option if I had a choice (more input lag, filters impact more the process and Runahead will not be implemented).
Also the user interface is a bit difficult to understand… but once you figured it, it’s pretty good in the end.