Display update duration improvements

General

dxb

5 years ago

I pushed this Pull Request on GitHub with improvements to the way DMA is used to update the display. The result is reduced duration of the display update duration and larger contiguous periods of idle CPU during display line update.

Total frame update duration is reduced to ~15ms.
During each line update 2 large contiguous idle CPU periods (adding up to ~63% of the line
update duration) are now present. This means that out the ~15ms frame update duration, ~9ms are spent idling and that time could be exploited for more game logic related computation (would require a task scheduler) or for implementing more CPU intensive video modes like e.g. tiled modes.


Total frame duration was shortened by eliminating inter-line gaps caused by line processing time and accesses to DMA channel/descriptor.


Some Oscilloscope prøn:


Current master branch (af067a50149e17dc9fb5a2d9276b822751047547)

In top down order: interline gap, total frame duration and line duration


New DMA branch (0bd317e1de459f88dccb7082265dce3b28ea8d2a)

In top down order: total frame duration, line duration, inter-line gap, per line CPU idle time


Current display_dma_improv branch (097d6d7c9c8e34a3a52a11e28654be2c714716ab)

In top down order: total frame duration, line duration, per line CPU idle time periods 1 and 2

Aurélien Rodot

NEW 5 years ago

15% time reduction, awesome. Thanks a lot, in the name of all Gamebuinians :D

I guess now we can say that we won't squeeze significative performance improvement, except by using the idle DMA time, if any (which wouldn't be newbie-friendly) ^^