This program is from http://www.ragestorm.net/tutorial?id=26 and
http://www.Planet-Source-Code.com/vb...=7391&lngWId=3. I have worked with win98 in my old celereon pc, but in win2000 in my new PIV it didn't detect the port, that used for playing the wave file.
#define DSP_RESET 0x06
#define DSP_DATAAVAIL 0x0E
#define DSP_READ 0x0A
int ResetDSP( unsinged int BasePort )
{
outportb(BasePort + DSP_RESET, 0x01); // write 0x01 to DSP_RESET
delay(10); // reinitialization
outportb(BasePort + DSP_RESET, 0x00); // write 0x00 to DSP_RESET
delay(10); // waiting for results
if ((inportb(BasePort + DSP_DATAAVAIL) & 0x80)=0x80) &&
(inportb(BasePort + DSP_READ) == 0xAA))
{
// DSP was found
return(1);
};
return(0); // No DSP found
}