RetroArch Run-Ahead - Less input lag than real hardware!

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • The new Run-Ahead option in RetroArch 1.7.2 uses frame rollback and multiple-frame emulation to effectively “remove” latency, including latency that is inherent in the original hardware!
    Super Mario Bros on the NES, for instance, has a single frame of latency, even on original hardware. This means that Mario begins his jump on the second frame drawn after the A button is pushed.
    With "Run-Ahead" in RetroArch enabled and set to "1", this single frame of latency can be erased, allowing Mario to jump on the very next frame!
    This is performance BETTER than real hardware can offer!
    This video was taken at 240fps on an iPhone, and slowed down further for demonstration purposes.
    Easy for anyone to do, as long as you have a smartphone and a computer! No fancy wiring or lights required to test your own setup.
    Just put the controller in front of your phone while taking a slow-mo video, and hit a button! Count slow-mo frames (use math to compare to 60fps at realtime) on a computer.
    Full specs:
    CPU: Intel Core 2 Duo P7450
    Graphics: NVIDIA GeForce 9400M
    OS: Ubuntu 18.04
    Latest RetroArch Nightly (3/31/2018)
    Display:
    Random DisplayPort to VGA adapter
    Extron VSC 500 (not required, but makes my VGA 240p signal look nicer)
    VGA to circuit feeding CRT jungle chip
    Sony Trinitron TV
    Linux Settings:
    Custom 1920x240p EDID via DisplayPort
    RetroArch launched in KVM mode through basic command-line (not GUI)
    Linux RetroArch settings:
    VSync On
    Maximum Swapchain Images: 2
    Frame Delay: 8
    Integer Scaling
    No filters
    Run-Ahead to Reduce Latency: On
    Number of Frames to Run Ahead: 1
    Runahead Use Second Instance: On
    Input device:
    Super Famicom controller
    Dual SNES controller to USB adapter - V2, configured to 1ms of lag. Website specs say 2ms minimum, but hey, 1ms was an option in the controls, and Linux reports 1ms poll time…
  • РазвлеченияРазвлечения

Комментарии • 105

  • @RicochetForce
    @RicochetForce 5 лет назад +25

    With this having been out for a while, it's a goddamn miracle. Having games that look better, sound better, run better, and now feel better than original hardware is a treat. The responsiveness is a joy.

  • @SimonZellox
    @SimonZellox Год назад +6

    I can't wait for future hardware to be powerful enough for this to work with PS2 emulation.

  • @diegomayfield4751
    @diegomayfield4751 7 месяцев назад +3

    Tried this with the first TMNT on NES . Did the pause and skip frame to dial in the number to set it at . Wow I think it now plays much better than the original.

  • @TheLastLineLive
    @TheLastLineLive 6 лет назад +53

    What now, console purists?

    • @MarthSR
      @MarthSR 6 лет назад +10

      Well, it's certainly nice for input lag. However, when set to more than 1 frame of runahead, you'll visually notice the frameskip and it still can throw you off at times. At least from what I've experienced with this feature.
      On a Windows 7 machine with desktop composition disabled, 1 frame of runahead will provide great results. On a Windows 10 machine, 1 frame won't be enough. Good thing is that at 1 frame, the runahead won't visibly be noticeable. However, at 2 or more, it certainly is noticeable, and sometimes, certain specific inputs of a given input combination (the teleport moves of Street FIghter's Akuma, for example) can be lost, depending on your timing.
      So yeah, while it certainly does wonders when you only need one runahead frame, it breaks games in different ways when you need more.

    • @heatherslender5590
      @heatherslender5590 6 лет назад +5

      @MarthSK Speedruns: You are supposed to check beforehand what's the input lag of the game (look at their forums for instructions) and set exactly that amount of frames.

    • @videogameobsession
      @videogameobsession 6 лет назад +7

      Frameskip? No sir, I don't like it!

    • @GreekRetroGeek
      @GreekRetroGeek 5 лет назад +9

      Frameskipping to achieve results is trickery. Worst idea ever, for emulatards only. To reduce lag, it basically squeezes in a frameskip or more. Frameskipping in emulation. Like in the 90s.

    • @agentskazzers3482
      @agentskazzers3482 5 лет назад

      I know this alone could at least kill the console after market but who knows woah!!

  • @playstation1freak26
    @playstation1freak26 6 лет назад +4

    I tried this with Rayman 1 it feels much more responsive with runahead.

  • @DrTechXX
    @DrTechXX 6 месяцев назад +1

    And now? What are you going to do, Mister FPGA? Kkkkkk!

  • @lucagil64
    @lucagil64 2 месяца назад

    Hi, can i react you video?

  • @WingmanLive
    @WingmanLive 2 года назад +2

    On pc though youve got a lot of new sync technology- retro console's would most likely use vsync, co a comparason of mario 64 on crt vs mario 64 on a gsync or amd freesync monitor would be interesting to see maybe emulation could beat real hardware.

    • @TylerLoch
      @TylerLoch  2 года назад +1

      Absolutely. Higher refresh rates alone get you there. A CRT always takes 16ms to paint a frame. A 240Hz display gets you a whole frame in only 4ms. Though you're fighting against display processing time that isn't an issue on an analog CRT.

  • @amgs-diversão
    @amgs-diversão 3 месяца назад

    Genial... Isso mostra que realmente muda o jogo!
    Se o jogo foi feito e construído com inpult, o correto é eu permanecer no original... Mas isso é gosto de quem gosta!
    Eu sou totalmente a favor de que o jogo siga sua originalidade e construção da época e não uma aplicação criada para modificar o original para um jogo que não existe!

  • @emilydrake7829
    @emilydrake7829 6 лет назад +2

    This is amazing!!

  • @GlassICE
    @GlassICE 4 года назад +1

    OMG
    Guys
    till now, i've always thought that Real Hardware always have less lag than an Emulator
    but this video shown me that i was wrong all that time ?
    Is this also applies to Sega Genesis, N64 and SNES etc,,,etc... ?

    • @tylerloch9173
      @tylerloch9173 4 года назад +2

      You weren't wrong ALL that time. Just the last year or so :)
      This applies to any core available in RetroArch. Obviously it has heightened performance requirements, so it only realistic to use on pre-3D console cores.

    • @GlassICE
      @GlassICE 4 года назад +1

      @Neon Pizza
      I always respect to play Retro games with a CRT and, that would never change
      I even use every system up to Wii on a CRT Screen
      Except Original XBOX
      that hardware is capable of HD
      But other than that, it's all CRT

  • @diegomayfield4751
    @diegomayfield4751 7 месяцев назад

    Thanks for doing this test ! I never thought this would ever happen with NES emulation .

  • @ofoofo
    @ofoofo 6 лет назад +1

    Do you have your video out setup (from GPU to CRT) described in more details somewhere ?

    • @Dwedit
      @Dwedit 6 лет назад

      Tyler posted about it here:
      shmups.system11.org/viewtopic.php?p=1258657#p1258657

  • @mirabilis
    @mirabilis 3 года назад +1

    Sure. But is it consistent?

    • @TylerLoch
      @TylerLoch  3 года назад

      Depends on the Run-Ahead settings and the system being emulated.
      For this run on a 2009 MacBook showing next-frame latency on a one-frame-lag game, Run-Ahead was set to 1 frame, and Frame Delay was enabled at 8ms to start emulation of the frame(s) halfway through the raster scan. So 50% of inputs would make it in time to be shown on the next frame.
      More powerful rigs can set Frame Delay to 15ms so virtually all inputs land in time for the next frame.
      Of course...just set Frame Delay to 2, and no Frame Delay shenanigans are needed. You'd just miss out on seeing the first frame of Mario's jump. Most games later than the NES (like SNES) seem to have two frames of inherent lag, so no animation would be lost.

    • @mirabilis
      @mirabilis 3 года назад +1

      @@TylerLoch That depends on the game. :)

  • @DavidFilskov
    @DavidFilskov 7 месяцев назад

    That's simply incredible!! - is your emulator circumventing the GPU by rendering directly into video memory somehow?

    • @TylerLoch
      @TylerLoch  7 месяцев назад +1

      This is just RetroArch. You can see the specs in the video details.
      I'm using Linux in DRM (Direct Rendering Manager) mode, launching RetroArch from a plain console rather than through a standard window manager like X or Wayland.

    • @DavidFilskov
      @DavidFilskov 7 месяцев назад

      Linux of course :) - quite impressive. Thanks!

  • @LasciviousPsyche
    @LasciviousPsyche 9 месяцев назад

    @Tyler Loch I know this is old, but i'm just getting into retroarch on pc, but a friend told me about the delay that new monitors aka my pc monitor vs crt old monitors. Is there really a difference in the input lag using a modern tv or monitor? If so is there a way to fix this delay with retro arch or any other program thanks.

    • @TylerLoch
      @TylerLoch  9 месяцев назад

      Old CRT displays have 1-16ms of delay by nature, because that's how long it takes to draw an entire screen from top to bottom.
      Newer displays can theoretically have less but often have more, due to additional internal processing steps (smoothing, etc) that simply didn't exist in CRT displays. Every modern display has different settings to tweak (Game Mode, etc etc), and higher refresh rates can drastically help as well.

  • @zeesunoo6950
    @zeesunoo6950 2 года назад

    Means...Is it safe to put ONE value as run ahead frame for all SEGA and SNES games ?

    • @TylerLoch
      @TylerLoch  2 года назад +3

      "Safe"? That's a subjective term. What are you trying to be safe against?
      Generally there's nothing wrong at all with a value of 1. You're likely not going to get the same latency as hardware with modern displays and computer hardware anyway, so 1 maybe gets you back to even.
      A value of 2 combats most SNES games' two-frame internal lag. I can't speak much to the latency of Sega (MegaDrive/Genesis?) though.
      I usually set it to 2.

  • @immediamalcoccinello483
    @immediamalcoccinello483 5 лет назад +6

    Actually, this is what we call a _negative lag_

  • @zaadbaad541
    @zaadbaad541 5 лет назад

    dammh

  • @MrMassivemanmeat
    @MrMassivemanmeat 5 лет назад +3

    how did you get the PC hooked up to the CRT? are you using a vga to scart ? or vga to an AV cable converter thing?

    • @TylerLoch
      @TylerLoch  5 лет назад +4

      Pretty much VGA to SCART. It's a tortured interface because I'm lazy. Here's a video of my messy setup: ruclips.net/video/4yQHp0pbHMI/видео.html

  • @kiyoaki1985
    @kiyoaki1985 4 года назад +8

    The real problem here is that you're using A on the SNES controller to jump

    • @tylerloch9173
      @tylerloch9173 4 года назад +6

      Sorry you had to suffer. I didn't edit the button configuration before taking the video. Y/B for life.

  • @teddym2808
    @teddym2808 3 года назад

    I got all excited when I saw the title as I thought it meant on laptops/LCDs etc.
    How low can I get retro gaming/arcade shmups lag with retroarch, with an xbox usb controller? Any ideas?

    • @TylerLoch
      @TylerLoch  3 года назад +2

      RunAhead is a magical setting that "erases" routine levels of input lag, and is meant for a situation like yours. Going for less lag than real hardware is more of an academic pursuit than something feasible for everyone.
      LCDs almost all have more latency than a CRT. In fact, they cannot have LESS than a CRT, except maybe for high framerate panels.
      So, high framerate panel (120hz, 240hz, etc), RunAhead enabled at 1-2 frames, is your best bet. There will be inherent lag to any input device. Not sure what an Xbox controller is by default, but probably no more than a frame.

    • @teddym2808
      @teddym2808 3 года назад +3

      @@TylerLoch Hi, ,my panel is 7ms response 144hz. Sorry I had missed your very kind reply somehow. My coming gaming laptop is 3ms 300hz. That with one or two runahead will basically be great I presume. Tried one today, and can even use it on PS1 (10980HK 8 core locked at 4.4ghz for all 8 cores, 32gb ram, Nvidia 2080S), but I have yet to try two. I can also use 1 on duckstation standalone and I can really feel it when playing games like einhander. It's a very exciting time to be a retro gamer!

    • @DavidFilskov
      @DavidFilskov 7 месяцев назад

      ​​@@teddym2808Did you succeed in minimizing your latency?
      On my channel I've only ever measured ~60 ms (3-4 frames) as the lowest latency on modern emulation gaming handhelds in RetroArch. Most devices lie around 80 ms and the worst (AYN Odin 1 and 2) around 130-140 ms.

    • @teddym2808
      @teddym2808 7 месяцев назад

      @@DavidFilskov Oh yes, my input lag is crazy low now with a powerful system, and a board with good DPC latency figures also helped. Plus I use Nvidia Reflex and a real G-Sync monitor, it's amazing now. It will never be like this on a handheld, well, a powerful AMD windows handheld can have excellent input lag, but I mean the cheapos you know, forget about it. The best thing I ever did was buy a real G-Sync monitor with module that easily rotates into TATE mode. It has 1-240hz adaptive sync and has simply transformed retro gaming for me.,
      If I add just one frame run ahead to the genesis plus gx core, for example, when I do the frame test (let go of all controls, press P to pause game, hold jump button in game, press K to advance frames), I get response on very first press. So I am seeing input lag of a frame here, or 2 frames without any run ahead. It does depend on the core of course, things like Beetle Saturn have extra unnecessary lag. But even PS2 and PS3 can be played without any discernible lag :)

    • @teddym2808
      @teddym2808 7 месяцев назад

      I replied but youtube keeps deleting my replies. I have no idea what I said wrong, all I spoke about was sync and latency.@@DavidFilskov

  • @JF_OM
    @JF_OM 6 лет назад

    I have retroarch too

  • @italoa.b.oliveira3499
    @italoa.b.oliveira3499 4 года назад +1

    Could someone explain better how to know the frames?! Please. Because on youtube, everyone says something.
    I did the procedure with Super Mario World (snes):
    - I pressed the "K" key, Mario did NOT move.
    - I pressed the "K" key a second time, Mario did NOT move.
    - I pressed the "K" key for the third time, Mario moved.
    How many frames do I set on RETROARCH??? 2 or 3?!

    • @TylerLoch
      @TylerLoch  4 года назад +1

      I can confirm that Super Mario World on the SNES has two internal frames of input delay during gameplay. So you'd set Run Ahead in Retroarch to 2.
      Knowing that as a frame of reference, you can figure out how your button presses correspond to frames. Each game can have a different delay. You can't assume based on system.

    • @italoa.b.oliveira3499
      @italoa.b.oliveira3499 4 года назад +1

      @@TylerLoch So, the frame that the character starts the movement is always discarded?! (In the case of the "Super Mario Word" that I mentioned, Mario starts the movement in the third frame.)

    • @TylerLoch
      @TylerLoch  4 года назад +1

      ​@@italoa.b.oliveira3499 Correct.
      So, Frame 0 is the frame you pushed the button. On Frames 1 and 2 nothing happens. On the third frame, you see the result of your action.
      Run-Ahead effectively "removes" the number of frames its configured for. Picking "2" for Run-Ahead means the above Frames 1 and 2 are "removed", leaving your action to be displayed as fast as possible.

    • @italoa.b.oliveira3499
      @italoa.b.oliveira3499 4 года назад

      @@TylerLoch Best explanation I've seen so far. And if I in this case of "Super Mario World" activate run-ahead in 3 or more frames, how will the emulator react???

    • @megapro1725
      @megapro1725 3 года назад

      @@italoa.b.oliveira3499 it will add latency instead

  • @kynaston1474
    @kynaston1474 5 лет назад +9

    This isn't removing lag, it's hiding it. Big difference there.

    • @marialopezlopez546
      @marialopezlopez546 5 лет назад +1

      Wuot

    • @Hornet135
      @Hornet135 5 лет назад +10

      Sounds like someone doesn't understand what's going on

    • @mielthesquid6536
      @mielthesquid6536 5 лет назад +2

      @@Hornet135 in fact he is about right. The way it works is by doing a frame skip, so in motion you will notice it, it won't be as fluid as it should. The timming will be about right but not the motion.

    • @Hornet135
      @Hornet135 5 лет назад +12

      miel the squid that’s not how it works either, go read technical documentation about this and it will become clearer

    • @gblargg
      @gblargg 3 года назад +2

      @@mielthesquid6536 I don't think it's skipping anything. Most console game engines lagged. They polled input in vsync, which then displayed sprites from the previous frame's calculation. Then during that frame it calculated the new game state for the next frame. This feature is just removing this inserted frame of delay.

  • @gklinger
    @gklinger 6 лет назад +3

    Can someone explain why this is desirable if the goal of emulation, as I understand it, is to replicate the behaviour of the original device as accurately as possible?

    • @TylerLoch
      @TylerLoch  6 лет назад +10

      Because why not? Emulators have many optional features not available on original hardware, like overclocking, removing sprite limits, and in the case of 3D consoles, increased resolutions.
      Features like Run-Ahead, when left optional, are not hurting an emulator’s goal of accuracy.

    • @gklinger
      @gklinger 6 лет назад +1

      I didn't mean to convey criticism with my question. It's just that while I'm impressed from a technical standpoint, I'm struggling to understand why such a feature would be useful. Is it so one might achieve a higher score under emulation than might otherwise be possible with original hardware?
      Thanks for video, BTW.

    • @TylerLoch
      @TylerLoch  6 лет назад +2

      Very few systems, input devices, and display devices lend themselves well to zero-latency. The best most people can get down to is 1 or 2 frames of lag. Run-Ahead can get them closer to (or right at) real hardware response, enhancing their experience with emulation.
      What I’ve demonstrated here is the extreme: using this feature to do BETTER than real hardware, in an attempt to show in a very direct way that software emulation doesn’t have to mean “laggy”.
      As for actual use cases, you’re right. There isn’t much :) I guess there’s a chance for better scores or personal performance. But Run-Ahead would never be allowed in competition.

    • @perezkoala
      @perezkoala 6 лет назад +4

      Golan Klinger
      Don't struggle so much. There are gamers who play on emulators for fun, not for competitive reasons, not to break records or to experience "the true intention of the programmers".
      Everyone has different tastes, and emulators let them customize games according to their preferences. That's the reason many gamers use guides, save states, cheat codes, mods, fan translations, faster speeds, etc.
      Some uses:
      - In multi-player games, specially fighting.
      - Compensate for input lag from other sources.

    • @MisakaMikotoDesu
      @MisakaMikotoDesu 5 лет назад +2

      The goal of emulation is to play games through software without requiring the actual hardware. No one said it had to be accurate. Hell, look at PS2 and Wii emulation where enhancing the original video is touted as a desirable feature.

  • @luisandandrea1101
    @luisandandrea1101 5 лет назад

    RIP CHANNL

  • @xvit
    @xvit 3 года назад +3

    I’m so sick of zero input lag on emulators. Nothing beats authentic hardware with that classic input lag.