If worrying about slowness, this is the cause:
Code:
Canvas.Pixels[I,J]:= Loc^;
Using Canvas functions to draw is always slow. Since you started making SDL screen, you could look into drawing with SDL too.

When drawing on a form canvas, and then moving window outside of screen and back, all drawn graphics disappear. With no SDL or other graphics API this is fixed by drawing on TImage.Picture.Bitmap.Canvas. You don't need to handle onPaint event then, because you can be sure that what you draw once will remain forever.