Raster Effect with Gendev ( SGDK)

SGDK only sub forum

Moderator: Stef

danibus
Very interested
Posts: 135
Joined: Sat Feb 03, 2018 12:41 pm

Re: Raster Effect with Gendev ( SGDK)

Post by danibus » Mon Feb 08, 2021 6:54 pm

[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.

Joe Musashi
Interested
Posts: 17
Joined: Sat Oct 13, 2018 10:08 pm

Re: Raster Effect with Gendev ( SGDK)

Post by Joe Musashi » Tue Feb 09, 2021 8:29 pm

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.

danibus
Very interested
Posts: 135
Joined: Sat Feb 03, 2018 12:41 pm

Re: Raster Effect with Gendev ( SGDK)

Post by danibus » Tue Feb 16, 2021 12:32 am

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 4731 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.

cero
Very interested
Posts: 338
Joined: Mon Nov 30, 2015 1:55 pm

Re: Raster Effect with Gendev ( SGDK)

Post by cero » Tue Feb 16, 2021 7:56 am

The image is premade like that - the lower lines are wider. There is nothing happening runtime horizontally.

Post Reply