5 ms·
The keyboard controller
- rektide 4y ago> I learned about computer architecture in the days in which the "northbridge" and "southbridge" were the major active components of the system bus... but few computers today have discrete north and south bridges (or front-side and back-side buses for that matter), the functions of the two having been integrated into various combinations of the processor die and a large, monolithic motherboard chipset like the platform controller hub (PCH), with the functions of essentially all motherboard components put into one IC. Seems somewhat in flux again though, albeit slightly different form! AMD's been doing chiplets for a while now, with a io die that quite strongly resembles a Northridge in many ways. It sits between cpu, ram, and the rest of the system. Conceptually it seems very similar to a Northridge. But it so happens to be a dedicated die on the multi-chip-module, rather than be on the motherboard. The southbridge never really left, and I'm not sure if there's any roles it really gave up either... i've thought of it as the platform control hub or io expander for a long time. But agreed that many embedded chips tend to eskew this pch & just combine all functionally on the main chip, albeit that might be comprised of chiplets. We've gone to finer levels of integration! But things are much the same.
- tsujamin 4y agoHis recent posts about over the horizon radar are a super good read: https://computer.rip/2022-12-04-over-the-horizon-radar-pt-II.html https://computer.rip/2022-12-04-over-the-horizon-radar-pt-II...
- userbinator 4y agoEver 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 ?
- matheusmoreira 4y ago> It's tragic how the modern PC has put us into this situation, where we no longer have control or even visibility into the working of core, privileged components of our computers It's worrying. These days hardware isn't even managed by the operating system anymore. Hardware makers look at the operating system the same way operating systems look at programs. It's the "user OS" to be isolated from everything else. https://youtu.be/36myc8wQhLo https://youtu.be/36myc8wQhLo
- MichaelZuo 4y agoWell except Apple, like most things.
- randombits0 4y agoBut that’s anti-consumer! Who do you trust? You can’t trust anyone. They drop the ball, “whoops!”, and it’s back in business. Remember, RSA not only compromised the root keys for their products, they responded by wanting their customers to pay for replacements.
- throwaway71271 4y agoI love computer.rip, everything is super good read, but I just wish it had some ascii diagrams I also dislike images, but some phrack style ascii is so beautiful, like the famous issue 49 article 14. I think the information density per symbol (or area) even beats images.
- rollcat 4y agoI love ASCII diagrams, and fixed width everything... Until I want to read it on mobile. If a picture is worth a thousand words, I'll take a thousand words of computer.rip over any picture ;)
- throwaway71271 4y agoyea its a shame how hard it is to read 79 columns on mobile..
- jcrawfordor 4y agoThis is what's prevented me putting in ASCII-art - the header already explodes on mobile. I force mobile to 40char display width to mitigate it but it's still not a great experience. I probably need to totally rethink how the mobile version works but I'm not much of a web frontend person and I appreciate the simplicity of what I have right now.
- mixmastamyk 4y agoShould change the width to max-width and let text flow. Art is different, try to keep it narrow I suppose.
- AshamedCaptain 4y agoIn a shitton of computers the 8042 is not even a separate entity, being emulated by the main CPU through SMM, so that the BIOS can play fancy tricks like allowing a USB keyboard to be read through the 8042 primary PS/2 port.
- mjg59 4y agoThere's typically a "real[1]" 8042, but with an optional chipset configuration register that diverts accesses to it to SMM instead, even on modern chipsets [1] Obviously not actually an 8042, but some hardware that would decode those addresses if they weren't trapped beforehand