03.14.08

A Revised Approach

Posted in Apple ][ at 10:41 am by site admin

After getting down to brass tacks with regard to the blitter code reorganization, I found the order of operations needed to be tweaked a bit. The blit order is now:

  • Turn shadowing off
  • Blit the lines with sprites
  • Blit the sprites
  • Turn shadowing on
  • Blit the lines without sprites and PEI updates in one pass

I like this for two reasons. First, I save a very small amount of time avoiding repeated toggling of the shadow register. Second, the actually display of the screen is done in a top to bottom fashion, rather than “filling in” the lines that had sprites on them. This is just a nice property to have in case you want to be fancy and try synchronizing with the VBL.

Another small victory is that the non-sprite blitter and PEI slammer is the fastest code in the engine, so the graphics are updated in the shortest amount of time. If the sprites are drawn in the middle of the rendering loop, then a delay is introduced between when the drawing begins and ends. This can lead to additional tearing of the screen.

Leave a Comment

You must be logged in to post a comment.