View Single Post
Old 31 May 2012, 23:40   #10
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,182
Quote:
Originally Posted by Photon View Post
You never need to add more bytes offscreen than your widest offscreen blit, and you never have to make space on "either side", just on the right. Just reserve xtra bytes below the screen start address for the first line if scrolling right (player going left).
That's not completely true. I have a scrolling game that goes both left and right, and because of memory restrictions I am only using a single buffer AND the blitter is not used to draw new tiles (as they are in fast memory if found).

With this (admitedly abnormal) setup you need far more "xtra" bytes because the blitter maybe blitting into an off-screen area that the tiles are being drawn into with the CPU, and if that happens when you restore the graphics some maybe corrupt. Plus you need a strip of tiles on each side of the screen as the player maybe on a 16 pixel boundary and could go either direction. With certain scroll positions and blit shift positions, I require another strip to be safe, otherwise corruption occurs.

So if you are using the blitter to draw everything, I would agree with Photon but there are certainly situations where this is not a 100% rule!
Codetapper is offline  
 
Page generated in 0.07574 seconds with 11 queries