Skip navigation
NintendoAge
Welcome, Guest! Please Login or Join
Loading...

Measuring input response / lag / processing delays

Feb 6, 2014 at 11:17:58 PM
bunnyboy (81)
avatar
(Funktastic B) < Master Higgins >
Posts: 7704 - Joined: 02/28/2007
California
Profile
I am measuring the time from a button on a NES controller being pressed until the graphics in a game change by counting frames from a high speed camera.  The controller only gets an LED added and the game used is Balloon Fight so it should work on any system.
 
CRT composite = ~14mS from button to graphics.  The buttons are read when the electron beam is at the top of the screen, so that time is pretty much all waiting for the beam to get to the bottom part of the screen.  This is the absolute best it gets.
 
LCD HDMI = ~34mS.  Subtracting out the 14mS from above gets 15mS for the video processing/upscaling and 5mS for the pixel response of the panel.  I haven't found out anything about a game mode but around 1 frame slower than CRT is good.  This isn't a high quality TV but it is upscaling from 720p to 1080p.
 
LCD composite = ~64mS.  Analog adds an extra 30mS of processing time, total of 3 frames slower than a CRT.  This should be noticable for most people and would be death in Tetris.

Next step is to try some software emulators.  All digital should be a bonus like HDMI, but the extra frame buffers and controller input delay will be a penalty.

Hannspree SC24LMUB 1080p time behind CRT
NES CRT 14mS -
NES composite 64mS 3.1 frames
HDMI NES 720p 34mS 1.2 frames



Edited: 02/08/2014 at 02:52 AM by bunnyboy

Feb 6, 2014 at 11:30:25 PM
Duke.Togo (114)
avatar
(Christopher Cantrell) < Kraid Killer >
Posts: 2142 - Joined: 10/22/2011
Indiana
Profile
Very interesting stuff! I'll be interested to see what you find, and the difference game mode would make on a LCD on HDMI.

Feb 7, 2014 at 1:09:45 AM
renderling (7)
avatar
< Little Mac >
Posts: 98 - Joined: 01/21/2014
New York
Profile
It would be interesting to make a game that just displays some bars when you hold down the A button -- an NES version of this: http://www.displaylag.com/the-lag...

-------------------------
Now Playing: Mega Man X
Twitter | Bitbucket | GitHub

Feb 7, 2014 at 2:07:44 AM
bunnyboy (81)
avatar
(Funktastic B) < Master Higgins >
Posts: 7704 - Joined: 02/28/2007
California
Profile
That was my original idea but the problem is a software emulator like the Retron 5 that won't let you run any game you want. Using a simple/common/licensed game like Balloon Fight guarantees I can run the same test on any system.

I might have to do the white bars when I switch to an optical sensor instead of using the camera anyways.

Feb 7, 2014 at 7:54:04 AM
DarkTone (2)
avatar
(GameCube Boss) < Bowser >
Posts: 6926 - Joined: 01/15/2013
United Kingdom
Profile
This is interesting. Wish I could do this.

-------------------------
"Vacations are dangerous! They give you too much time to realize you work too hard." - Dain

Feel free to help NA  here

Feb 7, 2014 at 9:41:21 AM
renderling (7)
avatar
< Little Mac >
Posts: 98 - Joined: 01/21/2014
New York
Profile
I've been wanting to write some sort of NES "Hello, World"; maybe it will be "Super Press A For White Bars".

-------------------------
Now Playing: Mega Man X
Twitter | Bitbucket | GitHub

Feb 7, 2014 at 9:54:03 AM
arch_8ngel (68)
avatar
(Nathan ?) < Mario >
Posts: 35266 - Joined: 06/12/2007
Virginia
Profile
Very cool project.

I am actually surprised some of the LCD display latencies are so low.

It would probably be worth mentioning the brand, since it is reasonable to believe that no two tv manufacturers are using exactly the same signal conversion hardware, and extrapolating these results to all brands may paint a rosier picture than reality.

Then again, if your point us to show the best case frame difference between HDMI and composite for marketing the hdmi NES I think you have succeeded.

-------------------------
 

Feb 7, 2014 at 10:24:42 AM
teh lurv (118)
avatar
< King Solomon >
Posts: 4915 - Joined: 07/17/2013
Massachusetts
Profile
Originally posted by: arch_8ngel

It would probably be worth mentioning the brand, since it is reasonable to believe that no two tv manufacturers are using exactly the same signal conversion hardware, and extrapolating these results to all brands may paint a rosier picture than reality.

I agree with Arch, input lag can vary wildly among manufacturers, models of HDTV sold by a manufacturer, and even within the same model of TV. The input lag comparision is interesting, but isn't that useful outside the exact type of HDTV you're testing on Bunny.

-------------------------
My son... gives me Helpful Nintendo Hints that are far too complex for the adult mind to comprehend. Here's a verbatim example: "OK, there's Ganon and miniature Ganon and there's these things like jelly beans and the miniature Ganon is more powerfuller, because when you touch him the flying eagles come down and the octopus shoots red rocks and the swamp takes longer." And the hell of it is, I know he's right. - Dave Barry

Feb 7, 2014 at 11:58:14 AM
Tanooki (185)
avatar
(The Wind Waker) < Bonk >
Posts: 17067 - Joined: 08/27/2010
Kentucky
Profile
I'll third that. I didn't even realize it a few years ago when I thought Nintendo coded up a POS lazy lagged and unplayable SMAS for Wii, ended up being the stupid TV hating on sub-HD system stuff. Taking it to a Panasonic I have it ran as well as my legit cart so I kept a second copy I got. There's a website out there I don't have bookmarked where people are trying to stir up a community effort of as many makes, models, and variants of LCD, LED, OLED and Plamsa tvs and assessing the input lag so people will know what to buy or not if they intend to use older sub-HD devices so they don't run as useless lagged up crap.

I fear the day my Panasonic dies as it's solid, even displays old games with a sharp clean image that basically fills the screen.

Feb 7, 2014 at 12:08:05 PM
bunnyboy (81)
avatar
(Funktastic B) < Master Higgins >
Posts: 7704 - Joined: 02/28/2007
California
Profile
Yup I will test other TVs and make a cool chart, but the main focus is the console/emulator so using the same display is important. At least one of my screens is on displaylag.com so I can see how it compares.

Feb 7, 2014 at 12:11:21 PM
matt (8)

< Crack Trooper >
Posts: 151 - Joined: 04/03/2011
Manitoba
Profile
Fascinating stuff! I'm always impressed with bunnyboy's ability to engineer solutions, and the fact that he's considered stuff like using a common licensed game is brilliant in its own right.

Feb 7, 2014 at 5:34:38 PM
cradelit (21)
avatar
(crade lit) < Bowser >
Posts: 5673 - Joined: 08/18/2009
Alberta
Profile
I wonder if a CRT HDMI would make a difference. My PS3 using HDMI to my CRT has noticably less input delay vs. HDMI to LCD using that rocksmith game.

-------------------------
GRRR!


Edited: 02/07/2014 at 05:34 PM by cradelit

Feb 7, 2014 at 5:43:46 PM
arch_8ngel (68)
avatar
(Nathan ?) < Mario >
Posts: 35266 - Joined: 06/12/2007
Virginia
Profile
Originally posted by: cradelit

I wonder if a CRT HDMI would make a difference. My PS3 using HDMI to my CRT has noticably less input delay vs. HDMI to LCD using that rocksmith game.

What CRT do you have with HDMI input?


-------------------------
 

Feb 7, 2014 at 5:53:52 PM
cradelit (21)
avatar
(crade lit) < Bowser >
Posts: 5673 - Joined: 08/18/2009
Alberta
Profile
Originally posted by: arch_8ngel

Originally posted by: cradelit

I wonder if a CRT HDMI would make a difference. My PS3 using HDMI to my CRT has noticably less input delay vs. HDMI to LCD using that rocksmith game.

What CRT do you have with HDMI input?
 

My TV is a panasonic CT34WX15N..  It doesn't do full 1080p though only 1080i and 720p, which apparently isn't the right format. but I assume there are others that do 1080p?  The difference in input delay was significant enough that when I moved my PS3 from the CRT to the LCD, I couldn't play rocksmith at all anymore and I had to move it back.


-------------------------
GRRR!


Edited: 02/07/2014 at 05:55 PM by cradelit

Feb 7, 2014 at 6:11:09 PM
bunnyboy (81)
avatar
(Funktastic B) < Master Higgins >
Posts: 7704 - Joined: 02/28/2007
California
Profile
Originally posted by: cradelit

My TV is a panasonic CT34WX15N..  It doesn't do full 1080p though only 1080i and 720p, which apparently isn't the right format. but I assume there are others that do 1080p?
Like all HDMI CRTs I have seen, it doesn't do 720p.  Either 1080i or 480p only.  Should be much less lag because it is only doing digital->analog conversion instead of any kind of processing or upscaling.  At most it would have a couple scanline buffer to do the pixel doubling on 480p.

Feb 7, 2014 at 7:23:46 PM
bunnyboy (81)
avatar
(Funktastic B) < Master Higgins >
Posts: 7704 - Joined: 02/28/2007
California
Profile
Next round of tests!  These are results from a Samsung 32" LCD, model #UN32EH4003.  The panel is 720p native so the HDMI has no upscaling.  It is listed at displaylag.com as 26mS so my method is underestimating the time compared to theirs.  Still good for relative measurements, just not absolute ones.

Samsung UN32EH4003 720p time behind CRT
NES on CRT 14mS -
NES composite, game mode ON 42mS 1.7 frames
NES composite, game mode OFF 52mS 2.4 frames
HDMI NES 720p, PC mode 24mS 0.6 frames
HDMI NES 720p, game mode ON 24mS 0.6 frames
HDMI NES 720p, game mode OFF 26mS 0.7 frames

Again composite is significantly slower than HDMI in all cases.  Turning on game mode saves 10mS which is significant but still slower.  In HDMI game mode only saves ~2mS.  Labeling the input as PC ends up the same as game mode (within the error margin of the tests).

Next is Nestopia connected to the display above through HDMI.  The USB hardware can add 0-12mS just for polling the controller, so results will vary wildly.  I got 52mS and 68mS, so the usb/emulator/buffers/output adds around 2+ frames making it as slow as composite.  Will do more tests later with options like vsync.  I doubt filters or scaling will add any measurable delay.

What I need is a pro player to come over and see which of the delays is noticable, and which is instant death  


Edited: 02/08/2014 at 02:49 AM by bunnyboy

Feb 7, 2014 at 7:32:00 PM
Duke.Togo (114)
avatar
(Christopher Cantrell) < Kraid Killer >
Posts: 2142 - Joined: 10/22/2011
Indiana
Profile
I've got a Sony KV-34XBR800 that has DVI in which I use an adapter from HDMI, which does support 720p I believe. It would be interesting to see if there is lower lag in this versus an LCD.

Feb 7, 2014 at 8:06:09 PM
bunnyboy (81)
avatar
(Funktastic B) < Master Higgins >
Posts: 7704 - Joined: 02/28/2007
California
Profile
Interesting, the spec sheet says that one converts 720p to 1080i. Want to mail it here?

Looks like there's a CRT on ebay that does 720p, but it is 5 hours away....


Edited: 02/07/2014 at 08:20 PM by bunnyboy

Feb 7, 2014 at 9:51:28 PM
Tanooki (185)
avatar
(The Wind Waker) < Bonk >
Posts: 17067 - Joined: 08/27/2010
Kentucky
Profile
Display lag doesn't have my tv on their site, looked at the back it's a Panasonic Viera model TC-26LX70 (dated Nov 2007 so I must have got it in 08.)

I'm not sure how people are rating this but newegg and crutchfield claims it has a 9ms response time. It's a 720p(or 1080i) tv and runs at 60hz. I do know it's not as bright as the LED tv but the way I tweaked it it's fairly close and the image is super sharp on it.

Feb 7, 2014 at 9:57:14 PM
nitro2k01 (0)

< Cherub >
Posts: 6 - Joined: 11/18/2008
Sweden
Profile
I've been considering doing something like this myself, but with a slightly different approach to keep the results more controllable. In short, a special ROM that changes the color of the whole screen from black to white when a button is pressed, and then a controller as well as a light sensor connected to an oscilloscope (or other device capable of measuring time between trigger pulses.)

There are four interesting data points, imo.
1) The time a button is pressed.
2) The time when the button press is registered. (This would depend on the poll rate of the controller device.)
3) The time of the earliest display change.
4) The time of the last display change.

The point of separating 1 and 2 is isolating one aspect of the measurement as "poll to output time" instead of "input to output time" to make the technical part of the measurement more predictable. You now can now isolate the press to poll time as a random term between 0 and x where x is the time between polls.

The point of 3 and 4 is again more predictability. 3 and 4 would in practice correspond to the top and bottom of the screen a classical CRT will draw the screen progressively, meaning that you might hit the jackpot and get a <1 ms input to output latency if you press the button at the right time, and look at the top of the screen. The bottom of the screen on the other hand is guaranteed a minimum latency of 16.7 ms. (Assuming 60 Hz and checking the controller once in each VBlank only.)

An LCD on the other hand might have a different strategy where the data is drawn to the screen faster than 16.7 ms, and only a smaller portion of the time of a frame is used for drawing. This would make the difference for the best and worse case scenario for the same frame (ie the top and the bottom of the screen) smaller. I don't know if any TVs/screens actually do this, but it's worth keeping in mind.

The result that composite was slower than HDMI is not surprising, considering it will likely double or triple buffer the screen contents before drawing it. The screen drawing might not even be be synched to the video signal for composite on a digital TV, meaning that your latency might vary slightly depending on the phase relationship between the signal and the composite decoder at the time.

Yet another issue is the jitter introduced by the timing of the controller polling. Even more ideally you would add yet another data point, an "end of frame" in the emulator, which could be signalled in some good way such as perhaps outputting it on one of the pins on an LPT port, or recording the a high precision timestamp, assuming that this could be correlated well with the rest of the rig, again to isolate another individual step in the process.

I hope I've given some good ideas. I want to do something like this myself, but I haven't managed had the time and motivation to set it up yet.

-------------------------
Blog

Feb 7, 2014 at 9:58:20 PM
bunnyboy (81)
avatar
(Funktastic B) < Master Higgins >
Posts: 7704 - Joined: 02/28/2007
California
Profile
Response time is different from input lag. Response is the time for a pixel to change from black to white (or a similar measurement). 9mS would be considered slow now, 6mS is common and 2mS is fast. The input lag testers need the pixel to change so that response time is included in the overall number on sites like displaylag.com.

Feb 7, 2014 at 10:45:12 PM
bunnyboy (81)
avatar
(Funktastic B) < Master Higgins >
Posts: 7704 - Joined: 02/28/2007
California
Profile
Originally posted by: nitro2k01

I've been considering doing something like this myself, but with a slightly different approach to keep the results more controllable. In short, a special ROM that changes the color of the whole screen from black to white when a button is pressed, and then a controller as well as a light sensor connected to an oscilloscope (or other device capable of measuring time between trigger pulses.)
That was my original plan, but I couldn't find a light sensor that would work.  Did you ever get to that point?  I wonder how much the brightness matters for sensors like the bodnar.  I am ending the test when I see the first sign of the new graphics which still might be too dark for it to register.  That could mean a 5mS difference between my camera results and an optical sensor.

The point of separating 1 and 2 is isolating one aspect of the measurement as "poll to output time" instead of "input to output time" to make the technical part of the measurement more predictable. You now can now isolate the press to poll time as a random term between 0 and x where x is the time between polls.
Mine is already starting at the poll, but another LED on the button itself was the next step.  I think that is only significant for emulators where the hardware poll does not align with the NES game poll.  It would be awesome to measure a tetris player to see how much time they have between button press and button poll!

The point of 3 and 4 is again more predictability. 3 and 4 would in practice correspond to the top and bottom of the screen a classical CRT will draw the screen progressively, meaning that you might hit the jackpot and get a <1 ms input to output latency if you press the button at the right time, and look at the top of the screen. The bottom of the screen on the other hand is guaranteed a minimum latency of 16.7 ms. (Assuming 60 Hz and checking the controller once in each VBlank only.)
I am already picking a consistent point on screen, so that shouldn't make a difference other than a constant add or subtract from the final number.  The lcd/plasma panel won't be able to draw any sooner simply because the NES/emulator won't have output the video data yet.

I think displaylag.com had more info about how they average top/bottom/middle to account for different drawing routines but I'm not sure that is significant enough to care about. 

Yet another issue is the jitter introduced by the timing of the controller polling. Even more ideally you would add yet another data point, an "end of frame" in the emulator, which could be signalled in some good way such as perhaps outputting it on one of the pins on an LPT port, or recording the a high precision timestamp, assuming that this could be correlated well with the rest of the rig, again to isolate another individual step in the process.
I don't think LPT port is low latency enough, there are just too many layers of software and hardware in the way.   Not sure of anything else that would be faster without some extreme hardware tho.  Are there any USB 3.0 keyboards to use the num lock light?  


Feb 7, 2014 at 11:05:58 PM
teh lurv (118)
avatar
< King Solomon >
Posts: 4915 - Joined: 07/17/2013
Massachusetts
Profile
Originally posted by: bunnyboy

Again composite is significantly slower than HDMI in all cases.  Turning on game mode saves 10mS which is significant but still slower.  In HDMI game mode only saves ~2mS.  Labeling the input as PC ends up the same as game mode (within the error margin of the tests).

You didn't list what your using with those inputs, but I'm assuming you're using a stock NES for composite and your HDMI NES for the HDMI input. If that's the case, the higher composite lag would be due to the TV applying de-interlacing to the 240p signal to convert it to 480p.

-------------------------
My son... gives me Helpful Nintendo Hints that are far too complex for the adult mind to comprehend. Here's a verbatim example: "OK, there's Ganon and miniature Ganon and there's these things like jelly beans and the miniature Ganon is more powerfuller, because when you touch him the flying eagles come down and the octopus shoots red rocks and the swamp takes longer." And the hell of it is, I know he's right. - Dave Barry

Feb 7, 2014 at 11:21:16 PM
bunnyboy (81)
avatar
(Funktastic B) < Master Higgins >
Posts: 7704 - Joined: 02/28/2007
California
Profile
240p isn't interlaced, or it would be 240i. The screen in the first display is 1080p, so both the HDMI (720p) and composite (240p) need to be upscaled. I would have assumed those would take similar time and the analog->digital conversion would be very fast, but apparently not!

Feb 8, 2014 at 12:00:58 AM
PowerPlayers (87)
avatar
(The Phleo) < Bowser >
Posts: 7378 - Joined: 11/06/2011
New Jersey
Profile
I'm assuming you've created a custom NES software to test the inputs easier, is there any chance that your software may also have some lag? I know some games have input lag, although I'm hard pressed for examples right now.

Excellent stuff though man, CRT Composite is the way to go for competitive NES gameplay, thanks for that tidbit.

-------------------------

Got any of these for sale? Sell them to me. I also buy other NES Publisher inserts, and even GB/GBC, and SNES inserts too.