VGA output

Basically yes, the shimmering problem was caused by the interrupt not firing with exactly the same period each time, so each line is a random number of ticks late. What the mysterious piece of inline assembler at the start of the interrupt is trying to do is to synchronize the CPU with the timer. But it is not a good solution.

In the VGA library I tried a different solution. It uses two interrupts each line - the first puts the processor to sleep, so then when the second one fires it should be precisely on time. The display is much more steady (in most cases, rock steady). This broke the Serial support, but in the last few days I think I have made a breakthrough and got it working again. The other advantage to the VGA library is that it now uses DMA for the colour mode which is about 4x faster since the processor can continue to execute code while the screen is being displayed, plus the pixels are all the same width :slight_smile:

Unfortunately I don't have standalone code of this approach as I had already turned the code into a library by then.