|
Atari coding BBS
Blitter Draw Loop |
Posted by: Bod/STAX
|
Oct,12.2012-11:46
|
I have now cured all timer b flicker and vbl delay problems in my game 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
rte
last_tb: sf blit flag
rte
The blitter drawing loop now looks like this
blit:
tst.b blit_flag
bne.s .s1
bclr #7,$fffff8a3c.w ; stop blitter
bra.s blit
.s1 bset #7,$fffff8a3c.w ;restart blitter
nop
bne.s blit
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.
|
[All messages in this thread] [Start new thread]
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|