Path: utzoo!attcan!uunet!dino!ux1.cso.uiuc.edu!aries!mcdonald From: mcdonald@aries.scs.uiuc.edu (Doug McDonald) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: VGA smooth scrolling problem Message-ID: <1990Mar7.142314.26806@ux1.cso.uiuc.edu> Date: 7 Mar 90 14:23:14 GMT References: <13409.25f447ea@max.u.washington.edu> Sender: news@ux1.cso.uiuc.edu (News) Reply-To: mcdonald@aries.scs.uiuc.edu (Doug McDonald) Organization: School of Chemical Sciences, Univ. of Illinois at Urbana-Champaign Lines: 31 In article <13409.25f447ea@max.u.washington.edu> 8324155@max.u.washington.edu writes: > > Hi, I'm hoping someone can help me with this problem. > > I am trying to write an assembly routine which smoothly scrolls (one >pixel at a time) a VGA text screen. I use the Preset Row Scan Register >(port 3d4h/3d5h, index 08h) to scroll the screen up one pixel at a time. >When I have scrolled the height of one full character (16 pixels in this >case) I reset the register, and then move the data up one line as fast as >possible (using the movsw command to move the data in video memory directly) >This works well up to a point. The screen scrolls fine until a full >character has been scrolled. At that point there is a slight flicker as the >register is reset and the data moved. I have tried waiting for the video >refresh to finish by watching the status register bit 3 (port 3dah) and >then reseting the register and moving the screen, but this does not solve >the problem. I would really appreciate any suggestions. > > Thanks, > Mark > > Don't do it that way. Have a buffer in VGA memory two whole screens high. Then do the moving up and down entirely by changing the starting position, as you describe above. You also change the starting address in video memory rather than moving data around. When you scroll off the bottom of the second page you copy data to the top of the first page before changing the video registers. This works perfectly. Doug McDonald