Stuart Brady wrote:
> I haven't written one yet... I imagine that it'd be good 
> practice, and maybe I could learn something in the process. 

Certainly. I think it's the thing most demo coders start with :)

> Does this sound like a sensible approach for pixel-by-pixel 
> scrolling?

[snip]

I don't think many people bother with pixel-by-pixel: certainly (as far
as I remember) my scrollies always moved a byte at a time.
Pixel-by-pixel is really slow, even at 50fps: remember most people read
at about what, 10 words a second? If your text is going by at (50/5/5 =
2) words (given an average of 5 chars per word, 5 pixels per char) per
second, that's going to be -really- dull.

The buffering is worthwhile if you're likely to have anything else going
on in the same screen area which could corrupt the scrolled area (like
starfields etc) but otherwise you might as well just write directly to
the screen and scroll the whole thing with LDIR (or LDI unrolled, if you
prefer... or stack copying, if you're -really- short of t-states!).

The alternative is to write optimised scrolling code for -each letter-.
That's a bit complex, but basically you keep track of where each letter
is on the screen, and you work out what you need to change to shift that
letter one position. For example, if it's a "!" you only need to move
about 1/5th of the bytes you would in a generalised scrolling routine
(assuming it's a fixed-font, of course).

> I suppose changing the video page between scanlines would 
> work? 

Whatever for?? But yes, it does.

Geoff


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________

Reply via email to