3 ms·
Ever since the KBC was integrated into the chipset, it's not been an 8042 or even any sort of microcontroller anymore but a specialised ASIC core that just hand
by userbinator 4y ago
Ever since the KBC was integrated into the chipset, it's not been an 8042 or even any sort of microcontroller anymore but a specialised ASIC core that just handles the interface between the PS/2 ports and the bus.
Chipsets also started including "fast gate A20" via port 92h when the KBC hadn't been integrated into them yet, although I think the newer ones that have both fast A20 and regular KBC A20 control will basically be the same speed for both. (I'll leave it as an exercise for the reader to wonder why A20 control needs to be fast.)
Of course today, we use keyboards and mice primarily via a polling strategy over USB.
You can still get motherboards with a pair of PS/2 ports --- and they're often the high-end gaming/enthusiast-oriented ones too.
- rollcat 4y ago> You can still get motherboards with a pair of PS/2 ports --- and they're often the high-end gaming/enthusiast-oriented ones too. Part of the reason is because USB HID supports 6-key rollover only (whereas PS/2 enables proper NKRO), as cheap keyboards wouldn't include a diode with each switch to properly prevent ghosting. Apparently it does get in the way of some games, but the only case that comes to mind is local multiplayer with the same keyboard, which isn't exactly a common or high-end thing - I imagine most people enjoying local multiplayer on a big screen from a PC would get at least one controller anyway. So most likely, something to do with latency.
- hakfoo 4y agoActually, you can start to see rollover issues with fewer than 6 keys down. Consider if the keys are (from the perspective of the controller) wired in a 3x3 grid: A B C D E F G H I Most controllers work by running a signal down the "rows" and reading back on the "columns" (or vice versa) to determine which switches are closed. If you hold down A and D, and then press either "B" or "E", without diodes, it looks like both B and E are pressed. Controllers try to mitigate this problem by locking out troublesome combinations, so you end up with worst-case of 2-key rollover. The logical key matrix may end up designed in a way very different from the physical layout, to avoid putting commonly-used-together keys in the same row or column. This does have non-gaming implications: commands like shift-control-alt-S (IIRC, Photoshop's "save as non-PSD" command) are blocked on some keyboards.
- rollcat 4y agoYep, most "consumer grade" peripherals are a race to the bottom. Diodes are cheap, but manufacturers are cheaper. Unfortunately the protocols follow.
- AshamedCaptain 4y ago> USB HID supports 6-key rollover only I don't understand why. In USB HID the report size is practically unlimited. Is there a limit on popular OSes that would be the reason for this ?
- jcrawfordor 4y agoYeah, I'm really leaving out a lot of steps on the evolution to modern machines which I probably could have made more clear. In practice an "8042" keyboard controller was never really that common, as a lot of machines used the 8048 instead. That said there were plenty of laptops especially that used the 8048 for everything we'd expect in a modern EC like the LEDs, screen backlight, etc. The general ACPI architecture still reflects this history in some ways. NKRO is an interesting issue and I'll probably write a post on it one day, it's not actually a limitation of USB HID as many people think but there is a set of factors that mean that USB HID keyboards usually do not support NKRO (has to do with the BIOS and EFI specs). It's less of an issue these days and there are more NKRO keyboards on the market that don't require device-specific drivers. That said one of the original motivations for GAMERS to stick to PS/2 is the fact that the PS/2 controller was capable of interrupts, while the USB controller was not, and there were plenty of people who felt that this added up to noticeable latency (perhaps possible under high load conditions but I tend to doubt it). This situation has changed these days with USB 3.0 but I don't see a lot of USB 3.0 keyboards. In practice I think processors got fast enough and the polling loop short enough that people stopped caring. Things like USB interrupt (a different thing than processor interrupts) mitigate the issue by ensuring reliable polling.