On 2017-05-04 23:03, Jan Engelhardt wrote:
On Thursday 2017-05-04 21:59, Carlos E. R. wrote:
On 2017-05-04 16:27, Jan Engelhardt wrote:
What I meant is that "outb 0x61,..." will always succeed (even if there is no speaker connected to the two pins) - unlike outb to 0x170 ports (disk), which won't give you something usable if the disk is missing ;-)
Well, of course. You only need the timer chip to be there, and it is so basic, from the original IBM PC, that the ports will always be there. No need for the speaker to be connected.
Another thing is if you say that the speakers sounds even if not connected - is that it? Some hardware on the keyboard? :-?
Beepers were also in keyboards (especially in the terminal era). I could be wrong, but IIRC the moderately modern Sun4 keyboard still had one integrated.
Ah. But I think the IBM PC keyboard was differently defined.
But what I really mean is that the x86 KBC provides the "API" to sound the bell, and this API is always there, even if a sound-emitting (such as a speaker a.k.a. electromagnet+membrane) or a sound-visualizing device (such as an oscilloscope) is not present. Just like you can always make a sound card play or a video card render something even if no speakers/monitor is connected.
What I recall of the hardware specs of the PC speaker says that there is no way to know if the speaker is actually connected. You program the timer (two, actually, IIRC), and the pins get the oscillating voltage, that's all. It was a very basic hardware initially, also used to program the RAM refresh via DMA, so it was always present. They just used a spare timer in the chip. That's from memory. I would have to dig out some old photocopies to be certain. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)