DB9 Vs USB game control tests

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

User avatar
the80scomputers
Atari User
Atari User
Posts: 41
Joined: Sun Oct 06, 2019 8:29 am

DB9 Vs USB game control tests

Postby the80scomputers » Tue Nov 26, 2019 9:57 am

Without the intention of generating controversy, I want to share these test that I have made.

https://youtu.be/zZeAIpW1fCc

I am always grateful for the great work of Sorgelig.

oskarzer0
Retro freak
Retro freak
Posts: 15
Joined: Thu Oct 25, 2018 1:42 am

Re: DB9 Vs USB game control tests

Postby oskarzer0 » Tue Nov 26, 2019 10:05 am

Thanks for your tests. Yes, DB9 is 0 lag because have direct connect to the fpga, and USB not.

crocky
Atari maniac
Atari maniac
Posts: 98
Joined: Fri Nov 23, 2018 2:01 pm

Re: DB9 Vs USB game control tests

Postby crocky » Tue Nov 26, 2019 12:23 pm

Thanks, is this Antonio Villena's DB9 module?

kublai
Atari nerd
Atari nerd
Posts: 44
Joined: Tue Nov 19, 2019 6:59 pm

Re: DB9 Vs USB game control tests

Postby kublai » Tue Nov 26, 2019 1:14 pm

Where can you buy the DB9 adapter for Mister?

antoniovillena
Atari User
Atari User
Posts: 43
Joined: Mon Oct 24, 2016 9:11 pm

Re: DB9 Vs USB game control tests

Postby antoniovillena » Tue Nov 26, 2019 11:07 pm

kublai wrote:Where can you buy the DB9 adapter for Mister?


I will sell, but don't have available yet (waiting boards from JLCPCB). It's open hardware, so you can order the PCBs and make yourself (mister_io_db9 and mister_io_todb9):

https://github.com/MiSTer-devel/Hardwar ... le_Gerbers

User avatar
the80scomputers
Atari User
Atari User
Posts: 41
Joined: Sun Oct 06, 2019 8:29 am

Re: DB9 Vs USB game control tests

Postby the80scomputers » Wed Nov 27, 2019 10:33 am

crocky wrote:Thanks, is this Antonio Villena's DB9 module?



No, it is an alternative passive adapter that I made with the kind indications of Antonio Villena.

This is the scheme:

Code: Select all

DB9   FPGA  USERIO       
===   ===== =========     
1(up) AF15  Arduino_IO10
2(dw) AE15  Arduino_IO9
3(lf) AH9   Arduino_IO14
4(rg) AH12  Arduino_IO13
5           Not connected
6(f1) AH11  Arduino_IO12
7           Not connected
8     GND
9(f2) AF17  Arduino_IO8


My adapter that is seen in the video is very simple because it is pin to pin and there is no risk of frying the FPGA because it does not conduct electrical voltage to the joystick.

crocky
Atari maniac
Atari maniac
Posts: 98
Joined: Fri Nov 23, 2018 2:01 pm

Re: DB9 Vs USB game control tests

Postby crocky » Wed Nov 27, 2019 11:09 am

the80scomputers wrote:
crocky wrote:Thanks, is this Antonio Villena's DB9 module?



No, it is an alternative passive adapter that I made with the kind indications of Antonio Villena.

This is the scheme:

Code: Select all

DB9   FPGA  USERIO       
===   ===== =========     
1(up) AF15  Arduino_IO10
2(dw) AE15  Arduino_IO9
3(lf) AH9   Arduino_IO14
4(rg) AH12  Arduino_IO13
5           Not connected
6(f1) AH11  Arduino_IO12
7           Not connected
8     GND
9(f2) AF17  Arduino_IO8


My adapter that is seen in the video is very simple because it is pin to pin and there is no risk of frying the FPGA because it does not conduct electrical voltage to the joystick.



Nice I wonder if this adaptor can be modified for SNES/NES etc since you are already using Ardruino :) I think it would be similar to the supergun adaptors that offer SNES/MD/PS controller compatibility. A few of them use Ardruino.

User avatar
the80scomputers
Atari User
Atari User
Posts: 41
Joined: Sun Oct 06, 2019 8:29 am

Re: DB9 Vs USB game control tests

Postby the80scomputers » Sat Dec 14, 2019 5:03 am

crocky wrote:Nice I wonder if this adaptor can be modified for SNES/NES etc since you are already using Ardruino :) I think it would be similar to the supergun adaptors that offer SNES/MD/PS controller compatibility. A few of them use Ardruino.


These pins really belong to FPGA card,in a connector that it have for plug an Arduino as son card but in this case no Arduino has been plugged in. It is also possible what you say without using Arduino, through the verilog code. In fact, it is working to be able to use complex DB9 controls such as those of the Genesis console (this is already a fact) and also in adapters from DB9 to other controls, and It is even in splitters to be able to connect several controls at the same time.


On the other hand, here are the videos of the latest input lag tests (DB9 Vs USB) with the new Overclock USB Controllers Polling Rate feature of MiSTer (https://github.com/eniva/MisSTer_Guides/wiki/Overclock-USB-Controllers-Polling-Rate) and two USB high performance interfaces:

Test VI:
https://youtu.be/l8tnkloiHHs
Xin-mo 1 USB Arcade Encoder Controler

Test VII:
https://youtu.be/GbgEOT0DrYo
Zero Delay USB Interface

Although it is evident that the performance of the USB control has improved substantially with the improvement of overclocking and with high-quality USB interfaces, only lag 0 is achieved with the direct connection of the control to the FPGA via DB9 connector.

mahen
Captain Atari
Captain Atari
Posts: 251
Joined: Mon Aug 26, 2013 3:11 pm
Location: France

Re: DB9 Vs USB game control tests

Postby mahen » Sat Dec 14, 2019 8:18 am

Do you consider the XinMo as a high quality interface btw ? This is what I have in my cabinet :)
Amiga user non-stop since 1993 ;-)
Win 1997-2001 / MorphOS 2002-2005 / Linux since 2005

User avatar
witchmaster
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 147
Joined: Wed Jun 15, 2011 10:50 am

Re: DB9 Vs USB game control tests

Postby witchmaster » Sat Dec 14, 2019 9:52 am

the80scomputers wrote:Although it is evident that the performance of the USB control has improved substantially with the improvement of overclocking and with high-quality USB interfaces, only lag 0 is achieved with the direct connection of the control to the FPGA via DB9 connector.

You should do the same test with an Arduino Pro Micro and my code here: https://github.com/MickGyver/MiSTer-Arcade-Controller

User avatar
the80scomputers
Atari User
Atari User
Posts: 41
Joined: Sun Oct 06, 2019 8:29 am

Re: DB9 Vs USB game control tests

Postby the80scomputers » Sat Dec 14, 2019 10:57 am

mahen wrote:Do you consider the XinMo as a high quality interface btw ? This is what I have in my cabinet :)



Yes, they tell me that USB interface is the one that has the best performance.
If someone knows another controller with more performance, they can say it and it can be proved, but I'm afraid, that the input lag> 0 will always be there.
Last edited by the80scomputers on Sat Dec 14, 2019 11:02 am, edited 1 time in total.

User avatar
the80scomputers
Atari User
Atari User
Posts: 41
Joined: Sun Oct 06, 2019 8:29 am

Re: DB9 Vs USB game control tests

Postby the80scomputers » Sat Dec 14, 2019 10:59 am

witchmaster wrote:
the80scomputers wrote:Although it is evident that the performance of the USB control has improved substantially with the improvement of overclocking and with high-quality USB interfaces, only lag 0 is achieved with the direct connection of the control to the FPGA via DB9 connector.

You should do the same test with an Arduino Pro Micro and my code here: https://github.com/MickGyver/MiSTer-Arcade-Controller


I doubt the performance is greater. I don't have any Arduino Pro Micro but if you give me one I can try it, but I'm afraid too, that the input lag> 0 will be there again.

User avatar
witchmaster
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 147
Joined: Wed Jun 15, 2011 10:50 am

Re: DB9 Vs USB game control tests

Postby witchmaster » Sat Dec 14, 2019 11:32 am

the80scomputers wrote:
witchmaster wrote:
the80scomputers wrote:Although it is evident that the performance of the USB control has improved substantially with the improvement of overclocking and with high-quality USB interfaces, only lag 0 is achieved with the direct connection of the control to the FPGA via DB9 connector.

You should do the same test with an Arduino Pro Micro and my code here: https://github.com/MickGyver/MiSTer-Arcade-Controller


I doubt the performance is greater. I don't have any Arduino Pro Micro but if you give me one I can try it, but I'm afraid too, that the input lag> 0 will be there again.

I can send you a Pro Micro, no problem, just PM me your address. The input lag will of course be >0 but it should be lower than a zero delay encoder (which has about one frame of lag if I remember correctly). The code I linked to is very simple and optimized so the lag should only come from the USB communication with the Arduino.

User avatar
Newsdee
Atari God
Atari God
Posts: 1545
Joined: Fri Sep 19, 2014 8:40 am

Re: DB9 Vs USB game control tests

Postby Newsdee » Sat Dec 14, 2019 1:03 pm

We have been doing latency tests on USB controllers over at the Classic Gaming Discord. I still have to complete my own setup so we can test more decices, but long story short:

1) we found there is a wide variation in input lag per controller brands/types. This is exoected as the guy in inputlag.science got similar conclusions

2) it is possible to override the polling frequency or MiSTer, but not all controllers are able to cope. With a frequency of 1ms we get very good result with a few devices.

3) Technically a serial protocol has less latency than USB but we are talking ~94% of being on time (of USB not missing a frame at 2ms interval) vs. 100% on time (direct connection/serial). There is some latency but it was measured at a few scanlines (10 to 20 IIRC).

User avatar
the80scomputers
Atari User
Atari User
Posts: 41
Joined: Sun Oct 06, 2019 8:29 am

Re: DB9 Vs USB game control tests

Postby the80scomputers » Sat Dec 14, 2019 4:49 pm

witchmaster wrote:
the80scomputers wrote:
witchmaster wrote:You should do the same test with an Arduino Pro Micro and my code here: https://github.com/MickGyver/MiSTer-Arcade-Controller


I doubt the performance is greater. I don't have any Arduino Pro Micro but if you give me one I can try it, but I'm afraid too, that the input lag> 0 will be there again.

I can send you a Pro Micro, no problem, just PM me your address. The input lag will of course be >0 but it should be lower than a zero delay encoder (which has about one frame of lag if I remember correctly). The code I linked to is very simple and optimized so the lag should only come from the USB communication with the Arduino.


Thank you for the offer, and I think it would be interesting to do one more test but surely there will be no surprise.


Newsdee wrote:We have been doing latency tests on USB controllers over at the Classic Gaming Discord. I still have to complete my own setup so we can test more decices, but long story short:

1) we found there is a wide variation in input lag per controller brands/types. This is exoected as the guy in inputlag.science got similar conclusions

2) it is possible to override the polling frequency or MiSTer, but not all controllers are able to cope. With a frequency of 1ms we get very good result with a few devices.

3) Technically a serial protocol has less latency than USB but we are talking ~94% of being on time (of USB not missing a frame at 2ms interval) vs. 100% on time (direct connection/serial). There is some latency but it was measured at a few scanlines (10 to 20 IIRC).


Certainly, from a USB controller we could approach the input lag 0 but we would never get the absolute 0 of the direct connection to the FPGA, that is pure logic.

I think it should be an option to be able to enjoy this advantage, and also, at the same time, to our old DB9 joysticks.

The code is already developed, I think it would only be necessary to insert it in the official releases so that everyone can enjoy it.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6075
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: DB9 Vs USB game control tests

Postby Sorgelig » Sat Dec 14, 2019 5:49 pm

99% of users even don't know what you are talking about and which bugs you are catching.
USB is a standard for input devices, so for MiSTer too. DB9 is not enough for many cores. Even retro controllers with more than 2 buttons use specific serial protocol. If it's not native to the core, then translation to other protocol together with specific quirks (like specific time to access without being falling down to lower button count like Sega 6 vs 3 protocol) makes access similar to USB where gamepad is queried separately from core queries.
This discussion is pointless as small quantities of purists will never understand the MiSTer purpose.
There is no point do provide any proofs. Go buy a real console and play, this is the only answer for you.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6075
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: DB9 Vs USB game control tests

Postby Sorgelig » Sat Dec 14, 2019 6:14 pm

For an input lag in general i suggest to google about sport and false starts. There are debates if reaction in less than 120ms can be considered as false start. Some people arguing that reaction can be less than 100ms. Anyway, it's arguing about that time. No one even think about 1ms or 10ms reaction.
What you measure is way below a human reaction time even without tweak USB polling. Even in original console with original gamepad, if you control character somewhere in lower part of screen, then if you want your action get registered on the next frame, you have only about 2-3ms to press. No way you can do it. I'm talking about non-regular reaction when you don't know what happens on the next frame. No way you will be able to react. You only can react on periodic or expected events - such events are predictable and button get pressed in advance.
On a real game, reaction is expected AT LEAST after one frame. So you have at least 16-20ms to react. But again, it's unrealistic time. It only for periodic and expected reaction when you see in advance like 500ms-1000ms.
While you can measure that some controller has 5ms or 10ms you may tell 5ms is better while in gameplay you won't see the difference. You may feel short time that changing from 5ms to 10ms will give you strange feeling, but you will quickly adopt yourself and will forget it, because none in the game depends on such small reaction. If you need 5ms (or even less than 1ms) reaction, then you are playing the game wrong.

All modern consoles use USB or even wireless connection. According to purists it shouldn't be possible to play on PS4 or XBOne. And no, games didn't became slower in last 30 years. So argument "Games adopted for USB" is not acceptable.

User avatar
the80scomputers
Atari User
Atari User
Posts: 41
Joined: Sun Oct 06, 2019 8:29 am

Re: DB9 Vs USB game control tests

Postby the80scomputers » Sun Dec 15, 2019 8:33 am

Many of us already have old consoles and computers and thanks to projects such as MiST and ZX-UNO we can fully enjoy the experience we felt with our old machines, and so, we can do this and preserving them at the same time.

There is no doubt that the technical superiority of MiSTer hardware and developments is making this FPGA something outstanding, far above other FPGAs. Proof of this is how well and fast cores such as Minimig or the latter work: the USB oveclock with input lag ≈ 0, and therefore, the gaming experience is close to the fullness for the majority.

This is something similar to the CRT issue, why would we have to give up being able to visualize the cores of the old systems as before, with the same display technology and also with 0 delay, when technologically it was possible?

This is the same, but we want to enjoy (as well as our old CRTs) also of our old DB9 joysticks y for many of us, one thing does not make sense without the other.

Fortunately it is already possible to have both and enjoy a full experience, because for this, a fork has been created that is easily adapting official cores for DB9 controls: https://github.com/antoniovillena/MiSTer_DB9

It would make us sad for many of us if this feature finally was not officially implemented :(

Thank you for your great work and effort.

User avatar
Newsdee
Atari God
Atari God
Posts: 1545
Joined: Fri Sep 19, 2014 8:40 am

Re: DB9 Vs USB game control tests

Postby Newsdee » Sun Dec 15, 2019 9:17 am

How is this DB9 solution different than SNAC? That is already part of the main cores.

User avatar
the80scomputers
Atari User
Atari User
Posts: 41
Joined: Sun Oct 06, 2019 8:29 am

Re: DB9 Vs USB game control tests

Postby the80scomputers » Sun Dec 15, 2019 11:43 am

Newsdee wrote:How is this DB9 solution different than SNAC? That is already part of the main cores.

What's SNAC?

hyperterminal
Captain Atari
Captain Atari
Posts: 175
Joined: Sun Jul 09, 2017 1:43 pm

Re: DB9 Vs USB game control tests

Postby hyperterminal » Sun Dec 15, 2019 1:00 pm

the80scomputers wrote:
Newsdee wrote:How is this DB9 solution different than SNAC? That is already part of the main cores.

What's SNAC?

SNAC (Serial Native Accessory Converter) is a controller adapter that can be plugged into the User Port (Serial IO).

It is explained here:
https://github.com/MiSTer-devel/Main_MiSTer/wiki/User-Port-(Serial-IO)

And here is a picture of a SNAC adapter:
https://www.misteraddons.com/product/se ... rter-snac/

Lightwave
Atari maniac
Atari maniac
Posts: 88
Joined: Sun Dec 16, 2018 8:18 pm

Re: DB9 Vs USB game control tests

Postby Lightwave » Sun Dec 15, 2019 4:31 pm

Sorgelig wrote:99% of users even don't know what you are talking about


Putting aside whether input lag is an issue or not, I found this comment pretty funny. :lol:

99.9% of people don't know what an FPGA is and are happy to use decade-old emulators with all sorts of inaccuracies, running on an under-powered Pi.

By nature, people who are interested in MiSTer and FPGA and are already the .01% purists, willing to spend $300+ to self-assemble a niche hobby system to run old software. You can't really blame these folks for being passionate about using original controllers or connecting to CRTs; for better or worse this is your audience :)

(I do understand your goal of modernizing these systems via standard USB/HDMI, but many of us here are still stuck in the past)
Last edited by Lightwave on Sun Dec 15, 2019 4:42 pm, edited 2 times in total.

Lightwave
Atari maniac
Atari maniac
Posts: 88
Joined: Sun Dec 16, 2018 8:18 pm

Re: DB9 Vs USB game control tests

Postby Lightwave » Sun Dec 15, 2019 4:31 pm

. double post

Threepwood
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 114
Joined: Thu Jan 10, 2019 10:06 am

Re: DB9 Vs USB game control tests

Postby Threepwood » Sun Dec 15, 2019 5:05 pm

Sorgelig wrote:[...] All modern consoles use USB or even wireless connection. According to purists it shouldn't be possible to play on PS4 or XBOne. And no, games didn't became slower in last 30 years. So argument "Games adopted for USB" is not acceptable.


Acceptable or not, that is exactly what happened. Game development changed like the hardware changed. E.g. Platformers now have "Coyote Time" that gives the player a tiny window where the jump still counts while they were already over the edge.

It is only possible to play games on modern consoles, because the delays are factored into the game design. Control inputs are ignored to create a smoother experience, AI constantly adapts to not let you get too dominant etc. We have come a long way in game development.
2x MiSTer FPGA: [Official Stormtrooper Case, USB Hub 2.1 with Bridge Board, 128MB SDRAM, ADC, RTC 1.3, I/O v5.5] + [3D printed MiSTer XS Case v2, 128MB SDRAM, I/O v5.6 XL]

benitoss
Atarian
Atarian
Posts: 6
Joined: Tue Nov 26, 2019 4:17 pm

Re: DB9 Vs USB game control tests

Postby benitoss » Sun Dec 15, 2019 5:12 pm

Newsdee wrote:How is this DB9 solution different than SNAC? That is already part of the main cores.


The DB9 solution is simple, not electronic components are necessary unless the minimal (5 v to 3.3 v converter) to protect the FPGA
In general in technical devices when a solution that works perfectly is simple, is better and is adopted. Less chips, less electronics element bring less lag and the solution is cheaper.

DB9 is not here to replace the USB Joysticks, it is a new complement that allows to enjoy the microcomputers and consoles implementation closer to the real devices using the native controllers giving a better user experience.


Return to “MiSTer”

Who is online

Users browsing this forum: GallopGhost, mario64, reflex and 8 guests