Konami-style "mirror" raster effect

For anything related to VDP (plane, color, sprite, tiles)

Moderators: BigEvilCorporation, Mask of Destiny

Post Reply
powerofrecall
Very interested
Posts: 237
Joined: Fri Apr 17, 2009 7:35 pm
Location: USA

Konami-style "mirror" raster effect

Post by powerofrecall » Mon May 04, 2009 4:36 pm

Example, the 3rd stage of Rocket Knight Adventures (the lava) and the 2nd level of Castlevania: Bloodlines.

Is this just vertically flipping the tiles on a certain scanline or something? I figure a wizard in here knows exactly what's being done. :D

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Mon May 04, 2009 4:44 pm

Taking in account that in RKA level with lava has no parallax effects, lava is on second BG layer and uses vertical flip and different palette for tiles. Castlevania probably uses raster split to reuse second layer (upper part of screen for far background, lower for water on foreground).

TmEE co.(TM)
Very interested
Posts: 2370
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Mon May 04, 2009 10:35 pm

The screen is put into full screen scroll mode and Vscroll value is changed on scanlines that are mirrored... simple, effective, loads of fun for programmer :P
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

tomaitheous
Very interested
Posts: 256
Joined: Tue Sep 11, 2007 9:10 pm

Post by tomaitheous » Tue May 05, 2009 4:08 am

Well, you can draw a BG layer upside down with a Hint and adjusting vscroll (full screen) on each corresponding scanline. You could even 'squish' (skipping map positions) it to give the appearance that it's a reflection.

notaz
Very interested
Posts: 191
Joined: Mon Feb 04, 2008 11:58 pm
Location: Lithuania

Post by notaz » Tue May 05, 2009 10:36 am

Castlevania actually takes advantage of VDP quirk to pull off that sprite mirroring, where certain sprite attributes are cached in VDP, and others are fetched form VRAM (it happens when game switches sprite attribute table pointer during active display).

powerofrecall
Very interested
Posts: 237
Joined: Fri Apr 17, 2009 7:35 pm
Location: USA

Post by powerofrecall » Tue May 05, 2009 1:49 pm

tomaitheous wrote:Well, you can draw a BG layer upside down with a Hint and adjusting vscroll (full screen) on each corresponding scanline. You could even 'squish' (skipping map positions) it to give the appearance that it's a reflection.
If I understand, you're basically waiting for a certain line and then adjusting vscroll to another line, and this way you can manipulate it to draw something "upside down." I think I know about the "squish" thing you're talking about, when you do the fire magic in Shinobi III there is a "heat wave" effect that looks like they are alternately skipping and duplicating individual lines to make it "wave." Any games use this as a water effect? I'm also guessing this same capability is what's being used to do sprite zooming in Treasure games (just duplicating the lines).

Oh, and if anyone's curious, I do want to try banging together a demo just to say I did, and if I do I want to have some kind of neat graphic effect or something going on rather than a "hello world."

Also--can a palette entry be changed during the display period for a water effect, or is it using a separate palette table for top+bottom of the screen?

nineko
Newbie
Posts: 7
Joined: Sat Mar 07, 2009 4:01 am
Location: italy
Contact:

Post by nineko » Tue May 05, 2009 10:42 pm

I'm not an expert but I think you can change palette as many times as you want.
There was a demo that displayed 1536 colors at the same time somewhere...
Image

TmEE co.(TM)
Very interested
Posts: 2370
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Wed May 06, 2009 12:02 am

you can set about 1 palette per line if you use DMA, but you will get some artifacts, the point where data gets passed to VDP is marked with a pixel with the color the data carries.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Mask of Destiny
Very interested
Posts: 591
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Wed May 06, 2009 5:53 am

TmEE co.(TM) wrote:you can set about 1 palette per line if you use DMA, but you will get some artifacts, the point where data gets passed to VDP is marked with a pixel with the color the data carries.
You can avoid artifacts by turning off the display while you're doing the transfer. I was able to handle 8 colors per HSYNC when turning the display on and off if I polled the status register rather than using HINTs.

Of course, polling the status register like that makes it somewhat difficult to do anything useful with the 68K during the active display period.

Post Reply