DB9 Vs USB game control tests
Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team
- the80scomputers
- Atari User
- Posts: 41
- Joined: Sun Oct 06, 2019 8:29 am
DB9 Vs USB game control tests
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.
https://youtu.be/zZeAIpW1fCc
I am always grateful for the great work of Sorgelig.
Re: DB9 Vs USB game control tests
Thanks for your tests. Yes, DB9 is 0 lag because have direct connect to the fpga, and USB not.
Re: DB9 Vs USB game control tests
Thanks, is this Antonio Villena's DB9 module?
Re: DB9 Vs USB game control tests
Where can you buy the DB9 adapter for Mister?
-
- Atari User
- Posts: 43
- Joined: Mon Oct 24, 2016 9:11 pm
Re: DB9 Vs USB game control tests
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):kublai wrote:Where can you buy the DB9 adapter for Mister?
https://github.com/MiSTer-devel/Hardwar ... le_Gerbers
- the80scomputers
- Atari User
- Posts: 41
- Joined: Sun Oct 06, 2019 8:29 am
Re: DB9 Vs USB game control tests
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
Re: DB9 Vs USB game control tests
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: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.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
Nice I wonder if this adaptor can be modified for SNES/NES etc since you are already using Ardruino

- the80scomputers
- Atari User
- Posts: 41
- Joined: Sun Oct 06, 2019 8:29 am
Re: DB9 Vs USB game control tests
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.crocky wrote: Nice I wonder if this adaptor can be modified for SNES/NES etc since you are already using ArdruinoI think it would be similar to the supergun adaptors that offer SNES/MD/PS controller compatibility. A few of them use Ardruino.
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 ... lling-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.
Re: DB9 Vs USB game control tests
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

Win 1997-2001 / MorphOS 2002-2005 / Linux since 2005
- witchmaster
- Captain Atari
- Posts: 150
- Joined: Wed Jun 15, 2011 10:50 am
Re: DB9 Vs USB game control tests
You should do the same test with an Arduino Pro Micro and my code here: https://github.com/MickGyver/MiSTer-Arcade-Controllerthe80scomputers 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.
- the80scomputers
- Atari User
- Posts: 41
- Joined: Sun Oct 06, 2019 8:29 am
Re: DB9 Vs USB game control tests
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.
- the80scomputers
- Atari User
- Posts: 41
- Joined: Sun Oct 06, 2019 8:29 am
Re: DB9 Vs USB game control tests
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.witchmaster wrote:You should do the same test with an Arduino Pro Micro and my code here: https://github.com/MickGyver/MiSTer-Arcade-Controllerthe80scomputers 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.
- witchmaster
- Captain Atari
- Posts: 150
- Joined: Wed Jun 15, 2011 10:50 am
Re: DB9 Vs USB game control tests
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.the80scomputers wrote: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.witchmaster wrote:You should do the same test with an Arduino Pro Micro and my code here: https://github.com/MickGyver/MiSTer-Arcade-Controllerthe80scomputers 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.
Re: DB9 Vs USB game control tests
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).
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).
- the80scomputers
- Atari User
- Posts: 41
- Joined: Sun Oct 06, 2019 8:29 am
Re: DB9 Vs USB game control tests
Thank you for the offer, and I think it would be interesting to do one more test but surely there will be no surprise.witchmaster wrote: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.the80scomputers wrote: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.witchmaster wrote: You should do the same test with an Arduino Pro Micro and my code here: https://github.com/MickGyver/MiSTer-Arcade-Controller
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.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).
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.
Re: DB9 Vs USB game control tests
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.
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.
Re: DB9 Vs USB game control tests
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.
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.
- the80scomputers
- Atari User
- Posts: 41
- Joined: Sun Oct 06, 2019 8:29 am
Re: DB9 Vs USB game control tests
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.
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.
Re: DB9 Vs USB game control tests
How is this DB9 solution different than SNAC? That is already part of the main cores.
- the80scomputers
- Atari User
- Posts: 41
- Joined: Sun Oct 06, 2019 8:29 am
Re: DB9 Vs USB game control tests
What's SNAC?Newsdee wrote:How is this DB9 solution different than SNAC? That is already part of the main cores.
-
- Captain Atari
- Posts: 178
- Joined: Sun Jul 09, 2017 1:43 pm
Re: DB9 Vs USB game control tests
SNAC (Serial Native Accessory Converter) is a controller adapter that can be plugged into the User Port (Serial IO).the80scomputers wrote:What's SNAC?Newsdee wrote:How is this DB9 solution different than SNAC? That is already part of the main cores.
It is explained here:
https://github.com/MiSTer-devel/Main_Mi ... Serial-IO)
And here is a picture of a SNAC adapter:
https://www.misteraddons.com/product/se ... rter-snac/
Re: DB9 Vs USB game control tests
Putting aside whether input lag is an issue or not, I found this comment pretty funny.Sorgelig wrote:99% of users even don't know what you are talking about

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.
Re: DB9 Vs USB game control tests
. double post
-
- Captain Atari
- Posts: 154
- Joined: Thu Jan 10, 2019 10:06 am
Re: DB9 Vs USB game control tests
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.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.
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]
Re: DB9 Vs USB game control tests
The DB9 solution is simple, not electronic components are necessary unless the minimal (5 v to 3.3 v converter) to protect the FPGANewsdee wrote:How is this DB9 solution different than SNAC? That is already part of the main cores.
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.