Path: utzoo!attcan!uunet!wuarchive!mailrus!jarvis.csri.toronto.edu!eecg.toronto.edu!leblanc From: leblanc@eecg.toronto.edu (Marcel LeBlanc) Newsgroups: comp.sys.cbm Subject: Re: Machine Language Smooth Scrolling Problem Summary: Easier with scroll UP Keywords: machine language, scrolling, C64, squid, gratification Message-ID: <1989Oct29.134328.26475@jarvis.csri.toronto.edu> Date: 29 Oct 89 18:43:28 GMT References: <2317@jarthur.Claremont.EDU> <136@cbmtor.UUCP> <2823@husc6.harvard.edu> <1989Oct11.151724.18728@jarvis.csri.toronto.edu> <2911@husc6.harvard.edu> <1274@utkcs2.cs.utk.edu> Organization: EECG, University of Toronto Lines: 47 In article <1274@utkcs2.cs.utk.edu> mccaslan@cetus1a.cs.utk.edu (Donald McCasland) writes: >>Regarding scrolling down. This algorithm does it, starting from the top of >>the screen and working its way down: >> >>1. Copy present character row into buffer B. >>2. Copy buffer A into present character row. >>3. Copy buffer B into buffer A. >>4. Go to next lower character row, if there is one; if not, end. >>5. Go to step 1. >> >>But the big question: is it fast enough to get to the bottom of the screen >>before the raster, released at the previous bottom edge, does? I don't >>think so, after Marcel's analysis. It should take about 3 times as long as >>Marcel's routine, or about 1/20 of a second. Dang it, not fast enough! >>However, if it were possible to do this much computation in 1/60 of a >>second, and your normal down-scroll algorithm wasn't fast enough to beat >>the raster to the top of the screen, this one would do it. > >Yes, I am an extremely unpracticed and unknowledgeable c64 user. >However, (this may seem stupid) has anyone thought of waiting for the >raster to be past the first 8 or so (far enough past so that the information >writing wouldn't catch up to the raster) character rows on the screen, and >then applying the aforementioned (I bet that's spelled wrong) buffering >algorithm. In another words, what I'm trying to say is, would it be >possible to draw, smoothly, the screen while the raster is on another >part of the screen, rather than off the screen? This is exactly what my original posting on this subject addressed. With the scroll _UP_ algorithm that I presented, I does indeed seem possible to start the scroll at the top of the screen once the raster has reached the 2nd character row, and have it complete before the raster starts the next frame. The problem is that this doesn't work with the scroll _DOWN_ algorithm. The simple algorithm that I presented started from the bottom of the screen, moving up. This doesn't allow enough time to complete the scroll before the raster starts the next frame. The scroll _DOWN_ algorithm quoted at the beginning of this posting starts at the top of the screen and moves down. Because of this, it has more time to complete the scroll. However, it still won't be able to scroll smoothly without double buffering because it performs about 3 times as many byte moves as the simpler algorithm, which requires about 3 times as many CPU cycles. > Don McCasland Marcel A. LeBlanc | University of Toronto -- Toronto, Canada "leblanc@eecg.toronto.edu" | and: LMS Technologies Ltd, Fredericton, NB, Canada ------------------------------------------------------------------------------- UUCP: uunet!utai!eecg!leblanc BITNET: leblanc@eecg.utoronto[.ca]