SP1 Scrolling: Performance Review

In this section I have compiled the performance characteristics for all the previous tests. For this, I have needed to normalize the code so that comparison between measurements are meaninful.

I have disabled the regular ROM interrupt processing and activated a minimal IM2 interrupt routine and performance counter in all the previous SP1 examples, so that we have a consistent way of measuring the performance of all of them.

Performance is then measured as a Frames Per Second counter which is shown every second at the bottom left corner. It is interesting to see how it changes depending on the number of tiles on screen and the different algorithms used for updating the scrolling zones.

Synchronizing to screen retrace via HALT instruction has also been removed in all tests, since it is not needed in SP1 games, and also allows us to measure the raw speed with no artifacts.

Finally, all scroll areas have been normalized to a 16x16-cell zone, and the number of sprites has been set to 6 in all tests that have them.

The following table resumes the measured performance on each of the tests:

Test #DirectoryDescriptionFPS
Test 0sp1-baselinePoC to test raw performance of SP1 updating whole scroll area22
Test 1sp1-randomtilesWhole scroll/top-row-update loop, full column scroll and invalidation17-18
Test 2sp1-spritesTest 1, with added moving sprites13
Test 3sp1-partial-inv-1Test 2, with added partial column invalidation, method #117-25
Test 4sp1-partial-inv-2Test 2, with added partial column invalidation, method #220-25
Test 5-Not implemented-
Test 6sp1-parallaxTest 3, with 2 added parallax zones scrolling at different speeds11-17

Conclusions: