Blitter VBL delay

All 680x0 related coding posts in this section please.

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
bod/STAX
Atari Super Hero
Atari Super Hero
Posts: 508
Joined: Wed Nov 24, 2004 8:13 pm
Location: Halesowen, West Midlands, England

Blitter VBL delay

Postby bod/STAX » Fri Oct 12, 2012 12:36 pm

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
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.

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 :oops:

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?
So let it be written, So let it be done. I'm sent here by the chosen one.

Social Media

     

Return to “680x0”

Who is online

Users browsing this forum: No registered users and 4 guests