Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!brutus.cs.uiuc.edu!jarthur!kfink From: kfink@jarthur.Claremont.EDU (Kevin Fink) Newsgroups: comp.sys.cbm Subject: Another Smooth-Scrolling ML question Message-ID: <3408@jarthur.Claremont.EDU> Date: 4 Dec 89 19:30:20 GMT Reply-To: kfink@jarthur.Claremont.EDU (Kevin Fink) Followup-To: comp.sys.cbm Organization: Harvey Mudd College, Claremont, CA Lines: 70 My brother has another question. ----------------------------------------------------------------------------- I am still having problems getting smooth scrolling to work. I am using double-buffering but it is still flickering. I think I know why. Try turning on the computer and typing this BASIC program: 10 Y=53265 20 X=X-1:IF X=-1 THEN X=7 30 POKE Y,(PEEK(Y) AND 248) + X : GOTO 20 Make sure you have plenty of garbage on the screen when you run this, especially near the bottom. When I ran it, (1) a black line flickered up the screen, and (2) the letters flickered. The area the letters flickered 'rolled' up the screen. The black line can be taken care of by turning the screen black. I can't figure out why the letters are flickering, since I'm only using the VIC-II chip's built-in scrolling. They don't only flicker when jumping the seven bits, either. I also modified line 20 to read: 20 X=X+1:IF X=8 THEN X=0 This scrolled the screen down instead of up. The screen flickered much less this time. I decided this was because of the position of the raster, so I wrote the following assembly language program: [ed. note: I think he's using the LADS assembler from some book or something.] 10 *=49152 11 .S 12 .O 20 X = 820 30 WEDGE SEI:LDA #INT:STA $315:LDA $D011:AND #$7F:STA $D011 40 LDA #251:STA $D012:CLI:RTS 50 INT LDA $D011:AND #248:ORA X:STA $D011:JMP $EA31 That program scrolls the screen based on the contents of the memory location 820, but only when the raster is at the set value. The hexadecimal machine code for the program is: C000: 78 A9 1A 8D 14 03 A9 C0 C008: 8D 15 03 AD 11 D0 29 7F C010: 8D 11 D0 A9 FB 8D 12 D0 C018: 58 60 AD 11 D0 29 F8 0D C020: 34 03 8D 11 D0 4C 31 EA To use this program, enter it into memory, then write the following BASIC program: 1 X=PEEK(820):X=X-1:IF X=-1 THEN X=7 2 POKE 820,X:GOTO 1 This didn't help at all. By adjusting the raster position which caused the interrupt, I could make the flickering get worse, but I couldn't improve it much. The demonstration program my reference guide lists scrolls up a line of HELLOs, which don't flicker at all because when one flickers a 'shadow image' down, it is indistinguishable from the HELLO below it. Is there some way to eliminate the flickering, or will I have to use the same method? ----------------------------------------------------------------------------- Once again I have no idea what he is talking about, but he'd appreciate a response. Thanks. Kevin Fink