anyway, here is the initialization code. i'm almost certain that if i could fix this i could get going again.
Code: Select all
ushort lsBases[i]={0x0210,0x220,0x0230,0x0240,0x0250,0x0260,0x0280};
#define lsBaseCount 7
ushort LSAutoDetect() {
uchar i;
ushort j;
string nBuffer[5];
for (i=0;i<lsBaseCount;i++) {
puts((strptr)"Attempting to detect SoundBlaster on port 0x");
puts(StrSToH(lsBases[i],nBuffer));
puts((strptr)"...");
outportb(lsBases[i]+SB_DSP_RESET,1);
TmrWait(1);
outportb(lsBases[i]+SB_DSP_RESET,0);
//TmrWaitS(0.1);
if (inportb(lsBases[i]+SB_DSP_READSTAT)&0x80) {
for (j=0;j<0xFFFF;j++) {
if (inportb(lsBases[i]+SB_DSP_READ)==0xAA) {
puts((strptr)"Passed!\n");
return lsBases[i];
}
}
}
puts((strptr)"Failed.\n");
}
puts((strptr)"No SoundBlaster present! :[\n");
return 0;
}
Code: Select all
typedef unsigned short ushort;
typedef unsigned char *strptr;
TmrWaitS waits a specified number of seconds, TmrWait waits a certain number of ticks, which is currently 11025 just to test out direct mode to see if it's working (which it's not) (and i made sure 1/11025 was more than 3 microseconds like i'm supposedly supposed to wait)
if anyone can spot what i'm doing wrong, i'd be pretty happy.
thanks[/code]