Main > Main Forum

USB vs PS/2 vs COM vs LPT

<< < (38/43) > >>

Driver-Man:

--- Quote from: cotmm68030 ---Just for fun..  here's an unfiltered USBTrace history dump for banging on 7 keys simultaneously on a MiniPac:

http://cotmm.org/arcade/minipac_7buttons.html

Held them for a moment and smashed on a few times before the trial version's buffer filled up.

--- End quote ---

If you could do more controlled test, so instead of "banging" and 7 buttons, try just 3 or 4 buttons, and make precise, firm simultaneous push, hold for a sec or two, and the then release them all in the same time. That should produce sufficient and more readable data, anyway here's what I conclude...


--- Code: --- #7 0.172194 = 00 01 02 00 - Button A down
#11 0.188163 = 00 01 01 00 - Button B down
#15 0.196286 = 00 01 01 00 - Button B down
#19 0.204161 = 00 01 01 00 - Button B down
#23 0.212153 = 00 00 01 00 - Button C down / Button B up?
#27 0.220165 = 00 01 01 00 - Button B down
#31 0.228163 = 00 01 01 00 - Button B down
...holding down for 0.672 sec
#35 0.900140 = 01 00 01 00 - Button C down / Button B up?
...still holding for 0.136 sec more
#39 1.036147 = 00 00 00 00 - All buttons up
...pause
#43 1.172134 = 00 01 00 00 - Button D down / ?? up
#47 1.180117 = 00 02 00 00 - Button E down / ?? up
.
.

--- End code ---

* 4 bytes long buffer,
looks like this is "MOUSE" type device.

* It has steady minimum latency of 8 ms,
but no constant polling rate, signals only state change

=======================================================
MAXIMUM INPUTS PER FRAME @60 FPS = 1/60 / 0.008 = 2.083

With this same pooling rate, this device could potentially do 4 x 2 = 8 inputs per frame @60fps, if it was not mouse/kbd device, or maybe if it only had different driver, who knows.



--- Quote ---and just for comparison sake, a trace where I rapidly press a single button:
http://cotmm.org/arcade/minipac_singlekey.html

--- End quote ---


--- Code: ---..missing 3 packets?
 #7 0.011828 = 00 00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 - down
#11 0.015812 = 00 00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 - down
#15 0.059869 = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - up
#19 0.063845 = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - up
#23 0.067835 = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - up
#27 0.071836 = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - up
#31 0.075843 = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - up
...pause
#35 0.143824 = 00 00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 - down
#39 0.147805 = 00 00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 - down
#43 0.151797 = 00 00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 - down
#47 0.155807 = 00 00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 - down
#51 0.159800 = 00 00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 - down
...holding button down for 0.068 sec
#55 0.227818 = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - up
#59 0.231805 = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - up
#63 0.235802 = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - up
#67 0.239807 = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - up
#71 0.243808 = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - up
...pause
#75 0.291894 = 00 00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 - down
.
.

--- End code ---


* 16 bytes long buffer, 5 packets per state change?
this is different device, or it has second controller

* It has steady minimum latency of 4 ms,
but no constant polling rate, signals only state change

=======================================================
MAXIMUM INPUTS PER FRAME @60 FPS = 1/60 / 0.004 = 4.17 ?


With this same polling rate, this device has potential to produce 4 x 16 = 64 inputs per frame, which possibly comes down to 16 inputs due to redundancy, however due to the keyboard driver, or something, this seem to be limited to only about 4 inputs per frame @60fps, minus "keys up" aka. "break codes". -- It's inconclusive, please do 3 and 4 simultaneous press test with this device too. [edit: We still have not quite established how windows drivers work and what particular method of READING the input is employed in MAME.



*** More tests & statistics...


X-Arcade trackball USB trace:



* 4 bytes long buffer,
this is "MOUSE" type device

* It has *unsteady* latency, minimum ~2-6 ms,
but no constant polling rate, signals only state change

=======================================================
MAXIMUM INPUTS PER FRAME @60 FPS = 1/60 / 0.002 = 8.33

With this same pooling rate, this device could potentially do 4 x 8 = 32 inputs per frame @60fps, if it was not mouse/kbd device, or maybe if it only had different driver, who knows.



PC GamePad (DualShock clone) USB trace:




* 8 bytes long buffer,
this is "Generic USB Joystick" device

* It has steady latency of 2 ms,
the first one that actually has constant output stream

=======================================================
MAXIMUM INPUTS PER FRAME @60 FPS = 1/60 / 0.002 x 8 = 66.7 ?

This a bit more complicated as there are two analog sticks too, and I can't really tell from this data sample if there is any redundancy there as well. In any case, this device is constantly pushing data down the USB at steady 2ms intervals and in this test I did not press any buttons at all.

newmanfamilyvlogs:
the trackball was sending a fair bit of data that makes it harder to read. i disconnected the trackball for the following traces:

http://cotmm.org/arcade/minipac_6buttons.html
Six buttons pushed on and off, slowly and as simultaneously as I could manage

http://cotmm.org/arcade/minipac_4buttons.html
Four buttons pressed in various combination.

http://cotmm.org/arcade/minipac_twobuttons.html
Two buttons pressed in a more controlled fashion.

http://cotmm.org/arcade/minipac_twoalternate.html
Two buttons alternating as fast as I could hit them.

Malenko:

--- Quote from: Driver-Man on September 28, 2010, 01:21:21 pm ---MAXIMUM INPUTS PER FRAME @60 FPS = 1/60 / 0.008 = 2.083

--- End quote ---

When why can I jump and fire while circle strafing in a FPS game?

Driver-Man:

--- Quote from: Malenko on September 28, 2010, 02:37:16 pm ---
--- Quote from: Driver-Man on September 28, 2010, 01:21:21 pm ---MAXIMUM INPUTS PER FRAME @60 FPS = 1/60 / 0.008 = 2.083

--- End quote ---

When why can I jump and fire while circle strafing in a FPS game?

--- End quote ---

Holding a third key will not impact the two other keys you are "tapping", you will still be able to report both jump and fire in the same frame. However, if you start from complete still, and then press all three in the same time, then in the 1st frame you will do two of those three actions, and in the very next frame program will pull the 3rd one from the buffer (even if you release them all by this time) and so this would be impossible to notice... but, in Donkey Kong, try to stand still and then *TAP* "jump+arrow key" and see if you can do it at all (jump sideways).


I have to fix some numbers in my previous post...

Malenko:

--- Quote from: Driver-Man on September 28, 2010, 03:02:22 pm ---
Holding a third key will not impact the two other keys you are "tapping", you will still be able to report both jump and fire in the same frame. However, if you start from complete still, and then press all three in the same time, then in the 1st frame you will do two of those three actions, and in the very next frame program will pull the 3rd one from the buffer (even if you release them all by this time) and so this would be impossible to notice... but, in Donkey Kong, try to stand still and then *TAP* "jump+arrow key" and see if you can do it at all (jump sideways).


I have to fix some numbers in my previous post...

--- End quote ---

but I do that all the time, turn face to barrel standing jump backwards...... in street fight I'll hold tap D+F+medium kick with chun li all the time, in bad dudes I tap up+forward+jump+atack to spin kick.........

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version