SB MIDI: Time-stamp Interrupts fail (DOS/DJGPP)

SB MIDI: Time-stamp Interrupts fail (DOS/DJGPP)

Post by nospa » Sun, 03 Aug 2003 23:28:08



Sorry if this is the wrong group; I've been searching all over the net
for any info on this question, and this group seems to be the only related
group with any activity. Please direct me to the proper place if this isn't
the right group.

I'm programming a DOS protected mode (DJGPP) MIDI sequencer and am
currently adding MIDI IN (everything else works). From reading different
Soundblaster information, I've come to think Time-Stamped Interrupt mode
would suit me best. When I set up a normal (non-time-stamped) MIDI
interrupt mode (like DSP MIDI mode 31h) everything works and I am able to
correctly read MIDI input.
However, when I switch to a Time-Stamped mode, such as 35h or 37h, MIDI
Input works for a few seconds, and then the SB DSP simply stops generating
Interrupts, and it won't generate any further interrupts even if I restart
the program (with DSP reset command and such things). It doesn't matter if
I read 4 bytes at a time inside the ISR or simply acknowledge the IRQ and
the the ISR run 4 times per input MIDI byte (MIDI byte + 3 timestamp bytes).
If I run the program from a Win98 DOS box, all I have to do is to close
that DOS box and open a new DOS box, and the program again recieves
TimeStamped MIDI IN for a few seconds, and then it stops again. Therefore I
figure I'm either not acknowledging something properly, or not resetting
something, since the Windows MIDI driver seems to solve the problem.


One thing I've noticed is that the card seems to stop sending interrupts
when the 3:rd timestamp byte comes close to FFh, so perhaps there's some
counter I need to reset after each recieved byte? From the SoundBlaster
documentation I thought the time-stamp would count the number of
milliseconds since the last MIDI command, but mine seems to count the
number of milliseconds since the last DSP reset.

I can't find any specific documentation on the SoundBlaster MIDI stuff,
the only docs I have are sblaster09.zip, the Creative "documentation" and
some things from various newsgroups. I can't find any sourcecode using
Time-Stamped MIDI IN, is there any?

I am using a Pentium II 400mhz, 256 MB RAM with an ISA AWE32 (the old,
long card) and Windows 98. I have recently reinstalled Windows and the
latest version of DJGPP (to see if that solved the problem), but the exact
same problem existed before this.

If you need to contact me by email, you get my email address by taking
jesus_lever12 and then adding @hotmail.com.

/Johannes