so I'm attaching a modified version of your sample that I think
addresses the stuff I mentioned.
Huh, you're right, that is an improvement. Thanks for improving it!
This dirty rectangle processing is only useful for certain games, ones
with static backgrounds, as you mentioned. If you have a scrolling game,
or a huge parallax starfield, it would be faster to not use dirtyrects
at all.