mirror of
https://frontier.innolan.net/github/AmigaExamples.git
synced 2025-11-21 17:35:45 +00:00
how fast are my blits?
Blitting a 5 bitplane 64x64 rectangle with the cookie cut function (4 active DMA channels) probably isn't going to be very fast.
How fast is it ?
I added a feature to imagecon to generate a greyscale version of the palette.
Then in the main loop I now:
- wait for the vertical blank
- set the greyscale palette
- do 5 blits
- set the color palette
.mainLoop:
bsr.s waitVerticalBlank
bsr.s installGreyscalePalette
move.l #4,d0 ; blit the object 5 times each frame
.blitLoop:
bsr.s moveBlitterObject
dbra d0,.blitLoop
bsr.s installColorPalette
bra.s .mainLoop
So when the screen changes to color, that's how many scan lines we have used blitting stuff.
The NUM_COLORS variable in the Makefile sets the number of colors. This automatically creates the correct bitplane and palette data as well as reconfiguring the example code. So now we can see what impact the number of bitplanes has on blit speed:
5 bitplanes
At 5 bitplanes we have enough time to do 5 blits.
4 bitplanes
3 bitplanes
2 bitplanes
1 bitplanes
Lots of time left over with 1 bitplane :-D




