Experiences about Retroarch's runahead feature?

Thread in 'Discussion' started by joemaro, 28 Oct 2018.

  1. Hey all,

    i started to play the amazing LJ65 on NES and tried out 3 different emulators on my linux system (FCEUX, Nestopia & Retroarch).

    So after maybe a week of trying these, i find the playability in Retroarch (using the Nestopia core :p) the best, because of the runahead function it has. It is described here: https://www.libretro.com/index.php/...riginal-hardware-through-new-runahead-method/

    So i'm wondering how are other people's opinions/experiences with it. Did some good NES players play this yet?

    Thanks for contributing!

    joe
     
    Qlex likes this.
  2. Zaphod77

    Zaphod77 Resident Misinformer

    What this is is a way to remove ingame latency. it can't correct for anything more than that.

    We assume that nes games have 1 extra frame of latency. you press the button and enter new frame is rendered after that, then the next frame the character leaves the ground. that's one frame baked in.

    so what we do is when input changes, during vblank we rewind one frame, apply the input change on the previous frame, then advance one frame, and load that state to the main screen.

    effectively it tries to send the input back in time. the rewind, send input,fast forward is never rendered, and you just end up with a in theory clean input received one frame earlier, and the current picture and sound as if it was pressed earlier.

    if the response time of the game is consistent, this works. but you need enough cpu to do the rewind/fast forward. if unthrottled emulation is many times the throttled one, you have enough cpu power to spare to do this, and done right it is completely seamless. If you set the lookahead too far, you would skip up in the air during a jump.

    it is also cheating if you successfully reduce total latency to more than the real hardware. but say if you have one frame of tv lag, removing the one frame of baked in game lag will counteract it, getting an experience the same as console on crt.
     
    joemaro likes this.
  3. Thanks for the clear explanation of what it does.

    I did some very crude tests with a smartphone camera filming the monitor and the keyboard, and my current setup (retroarch with nestopia core, 1 frame runahead) is having way less input delay than running it in FCEUX or Nestopia.
    I can really recommend this, LJ65 feels way better like this.
    The cpu power needed for this is not much at all in my experience, i didn't even notice when i started to use it.
     
  4. Zaphod77

    Zaphod77 Resident Misinformer

    again if it's better than console on crt, you are cheating. lj65 has always felt very responsive to me under emulation.

    we need to test with frame advance to see if lj65 actually has lag. smb has one frame. if lj65 has one frame it will take the same number of frames for an input to register in lj65 as smb.

    i actualyl should go test that.
     
  5. i measured it when i started to use Retroarch and yes there is the (NES-typical) 1 frame.
    But would love to see if you measure the same.
     
  6. Zaphod77

    Zaphod77 Resident Misinformer

    if it indeed is one frame lag, then its cheating unless your setup has 1 frame of lag before the NES lag frame.
     
    Last edited by a moderator: 9 Dec 2018

Share This Page