Added article on PC Speaker

All about the OSDev Wiki. Discussions about the organization and general structure of articles and how to use the wiki. Request changes here if you don't know how to use the wiki.
Post Reply
User avatar
Stevo14
Member
Member
Posts: 179
Joined: Fri Mar 07, 2008 3:40 am
Location: Arad, Romania

Added article on PC Speaker

Post by Stevo14 »

I made a short article on the PC Speaker. It is mostly theory right now but will have concrete examples in the future. Please critique. :)
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Post by lukem95 »

i added some sample code, although much more detailed code could be added (plus comments)

looks like a good start
~ Lukem95 [ Cake ]
Release: 0.08b
Image
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post by AJ »

Hi,

Just had a look - seems good to me.

I remember a game back in the early 90's which was an NBA basketball thingie with commentary via the PC speaker - I remember thinking it was very advanced at the time!

Cheers,
Adam
User avatar
Stevo14
Member
Member
Posts: 179
Joined: Fri Mar 07, 2008 3:40 am
Location: Arad, Romania

Post by Stevo14 »

I plan on expanding the pulse-width modulation section once I have actually used the technique myself. No use writing about something that I don't really know about. :)
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Post by xyzzy »

AJ wrote:I remember a game back in the early 90's which was an NBA basketball thingie with commentary via the PC speaker - I remember thinking it was very advanced at the time!
I remember a DOS game that supported both SB16 and the PC speaker. I preferred the PC speaker sounds to the ones on the normal speakers :roll:

Anyway, good article :)
User avatar
gzaloprgm
Member
Member
Posts: 141
Joined: Sun Sep 23, 2007 4:53 pm
Location: Buenos Aires, Argentina
Contact:

Post by gzaloprgm »

Well done Stevo14 and Lukem95, it is a very interesting article for making sound (?) in old pcs which don't even have sound card.

Cheers,
Gonzalo
Visit https://gzalo.com : my web site with electronic circuits, articles, schematics, pcb, calculators, and other things related to electronics.
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Post by piranha »

Nice article.
I figure I'll ask this here, as it's related:
Does qemu beep the speaker using that code? I tried it in my kernel and nothing happens in qemu.

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
User avatar
Stevo14
Member
Member
Posts: 179
Joined: Fri Mar 07, 2008 3:40 am
Location: Arad, Romania

Post by Stevo14 »

piranha wrote:Nice article.
I figure I'll ask this here, as it's related:
Does qemu beep the speaker using that code? I tried it in my kernel and nothing happens in qemu.

-JL
My PC beep doesn't work at all under Linux (some driver conflict involving my sound card and the pcspkr module) but I use almost identical code in my own kernel, which produces the proper beeps on real hardware and Bochs (for windows). Can't say for Qemu though because I only have it installed under Linux.
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Post by piranha »

Oh well, its not really that important

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Post by lukem95 »

Yeah, sorry i shouldv mentioned, it doesn't always work under emulators for some reason, but under real hardware it works "tip-top" ;)
~ Lukem95 [ Cake ]
Release: 0.08b
Image
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

lukem95 wrote:doesn't always work under emulators
Race conditions... :-({|=
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Post by lukem95 »

sorry? i dont follow.

im guessing its a criticism though :(
~ Lukem95 [ Cake ]
Release: 0.08b
Image
Post Reply