Discussion:
Getting started with DMA?
(too old to reply)
Johann 'Myrkraverk' Oskarsson
2020-05-24 13:35:47 UTC
Permalink
Dear c.o.m.programmer,

What are some good references to use to get started with DMA transfers?

For context: it's still possible to find programming guides for the
Sound Blaster (and compatible) cards, and last time I looked at them
they mention DMA without going well into the details of how to program
the DMA controller, and so forth. At least, back when I was reading
this stuff, the SB documents seemed not well geared towards people with-
out experience in it. And the referenced book, which I found at the
time on archive.org, while comprehensive, didn't seem to be aimed at
beginners either [1].

Are there books and/or tutorials that go into this stuff simply and
detailed enough that I can be reasonably sure my first attempt will be
correct? Bonus point for books, if any, that can be found in digital
form.

[1] The book had to be "borrowed" online, and I don't remember its name.
And before writing the question, I haven't gone and looked for/at the SB
docs again.
--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk
Sjouke Burry
2020-05-24 14:10:56 UTC
Permalink
Post by Johann 'Myrkraverk' Oskarsson
Dear c.o.m.programmer,
What are some good references to use to get started with DMA transfers?
For context: it's still possible to find programming guides for the
Sound Blaster (and compatible) cards, and last time I looked at them
they mention DMA without going well into the details of how to program
the DMA controller, and so forth. At least, back when I was reading
this stuff, the SB documents seemed not well geared towards people with-
out experience in it. And the referenced book, which I found at the
time on archive.org, while comprehensive, didn't seem to be aimed at
beginners either [1].
Are there books and/or tutorials that go into this stuff simply and
detailed enough that I can be reasonably sure my first attempt will be
correct? Bonus point for books, if any, that can be found in digital
form.
[1] The book had to be "borrowed" online, and I don't remember its name.
And before writing the question, I haven't gone and looked for/at the SB
docs again.
I nave been playing with some software for the soundblaster pro,
creating an include file and a few testprorgams.
I found the register info on the net.
testwav.exe plays some wav files,
record.exe gets a datastream from the blaster, but stores nothing.
All done with the SB registers and dma.
You are welcome to it.
Post by Johann 'Myrkraverk' Oskarsson
http://home.planet.nl/~burry004/soundblaster.zip
I will remove that in the near future.
Johann 'Myrkraverk' Oskarsson
2020-05-24 14:20:56 UTC
Permalink
Post by Sjouke Burry
I nave been playing with some software for the soundblaster pro,
creating an include file and a few testprorgams.
I found the register info on the net.
testwav.exe plays some wav files,
record.exe gets a datastream from the blaster, but stores nothing.
All done with the SB registers and dma.
You are welcome to it.
Post by Johann 'Myrkraverk' Oskarsson
http://home.planet.nl/~burry004/soundblaster.zip
I will remove that in the near future.
Thanks, I've saved it, and will take a look later.

I'd still like books and/or tutorials that cover the topic, if any can
still be found.
--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk
Johann 'Myrkraverk' Oskarsson
2020-05-24 16:01:45 UTC
Permalink
Post by Johann 'Myrkraverk' Oskarsson
I'd still like books and/or tutorials that cover the topic, if any can
still be found.
Ok, so the last chapter in Undocumented PC covers this topic, which is a
book I didn't have when I was originally experimenting with Sound
Blaster programming, but it's a very terse introduction with a somewhat
comprehensive reference. The one code example seems to have a serious
bug.

It's mentioned in the UPC book, but probably impossible to find nowa-
days, EISA. So probably not worh studying, even with emulators.
--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk
T. Ment
2020-05-24 16:23:20 UTC
Permalink
Post by Johann 'Myrkraverk' Oskarsson
last chapter in Undocumented PC
but it's a very terse introduction with a somewhat
comprehensive reference. The one code example seems
to have a serious bug.
Life is hard. It's harder when you can't fix bugs.
T. Ment
2020-05-24 16:15:11 UTC
Permalink
Post by Johann 'Myrkraverk' Oskarsson
What are some good references to use to get started with DMA transfers?
The Undocumented PC, chapter 18, 1st edition (purple cover). Maybe 2nd
edition has it too.
Johann 'Myrkraverk' Oskarsson
2020-05-25 05:39:38 UTC
Permalink
Post by T. Ment
Post by Johann 'Myrkraverk' Oskarsson
What are some good references to use to get started with DMA transfers?
The Undocumented PC, chapter 18, 1st edition (purple cover). Maybe 2nd
edition has it too.
I have the 2nd edition, and it's not a good "first introduction" to the
topic. Right now it's not feasible for me to try to get hold of
physical books, so I guess I'll have to search elsewhere.

A good introduction to the topic should give you enough information to
answer the question "can I have two DMA transfers going on, for reading
input from the card (such as microphone) and writing to the card (for
sound output)?"

Reference manuals don't tell you, so you have to experiment yourself. I
guess most games from the era didn't bother to read from the audio input
so examples of this might be rare.
--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk
Loading...