See https://superuser.com/questions/16893/do-usb-or-ps-2-keyboar...
See https://superuser.com/questions/16893/do-usb-or-ps-2-keyboar...
Edit: then there is third approach: simple keyboard/input devices with serial interfaces, where host provided clock is used to both clock the interface and keyboard scan logic. In essence the whole keyboard then looks like one big shift register. Keyboards that works this way includes original Macintosh, most Wyse and DEC terminals and MIT/LMI/Symbolics Lisp machines (and probably pre-sun4 Suns, sun4 and later have rs232-derived ionterface), also this is the way how controllers for Nintendo consoles before Wii work (IIRC Nintendo calls that "EXI bus") and how PlayStation 1/2 controllers work. IMHO this is to some extent where the idea behind SPI comes from.
Notice that just getting a thread scheduled every 2 ms is already impossible for Windows, certainly one running a game. You'll get a bunch of outliers within the second. So even if you got your keyboard down to 5 ms, great, but you are not running an operating system that can reliably do something within that timespan!
Maybe I'm not understanding, but that doesn't seem correct.
Most people (gamers) are running mice at 500/1000Hz polling rates and you can easily verify the movement made in each 1-2ms update. (And it is most definitely a noticeable difference going from a standard 125Hz rate to even 500Hz.)
The mouse measuring data every 1-2ms will increase the quality of the motion tracking, but it won't necessarily help you with latency unless the data gets to the game fast and the game handles the data quickly.
This explanation by John Carmack comes to mind... it's a good reminder against a lot of the hardware fetishism that is mixed into otherwise good advice about gaming setups. https://superuser.com/questions/419070/transatlantic-ping-fa...
I think the only PS/2 holdouts you'll find are the old Korean Starcraft players that are still using a Qsenn DT-35.
It's entirely a preference based thing, the most relevant factor would be whether or not you need to hot swap it.
And I'm not an expert in this either, but I'm pretty sure double buffering is the norm, whether you use V-Sync or not.
One buffer in which your graphics card works on frames (I'll call this "graphics card buffer") and then a buffer into which finished frames are moved, so that your screen can read them out in peace (I'll call this "pre-screen buffer").
There's also "triple buffering", which introduces another one of those graphics card buffers, so that when a finished frame is being transferred from that first graphics card buffer to the pre-screen buffer, then your graphics card doesn't have to wait for that transfer to finish and can instead start working in the second graphics card buffer right away. (And then it transfers frames from those graphics card buffers in alternating fashion.)
So, the delay that V-Sync introduces is not that. What V-Sync does, is that instead of transferring finished frames from the graphics card buffer(s) into the pre-screen buffer as soon as the frame is finished, it waits with the transfer until your screen has finished with reading out the previous frame.
If you don't wait (have V-Sync disabled), your screen will read out some part of the previous frame and then read out the rest from the new frame. On the screen, you'll see this break between previous and new frame as screen tearing.
So, assuming your screen can display 120 frames per second and your graphics card happens to finish 120 frames in a second, then V-Sync will not introduce a delay. It'll wait once with transferring the first frame, but then they'll be in sync and no further delay should occur.
However, if your graphics card is able to calculate 240 frames per second (and your screen still does 120 frames per second), then with V-Sync, the graphics card buffer will be transferred into the pre-screen buffer only 120 times per second, making the graphics card slow down to 120 frames per second as well.
Without V-Sync, the graphics card buffer will be transferred 240 times per second, regardless of how often your screen can read it out from the pre-screen buffer. This means a frame will get loaded into the pre-screen buffer as your screen is reading it out. As a result, you'll get screen tearing and one half of your screen will be from the new frame, with a 1/240 s = 4.167 ms delay, the other half is still from the previous frame with a 2/240 s = 1/120 s = 8.33 ms delay.
So, a few numbers:
120 FPS with 120 Hz screen = 8.33 ms delay.
240 FPS with 240 Hz screen = 4.167 ms delay.
240 FPS with 120 Hz screen = ½8.33 ms + ½4.167 ms = 6.25 ms delay on average.
480 FPS with 120 Hz screen = ¼(1/480) + ¼(1/360) + ¼(1/240) + ¼(1/120) = 4.34 ms delay on average.
960 FPS with 120 Hz screen = 2.83 ms delay on average.
960 FPS with 240 Hz screen = 2.17 ms delay on average.
You pressing the key triggers a wave of electricity cross the keyboard which is converted into the PS2 waveform, and pumped out at the same rate of the incoming clock waveform.
OLD PS2 keyboards don't generally have internal digital micro-controllers, they're effectively analog, the logic they do contain is blindly simple. This is why some struggle with N-Key Rollover.
---
OFC this is if you are using an -old- PS2 keyboard. I'm still using an 80's IBM Model M and above it roughly how it works.
- I cannot find about "diode cascades" having anything to do keyboards. The closest is the usual diode matrix to deal with simultaneous key presses.
- The PS/2 interface involves sending scan codes, parity bits, and start and stop bits. How exactly does a "wave of electricity" get converted into a PS/2 waveform without some digital electronics?
- All the old schematics for mechanical keyboards I could find were the usual matrix scan. Even a textbook from the 1970s.
Anyway, reference please. I'd find it very interesting to see how such a thing would work.
Here is a set of pictures of an IBM Model M, for instance. The microcontroller is clearly visible in the ceramic DIP40 package.
http://www.clickeykeyboards.com/model-m-gallery/1985-ibm-mod...