Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!fernwood!portal!atari!apratt From: apratt@atari.UUCP (Allan Pratt) Newsgroups: comp.sys.atari.st.tech Subject: Re: Hardware -vs- Software Scrolling Keywords: scrolling Message-ID: <2894@atari.UUCP> Date: 4 Apr 91 21:24:01 GMT References: <150708@pyramid.pyramid.com> <1991Apr3.230728.17011@jato.jpl.nasa.gov> Organization: Atari Corp., Sunnyvale CA Lines: 49 >In article <150708@pyramid.pyramid.com> wniren@pyrtech.pyramid.com >(Walter "Crash" Nirenberg) writes: >>My question is what's the difference between scrolling routines written >>for an older system and a new system with hardware scrolling? Would I have >>to completely rewrite them to take advantage of the hardware or would it be >>a minor modification? vsnyder@jato.jpl.nasa.gov (Van Snyder) writes: >I've been using the raster operations in VDI and LineA, in the hope that the >OS will automatically take advantage of the hardware when it's there. If >I'm wrong, will somebody please post? You're wrong. The only hardware that can help raster operations is a blitter, and VDI/LineA automatically takes advantage of that when you do those operations. But "hardware scrolling" means something else. It operates on the entire display, not just pieces of memory. Hardware scrolling means that you have a "virtual display" which is larger than your physical screen. Imagine a large piece of paper with a smaller piece of glass on it. Your screen is a "window" onto the larger display. You can move the window around very quickly, in very fine increments, and this is hardware scrolling. The point is that you just bang a few registers rather than moving all 32K of screen memory to accomplish the move. (On the TT it can be 150K of screen memory!) (Of course, the piece of paper doesn't have to be as big as the world you're scrolling around in; it can be just a little bigger, and you can write the world in strips as it becomes visible.) Both the TT and the STe can move the window vertically on single-line boundaries, and the STe can move the window horizontally on single-pixel boundaries, but the TT can only move horizontally on 8-byte boundaries. This is eight pixels in the 256-color mode, but sixteen pixels in the 16-color modes, and sixty-four pixels in the monochrome modes. Hardware scrolling is only good for limited applications like paint programs where you want a canvas larger than your screen, or games where you want to scroll the player's view around in a larger world. Hardware scrolling CAN be used to make whole-screen scrolling faster. This is something you do in TOS programs when you're on the bottom line of the screen and you hit return. But that's another specialized operation, and it doesn't help such useful programs as Emacs, where some parts of the screen move and some don't. ============================================ Opinions expressed above do not necessarily -- Allan Pratt, Atari Corp. reflect those of Atari Corp. or anyone else. ...ames!atari!apratt