Page 1 of 2
Sound Problems
Posted: Thu Aug 14, 2008 4:09 am
by Uranium
Ok, I know how to program the PC Speaker to make basic noises, most people do. But I don't want it to interfere with the PIT timer. Which basically rules out the PC Speaker as a method for playing sounds.
Also, I don't want to have to write a shed load of sound card drivers for all the different types of sound cards there are out there (SoundBlaster, SoundBlaster 16, SoundBlaster AWE32, SoundBlaster AWE64 etc...).
What is a simple solution for playing basic WAV files that will work on all/most computers with a sound card?
Volume control would also be nice, and I don't want it to interfere with the PIT or the RTC.
Re: Sound Problems
Posted: Thu Aug 14, 2008 5:34 am
by AJ
Uranium wrote:Ok, I know how to program the PC Speaker to make basic noises, most people do. But I don't want it to interfere with the PIT timer. Which basically rules out the PC Speaker as a method for playing sounds.
PIT channel 2 is discrete from channel 0, so there shouldn't be much of a problem there.
Also, I don't want to have to write a shed load of sound card drivers for all the different types of sound cards there are out there (SoundBlaster, SoundBlaster 16, SoundBlaster AWE32, SoundBlaster AWE64 etc...).
What is a simple solution for playing basic WAV files that will work on all/most computers with a sound card?
I think you are out of luck there - it's a case of a separate driver for each sound card. A lot of cards used to provide soundblaster emulation - if that's still the case, it would be a good starting point. I think there is even a VESA sound specification, but IIRC not many BIOS/Sound card manufacturers bothered implementing it.
Cheers,
Adam
Re: Sound Problems
Posted: Thu Aug 14, 2008 10:37 am
by Dex
You have just hit one of the reason why there is not a shed load of OS, it's impossible to code all available drivers.
Your best start with the most common (eg: in this case AC97) also once you have a USB stack you could use that as more people use usb speakers or headphones eg:
http://board.flatassembler.net/topic.ph ... sc&start=0
Re: Sound Problems
Posted: Thu Aug 14, 2008 2:21 pm
by bewing
AFAIK there is an 8 bit "legacy mode" Soundblaster emulation that all cards support? Including other soundblasters.
Re: Sound Problems
Posted: Fri Aug 15, 2008 1:49 am
by Combuster
I thought of that, practically all old dos games I have run on my SB 64, and depending on the game I have to select one of the soundblaster settings it has (SB 16, SB pro, SB clone) to get it working for that exact program (which differs!) so there must be some similarity between the various soundblaster chips...
The question would be where that similarity ends...
Re: Sound Problems
Posted: Fri Aug 15, 2008 2:10 am
by Omega
Sorry to hijack the thread, but why not support existing drivers? I mean how does Windows do it. You just install the hardware suitable for your MB/OS, install the drivers that came with the device, and your done. So, why aren't people just doing that? I think that you might try PnP too, could that work or perhaps a default set of values that work on a broad set of drivers? I think an OS should just support what is guaranteed and PnP everything else. Is this suggestion just harder than it sounds or am I way off and proving I have no idea what I am talking about?
Re: Sound Problems
Posted: Fri Aug 15, 2008 2:17 am
by Combuster
And implement the entire linux kernel interface, or worse, windows'
Bad Idea (tm)
Re: Sound Problems
Posted: Fri Aug 15, 2008 4:04 am
by Omega
So, it is a matter of being too involving rather than impossible?
Re: Sound Problems
Posted: Fri Aug 15, 2008 4:06 am
by Uranium
For something which is designed to fit on a floppy disk, support for ever different kind of sound card would be impossible and take hundreds of hours of work. Most of these things are poorly documented anyway.
Re: Sound Problems
Posted: Fri Aug 15, 2008 4:11 am
by Omega
Well you can't be everything to everyone. I suggest you go with what is popular and code for that. It isn't like many people will have floppy drives before long anyway.
Re: Sound Problems
Posted: Fri Aug 15, 2008 8:43 am
by jal
Combuster wrote:so there must be some similarity between the various soundblaster chips... The question would be where that similarity ends...
Of course there's many similarity between the chips, it would be silly for them not to do that. Besides that, there's plenty of programming information available for the older chips.
JAL
Re: Sound Problems
Posted: Fri Aug 15, 2008 10:32 am
by Dex
NOTE: SB compatibility is of little uses, why because all cards that are SB compatible unless they are old cards, have the SB compatibility turned off as default, and the way you enable them is different for each card, so your back to square one.
Re: Sound Problems
Posted: Fri Aug 15, 2008 11:41 am
by Uranium
Omega: It is for a games console, not a proper operating system.
Re: Sound Problems
Posted: Fri Aug 15, 2008 7:48 pm
by Omega
Oh, right on, my fault.
Re: Sound Problems
Posted: Mon Aug 18, 2008 5:23 am
by jal
Uranium wrote:Omega: It is for a games console, not a proper operating system.
I'm not sure I'd call dexos "not a proper operating system" though...
JAL