View Single Post
Old 07 December 2019, 09:51   #5
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,235
I'm currently tring to do the same thing (C++ code with blitter stuff). WaitTOF didn't help me much. In my case, the update is too slow.

I removed the main background blit and the flickering is gone. My background is static so no need to redraw it completely. My strategy now will be to draw the background around the moving objects first, then draw the objects (and don't full redraw), applying a rounding of 16 pixels of course, and trying to avoid to refresh the same zone several times (maybe more difficult/costly) by sorting the rectangles/other... didn't figure that out yet.

What about removing the loop and putting that in a VBLANK int server?

I notice that you're calling WaitBlit() after 2 blits (and not after each blit), but not in between. Wouldn't that cause issues too?

Also I didn't see any OwnBlitter()/DisownBlitter() calls. Not doing this allows the OS to use the blitter (unless the OS blit calls perform that, well, it's very likely after all)

Last edited by jotd; 07 December 2019 at 11:50.
jotd is offline  
 
Page generated in 0.04353 seconds with 11 queries