- THE OUTLAW TRIAD DEMO-SERIES -
----------------------- PART VIII ----------------------------------
Written by : Vulture/OT
Code in : Pascal/Asm
Topic : Samples
---------------------- Introduction --------------------------------
Welcome to the Outlaw Triad demo-series! In these series we will be
talking about programming demo-effects in either pascal or assembler.
Theory behind the effects shall be discussed while a full sourcecode
is also provided.
This time we will talk about something completely different,
sound-coding!
We will create a basic .RAW sound player using the soundblaster
(sorry, no GUS). Sound will be played using DMA transfers, just like
modplayers. Enjoy!
------------------------- Theory -----------------------------------
Notes: In this example I will use the most basic soundcard and that's
the soundblaster 2.0 (is 1.0 still alive?). Reason for this is that
I'm the lucky owner of such a device :-) and have absolutely no money
to buy a better card.
Allright! Let's start by talking about some soundblaster basics such
as port adresses and writing and reading from the card. Fundamental
things like that cannot be done any other way like described below.
The soundblaster can be programmed through 4 ports. These are:
Reset 2x6h
Read data 2xAh
Write command/data output 2xCh
Write buffer status input 2xCh
Data available 2xEh
The x is 1 for base address 210h, 2 for 220h њњњ and 6 for 260h.
Now, before you can program the DSP, you will have to reset it. The
reset takes around a 100 micro-seconds so if the reset takes longer
than that, you can assume an error has oc
|