Here's an idea to reduce the busy-waits during video rendering.
Break the frame into 5 points, A through E.
At A: spi_off(); audio_play(); spi_prefill(); audio_generate();
At B: sync pulse on (will occur during A interrupt)
At C: sync pulse off
At D: execute nops (low priority)
At E: spi_on(); spi_int(on);
Spi_int(): pull bytes from FB and load SPI until SPI full. When eol found, disable interrupt.
Spi_prefill(): call spi_int()
Here's an idea to reduce the busy-waits during video rendering.
Break the frame into 5 points, A through E.
At A: spi_off(); audio_play(); spi_prefill(); audio_generate(); At B: sync pulse on (will occur during A interrupt) At C: sync pulse off At D: execute nops (low priority) At E: spi_on(); spi_int(on);
Spi_int(): pull bytes from FB and load SPI until SPI full. When eol found, disable interrupt. Spi_prefill(): call spi_int()