Mail Archives: djgpp/1997/03/04/20:24:33
On 4 Mar 1997 11:21:15 GMT, steve_chew AT uk DOT ibm DOT com wrote:
>Sorry about the confusion - the docs do not mention Allegro, just the timing
>issue. SB05_DJ2 appears to be the latest version of the library.
>
>I am using slightly older versions of DJGPP and Allegro - I will link my program
>to Allegro 2.2 and see if this makes any difference.
The same problem occurs with Allegro 2.11. Through experimentation, I have
narrowed the culprit to the blit() command. I haven't scoured the blit() code
to see what could possibly be causing the problem, but the problem goes away if
I remove all references to blit(). Since the code in question uses only one
blit() command (in a loop), it was easy to positively identify.
Here is the interesting part, though. If I enable an Allegro timer interrupt
and put a long enough delay between interrupts (80 milliseconds works on my
machine), then the problem doesn't show itself. My timer interrupt just
increments a counter. My blit() loop checks for a non-zero counter value (which
occurs every 80 milliseconds) before blitting it's bitmaps to the screen, then
resets the counter to zero.
My first guess is that blit() my disable the timer interrupt long enough to make
SBLIB miss its timing mark, but a quick grep of the Allegro source doesn't
reveal an assembly language cli or a C disable(). I have to check for direct
writes to the interrupt ports next. I'll let you know what I find (or don't
find).
- Raw text -