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 # Directory Description FPS
Test 0 sp1-baseline PoC to test raw performance of SP1 updating whole scroll area 22
Test 1 sp1-randomtiles Whole scroll/top-row-update loop, full column scroll and invalidation 17-18
Test 2 sp1-sprites Test 1, with added moving sprites 13
Test 3 sp1-partial-inv-1 Test 2, with added partial column invalidation, method #1 17-25
Test 4 sp1-partial-inv-2 Test 2, with added partial column invalidation, method #2 20-25
Test 5 - Not implemented -
Test 6 sp1-parallax Test 3, with 2 added parallax zones scrolling at different speeds 11-17