FixYa.com
Technical Support, Instructions & Repair Service


Tags:

Bosch 36

Fast 2-D Scrolling Method Needed

By Peter1 - usenet poster


Hi! I am working on a couple of projects that require extremely fast
2-D scrolling of a 16 or 32 color playfield. The entire display is going to
be roughly 4 lo-res screens high, by 5 lo-res screens wide, so that would
be too large to have a SuperBitmap to scroll around (and still have any free
memory left :^P. What other options do I have? These projects require as fast
screen updates as possible. Any suggestions will be greatly appreciated!

Derek Bosch
Data General

This Problem has been added to the Share Your Expertise Page under "My Work Queue".
Solution #1
posted on Aug 02, 2007
Not Rated (0)

Cornish

Cornish - usenet poster

Rank:Apprentice Apprentice
Rating: 0%, 0 votes
Tiles sound like the way to go. Which way is faster though? 1) Create a new
bitmap by scrolling portions of the screen that stay on the screen, and blitting
in only the new portions of the screen. 2) Create a totally new bitmap by
blitting in each cell, each time you update the screen.

It seems that at first glance that 1) would be faster, but I don't know. Anyone
out there know for sure?

'tanks a lot!

-db-

Was this solution helpful? Show your Appreciation by rating it:

Solution #2
posted on Aug 02, 2007
Not Rated (0)

jessie25

jessie25 - usenet poster

Rank:Apprentice Apprentice
Rating: 0%, 0 votes
Using tiles for a scrolling screen works well. If you look carefully at
Faery Tale, you will see that it actually uses a two-level tile system. At
a guess (I'm not in front of my Amiga to count), it uses tiles composed of
4 x 4 subtiles, each of which is about 16 x 16 pixels. It must have been quite
a chore getting the subtiles set up so that everything goes together properly,
and still looks good. You can see the tile size most easily by looking at
some of the floor tiles - the part that isn't shadowed is a basic subtile.

--
Chris Gray Myrias Research, Edmonton +1 403 428 1616
{uunet!mnetor,ubc-vision,watmath,vax135}!alberta!myrias!cg

Was this solution helpful? Show your Appreciation by rating it:

Solution #3
posted on Aug 02, 2007
Not Rated (0)

Phoebe

Phoebe - usenet poster

Rank:Apprentice Apprentice
Rating: 0%, 0 votes
Hmmm. Pardon my thickness, but what exactly do you mean by "hardware
scrolling" here? Blitting the screen down a line? Copper manipulation?
If you're talking about blitting, then it might become expensive with several
bitplanes and very high frame update and scrolling rates.

Copper manipulation would be tricky. This doesn't stop me, though (it never
does ;-) from pondering funky ways of solving the problem by using massive
copper list manipulation instead of massive blitting. I present one such
idea for your consideration.

Ideally, as you say, you want to draw the bits as few times as possible. If
it were possible, then it would be nice to allocate a bitmap slightly larger
than the screen, and simply construct the off-portion of the screen, then
scroll it on to the screen as needed by playing with the copper list.
Unfortunately, this would result in the memory area covered by the bitmap
"creeping" all over the place, and in the end it would be no better than
just allocating the whole danged bitmap in the first place.

So, what if we do this. First, divide the bitmap into horizontal slices, say
20 scan lines high for starters. Allocate two extra slices, one for offscreen
at the top, one for offscreen at the bottom. Unfortunately, the slices would
have to be the *full width* of the superbitmap. A bummer, but if the region
around which you want to scroll is more vertically oriented, then we're still
coming out ahead. Anyway, we create a copper list that successively loads in
the address of the each succeeding slice into the bitplane pointers, creating
a smooth contiguous display.

Question #1: Can the copper reload just the bitplane pointers
quickly enough to avoid blank scan lines between slices? If not,
then we're hosed.

Now, horizontal scrolling is achieved with "standard" copper list twiddling.
Vertical scrolling, on the other hand, is achieved by creating (via tiles,
or algorithms, or who knows what) the next slice to be scrolled onto the screen,
and integrating it into the copper lists. When a slice gets scrolled
completely off the edge of screen, it can be freed up and reused. It may
be desirable to leave some sort of "buffer zone" at the top and bottom if you
don't know which direction you'll be needing to scroll.

So, the end result is that you have created a circular queue of display slices
which allows the display memory to be run like a treadmill. The height of each
slice would determine how long you have to create the off-screen slice, but
also how much you have to create. Optimal size would depend on the
application.

I am convinced that if pulled off correctly, this could make for absolutely
lightning fast scrolling of an arbitrarily tall but finitely wide field, with
many bitplanes.

Question #2a: Is this feasible? I know I could do it on an Atari 800
using display lists, but my copper list experience is much
more limited. I can't believe that any of Jay Miner's older
machines could do something the newer ones couldn't...

Question #2b: If it is feasible, has it been done?

Question #2c: Is this what you were talking about all along Leo? ;-)

Well, that's all for today. Whew!

/.- -- .. --. .- .-. ..- . ... .- -- .. --. .- .-. ..- . ...\
/ Neil Weinstock | att!cord!nsw | "One man's garbage is another \
\ AT&T Bell Labs | | man's prune danish." - Harv Laser /
\.- -- .. --. .- .-. ..- . ... .- -- .. --. .- .-. ..- . .../

Was this solution helpful? Show your Appreciation by rating it:

Solution #4
posted on Aug 02, 2007
Not Rated (0)

pawa

pawa - usenet poster

Rank:Apprentice Apprentice
Rating: 0%, 0 votes
If you're doing hardware scrolling, #1 is the winning method. If,
however, you're scrolling the image in a "window", and you're not faking it
with dual playfield, then it's a toss-up.

A nice rule of thumb is to try to draw a given pixel as few times as
possible. Computations and hardware scrolling are cheap. Drawing bits is
the expensive part, so the fewer times you draw bits, the better.

­-_
Leo L. Schwab -- The Guy in The Cape INET: well!
\_ -_ Recumbent Bikes: UUCP: pacbell O^o The Only Way To Fly. hplabs / (pronounced "AE-wack")
"Work FOR? I don't work FOR anybody! I'm just having fun." -- The Doctor

Was this solution helpful? Show your Appreciation by rating it:

Solution #5
posted on Aug 02, 2007
Not Rated (0)

Melissa

Melissa - usenet poster

Rank:Apprentice Apprentice
Rating: 0%, 0 votes
This should probably be in comp.sys.amiga.tech, but here goes,
If you allocate and store all your bitmaps in ram, you are going to
be using a bunch of memory. There is no way around that. If you want
speed, storing in RAM is the best way to go. After that, check the RKM
for uses of Dual Play field and SuperBitMap. I think there are specific
commands for doing scrolling.

Don White
zehntel!donw
Box 271177 Concord, CA. 94527-1177

Follow-ups to comp.sys.amiga.tech please.

Was this solution helpful? Show your Appreciation by rating it:

Solution #6
posted on Aug 02, 2007
Not Rated (0)

paulrmc

paulrmc - usenet poster

Rank:Apprentice Apprentice
Rating: 0%, 0 votes
Well, you could try using 'tiles'. That is, divide the virtual
screen up into X by Y cells, each of which are a fixed size. When you have
your cells, you can represent your virtual screen as an array of bytes/words
arranged as X by Y. Each element in the array serves as an index into the
array of cells you have created. Thus, you can assemble your entire screen by
blitting smaller cells into it.

Faery Tale is done this way. Faery Tale's virtual screen size is
HUGE.

­-_
Leo L. Schwab -- The Guy in The Cape INET: well!
\_ -_ Recumbent Bikes: UUCP: pacbell O^o The Only Way To Fly. hplabs / (pronounced "AE-wack")
"Work FOR? I don't work FOR anybody! I'm just having fun." -- The Doctor

Was this solution helpful? Show your Appreciation by rating it:

Can you Help with these Kitchen Hoods problems?

Kitchen Hoods
STIHL BLOWER MODEL BG-85
do you have a link to a parts... Answer This...
Kitchen Hoods
attic roof vent fan- brand...
put a new motor 3.4 amp 1050... Answer This...
Kitchen Hoods
ventahood fire suppression...
Hello I have to wire a... Answer This...
Kitchen Hoods
2000 mazda prot?g? air...
liquid is leaking and air... Answer This...
Kitchen Hoods
No Instruction Manual
We' ve just purchased a New... Answer This...
Repair Service
Find Kitchen Hood Repairman Near You:

FixYa does not evaluate or guarantee the accuracy of any information provided through its proposed solutions, posts, or Expert Assistance Sessions. By entering this site you declare you read and agreed to its Terms. You may NOT copy or distribute the content that appears on this site without written permission from FixYa Inc.
© 2005-2008, FixYa, Inc. or its affiliates
When the original poster rates a solution that was given to his own problem, that rating is locked!
X

Are you sure the solution content is Inappropriate?
   
Tech buddies can communicate directly to answer questions. Become a Tech Buddy and have direct access to your favorite expert for FREE!