Fade in, fade out

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Wave
Posts: 110
Joined: Mon Nov 16, 2009 5:59 am

Post by Wave »

thefox wrote:Anybody tried using the tint bits to add a little bit of smoothness? Setting all of them (or setting more and more of them gradually) as the first steps of the fade out might work. This of course would only work for global fades.

It would be interesting to see demo ROMs of different fade techniques.
I could show a demo of mine but it's like a $10 step fade (but you can set brightness to any value any time 0 black 8 white)
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

I tried smoothing out fades using the emphasis bits before, but wasn't very pleased with the results. The animation was very "flickery" and not smooth at all.

A trick that works wonders on systems with RGB palettes is to fade out the individual color components one after the other (i.e. first red, then green, then blue). A lot of Master System games and nearly all Genesis/MD ones do this, it looks incredibly smooth. Unfortunately this can't be done on the NES, since the palette is not RGB. Maybe if we could rearrange the colors to simulate an RGB palette we could use this trick, and in the end get the actual color value from a table before writing it to VRAM.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

thefox wrote:Anybody tried using the tint bits to add a little bit of smoothness?
Not if you want your game to work on a PlayChoice or a Famicom Titler.
User avatar
thefox
Posts: 3139
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Post by thefox »

Shiru wrote:I recall tried to use it, but in the emulator I was used for testing it was looking the same as one step lower brightness, so it didn't added any extra steps.
It should add one extra step, if setting all of the tint bits at once, or 3 steps if setting them one at a time. The idea was to set the tint bits as the very first thing in the fade, then after that just fade out normally.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

If you aren't doing anything during the fades, you can use timed $2001 writes to get tint on half the scanlines, which is like adding a half step.
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

thefox wrote:The idea was to set the tint bits as the very first thing in the fade, then after that just fade out normally.
What I tried (and didn't look good) was repeating these 2 steps:

1. Set all emphasis bits;
2. Clear emphasis bits and reduce the brightness of all colors by 1;

We should keep in mind that the emphasis bits are problematic on the RGB PPUs.
User avatar
thefox
Posts: 3139
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Post by thefox »

I threw together a little demo to try out the RGB fade: http://thefox.aspekt.fi/palette-fade.nes

Press A to do the usual "subtract $10 fade". Press B to do an RGB-fade. Hold down START while pressing either button to add the 3 additional tint steps in the beginning.

As to which one looks better, it's largely subjective, although using the tint bits definitely adds a lot of smoothness. I doubt an Average Joe would notice any difference...
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

It is definitely smooth, and additonal steps from the emphasis bits add extra smoothness. I would prefer 'subtract $10' version, though, because the RGB fade distorts colors, adds some greenish shade to them, albeit it looks smoother.
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

Pretty cool demo!
Wave
Posts: 110
Joined: Mon Nov 16, 2009 5:59 am

Post by Wave »

This is a demo of my system showing various palette effects from Megaman 2.
Up/Down to change brightness, SELECT to change "stage"
http://www.mediafire.com/?2hbtbebc83h66s7
Post Reply