Category : C Source Code
Archive   : SBDAC.ZIP
Filename : SB.H
/* Defines for Soundblaster and Soundblaster Pro IO address */
#define LEFT_FM_STATUS 0x00 /* Pro only */
#define LEFT_FM_ADDRESS 0x00 /* Pro only */
#define LEFT_FM_DATA 0x01 /* Pro only */
#define RIGHT_FM_STATUS 0x02 /* Pro only */
#define RIGHT_FM_ADDRESS 0x02 /* Pro only */
#define RIGHT_FM_DATA 0x03 /* Pro only */
#define MIXER_ADDRESS 0x04 /* Pro only */
#define MIXER_DATA 0x05 /* Pro only */
#define DSP_RESET 0x06
#define FM_STATUS 0x08
#define FM_ADDRESS 0x08
#define FM_DATA 0x09
#define DSP_READ_DATA 0x0A
#define DSP_WRITE_DATA 0x0C
#define DSP_WRITE_STATUS 0x0C
#define DSP_DATA_AVAIL 0x0E
#define CD_ROM_DATA 0x10 /* Pro only */
#define CD_ROM_STATUS 0x11 /* Pro only */
#define CD_ROM_RESET 0x12 /* Pro only */
#define CD_ROM_ENABLE 0x13 /* Pro only */
#define ADLIB_FM_STATUS 0x388
#define ADLIB_FM_ADDRESS 0x388
#define ADLIB_FM_DATA 0x389
/* Defines for 8237 DMA Controller IO addresses */
#define DMA 0x00
#define CH0_BASE DMA+0
#define CH0_COUNT DMA+1
#define CH1_BASE DMA+2
#define CH1_COUNT DMA+3
#define CH2_BASE DMA+4
#define CH2_COUNT DMA+5
#define CH3_BASE DMA+6
#define CH3_COUNT DMA+7
#define DMA_STATUS DMA+8
#define DMA_CMD DMA+8
#define DMA_REQUEST DMA+9
#define DMA_MASK DMA+10
#define DMA_MODE DMA+11
#define DMA_FF DMA+12
#define DMA_TMP DMA+13
#define DMA_CLEAR DMA+13
#define DMA_CLRMSK DMA+14
#define DMA_WRMSK DMA+15
#define DMAPAGE 0x80
/* Functions that are in the library */
int InitSB(void);
int GetSBParams(unsigned *SbIOaddr, unsigned *SbIRQ, unsigned *SbDMAchan);
/* Card parameters */
extern unsigned SbIOaddr;
extern unsigned SbIRQ;
extern unsigned SbDMAchan;
/* Define a useful macro for writing data to the DAC */
#define writedac(x) { while(inportb(SbIOaddr+DSP_WRITE_STATUS) & 0x80); \
outportb(SbIOaddr+DSP_WRITE_DATA,(x)); }
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/