It can be done for sure, but with some restriction on
the size of the TPSET "overlapping" areas.
How irregular do you want the ceiling and the floor?
In TP I draw the hidden page per columns of tiles 16x16.
All I need is to draw 16 columns before swapping.
One column must fit in 1/50 sec. In the same time I need also
to perform border management.
Actually the most effective compromise I have found for TP is
to draw in 1/50 sec the following things:
11 fast copies of 16x16 tiles
+
2 TPSET 16x16 blocks
+
1 veritical line copy for rigth border (1x176 pixels)
+
1 veritical line for canceling the left border (1x176 pixels)
all this stuff fits very well in 1/50 sec and allows to fill one colums,
so if you swap page each 16 frames you have a 1/50sec scrolling
and you can have nice block animations at 16/50 sec (i.e. also parallax).
Let' sgo to your requirements:
Quote:
|
Then a background which scroll together with the foreground, but also scrolls down on frame 0 and frame 8.
The total screen doesnt scroll every frame but on every even frame.
|
I see that the total scroll moves 2/50 sec, so in theory
you could have 32 frames before page swap. But
you want background be animated at frame 0 and 8, so
I must swap page each 16 frames (at the same TP rate).
Unhapplily, swapping each 8 pixels implies that the tiles
must have orizontal size 8, as at page swap the screen
has moved of 8 pixels.
In order to keep the same copy efficency you should use
8x32 tiles (actually the VDP is faster if the block has larger X).
Each frame, you must fill 2 columns of 6 blocks 8x32 that corresponds
to an area of 16x192.
In 16 frames you have a new page and you can swap.
So let's recollect:
each frames you must
1) fill an area of 16x192 with tiles 8x32.
2) do border management (only even frames)
This still consists in:
1 veritical line copy for rigth border (1x192 pixels now)
+
1 veritical line for canceling the left border (1x192 pixels now)
Broadly speacking in one frame, while filling an area
of 16x192 with tiles 8x32, you must
1) fast copy 6+6 = 12 tiles 8x32
2) TPSET copy up to 4 tiles 8x32 (the limit of 4 is due to VDP timing limits)
In my experience this can fit the VDP timings.
BUT
If you would relax the requirement on the background
animated at frame 0 and 8, and you accept an animation
at 0 and 16 this would change A LOT the things.
You could update the screen each 32 frames, this gives you
the possibility to have 16x16 tiles (the VDP is faster)
and to draw a 16x176 area each 2 frames!!
This gives you plenty of time for TPSET copy and VDP effects.
In 2/50 sec you can do
12 fast copies of 16x16 tiles
+
4 TPSET 16x16 blocks
+
1 veritical line copy for rigth border (1x176 pixels)
+
1 veritical line for canceling the left border (1x176 pixels)
and you have still spare time for SPRITE UPDATE using the VDP !!
This is the solution I was implementing in my OLD TP version,
where the sprites are updated by the VDP at each frame!!
up to you the decision