Please or Register to create posts and topics.

1 pixel horizontal scroller

Hi,

Back in the day I always wrote an 8 pixel scroller using a pre-shifted font and using skopy. This moves the text very quickly across the screen.

For my Jukebox demo I wanted to write a 1 pixel scroller but  I didn't want the complexity of pre-shifting the font 8 times.

The most basic way in STOS to do this would be:

def scroll 1,0,0 to 320,8,-1,0

but this isn't good for double buffering.

Another way is to use:

reserve as screen 4

screen copy 4,1,0,320,8 to 4,0,0

skopy 1,0,320,8,logic,0,0

screen copy only works on a boundary of 16 pixels but this method seems to work. I use the 'text' command from Missing Link instead of 'print' to print the next character at the right hand side of the screen.

To my surprise screen copy (4 bitplanes) takes 30% CPU time to do an 8 pixel scroller.

I tried an assembly routine to do the 1 bitplane 8 pixel area copy:

ROXL.W 152(A0) ; scroll one line

ROXL.W 144(A0)

...

ROXL.W 8(A0)

ROXL.W (A0)

etc.

 

This isn't as flexible as screen copy but much faster.

This takes around 7% CPU time including the time to do the skopy from bank 4 to logic.

Are there any other ways to do this?