flat assembler
Message board for the users of flat assembler.

Index > MenuetOS > SoundBlaster

Author
Thread Post new topic Reply to topic
THEWizardGenius



Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius 15 May 2005, 23:07
You should have an autodetection routine for SoundBlaster. I personally have a computer that came with the SoundCard, and I have no way of knowing the DMA, IRQ, or Port for it. There are plenty of detection routines online (check out SWAG- the pascal code they have is easy to convert to assembly). However, it should only do this the very first time you use MenuetOS, and save the result in a file. That way, any other things at the other Port locations do not get "messed up".

_________________
FASM Rules!
OS Dev is fun!
Pepsi tastes nasty!
Some ants toot!
It's over!
Post 15 May 2005, 23:07
View user's profile Send private message AIM Address Reply with quote
DC740



Joined: 01 Oct 2004
Posts: 74
Location: Argentina
DC740 16 May 2005, 21:04
i have an ESSOLO sound card Shocked and windows autodetects the irq, dma and the port each time it boots, and i don't have any problem, so i think that we can make the autodetect every time we boot Mos without any problem

good luck and happy coding
Post 16 May 2005, 21:04
View user's profile Send private message Reply with quote
THEWizardGenius



Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius 17 May 2005, 14:19
Well the problem is that some people might have a NIC or some other card at, for example, port 0x210. Now that is one of the possible ports for SoundBlaster, so in the process of scanning for SoundBlaster we have to check this port. We don't realize the NIC is there of course. So we send a reset command to the port, which is really an NIC. The NIC may get the wrong "idea" and refuse to work afterwards, or it may return a message that gives MenuetOS the wrong idea. This isn't necessarily so, but it is possible. Therefore, it's best to do it once so that we only mess up the NIC or other thing once- then the user can reboot and use the SoundBlaster and everything else properly.
Post 17 May 2005, 14:19
View user's profile Send private message AIM Address Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 17 May 2005, 15:30
<3 PCI PnP <3
Post 17 May 2005, 15:30
View user's profile Send private message Visit poster's website Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 215
Location: Budapest, Hungary
Endre 18 May 2005, 06:57
THEWizardGenius wrote:
You should have an autodetection routine for SoundBlaster. I personally have a computer that came with the SoundCard, and I have no way of knowing the DMA, IRQ, or Port for it. There are plenty of detection routines online (check out SWAG- the pascal code they have is easy to convert to assembly). However, it should only do this the very first time you use MenuetOS, and save the result in a file. That way, any other things at the other Port locations do not get "messed up".


IRQ and I/O port can easily be determined by reading PCI config space (of course in case of a PCI card). Little problem that the kernel might relocate this IRQ but it's no matter since it's known anyway.
DMA is another story since it is a restricted resource which should be managed centrally. That means that the driver has to allocate and free this resource dynamically. MenuetOS lacks DMA resource manager yet.
Post 18 May 2005, 06:57
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 18 May 2005, 16:26
One thing that people get confused with, is a soundblaster compatable sound card, These are as good as useless for OS's like MenuetOS, as most are not set to SB compatable at bootup and need setting and the way they are set up for SB compatible is differant on differant sound cards Crying or Very sad .
Post 18 May 2005, 16:26
View user's profile Send private message Reply with quote
THEWizardGenius



Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius 19 May 2005, 15:37
Who needs all that? Personally, I don't use PCI (can't find any docs!!!).
You can easily poll for the port, IRQ, and DMA, so why not?

_________________
FASM Rules!
OS Dev is fun!
Pepsi tastes nasty!
Some ants toot!
It's over!
Post 19 May 2005, 15:37
View user's profile Send private message AIM Address Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.