Page 1 of 1

Horizontal Cell Scroll + Vertical Plane Scroll

Posted: Mon Dec 02, 2019 9:43 am
by Manveru
I come from this topic but i do not know very well how it works and if the same applies to horizontal scroll:
viewtopic.php?f=22&t=737

In short: i have a cell (tile) scroll for a 36 tile height background. When vertical scroll is 0, then the background horizontally scrolls from tile line 0 to 27 as you can expect... but if you move down the vertical scroll for example 3 pixels, then the cell line 0 (probably it is now the cell -1) is shown partially only 5 pixels, and a new 28 line (probably the new 27) is partially shown with 3 pixel.

My question is how do you scroll 29 lines when the cell scroll only lets you scrolling 28. In the above topic the leftmost column seems to scroll with the same offset of the rightmost column, but i do not fully understand how to make it work, or if the horizontal scroll works the same as the vertical one "looping" the offset from bottommost line to the upmost.

Thanks.

Re: Horizontal Cell Scroll + Vertical Plane Scroll

Posted: Mon Dec 02, 2019 10:56 pm
by Miquel
Your post is extremely confusing, not sure I understood it at all, but let’s give it a try.

You can only scroll 28 tiles because that’s the max resolution on NTSC (28 * 8 = 224).

Re: Horizontal Cell Scroll + Vertical Plane Scroll

Posted: Tue Dec 03, 2019 9:55 am
by Manveru
Miquel wrote:
Mon Dec 02, 2019 10:56 pm
Your post is extremely confusing, not sure I understood it at all, but let’s give it a try.

You can only scroll 28 tiles because that’s the max resolution on NTSC (28 * 8 = 224).
The questin was if it is possible to make properly a horizontal cell scroll when the vertical scroll is moving. Horizontal cell scroll seems to desyncronize when you move vertical scroll a value % 8 != 0. It is like if you move down 4 pixels, what at 0 scrolled horizontal pixels 0-7 at cell 0, now moves pixels 4-11

Re: Horizontal Cell Scroll + Vertical Plane Scroll

Posted: Thu Dec 05, 2019 8:38 pm
by Miquel
Could it be that vdp hardware applies first vertical scroll and only then horizontal? If that’s the case, since there is no way to exchange priorities, I don’t think there is a solution, one of both scrollings has to be first.

Re: Horizontal Cell Scroll + Vertical Plane Scroll

Posted: Fri Dec 06, 2019 9:17 am
by Manveru
Miquel wrote:
Thu Dec 05, 2019 8:38 pm
Could it be that vdp hardware applies first vertical scroll and only then horizontal? If that’s the case, since there is no way to exchange priorities, I don’t think there is a solution, one of both scrollings has to be first.
it is possible and i also can not find a solution so we decided to set horizontal scroll to scanline mode. it is slower but.... That explains why in Thunder Force 4 they use scanline scroll even when the background only uses tile parallax, except in Air Raid where there is not vertical scroll and cell parallax is used.