Thread View: comp.sys.ibm.pc.programmer
5 messages
5 total messages
Started by 8324155
Wed, 07 Mar 1990 07:29
VGA smooth scrolling problem
Author: 8324155
Date: Wed, 07 Mar 1990 07:29
Date: Wed, 07 Mar 1990 07:29
20 lines
1351 bytes
1351 bytes
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
Re: VGA smooth scrolling problem
Author: Franklin Antonio
Date: Wed, 07 Mar 1990 10:56
Date: Wed, 07 Mar 1990 10:56
8 lines
850 bytes
850 bytes
ea@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 Check out the Start Address Registers. They allow you to move whole character widths or heights without moving characters in memory. I have never seen a program that actually implemented smooth scrolling on a VGA, so let us know if you succeed!
Re: VGA smooth scrolling problem
Author: Doug McDonald
Date: Wed, 07 Mar 1990 14:23
Date: Wed, 07 Mar 1990 14:23
31 lines
2025 bytes
2025 bytes
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
Re: VGA smooth scrolling problem
Author: Chris J. Wein
Date: Wed, 07 Mar 1990 14:25
Date: Wed, 07 Mar 1990 14:25
36 lines
2362 bytes
2362 bytes
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
===============================================================================
Re: VGA smooth scrolling problem
Author: Sean Malloy
Date: Wed, 07 Mar 1990 14:55
Date: Wed, 07 Mar 1990 14:55
21 lines
1606 bytes
1606 bytes
In article <1892@qualcom.qualcomm.com> fpa@qualcomm.com (Franklin Antonio) writes: >ea@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 >Check out the Start Address Registers. They allow you to move whole character >widths or heights without moving characters in memory. I have never seen >a program that actually implemented smooth scrolling on a VGA, so let us >know if you succeed! It wasn't written specifically for the VGA, but STYPE does smooth scrolling on both an EGA and a VGA, with adjustable scroll speed and pausing. It's a replacement for 'type [filename] | more' or 'more [filename]' (depending on whether you use the DOS 'more' or a more intelligently implemented one). Sean Malloy | "The Crystal Wind is the Navy Personnel Research & Development Center | Storm, and the Storm is Data, San Diego, CA 92152-6800 | and the Data is Life." malloy@nprdc.navy.mil | -- _Emerald Eyes_, D.K. Moran
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads