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).
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
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.
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).
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?
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...
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.
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.