                      POKEY SOUND EMULATION LIBRARY V2.3 
                      ==================================
                               January 19, 1998
                              
The Pokey Sound Emulation Library consists of source code and example 
executables that are designed to emulate the sound output characteristics
of the Atari POKEY chip.  Contained in this distribution, you should 
also have the following files:


SNDTEST.TXT - This file
FILE_ID.DIZ - A quick description of the release.
SBDRV12.ZIP - The SB Driver Source Code and examples.               
POKEY.C     - The Pokey Sound Emulation Source Code.
POKEY.H     - The Pokey Sound Emulation Header File which contains the 
              function prototypes.
POKEY.TXT   - A text file which explains the operation of the Pokey Sound
              Emulation module.
SNDTEST.C   - The Main Test routine Source Code.  Provided as an example
              of how the routines can be used. 
SNDTEST.EXE - An pre-compiled executable based on the code provided.              


These routines are available for your use free of charge, provided you give 
me proper recognition, and also provided you don't make a profit off of my 
work.  See the GNU Library Public License for more information.

If the final product you are creating will be sold for a profit, please
contact me at rfries@frmail.frco.com so we can discuss terms.


THE LIBRARY
-----------

The Pokey Sound Emulation software consists of two main files.  The 
functions have been divided into these two files depending on your needs.  
If you only need the sound generation routines, the only file you'll need 
to compile and link is the POKEY.C file.  If you need full SB drivers as 
well, then link both the POKEY.C and the SBDRV.C files into your 
application.

The POKEY.C file was designed to be as portable as possible.  You should
be able to use the file with little or no modification on any 'C' compiler.
It is currently only available in 'C', though I'll be happy to convert the
file to Assembly Language if necessary.  For best results, this file should
be compiled in a 32-bit environment with the 'maximize speed' option.

The SNDTEST.EXE program was created using the latest revision of the SBDRV
sound routines.  The POKEY and SBDRV routines are maintained separately,
so there may be a more recent release of the SBDRV routines.  A copy can
be obtained from:

ftp://members.aol.com/atari800xl/
 

Depending on your needs, you will use one of the following algorithms:

1) POKEY.C only - in this case, it is assumed you already have audio 
                    driver routines
   
   The general design is as follows:

   a) During startup, make a single call to Pokey_sound_init()
   b) Whenever an AUDC or AUDF value changes, call Update_pokey_sound()
   c) When a new buffer needs to be filled, call Pokey_process()


2) POKEY.C and SBDRV.C - using the SB driver routines provided

   The general design is as follows:

   a) During startup, make a single call to OpenSB()
   b) During startup, make a single call to Pokey_sound_init()
   c) During startup, make a single call to Start_audio_output()
   c) Whenever an AUDC or AUDF value changes, call Update_pokey_sound()
   e) During shutdown, make a single call to CloseSB()


Each function call has its own set of parameters.  Check with the 
POKEY.TXT and SBDRV.TXT files for more information.

The SNDTEST.C file has also been provided as an example.  I wrote it mainly
for my testing, but it should give you a little insight on how to correctly
use the routines.  You can also run the SNDTEST.EXE to play with the sounds.

Since the SNDTEST.EXE program uses my SBDRV routines, it is subject to the 
same limitations.  It only supports DMAs 0-3 and requires that you have the 
BLASTER environment variable configured.  It also only supports low-speed 
audio output (max freq is approx. 22KHz).                        


License Information and Copyright Notice
========================================

PokeySound is Copyright(c) 1996-1998 by Ron Fries

This library is free software; you can redistribute it and/or modify it under 
the terms of version 2 of the GNU Library General Public License as published 
by the Free Software Foundation.

This library is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
FOR A PARTICULAR PURPOSE.  See the GNU Library General Public License for more 
details.

To obtain a copy of the GNU Library General Public License, write to the Free 
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Any permitted reproduction of these routines, in whole or in part, must bear 
this legend.  
