Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mode-x scrolling problems

63 views
Skip to first unread message

Alberto Hernandez Marcos

unread,
Sep 11, 1997, 3:00:00 AM9/11/97
to

Timo Heikki Kalevi Asikainen wrote:
>
> How do you accomplish smooth horizontal scrolling in mode-x
> (320x200x256x4).I can do vertical scrolling smoothly (1 pixel at time) but
> horizontal scrolling jumps 4 pixels each time i try to scroll 1 pixel.
> What's the problem? please send some sources in c+asm.
>

Timo, we've just had that same problem recently. The answer is simple:
YOU CANT.
I mean, many video-cards (and not only the low-priced ones) don't fully
acomplish the VESA standard for hardware scrolling, producing odd
effects
when asked to perform a single pixel horizontal scroll, although 4
pixels works
fine. The effects can vary from strange horizontal lines on the screen,
to a
narrow 4-pixels wide column on one side of the screen.

Worse: many other cards won't even do a 4-pixel scroll, ACCEPTING
ONLY 8 pixels for each jump!!!

We've dealed the problem with the people at SciTech and some other game
developers, confirming this point.

Your/our chances are:
- software scroll: copying the WHOLE screen a single pixel further to
video memory.
It's a pain in the ass for the efficience of your code, but it ensures
compatibility.
- 8 pixels hardware scroll: it SHOULD work on every card. The drawback
is that
sometimes an 8 pixels jump looks too jerky.
- 4 pixels hardware scroll: it WILL produce strange effects on many
cards, but
you can always say it's not your fault, but the manufacturer's.

Please, let us know how you do with this. Greetings,

Alberto

P.S.: I'm crossposting this message to rec.games.programmer .

unknown

unread,
Sep 11, 1997, 3:00:00 AM9/11/97
to

Alberto Hernandez Marcos (a...@tid.es*NO_SPAM) wrote:

[..]

>Your/our chances are:
>- software scroll: copying the WHOLE screen a single pixel further to
>video memory.
> It's a pain in the ass for the efficience of your code, but it ensures
> compatibility.
>- 8 pixels hardware scroll: it SHOULD work on every card. The drawback
>is that
> sometimes an 8 pixels jump looks too jerky.
>- 4 pixels hardware scroll: it WILL produce strange effects on many
>cards, but
> you can always say it's not your fault, but the manufacturer's.

Add also an hybrid, that is 1pixel hardware scrolling if it works, and the
user can switch back to software scrolling in case it doesn't work. If he
has a gfx board capable of proper hardware scrolling, why not use it? If he
hasn't he'll enjoy slower frame rates. Next time he'll buy a gfx board he'll
remember to test it before purchasing it. Users gain from being more expert.

Start with software scrolling as default, then in the "Advanced Options" screen
put this "use hardware scrolling" option, and a test to see if everything works
as it should.. like "if it worked properly hit any key, otherwise Esc key".

I think it's a good "comprimize".

-------------------------
Fabio "Maverick" Bizzetti


Arjan Brussee

unread,
Oct 21, 1997, 3:00:00 AM10/21/97
to

Alberto Hernandez Marcos wrote in message <5v84vt$n...@tid.tid.es>...


>Timo Heikki Kalevi Asikainen wrote:
>>
>> How do you accomplish smooth horizontal scrolling in mode-x
>> (320x200x256x4).I can do vertical scrolling smoothly (1 pixel at time)
but
>> horizontal scrolling jumps 4 pixels each time i try to scroll 1 pixel.


full directional, unlimited scrolling like this should be possible in
320x200, I did it back in 1994 with Jazz Jackrabbit 1. You need to set the
offset per 4 pixels, then set the pixel scroller register to address the
exact pixel that you want to start on. I can't find the source so fast, but
I will release the full source code of Jazz-1 in about a month on my
website.

Scrolling in higher resolutions: haven't tried hardware scrolling by setting
the offsets, but what works is to either draw everything yourself into a big
buffer (redraw each time) or let the video card redraw everything by using
vidmem->vidmem blits, which are all standard on every 2d-windows accelerator
card like S3, ATI etcetera. DirectDraw supports this nicely. You need to set
up a vid-mem caching scheme for this to work perfectly, but you can do nice
things like parallax scrolling. <G>

-arjan

0 new messages