How does Castlevania 3 render the character switch animation?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

Post Reply
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

How does Castlevania 3 render the character switch animation?

Post by mkwong98 »

When the player switches character in Castlevania 3, character is drawn on alternate scan lines. How does the game do it? It doesn't seem to affect other sprites on same scan lines.
Fiskbit
Posts: 890
Joined: Sat Nov 18, 2017 9:15 pm

Re: How does Castlevania 3 render the character switch animation?

Post by Fiskbit »

I've not looked into it myself, but my understanding is that it swaps out the CHR bank used by the character for one with blank graphics.
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: How does Castlevania 3 render the character switch animation?

Post by mkwong98 »

Thank you! I tried to find it myself by running the Mesen debugger 1 scan line at a time but no success.

What are other ways to render a sprite tile as something other than a standard 8x8 or 8x16 such as this?
User avatar
Dwedit
Posts: 4922
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: How does Castlevania 3 render the character switch animation?

Post by Dwedit »

Klax uses a vertical scrolling trick to get 16x8 size attributes, but that's for background tiles rather than sprites.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
calima
Posts: 1745
Joined: Tue Oct 06, 2015 10:16 am

Re: How does Castlevania 3 render the character switch animation?

Post by calima »

There are no tricks to affect a single sprite like that. It's all faked by CHR.
User avatar
Marscaleb
Posts: 240
Joined: Fri Sep 11, 2015 10:39 am
Contact:

Re: How does Castlevania 3 render the character switch animation?

Post by Marscaleb »

So it's just timing its bank switching to go on specific scanlines?
I suppose that isn't too hard since it freezes gameplay, but that still has to be done manually...
User avatar
Bregalad
Posts: 8055
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: How does Castlevania 3 render the character switch animation?

Post by Bregalad »

Marscaleb wrote: Mon Jun 27, 2022 5:48 pm So it's just timing its bank switching to go on specific scanlines?
I suppose that isn't too hard since it freezes gameplay, but that still has to be done manually...
The original game use VRC6 mapper, the western port MMC5, both of which are quite capable on IRQs. When making the hack that allows the VRC6 game to play on PAL consoles I didn't have to do anything special for this effect, but it's unlikely they use 16 IRQs, instead it's probably one IRQ which does the 16 switches, but even if the switches are made at an approximate time the effect still work.

You can also note that when you're close to the top of the screen, this effect is disabled entierely.
Useless, lumbering half-wits don't scare us.
Post Reply