Provenance-Emu / Provenance

iOS & tvOS multi-emulator frontend, supporting various Atari, Bandai, NEC, Nintendo, Sega, SNK and Sony console systems… Get Started: https://wiki.provenance-emu.com |
https://provenance-emu.com
Other
5.87k stars 684 forks source link

Perceivable latency #157

Closed franktinsley closed 8 years ago

franktinsley commented 8 years ago

For me, perceivable latency really kills the experience so it's my number one issue. I'm a humble C# Unity dev but if someone can point me in some kind of direction on where I might start I will do anything I can to try to help get latency down. I would love to see latency reduced to the point where we can all play Mario at least as well as we can on Mario Maker for Wii U (which manages to have remarkably low latency even through a wireless gamepad that's also receiving a video stream!)

jasarien commented 8 years ago

I don't think so - the reports are saying all they did is update to 9.1 on their Apple TV, they didn't recompile/reinstall Provenance.

kreeger commented 8 years ago

Sadly I don't see any change in button press latency. I've tested with both Super Mario Bros. for NES and Mega Man X for SNES. It appears to be the same as it was after you made the change for polling for presses.

jasarien commented 8 years ago

yeah I thought it would be a bit too good to be true.

graphicbryan commented 8 years ago

I'll upload my settings later, but I was very surprised how much better the latency issues were after 9.1 update.

bvleur commented 8 years ago

Sadly I have to confirm no real improvements for me too.

Tested Steelseries Nimbus with Apple TV 4 on tvOS 9.1 with a Release build with the polling code.

I've compared the perceived latency with Super Mario World on the real SNES on the same TV (while not ruling it out completely due to HDMI versus composite)

Also I've played other games with the same controller on the same TV and Apple TV where I feel there is less latency.

If you need any help getting the required equipment to test this out yourself, please let us know. I guess a donation campaign would go pretty far :) I really appreciate your work on this project!

graphicbryan commented 8 years ago

Tested: SteelSeries Nimbus & Horipad Ultimate w/ATV4 9.1, running Provenance Release Build 1.2.6 (no additional mods) straight HDMI to Panasonic Plasma (game mode off), both controllers appear to be working with very low if any latency (for just about all EMUs). The other variable, is that testing was done later at night when many radio frequencies are at an all time low, so could have affected things.

I'll do more experimenting tonight when I get time. See if this performance improvement sticks or not.

drewbaumann commented 8 years ago

@graphicbryan I just picked up a nimbus as well, but have only tested on my iPad. Is it still working great with your ATV?

pjpalomaki commented 8 years ago

Mine works great on ATV 4. I don't really notice much/any latency..

Sent from my iPhone

On 21 Dec 2015, at 08:38, Drew Baumann notifications@github.com wrote:

@graphicbryan I just picked up a nimbus as well, but have only tested on my iPad. Is it still working great with your ATV?

— Reply to this email directly or view it on GitHub.

pjpalomaki commented 8 years ago

Just had a little go again after playing on PC with Xbox 360 controller (wireless) and yes, there is some lag with Ninbus+ATV4..

On 21 Dec 2015, at 12:28, PJ Palomaki pj@pjpalomaki.com wrote:

Mine works great on ATV 4. I don't really notice much/any latency..

Sent from my iPhone

On 21 Dec 2015, at 08:38, Drew Baumann notifications@github.com wrote:

@graphicbryan I just picked up a nimbus as well, but have only tested on my iPad. Is it still working great with your ATV?

— Reply to this email directly or view it on GitHub.

graphicbryan commented 8 years ago

@drewbaumann with build 1.2.6 and tvOS 9.1 things still appear to be working well with my preferred controller the horipad ultimate. I'm sure the nimbus is good too, but like the feel of the hori more. Lag is there on some games, but it's in the code of the game not the emu if I remember correctly.

whitverj commented 8 years ago

If it were in the code of the game, then the lag would be there whether playing on AppleTV or on iPad/iPhone, which (as others have determined) is not the case. iPhone/iPad seems lag-free in all cases, it's only AppleTV which has the issue this bug is trying to address.

graphicbryan commented 8 years ago

@whitverj that is correct, I will have to check other devices with emu and the games in question, but the lag that I'm noticing was on original NES consul too (at least I'm pretty sure, been a few years)

sakuranbokun commented 8 years ago

I'll chime in with my experiences - I'm using a Horipad with my ATV, and it's connected via an AV amp to a Pioneer Kuro plasma. Latency on my PS4 and XO (also via the amp) is negligible. With providence though, it's severe. I'm fairly well versed in retro gaming, and the latency associated with analogue to HDMI upscalers. I'd say the latency I'm seeing in Providence is similar, so around the 120ms mark. It makes games which require quick responses impossible to play.

Trying other Apple TV games with the Horipad, such as Rayman and Transistor, I see some lag, certainly more than with the PS4 or XO, but crucially much less than with Providence.

With regard to the OpenEmu source from which Providence was drawn, I use that often on my iMac with a wired USB Saturn pad, and there's no perceptible latency.

jasarien commented 8 years ago

It's Provenance, not Providence.

sakuranbokun commented 8 years ago

Apologies. No offense intended. Provenance is amazing piece of work, thanks for putting it together. I almost bought a Shield TV for emulation, so you saved me £200. :).

marlinmayo27 commented 8 years ago

I didn't see anyone mention making use of the Nimbus iOS app, so if someone did mention it and I missed it then I apologize. Anyway, the reason I bring that app up is because through it you can update the controller firmware. Curious if updating the controller firmware would help with the latency people keep experiencing.

I updated the firmware on my Nimbus last night and tested it with Provenance on my iPhone 6s Plus and the controller worked perfectly with it. I made it a point to test faster-paced games (Mega Man 2, Sonic the Hedgehog) and had zero issues. I haven't had a chance to test it on the Apple TV 4 since I updated the controller, but I'm going to test it out some time this week.

Either way, it probably wouldn't hurt to update your Nimbus controllers for those of you who have one. I'd assume it improves the functionality.

pjpalomaki commented 8 years ago

I updated my Nimbus firmware via the app the moment I got so it's running the latest version and still experiencing some lag with Provenance on ATV. That said, it's almost imperceptible and Provenance is already a great app on ATV!

On 23 Dec 2015, at 13:25, Marlin Mayo notifications@github.com wrote:

I didn't see anyone mention making use of the Nimbus iOS app, so if someone did mention it and I missed it then I apologize. Anyway, the reason I bring that app up is because through it you can update the controller firmware. Curious if updating the controller firmware would help with the latency people keep experiencing.

I updated the firmware on my Nimbus last night and tested it with Provenance on my iPhone 6s Plus and the controller worked perfectly with it. I made it a point to test faster-paced games (Mega Man 2, Sonic the Hedgehog) and had zero issues. I haven't had a chance to test it on the Apple TV 4 since I updated the controller, but I'm going to test it out some time this week.

Either way, it probably wouldn't hurt to update your Nimbus controllers for those of you who have one. I'd assume it improves the functionality.

— Reply to this email directly or view it on GitHub.

sakuranbokun commented 8 years ago

I got a second Horipad today and paired it with my second ATV 4. This one is connected direct to a Samsung LED TV, which are famous for having low levels of latency. Sadly I still see a good deal of latency with Provenance vs my other set-up with the Pioneer plasma and AV amp. It may be slightly better, but not much.

Maybe the Horipads are slow... who knows, but Hori is a top end Japanese brand for controllers- they've been making pro level fighting sticks for decades - , so if that were the case it would be surprising.

j4m13c0 commented 8 years ago

I also have controller input lag with an Nimbus and Stratus controller on the Apple TV. I have the Apple TV connected to a Samsung PC Gaming monitor and the lag is very noticeable. I have installed on both my iPad Air 1 and iPhone 6 Plus and there is no noticeable lag with either controller, only on the Apple TV itself. I have the latest build and running the latest iOS 9.2.

charlesvestal commented 8 years ago

For use of actually trying to get some data around this, there's the 240p test suite, a homebrew rom which has a "manual lag" test similar to Rock Band's visual calibration. Hopefully this is a good starting point to narrow down any weirdness between.

http://junkerhq.net/xrgb/index.php/240p_test_suite#Manual_Lag_Test http://sourceforge.net/projects/testsuite240p/files/SNES_SFC/

For reference, my first test results are:

240p Test Suite 1.0.2 // SNES

Provenance 1.2.6 // Apple TV -> TV // Steelseries Nimbus: 118.4ms Provenance 1.2.1 // iPad Pro // Steelseries Nimbus: 81.71ms Provenance 1.2.6 // iPad Pro // Steelseries Nimbus: 48.36ms

OpenEmu 2.0.1 // Macbook // Steelseries Nimbus: 76.71 ms OpenEmu 2.0.1 // Macbook via USBC -> HDMI // Steelseries Nimbus: 90.05 ms

Snes9X 1.53 x64 // Windows // Wireless XBOX 360 Controller: 38.36 ms

As an aside, I tried a comparison with the ipad pro via the lighing to hdmi AV adapter, which, given that it's an encoder not a signal converter, adds significant latency, upping to 181.76 ms

kwells1979 commented 8 years ago

Is this being looked into? I have the same issue (Apple TV 9.1, Provenance 1.2.6, Nimbus Controller). GameBoy Advance Mario World doesn't seem to have as much lag as the SNES version so must be down to the individual emulator?

iPhoneGitr commented 8 years ago

(Apple TV 4, Provenance 1.2.6, Nimbus Controller, HDMI to TV) I noticed a big difference in latency once I updated the nimbus controller firmware to v1.6.4.1 Very noticable with NES Super Mario World, went from unplayable to almost unnoticeable. Make sure you get the nimbus companion app. https://itunes.apple.com/app/steelseries-nimbus-companion/id1039561905?mt=8

tommolling commented 8 years ago

I've actually had 1.6.4.1 on my nimbus two months ago and had latency issues all the time.

amsennet commented 8 years ago

Any ideas on why my nimbus controller would be disconnecting from both aTV and iPad while playing in provenance? The controller works great in other games on both devices but disconnects after a few minutes in provenance. I'm on the latest iOS version, app version, and controller firmware. Also after it disconnects the only way to get the controller back on it to plug in the charge cable. It is fully charged though. Bad controller? Works fine in App Store apps though.

appletv4 commented 8 years ago

Anybody try the new TVOS beta 9.2 Maybe that helps

DanielFontes commented 8 years ago

@appletv4 Nope, i think it is still the same. I got iCade working but it is too laggy with tvOS 9.2

jeffsawatzky commented 8 years ago

@jasarien I'm experiencing lag with Apple TV 4 tvOS 9.1, Provenance 1.2.6, and the Nimbus controller (with firmware 1.6.4.1) on a Samsung 1080p smart tv (the apple tv is connected directly to the tv via hdmi). I would love to help debug this in any way I can. I'm not sure where I could put log messages or whatnot, but if you let me know what to do (or provide a branch with log messages that would help) I would be happy to run it and provide the logs. I've noticed the lag in SNES games, as well in NES games (though not as much).

I tried the manual lag test suggested by @charlesvestal and I got around 180ms lag.

mikeyg19 commented 8 years ago

@niltz I have the exact same setup (TV, versions, etc) and have the same lag problems. Most games are playable but games like Mario (NES), it's just enough to throw off the timing, making the game hard to play.

iOS games seem to have no lag at all with the Nimbus controller.

coreyfloyd commented 8 years ago

I also have been experiencing this lag. As @mikeyg19 noted, it's enough to make many games, like Mario, unplayable.

Has anyone been able to fix it?

mazerati commented 8 years ago

Hello, Just joined the forum because I was having this same issue but fixed it simply by putting my TV into Game Mode. I have Provenance 1.2.6 sideloaded on my 32GB Apple TV with a Vizio M50-C1 4KTV, I am also using the MFi Nimbus Steelseries controller. When playing games like SNES Super Mario World, there was a definite lag between when the button is pressed to when the action happens. Like when I press A to jump, Mario will jump a few milliseconds late. This did indeed make the game very difficult to play. After trying Game Mode, it fixed the lag. So remember, Game Mode in your TV's settings is your friend.

drcreek commented 8 years ago

I did have a lot of lag with game mode. But I will resideload it this week and report back if anything has changed since December. If anyone's else used to have issues please kindly do the same. It would be interesting to find out if much has changed.

DMx

5 apr. 2016 kl. 06:23 skrev mazerati notifications@github.com:

Hello, Just joined the forum because I was having this same issue but fixed it simply by putting my TV into Game Mode. I have Provenance 1.2.6 sideloaded on my 32GB Apple TV with a Vizio M50-C1 4KTV, I am also using the MFi Nimbus Steelseries controller. When playing games like SNES Super Mario World, there was a definite lag between when the button is pressed to when the action happens. Like when I press A to jump, Mario will jump a few milliseconds late. This did indeed make the game very difficult to play. After trying Game Mode, it fixed the lag. So remember, Game Mode in your TV's settings is your friend.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub

seanbperiod commented 8 years ago

There are times when the lag would be so much that I'd have to close out the app. The lag is much less noticeable on first load. But when I've left just the app open with no game loaded, the interface was sluggish, and the lag was MUCH worse until I closed out the app.

Sean Burdick Web & Graphics Designer|seanburdick.com http://seanburdick.com/607.341.4349

On Tue, Apr 5, 2016 at 1:37 AM, drcreek notifications@github.com wrote:

I did have a lot of lag with game mode. But I will resideload it this week and report back if anything has changed since December. If anyone's else used to have issues please kindly do the same. It would be interesting to find out if much has changed.

DMx

5 apr. 2016 kl. 06:23 skrev mazerati notifications@github.com:

Hello, Just joined the forum because I was having this same issue but fixed it simply by putting my TV into Game Mode. I have Provenance 1.2.6 sideloaded on my 32GB Apple TV with a Vizio M50-C1 4KTV, I am also using the MFi Nimbus Steelseries controller. When playing games like SNES Super Mario World, there was a definite lag between when the button is pressed to when the action happens. Like when I press A to jump, Mario will jump a few milliseconds late. This did indeed make the game very difficult to play. After trying Game Mode, it fixed the lag. So remember, Game Mode in your TV's settings is your friend.

— You are receiving this because you commented.

Reply to this email directly or view it on GitHub

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/jasarien/Provenance/issues/157#issuecomment-205654537

blodt commented 8 years ago

I have this exact issue also - Running the Provenance 1.2.6 on my Apple TV 4th Gen 32GB.

Running the latest Provenance on my iPad Pro using the Horipad Ultimate, there is no latency with button presses at all in Super Mario All Stars + World (SNES). Exact same controller + Game on the Apple TV version and the delay on the button presses makes it unplayable really.

The controller works superbly with all normal iOS apps (like Sonic, Sonic 2, Sonic CD) and also with Provenance on iOS.

Something is up with using it on tvOS though.

Major bummer - Hope it can be rectified. Thank you all for your hard work on this app! Great stuff!!

apexad commented 8 years ago

I'm sorry for asking this question, but you are using ProvenanceTV-Release not, ProvenanceTV, right?

tonycoco commented 8 years ago

I experienced this last night. Fresh ATV4, brand new Nimbus MFI controller, game mode ON new 4k Vizio TV, fresh build of ProvenanceTV-Release.

Super Mario is near unplayable with jumps not working 1/2 the time.

graphicbryan commented 8 years ago

Did you update the firmware on your Nimbus MFI controller?

tonycoco commented 8 years ago

@graphicbryan Does that actually help?

whitverj commented 8 years ago

@tonycoco Unlikely. From all appearances, the issue is in the time it takes to process the controller's input and apply it to the emulator core, not in the time it takes the controller to send the input to the AppleTV. For some reason, the issue is only present on AppleTV, not on any other platforms where Provenance runs. But because no one can (or has bothered to) gather hard, reproducible data about where exactly the lag is happening, @jasarien can't (or won't) investigate a fix.

lolkthxbai commented 8 years ago

@tonycoco yes, it does. When I first bought the ATV and Nimbus Controller I was disappointed with the amount of lag between button presses but when I paired the controller with my phone it recommended I install the app and the app has a firmware update feature. I updated it and since then I've had no lag at all.

whitverj commented 8 years ago

@lolkthxbai I suppose it's possible -- but consider that people in this thread have said that the lag they experience is inconsistent. Sometimes it's very noticeable, sometimes it seems not-so-bad. It's possible that the firmware update helped (I'll try again tonight after making sure my firmware is up-to-date), but it's also possible that you just ran into a not-so-bad run that just happened to fall after the firmware update.

Let's hope it's the former, because having everyone update their controller's firmware is a much easier fix than any other solution (since there appear to be none forthcoming).

jyc66 commented 8 years ago

Be sure to load the app as a Release build and not a debug build.

On Fri, Apr 29, 2016 at 2:27 PM, whitverj notifications@github.com wrote:

@lolkthxbai https://github.com/lolkthxbai I suppose it's possible -- but consider that many people in this thread have said that the lag they experience is inconsistent. Sometimes it's very noticeable, sometimes it seems not-so-bad. It's possible that the firmware update helped (I'll try again tonight after making sure my firmware is up-to-date), but it's also possible that you just ran into a not-so-bad run that just happened to fall after the firmware update.

Let's hope it's the former, because having everyone update their controller's firmware is a much easier fix than any other solution (since there appear to be none forthcoming).

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/jasarien/Provenance/issues/157#issuecomment-215839365

whitverj commented 8 years ago

@jyc66 Yeah, thanks - I know how to do that. I only ever run release builds, not debug.

seanbperiod commented 8 years ago

Alright guys. I have SteelSeries XL and after some hunting I found a USB port and updated the firmware. and WOW. it helped IMMENSELY! I still notice the slightest "hair" of a lag, but mario is definitely 98% more playable now. So everyone. Update your firmwares (your controllers, not your aTVs :D )

charlesvestal commented 8 years ago

Is no one else interested in submitting data from 240p? It certainly appears the lag is there, measurable and repeatable.

lolkthxbai commented 8 years ago

@charlesvestal I don't mind. Like I said before, I updated the controller firmware, am running a release build that was compiled about a week ago. When I play Aladdin on SNES the right shoulder button work intermittently or lags. Other times, it just doesn't work at all. In all games there's a split second of lag between button presses. I thought the nimbus was to blame but when I play oceanhorn and transistor it works fine. I can submit any diagnostic data neccessary. Tell me what to do to capture it and I'll submit it.

charlesvestal commented 8 years ago

@lolkthxbai awesome. I linked to the 240p test suite rom, if you want to try the manual lag test above. https://github.com/jasarien/Provenance/issues/157#issuecomment-168223906

JoeMatt commented 8 years ago

I made a tweak to the NES emu to switch MFI polling to before the emulator runs a cycle similar to a tweak that was made in the SNES in this ticket https://github.com/jasarien/Provenance/issues/354

https://github.com/JoeMatt/Provenance/tree/nes_mfi_lag

drakkhen commented 8 years ago

Just wanted to thank you all for resolving this! I didn't get a chance to rebuild/install on my AppleTV 4 until today and NES Zelda II is MUCH better. Cheers!

mattstoker commented 7 years ago

I was disappointed with input lag on a new ATV4 and Horipad controller playing Super Mario Bros on SNES on my Vizio 4k TV. Nearly unplayable. However, after I turned on the setting on the TV's menu for game latency reduction, the situation was drastically improved. There is a bit of latency (I notice it on on the menu and Sonic the Hedgehog native app), but it is very playable now.

alexchandel commented 1 year ago

PSA to future readers: turn off Dolby Vision (/ turn on your TV's Game Mode) when using Provenance.