the last two days i've played around with vertical scrolling.
it was relative easy to write the character copy code for the "scroll down" part (means, characters rising up, decreasing $9001).
after a beamline sync i got a very smooth scolling animation.
but:
the "scroll up" part was not successfull. ( characters falling down, increasing $9001)
I've tried two different concepts.
1. the copy process works bottom-up, what means oncoming to the beamline (yes, bad idea!

line 22 is copied to 23, 21 to 22, and so on. the routine is slim but not fast enough.
2. the copy process works top-down, what means in beamline direction (yes, good idea! but not good enough

here i buffer the top line in the zero page and copy it to the old line 1 and - in the same run - the old line 1 fills the buffer.
like this:
Code: Select all
...
ldx #0 ;
ldy #0 ; 0 to 21 (for 22 columns)
loop
.adrReadDown
lda $1000,x ; read character
sta tmp2 ; temp backup character
lda tmp_line,y ; read new character for line ...
.adrWriteDown
sta $1016 ; store new character - selfmod. code increases by 1 (initvalue $1016 )
lda tmp2 ; restore temp character
sta tmp_line,y ; store in tmp line
...
for both solutions i got a flickering scroll animation.
it was not possible for me to find a proper beamline position for a stable screen.
for this experiment i use the standard screen configuration (23 rows / 22 columns).
the copy routines will be called after 4 times dec / inc $9001.
how can this be solved better? has someone an code snippet for scrolling in this direction?
aitsch