Raster Effect with Gendev ( SGDK)

SGDK only sub forum

Moderator: Stef

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

Re: Raster Effect with Gendev ( SGDK)

Post 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.
Joe Musashi
Interested
Posts: 17
Joined: Sat Oct 13, 2018 10:08 pm

Re: Raster Effect with Gendev ( SGDK)

Post 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.
danibus
Very interested
Posts: 142
Joined: Sat Feb 03, 2018 12:41 pm

Re: Raster Effect with Gendev ( SGDK)

Post 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 12513 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: 340
Joined: Mon Nov 30, 2015 1:55 pm

Re: Raster Effect with Gendev ( SGDK)

Post by cero »

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