Home Falcon F030 Register Audio - Register Verschiedene Laufwerke am Falcon F030
 

5.6 Hardware Scroll


Hardware Scrolling


The following text describe techniques to do continuous hardware scroll with STe and FALCON machines. This technique make the scroll in very little time.

With continuous I mean, scroll like to XENON or IMPOSSAMOLE but fine.

Is very possible that ZOOL and ENCHANTED LAND uses such techniques.

You must know how make normal hardware scroll (you must know exactly how control $FF820F and $FF8265 registers), ok?.

To make horizontal scroll one pixel for every VBL at the left direction, make the following passes:


1) Define two contiguous screens (320X200 and 320X200) ($FF820F=80)

   0                         319 |0                          319
   ------------------------------|------------------------------
0  |                             |                             |
   |                             |                             |
   |           main              |          secondary          |
   |                             |                             |
   |          screen             |           screen            |
   |                             |                             |
   |                             |                             |
   |                             |                             |
199------------------------------|------------------------------


2) Now you must write some graphics at right border in secondary screen. 16 bit wide for example:

0                         319 |0     15                   319
------------------------------|------------------------------
|                             |       |                     |
|                             | extra |                     |
|                             |       |                     |
|                             |graphic|                     |
|                             |       |                     |
|                             |       |                     |
|                             |       |                     |
|                             |       |                     |
------------------------------|------------------------------
^----current visible window---^


3) On the first VBL it's necessary to scroll one pixel ($FF8265=1)
4) On the second VBL it's necessary to scroll another pixel ($FF8265=2)
5) On the thirt VBL it's necessary to scroll another pixel ($FF8265=3)
6) On the fourth VBL it's necessary to scroll another pixel ($FF8265=4)
7) On the fifth VBL it's necessary to scroll another pixel ($FF8265=5)
8) On the sixth VBL it's necessary to scroll another pixel ($FF8265=6)
9) On the seventh VBL it's necessary to scroll another pixel($FF8265=7)
10) On the eighth VBL it's necessary to scroll another pixel ($FF8265=8)
11) On the ninth VBL it's necessary to scroll another pixel ($FF8265=9)
12) On the tenth VBL it's necessary to scroll another pixel ($FF8265=10)
13) On the 11 VBL it's necessary to scroll another pixel ($FF8265=11)
14) On the 12 VBL it's necessary to scroll another pixel ($FF8265=12)
15) On the 13 VBL it's necessary to scroll another pixel ($FF8265=13)
16) On the 14 VBL it's necessary to scroll another pixel ($FF8265=14)
17) On the 15 VBL it's necessary to scroll another pixel ($FF8265=15)
18) On the 16 VBL, add 8 bytes (four planes) to main screen pointers ($FF8205,7 and 9), set $FF820F to 80 and $FF8265 to 0.

19) Now it's necessary copy the 1600 bytes (8 bytes for every plane * 200 lines=1600 bytes) of the new graphics zone to old graphics zone screen (the left zone):

    |<<<<<copy byte here<<<<<<<<<<|
    |                             |
0     15                  319 |0     15                   319
------------------------------|------------------------------
|      |                      |       |                     |
|      |                      |       |                     |
| old  |                      | new   |                     |
|      |                      |       |                     |
| zone |                      |graphic|                     |
|      |                      |       |                     |
|screen|                      |       |                     |
|      |                      |       |                     |
------------------------------|------------------------------
       ^----current visible window----^


Now you must write another extra graphics on secondary screen, into bits 16 to 31 of every line.


0     15                  319 |0     15      31           319
------------------------------|------------------------------
|      |                      |       |  new  |             |
|      |                      |       |       |             |
| old  |                      |       | extra |             |
|      |                      |       |       |             |
| zone |                      |       |graphic|             |
|      |                      |       |       |             |
|screen|                      |       |       |             |
|      |                      |       |       |             |
------------------------------|------------------------------
       ^-----current visible window---^

Now control $FF8265 register in order to repeating pass 3 to 18 and another time more, copy new graphics zone to old graphics zone (pass 19):

           |<<<<<copy byte here<<<<<<<<<<|
           |                             |
0     15      31          319 |0     15      31           319
------------------------------|------------------------------
|      |       |              |       |  new  |             |
|      |       |              |       |       |             |
|      | old   |              |       | extra |             |
|      |       |              |       |       |             |
|      |graphic|              |       |graphic|             |
|      |       |              |       |       |             |
|      | zone  |              |       |       |             |
|      |       |              |       |       |             |
------------------------------|------------------------------
               ^----current visible window----^


The process is repeated until when the current visible window is the secondary window and the main screen is a copy of the secondary screen:

0                         319 |0                          319
------------------------------|------------------------------
|                             |                             |
|   main screen is exactly    |     secondary screen is     |
|                             |                             |
|    like to the secondary    |   exactly like to main      |
|                             |                             |
|           screen            |           screen            |
|                             |                             |
|                             |                             |
------------------------------|------------------------------
                              ^----current visible window---^


At this point, you must set the main screen pointers (FF8205,7 and 9) to point to the main screen (another time more):

0                         319 |0                          319
------------------------------|------------------------------
|                             |                             |
|                             |                             |
|                             |                             |
|                             |                             |
|                             |                             |
|                             |                             |
|                             |                             |
|                             |                             |
------------------------------|------------------------------
^----current visible window---^


How you see, only 1600 bytes is copied every 16 VBL. If the scroll is at two pixel (more speed) for every VBL, you must copy 1600 bytes every 8 VBL etc.ok? this is very easy!! no?

Do you imagine how make the vertical scroll?.

First you must make two screen one above the other one. Second you now must copy 160 bytes every VBL from "the new line" to "the old line".

Mixing the above techniques make possible multi-directional (8 directions) scrolling.

Miguel García






Copyright © Robert Schaffner (support@doitarchive.de)
Letzte Aktualisierung am 23. Dezember 2003
Home Falcon F030 Register Audio - Register Verschiedene Laufwerke am Falcon F030