SB DMA Autodetection 
Author Message
 SB DMA Autodetection

I'm trying to make some SoundBlaster driver routines.
I've figured out how to autodetect SB presence, baseport
and IRQ, but is there also a way to detect what DMA-
channel the SB uses?

I'd appreciate any help!

TIA
--
Johan Levin                         Sweden
------------------------------------------
homepage: http://www.*-*-*.com/ ~w-21572



Wed, 11 Aug 1999 03:00:00 GMT  
 SB DMA Autodetection



Quote:
>I'm trying to make some SoundBlaster driver routines.
>I've figured out how to autodetect SB presence, baseport
>and IRQ, but is there also a way to detect what DMA-
>channel the SB uses?

>I'd appreciate any help!

>TIA
>--
>Johan Levin                         Sweden
>------------------------------------------
>homepage: http://home2.swipnet.se/~w-21572


I am writting a similar routine, and am basicly done with it.  I read
in the environment settings (these are set with the autoexec.bat
file.)  I work in DOS and Borland C with a C++ compiler and I just get
the information from what is set with the autoexec.bat.  If you want
you are free to my code.  Just let me know via email * and I'll send
it to ya.  If you type "set" at the DOS prompt you will see a list of
stuff, in it there is a line that says "BLASTER=..." that is where all
the DMA channels, I/O Port, IRQ and everything is defined.  Hope I
helped.




Thu, 12 Aug 1999 03:00:00 GMT  
 SB DMA Autodetection

Quote:



> >I'm trying to make some SoundBlaster driver routines.
> >I've figured out how to autodetect SB presence, baseport
> >and IRQ, but is there also a way to detect what DMA-
> >channel the SB uses?

> >I'd appreciate any help!

I knew how to do this once.  I remember there was a file that somebody
on AOL wrote (apperantly there IS somebody on AOL who knows how to code,
but there's only one left) that showed how to do it.  The basic
principle was to program the card to do a 1 byte transfer without
programming the DMA controller.  There's some port (I think it's 0x8,
but I can't look it up because I loaned out my copy of "The Undocumented
PC") that shows the DREQ status for each DMA channel.  This won't work
under Win3.1.  I do remember that there *is* a way to get it to work in
Win3.1, but I had never actually gotten around to coding something that
worked in it :(

(This was less help than I though it would be.  If you need more help,
e-mail me and I'll see if I can get my book back, then I'll remember).

--


"...Windows For Repeat Offenders..." -- Dave Barry In {*filter*}space



Thu, 12 Aug 1999 03:00:00 GMT  
 SB DMA Autodetection

Johan Levin:

Quote:
> I'm trying to make some SoundBlaster driver routines.
> I've figured out how to autodetect SB presence, baseport
> and IRQ, but is there also a way to detect what DMA-
> channel the SB uses?

  Yes, excatly the same way as detecting the IRQ and the base port.  You
look for the environment variable "SOUND".


Sat, 14 Aug 1999 03:00:00 GMT  
 SB DMA Autodetection

Many of the newer cards have plug&play logic which will tell you
the IRQ,DMA, base, and additional addresses such as wave tables
or spacializers.

--
All opions expressed are mine.



Sat, 14 Aug 1999 03:00:00 GMT  
 SB DMA Autodetection


Quote:
>I'm trying to make some SoundBlaster driver routines.
>I've figured out how to autodetect SB presence, baseport
>and IRQ, but is there also a way to detect what DMA-
>channel the SB uses?

>I'd appreciate any help!

>Johan Levin                         Sweden

Program the sound card to do a 1 byte transfer.  Check the DMA Request bits
and whichever channel has the DREQ high, that's the channel the SB is pre-set
for.  There is a significant delay between making the request via port I/O to
the SB and the DREQ bit going high, so make sure you wait up to .5 seconds.
The older the SB card (or clone), the longer the delay.  Be warned that
Windows virtualizes the DMA incorrectly so you can't just detect the DMA
channel used by the SB by watching the DREQ bits go high.

Make sure to reset the card when you're done; verify by seeing the DREQ bit go
back to low.

AsmFiend



Thu, 19 Aug 1999 03:00:00 GMT  
 SB DMA Autodetection

Quote:
>I'm trying to make some SoundBlaster driver routines.
>I've figured out how to autodetect SB presence, baseport
>and IRQ, but is there also a way to detect what DMA-
>channel the SB uses?

>I'd appreciate any help!

I've never done this but you could try the following

1       Program all DMA channels to recieve 1 byte into different areas
        of memory
2       Program the DSP to send (record) 1 byte of data
3       See where it appears

It may require a lot of fiddling (I've never tried it)
#####  ###  #   #
  #    ##   # # #
  #    #    #   #

It's better to burn out than to fade away...



Sun, 22 Aug 1999 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. ==== SB DMA Autodetectio =========

2. A Strange SB IRQ/DMA problem

3. DMA and SB and PM

4. SB bug

5. Comestic SB bug

6. SB cannot add new method

7. SB controllers and Forth - advice?

8. Prototype version of SB-HiLog is available via ftp

9. SB WIN32 example

10. Modula-2 releases SB/TS ??

11. Anyone used SB/others

12. SB VS JPI

 

 
Powered by phpBB® Forum Software