Talk:PC speaker

From Wikipedia, the free encyclopedia

Is the page still really a stub? Richard cocks 02:14, Mar 9, 2004 (UTC)


He don't forget Access Software's Realsound for their memorable games such as Crimewave, Links, and that point and click adventure set in an asylum in Turkey. Unfortunately I forget the name of this game. (It was Countdown. --Trixter 18:07, 15 March 2007 (UTC))

Meursault2004 23:03, 8 Apr 2004 (UTC)


This page is missing information on the hardware surrounding the PC speaker, e.g. the fact that it's based on a timer etc. — Timwi 18:43, 21 Apr 2004 (UTC)


This is 131.107.0.106 regarding my edits on 2 Feb 2006 (UTC). In previous versions before my edits, there were significant factual errors and inaccuracies in this article regarding the explanation of how to drive the PC speaker to produce PCM digital audio. I have taken information from the articles referenced by the external links (which has been selected, included and retained in this article long ago by others) as my basis for making the edits.

I had added some info based on my programming experiences too. On my machine, I could savely write hrxadecimal values between 0-40 (0-63) decimal directly to I/O port 61H and they would more or less play correctly, to the point that I wondered why digital PC speaker sound wasn't commonplace on commercial games :-p. On my machine again, I could actually READ the 61H I/O port, even shortly after writing and I would get back a sort of noisy reading of what I had previously written. However, the technique described in the article (which looks a lot like PWM) seems to be the most common and generic, as I don't know if all "PC speaker hardware" could work the way mine did. EpiVictor 17:21, 2 February 2006 (UTC)
I saw your PWM edits, they are excellent, thank you (I originally wrote that part). As for reading the port, that is most definitely NOT the case on my original IBM 5150 (I get 0 every time) so I hope that's not something you want to keep in the article. Trixter 21:23, 2 February 2006 (UTC)
Well , I added more details to PWM (especially about filtering, which is crucial) and stressed that reading of the 61H port is implementation dependant. I could try that same old program on an Athlon-class machine and see what happens :-) Besides, the exact implementation of the PC Speaker seems to be something left to the manufacturers...some may just use a simple current-driving transistor, others use an op-amp, others a logic gate + amplifier + filter (IBM even had a monitor with built in speaker + volume knob for PC speaker).EpiVictor 12:30, 3 February 2006 (UTC) Addendum: according to this source, [1] reading of port 61H is not only possible, but NECESSARY since the other bits (other than bits 0 and 1) must not be modified when writing back...EpiVictor 12:49, 3 February 2006 (UTC)
I wasn't generating sound, which would explain why I got 0 reading the port. However, the original notes (don't remember who original author was) state that you could read those ports to turn the speaker into a microphone... I find that extremely difficult to believe and would need to see it happening to believe it. --Trixter 00:28, 6 February 2006 (UTC)
I believe I had written those notes, but never wrote that the PC speaker is so reversible that it can work as a microphone, I know very well it cannot. At most, it can give an output-dependant reading (e.g. if you are playing back a sound and trying to "read" the 61H port, you will get a heavily correlated reading, which looks like a waveform and/or static noise), and that's about it. Anyway, most PC speaker tutorials state that the full 8 bits of port 61H must be read before writing back, so this likely means they don't all stay to 0 during playback or normal functioning of the PC. EpiVictor 12:50, 6 February 2006 (UTC)
After checking this some more, it looks like you're referring to port C of the 8253, which has bit 5 wired as Timer 2 output read-back. Reading this from port 62h means that, yes, you'd get some random value, but it's coming from the timer and not the speaker. Also, port 62h is only wired that way on PCs and XTs and not ATs and later. So I removed the section as it was written; if you'd like to clarify and put it back, that's fine, but please note that the random value you get is from the timer and a better way to get it is just to latch the actual timer output. --Trixter 15:54, 5 April 2007 (UTC)

Contents

[edit] Output levels

The PC speaker is normally meant to provide only 2 levels of output .

That is, on and off, right? --Abdull 14:58, 27 June 2006 (UTC)

Yeah, it can only be either activated by TTL voltage (+5 V) or not (0V). Claims of it having accuracy comparable to 6 bits DAC are only indicative of the sound quality, not of the way it actually works, as digitized sound output on the PC-SPEAKER relies on PWM techniques instead of a true multiple level wave. EpiVictor 16:16, 27 June 2006 (UTC)


[edit] Regular speakers

I was looking for information on the difference between regular speakers for audio equipment, and speakers for home computers, as I have heard the former emit magnetic fields which if used nearby might harm my computer.--Darrelljon 19:55, 1 July 2006 (UTC)

"Computer Speakers" are usually no different than speakers meant to be used with other audio equipment, other than these details:
  • They are usually "active", e.g. have their own built-in amplifier, even if for a couple of watts. This sets them apart e.g. from "passive" speakers such as those used with walkmans or portable CD players, which only use headphone-level output.
  • The cheapest products usually claim delivering "100 W" or "200 W" of "PMPO Watts" or "Music Power" but that's a scam at best, real powers range from 1-2 Watts for the cheapest models, and expect anything with over 10 Watt per channel and a subwoofer to come with a separate amplifier module or really bulky speakers.
  • Also, the really cheap ones do not have a true line-level input, but work better with a pre-amplified headphone output.
  • Luckily, most speakers specifically designed for "computer" or "multimedia" use are also magnetically shielded and quite safe to keep near a CRT. Beware: speakers meant for use with portable audio equipment is usually *not* shielded, and even a tiny 0.5 Watt "walkman" speaker set can cause visible distortion on most CRT's, if placed close enough.
Anyway, this talk page is about the PC Speaker sound system, not about "Speakers for PCs" :-( EpiVictor 20:38, 1 July 2006 (UTC)


[edit] PC Speaker not on new computers?

I'm no expert on the matter, but I've noticed that the beeping internal speaker (which I'm pretty sure is the PC speaker) often doesn't work on newer computers (such as mine). For example, if I try to print ASCII 07 (Bell) on my computer, nothing will happen. Does anyone have any information on this? (Or am I perhaps crazy?) 65.188.254.26 01:33, 28 September 2006 (UTC)

If your computer is a laptop or a "brand" desktop machine, it might just be that the PC speaker is hardwired to the audio card sound output, instead of using its own speaker. You should still hear a beeping when it boots, the very least. When the OS is loaded however, the sound mixer settings take effect, and the PC speaker may be effectively cut off. Try checking these for volume/enabled lines. EpiVictor 08:45, 28 September 2006 (UTC)

[edit] PWM edits

I removed the parts of the PWM section that claimed the technique was flawed due to interrupt noise; you can disable all hardware and software interrupts (I've done it) during playback so that's not a good reason to claim the method is flawed. There are other, perfectly legit reasons why it is flawed :-) but background interrupt noise is not one of them. --Trixter 15:50, 5 April 2007 (UTC)

I reviewed all of your edits...they seem alright, although I'm not sure if the bit about having to store the status of port 61h should have been removed...well, that's the definitive time I'm going to try it on an oldskool machine as possible :-p Also there's that external link saying that you must read and store whatever is in that port before writing back. EpiVictor 17:59, 5 April 2007 (UTC)