I've now discovered what is causing the annoying flicker on the timer b interrupts in my game.
The blitter is causing a delay as the when the vbl interrupt occours thus knocking out all the timer b interrupts.
I have discovered what I believe is a solution to this problem (this is a copy of a post I've made over as dhs.nu as
I'm too lazy to type it all out again):-
By setting a flag on the last timer b in the bottom border and the vbl interrupt to enable the vbl to occour at the right moment like this:
vbl: st blit_flag
; do other vbl stuff
last_tb: sf blit flag
The blitter drawing loop now looks like this
bclr #7,$fffff8a3c.w ; stop blitter
.s1 bset #7,$fffff8a3c.w ;restart blitter
The idea behind this is to stop all blitter activity at the very bottom of a frame and restart is after the vbl at the top of the frame.
All flicker is now fixed but the blitter is screwing up all objects being drawn on screen and in some cases only drawing half an object and it's dropped the frame rate of the game.
Do any of the values in the blitter get changed by doing the blitter loop this way. I personally can't see how.
Can anyone see where I'm going wrong here?
EDIT: Seems the st blit_flag on the vbl and the sf blit_flag on the timer_b should be the other way around
However doing things this way is still causing the delay as to when the vbl occours (which seems strange).
Can anyone tell me a solution to get the vbl to occour at the moment when it's supposed to when using the blitter in a game that is running at 25fps?