port 0x220

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • baburk
    New Member
    • Oct 2006
    • 111

    port 0x220

    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(BasePo rt + DSP_RESET, 0x01); // write 0x01 to DSP_RESET
    delay(10); // reinitializatio n
    outportb(BasePo rt + DSP_RESET, 0x00); // write 0x00 to DSP_RESET
    delay(10); // waiting for results
    if ((inportb(BaseP ort + DSP_DATAAVAIL) & 0x80)=0x80) &&
    (inportb(BasePo rt + DSP_READ) == 0xAA))
    {
    // DSP was found
    return(1);
    };
    return(0); // No DSP found
    }
Working...