Live data from Hacker News

What’s up with the Beep driver in Windows 7? (2010)

blogs.msdn.microsoft.com

21–30 of 106 posts

Re: What’s up with the Beep driver in Windows 7? (2010)

#21
post #11

Earlier quoted context omitted.

Good luck using an AT keyboard today :P there are some USB converters. Some motherboards that offer PS/2 connectivity (rare, mostly "gaming motherboards" for n-Key rollover fanatics) but I don't even know if that chipset would do AT.

Even if you _have_ PS/2 connectivity, good luck getting it work with legacy hardware. E.g. an original Model M kbd will not work with most modern PS/2 due to electrical limitations (can't remember if it's non enough volts or not enough amps)

Only a few PS/2 -> USB adapters are fully functional according to the PS/2 specification. I use an adapter from Sanoxy [1] with my Model M and it works superbly. I have read of other Model M enthusiasts using the same one.

[1] https://www.amazon.com/SANOXY-PS2-Keyboard-USB-Adapter/dp/B0...

Re: What’s up with the Beep driver in Windows 7? (2010)

#22

This 8254 mention made me curious. Does anyone know which other parts of the original PC hardware are still present in modern machines for compatibility? (Real mode in CPUs, A20, ...)

Intel finally got rid of hardware A20 gating in Haskell. Real mode still exists, and iirc, the processor still defaults to it. You just can't jump into real mode from x64 mode, you need a virtualized environment in 32 bit mode to do that.

I'm pretty sure you don't need to virtualize anything. You can switch out of long mode and then use all the pre-64 modes as normal.

Re: What’s up with the Beep driver in Windows 7? (2010)

#23
post #14

This 8254 mention made me curious. Does anyone know which other parts of the original PC hardware are still present in modern machines for compatibility? (Real mode in CPUs, A20, ...)

FYI, it was 8253 in PC and XT, 8254 in AT. The main difference is the readback command I think. This is not the only error in this blog post BTW.

Author's reply concering that:

Back when I made that post I thought it was an 8253. But I checked the sources for the function that Beep.Sys uses to program the timer and it claims that it’s an 8254 so I went with the source code.

How hard would it be to use the chip? Not hard but now that Win7 has shipped, the number of machines with an 8254 that’s actually wired to something is going to dwindle to around 0. The machines will still have an 8254 (it’s on the SuperIo chip in every PC) but it won’t be connected to any hardware.

Re: What’s up with the Beep driver in Windows 7? (2010)

#24

This 8254 mention made me curious. Does anyone know which other parts of the original PC hardware are still present in modern machines for compatibility? (Real mode in CPUs, A20, ...)

Intel finally got rid of hardware A20 gating in Haskell. Real mode still exists, and iirc, the processor still defaults to it. You just can't jump into real mode from x64 mode, you need a virtualized environment in 32 bit mode to do that.

> Intel finally got rid of hardware A20 gating in Haskell.

Haswell?

Re: What’s up with the Beep driver in Windows 7? (2010)

#25
post #14

Earlier quoted context omitted.

FYI, it was 8253 in PC and XT, 8254 in AT. The main difference is the readback command I think. This is not the only error in this blog post BTW.

Author's reply concering that: Back when I made that post I thought it was an 8253. But I checked the sources for the function that Beep.Sys uses to program the timer and it claims that it’s an 8254 so I went with the source code. How hard would it be to use the chip? Not hard but now that Win7 has shipped, the number of machines with an 8254 that’s actually wired to something is going to dwindle to around 0. The mac…

There is another error in this reply. It is in the southbridge not in the Super I/O.

Re: What’s up with the Beep driver in Windows 7? (2010)

#26

This 8254 mention made me curious. Does anyone know which other parts of the original PC hardware are still present in modern machines for compatibility? (Real mode in CPUs, A20, ...)

Almost nothing, there are some components that are emulated in software/firmware.

Well a certain amount of it is emulated in SMM, but from the fact that its still possible to boot DOS on most modern machines, a lot of the core hardware is still there emulated or otherwise. I was just reading a review on the Asus X99-A II, board where they were talking about the super-io chip's PS2 keyboard port. And IIRC, a couple years ago someone (IBM IIRC) dared to ship a machine without an 8042 keyboard controller/emulation, and it failed to work in a ton of places (kgdb for one).

Frankly, I'm a little surprised at the hate for the couple thousand or so transistors required to support the set of 8253/8259/8250/8042/etc chips that form the basis of the original XT/AT. Especially given the love for all things ARM, which tend to implement their peripherals in a very 1980's way with simple fixed MMIO ports punched into the address map, but without the standardization that form the basis of PC/AT hardware.

And just to stay on topic, almost every single decent ATX/ITX board I've used in the last decade has a 4 pin PC speaker port. Including the skylake machine I built last night. Same thing goes for RS232 ports, which are still on the vast majority of decent PC hardware even if they don't have headers soldered on. The X99 in that review actually had the headers, and I owning the older version of the board actually have a cable plugged into it which I attach to assorted hardware for firmware/etc work.

Re: What’s up with the Beep driver in Windows 7? (2010)

#28

Earlier quoted context omitted.

I think I still have an old Silicon Graphics keyboard somewhere in the garage. Built like a tank, I'm pretty sure it would still work if I had a port to connect it to.

There aren't ports because there isn't support anymore. Intel doesn't support AT, I don't even think it supports PS/2 with most of it's chipsets. The motherboards that do come with PS/2 usually implement their chipset. Also PS/2 stopped being electrically compatible a while ago around about the same time that the combo Keyboard/Mouse PS/2 ports became available. It offers pretty low current only about 250ma so you mi…

This stuff is in the Super I/O chip.

Re: What’s up with the Beep driver in Windows 7? (2010)

#30
That is a pretty awesome tour de force. Somewhere deep inside your computer is an (emulated) PC/AT trying to get out :-).

An interesting lesson about the use of 'beep' for the assistive technologies. I see those sorts of things in architectures which have grown up over time and I wonder whether or not you could know at the time "Hey we're using this weird thing, please deprecated at your earliest convenience" or if it was more "there I fixed it."

Compatibility at the GPIO level was so ingrained in the PC community early on (there was even a code name for it, "Is it FlightSim compatible?" which referred to Microsoft Flightsim, a game that tested the compatibility limits of clones.) So as a tenet to the community all sorts of hacks could be committed in its name. Something like "Well we can depend on this, if they changed it then it would break compatibility and they can't do that."

Also an interesting take on how much Microsoft has had to unwind in a compatible way over the years.

Finally, the Linux console used to beep the speaker this way (I have no idea if it still does) and sometimes when I lay there sleeping I would hear my server softly feeping, yes feeping on its console bell. Sadly it wouldn't stop until I got up and logged in and figured out what was complaining.

Post reply on HN