Page 3 of 3

Re: Raster Effect with Gendev ( SGDK)

Posted: Mon Feb 08, 2021 6:54 pm
by danibus
[JUST DELETE LAST POST]

Ok So I'm working on it and get some answers, but better to ask to people know about HW hehe

I understand that using VDP_setVerticalScroll() in "normal" way just draws full plane, but using it each HInt just draw a line (if fired every HInt).
Is that right?

I just simplify code and add every step one additional "trick" to get scroll, scale, etc
At the moment trying to scale dinamically a plane... will make a small tutorial about this.
later I will try to understand perspective.

Re: Raster Effect with Gendev ( SGDK)

Posted: Tue Feb 09, 2021 8:29 pm
by Joe Musashi
You can think of each line as a "window" of height 1. The vertical scroll value applies to such a "window" in the same way as it does to the full plane. So we can vertically scroll what is displayed in each line if we set the vertical scroll value with HInt.

It is important that VDP_setVerticalScroll() expects a relative value. If we want to display a specific line of an image we have to subtract the current raster line number.

For example, suppose we want to stretch the image by a factor of 2. If the raster beam is, e.g., in line 10 we then want to display image line 5. Therefore we need to set the vertical scroll value to 5-10 = -5.

Re: Raster Effect with Gendev ( SGDK)

Posted: Tue Feb 16, 2021 12:32 am
by danibus
Thanks again for explanation, already playing with this trick, very nice, even sometimes unstable in real megadrive/genesis.

Is there any way to "wide" horizontal lines?

I mean, want to do something like this:
test.png
test.png (7.88 KiB) Viewed 5595 times
But I think is not possible with raster.

I mean, like Adventures of Batman and Robin ... I think this is not raster, I'm sure I read here some people talking about this but can't find thread.

Re: Raster Effect with Gendev ( SGDK)

Posted: Tue Feb 16, 2021 7:56 am
by cero
The image is premade like that - the lower lines are wider. There is nothing happening runtime horizontally.