Path: utzoo!utgpu!watserv1!watcgl!cjwein From: cjwein@watcgl.waterloo.edu (Chris J. Wein) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: VGA smooth scrolling problem Message-ID: <13699@watcgl.waterloo.edu> Date: 7 Mar 90 14:25:15 GMT References: <13409.25f447ea@max.u.washington.edu> Organization: U of Waterloo, Ontario Lines: 36 In article <13409.25f447ea@max.u.washington.edu>, 8324155@max.u.washington.edu writes: > 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. If you have multiple graphic pages then this method is better... While you are scrolling by pixel on one graphic screen, create, one another inactive page, a screen which is scrolled one complete character. When you have scrolled the 16 pixels, wait for video refresh and then switch active pages to the one scrolled by one character. You now start scrolling this page pixel by pixel and using the old screen as your update page. This way you can toggle between two pages. Of course, there can be a problem if the scroll direction changes just before you are switching pages but this is infrequent. Hope this helps Chris by the way, this method was implemented on a c64 many eons ago by myself. -- =============================================================================== Chris Wein, cjwein@watcgl{.waterloo.edu, UWaterloo.ca} Computer Graphics Lab, Department of Computer Science, University of Waterloo ===============================================================================