- create window & buffer surface
- update registers
- fire interrupts
- for each frame, call
draw_line()
144 times and noop (vblank) 10 times - we draw one line at a time because it's possible to update GPU settings multiple times per frame, eg adjusting x-offset for a parallax effect
- figure out what tiles are active on which layers (background, window,
sprites) and call
paint_tile_line()
for each tile.
- copy a line of pixels from a tile into the buffer