[torontocbm] Re: Smooth Scrolling

  • From: Robin Harbron <macbeth@xxxxxxxxxxx>
  • To: torontocbm@xxxxxxxxxxxxx
  • Date: Tue, 24 Feb 2009 00:02:51 -0500

Hi Dan, the simplest (but least efficient way) is to do a busy loop watching the raster register ($d012). You'll need to adjust the numbers to suit, but the basic idea is:


lda #100
loop1 cmp $d012 ;wait for raster line 100
bne loop1

; set $d016 to your smooth scroll value here

lda #116
loop2 cmp $d012 ;wait for raster line 116, 2 character rows later
bne loop2

;set $d016 to the default value ( #200 ) for the rest of the frame and the top of the next one.

Of course, there are many gotchas and interdependencies with this sort of stuff, but this should get you started. If you want to share your code for more specific advice, pastebin.com it and send me/us the link.

Robin.

Other related posts: