Ok, so the code runs in this order
Background - BLIT
Sprite - BOB
Foreground - M BLIT
I'm struggling for speed on the sprites, its really quite important I crack this little problem in order to progress, whats the best method to gain speed.. i dont mind if its the blitter or some wierd ASM rout for merging but the speed of the BOBS is painful, even compiled.
This is one of those issues that I keep coming across, surely someone has a solution? Or does someone want to MAKE a solution lol (I.E a small extension or PRG i can call? that will copy a picture to 'N' screen minus colour 0)
Thanks guys, this one's really getting annoying
Let me make sure I understand your terminology. The background is drawn via a single rectangle blit. The sprites are drawn one by one with individual rectangle blits to the screen buffer. Then the foreground is drawn via a masked blit.
That's a lot of RAM access. Especially if the masked blit for the foreground is a single full screen rectangle. It's got to read the screen, the mask, then write back to the screen.
Most likely the foreground doesn't really cover that much of the screen, probably no more than 20%, maybe even less, so a full screen masked blit is simply not very efficient.
Take the foreground and identity a number of bounding boxes where there is data. Then, instead of a single full screen masked blit, do an individual masked blit for each bounding box. Your mask and foreground rasters can still be the size of the full screen. Just do smaller multiple rectangles instead of one big one.
If the foreground is only 20% of the screen, for example, this will eliminate about 60% of the pixel RAM access for each frame.