Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news


  

Author Topic: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID  (Read 3304 times)

0 Members and 2 Guests are viewing this topic.

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
I bought 2 Zero Delay USB encoders on eBay. And as I'm crazy about Mame lag control I've decided to test if those Zero Delay encoders actually have no lag.
I've recorded a video using my 400fps camera. It's a test screen of Thunder Cross which has no 1 frame sprite buffer delay.

Here is a picture of my setup and a video link.



https://youtu.be/dzIqYNALMwk

On the left my reference Arduino encoder. On the right Zero Delay USB encoder. Both are wired to the same button. For most of the time Zero Delay is behind Arduino by 1 frame. Conclusion. Avoid, go for IPAC instead.

Nephasth

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 409
  • Bitches love Centipede
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #1 on: March 27, 2017, 11:18:16 am »
For when that 1/400th of a second really matters!  ::)
%Bartop

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #2 on: March 27, 2017, 11:20:31 am »
For when that 1/400th of a second really matters!  ::)

I wrote 1 frame, but screen frame not recording, so 16ms bro. I do not have a 400hz monitor.

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 6147
  • Obey.
    • The Chris Burke Band
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #3 on: March 27, 2017, 11:27:06 am »
Are your wires the exact same type (solid/stranded) and length? 

I'm going to need you to measure resistance from the button to each encoder.




oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #4 on: March 27, 2017, 11:32:19 am »
Since when the cable length matters? Do you know the speed at which electrons are travelling? I'ts immeasurable in the home environment.
Both Arduino and Zero Lag share +5V on one pin of the button and have pulldown resistors on the input pins.

Nephasth

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 409
  • Bitches love Centipede
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #5 on: March 27, 2017, 11:33:41 am »
Actually, it is measurable. And the unit of measure is called ohms...
%Bartop

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 6147
  • Obey.
    • The Chris Burke Band
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #6 on: March 27, 2017, 11:40:39 am »
Since when the cable length matters?

When we're analyzing input speed down to 1 frame, that's when.


oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #7 on: March 27, 2017, 11:40:58 am »
Ok, I've measured it for you.
From the button to Arduino pin - 0.3-0.4 ohms
From the button to the zero encoder 0.3-0.4 ohms
Closed loop of my multimeter 0.3-0.4 ohms

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #8 on: March 27, 2017, 11:44:20 am »
Zero Delays have internal 10 Mohm pulldown resistors on each input pin anyway.
« Last Edit: March 27, 2017, 11:46:10 am by oomek »

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #9 on: March 27, 2017, 11:51:49 am »
And as you are so eloquent in electronics you should know that the capacitance of the microcontroller's input pins is so small that the value of the pulldown resistor should not matter.

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #10 on: March 27, 2017, 11:53:14 am »
What's even more, if that was a matter of the pulldown resistor's value you should observe the delay only on the release of the button.

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #11 on: March 27, 2017, 11:57:26 am »
Since when the cable length matters?

When we're analyzing input speed down to 1 frame, that's when.

1 frame of my monitor has 16.66ms. Are you suggesting that it takes 16ms for electrons to travel through the wire :) ?

I've recorded it in 400fps just for you to see it.

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 6147
  • Obey.
    • The Chris Burke Band
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #12 on: March 27, 2017, 11:58:39 am »
I would argue you need to test the independently of each other with the same wiring, etc, but I think your video i conclusive enough.  To the people that care, use an Arduino.


Ah, well, I see you've posted 4 messages while I was writing this. 

Good luck, kid.

 :cheers:

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #13 on: March 27, 2017, 12:00:57 pm »
I would argue you need to test the independently of each other with the same wiring, etc, but I think your video i conclusive enough.  To the people that care, use an Arduino.


Ah, well, I see you've posted 4 messages while I was writing this. 

Good luck, kid.

 :cheers:

Kid ? :) Thank you, I wish I was, as I'm 40 years old.

I do not see the point of you disproving the basics of electronics, what is your point exactly?

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #14 on: March 27, 2017, 12:05:10 pm »
I've checked the input of the button again, but this time using the app I wrote in c#. It seems like when a controller appears in the system as HID game controller it's polling rate is quantized to 1 frame. This is why It's better to use an encoder which simulates a keyboard. Mystery solved.

edit: and yes, I'm using a rawhid library.
« Last Edit: March 27, 2017, 12:07:36 pm by oomek »

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 6147
  • Obey.
    • The Chris Burke Band
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #15 on: March 27, 2017, 12:07:35 pm »
Yes, that has been known for a long time.

 :cheers:

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #16 on: March 27, 2017, 12:10:12 pm »
Yes, that has been known for a long time.

 :cheers:

Well, I thought it's a device specific issue. Anyway it only confirms the lag and proves that Zero Delay encoder is inferior to IPAC.
« Last Edit: March 27, 2017, 12:12:20 pm by oomek »

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 6147
  • Obey.
    • The Chris Burke Band
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #17 on: March 27, 2017, 12:12:21 pm »
But you didn't test an IPAC?


oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #18 on: March 27, 2017, 12:14:01 pm »
No, My ipac is on the way, I will update the topic as soon as I get it, but I do not see a reason of why it should act differently than my Arduino compatible board.
« Last Edit: March 27, 2017, 12:15:45 pm by oomek »

yotsuya

  • Trade Count: (+21)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 16229
  • 2014 UCA Winner, 2014, 2015, 2016 ZapCon Winner
    • forum.arcadecontrols.com/index.php/topic,137636.msg1420628.html
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #19 on: March 27, 2017, 12:25:08 pm »
That's why it cracks me up when people want to spend $300 on LED button & joysticks, and then cheap out on these crappy zero delay encoders.
***Build what you dig, bro. Build what you dig.***

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 6147
  • Obey.
    • The Chris Burke Band
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #20 on: March 27, 2017, 12:25:55 pm »
Don't you think you ought to have it in hand before declaring it's superior?  Lot of folks here switched over from the Ultimarc products.




oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #21 on: March 27, 2017, 12:27:21 pm »
That's why it cracks me up when people want to spend $300 on LED button & joysticks, and then cheap out on these crappy zero delay encoders.

Thumbs up to that ^

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #22 on: March 27, 2017, 12:31:54 pm »
Don't you think you ought to have it in hand before declaring it's superior?  Lot of folks here switched over from the Ultimarc products.

Fair enough. I take my claim back then and put it on hold. It's inferior to my microcontroller on which I've managed to get a total lag from button to screen of 5ms as you can see on the video I attached. Bear in mind my display is not a CRT.

yotsuya

  • Trade Count: (+21)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 16229
  • 2014 UCA Winner, 2014, 2015, 2016 ZapCon Winner
    • forum.arcadecontrols.com/index.php/topic,137636.msg1420628.html
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #23 on: March 27, 2017, 12:56:31 pm »
Don't you think you ought to have it in hand before declaring it's superior?  Lot of folks here switched over from the Ultimarc products.
I have had both in hand. The Ultimarc products are way superior, it's not even funny.
***Build what you dig, bro. Build what you dig.***

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2503
  • Back from the dead.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #24 on: March 27, 2017, 01:03:01 pm »
I have swappable panels... each with its own iPac or similar. But I like the zero delays for installing direct to the cab to handle basic admin functions, coin inputs, etc. Good for that stuff.
Formerly known for the (apparently now defunct) arcadeartlibrary

Nephasth

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 409
  • Bitches love Centipede
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #25 on: March 27, 2017, 01:03:23 pm »
ZD's have their place...
%Bartop

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 6147
  • Obey.
    • The Chris Burke Band
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #26 on: March 27, 2017, 01:06:31 pm »
Only Ultimarc product I used were the JPACs and my opinion of them is widely known.  (junk)

The zero delay encoder functions fine for me, but I've only used one of them.  I have it mounted on the underside of the control panel and the USB connector falls out far too easily.  Could fix that with hot glue but it is an annoyance.  Joystick encoders in general are too limited, IMO.



 

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #27 on: March 27, 2017, 01:13:46 pm »
It's teasing to sacrifice my Teensy 2.0 and use it as an encoder. At least I have total control over the encoding process. I still can cancel my Mini-PAC delivery....very tempting....
« Last Edit: March 27, 2017, 01:16:03 pm by oomek »

MaxAsh

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 133
  • This... is my boomstick!
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #28 on: March 27, 2017, 01:15:53 pm »
Have you tested the Xin Mo encoder, out of curiosity? I had the ZD ones in a build long ago, but with the cost being almost the same for a Xin Mo, I replaced the ZDs with that when I was rebuilding a few things. I'm curious how it stacks up against Ultimarc.

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #29 on: March 27, 2017, 01:17:53 pm »
Have you tested the Xin Mo encoder, out of curiosity? I had the ZD ones in a build long ago, but with the cost being almost the same for a Xin Mo, I replaced the ZDs with that when I was rebuilding a few things. I'm curious how it stacks up against Ultimarc.

No unfortunately not, but I read somewhere XinMos are even more laggy. Can't remember the link I'm afraid.

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #31 on: March 27, 2017, 01:22:04 pm »
I'm wiring my Teensy 2.0 now to see how it compares to the A-Star board I used for testing from the 1st post.

I dropped it before as a candidate for an encoder as it has 25 digital inputs and I needed 26, but today I realised I can use an analog ins for left/right and up/down pairs and wire it with a resistor network. I do not need simultaneous left and right do i :) ?
« Last Edit: March 27, 2017, 01:27:16 pm by oomek »

MaxAsh

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 133
  • This... is my boomstick!
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #32 on: March 27, 2017, 01:27:56 pm »
Oh it was here on the forum :)
http://forum.arcadecontrols.com/index.php/topic,113432.msg1212763.html#msg1212763

Interesting. I've experienced no noticeable delay with my Xin Mo. Reading through additional posts in that thread, it seems others haven't had issues either. Perhaps there is simply too much variance in the setups (computer used, etc.) that can come into play. In comparing to some of the actual arcade cabinets I have as well (DK, Pac, etc.) overall I'd say it does a great job emulating without noticeable delay in controls.

Good luck with your testing!

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #33 on: March 27, 2017, 01:34:12 pm »
I agree, you would need to do a comparison with some known low lag device like I did with A-Star and record it with high speed camera.

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #34 on: March 27, 2017, 01:42:05 pm »
I'm planning to post some guide explaining how to get that total 5ms latency in mame on a LCD as it makes me cry when I see people playing arcade games on a RP with 80-100ms lag. It's not an arcade anymore but more likely a RTS, click and pray game.

bootsector

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 70
  • I want to build my own arcade controls!
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #35 on: March 27, 2017, 04:36:12 pm »
Would you mind to test this flashed to your Teensy 2.0 board?

https://github.com/bootsector/PS3PadMicro

It works on PCs and PS3.

Thanks

morton

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 129
  • I want to build my own arcade controls!
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #36 on: March 27, 2017, 04:54:42 pm »
I would first like to commend the OP for performing an actual test and not basing his opinion on pure speculation without anything to back it up.

What I do take issue with is declaring something to be junk, when it hasn't been compared to the competition. It would be much more constructive to see how it compares to the others on the market. The OP should have collected 3-4 different models and done further comparison to see where each fall on the spectrum. This would give people much more useful information - being able to compare it - rather than just accepting a test with variables that some may or may not agree with. Just my $0.02.

oomek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 111
  • Mame forever.
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #37 on: March 27, 2017, 10:35:17 pm »
Would you mind to test this flashed to your Teensy 2.0 board?

https://github.com/bootsector/PS3PadMicro

It works on PCs and PS3.

Thanks

I've had a lot of headache today with my Teensy board. It somehow refused to work. It was working few monts ago, so out of desperation I dowgnraded the IDE and Teensy loader and it started working again. It seems like I bought a counterfeit :) Teensy is a fraction of a ms behind A-Star and I do not know if being a counterfeit somehow affects that. I'm done for today, will try your sketch tomorrow.

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 368
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #38 on: March 28, 2017, 12:56:41 am »
Zero delay doesn't mean zero lag, as you noticed ;)

One additional frame lag is A LOT, if you keep in mind that emulators loose another frame di-per-se.

ChurchOfSolipsism

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 188
Re: Zero Delay USB encoders lag measurements - THEY HAVE LAG - AVOID
« Reply #39 on: March 28, 2017, 08:21:53 am »
Correct me if I'm wrong, but don't many arcade PCBs have 1 frame of lag, too? Wouldn't the introduction of one frame lag make it more authentic?  :D

Not that I, personally, care about a delay of 1/24th of a second (still, good work, op!)...

  
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31