Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Logo fade in/out
2011-12-28 11:49
Flavioweb

Registered: Nov 2011
Posts: 447
Logo fade in/out

I have a logo in chars multicolor format for c64 intro. I would to fade it in/out but never coded a fader routine before.
What is the best method to do it in assemby? Is possible to fade in/out colors all at the same time?
2011-12-28 11:56
ready.

Registered: Feb 2003
Posts: 441
if it is a 4 color multicolor logo you could easily fade it in/out by changing the multicolor registers of VIC and the color RAM ($d800) for each char.

Otherwise you could delete it pixel by pixel using a pseudo random code (check last part of Aurora 100%)
2011-12-28 12:18
JackAsser

Registered: Jun 2002
Posts: 1997
Quote: I have a logo in chars multicolor format for c64 intro. I would to fade it in/out but never coded a fader routine before.
What is the best method to do it in assemby? Is possible to fade in/out colors all at the same time?


An easy trick is to swap the %00 and %11 colors so that $d021 becomes $d8xx-colors. Setup $d8xx once with the former bg color. Then you can fade the whole logo by POKEing to $d021/22/23.
2011-12-28 12:19
Elder0010

Registered: Apr 2011
Posts: 7
You can fade on the colours by using an indexed fade table, like

$0,$b,$c,$a (use a cool sequence, non this random one :D)

in one frame:
for each color in $d800 put the current indexed colour (read from the table):
$0 (frame 1)
$b (frame 2)
$c (frame 3)
$a (frame 4)

also, fade the multicolour registers with the same technique.

after 4 frames, you have to put the real colour value in $d800 / MC registers.

Of course you have to deal with colour clashes, but it's just to find the correct values to put in the table!

You can also use 3 separate tables for $d800 / MC1 / MC2!
2011-12-28 12:21
Flavioweb

Registered: Nov 2011
Posts: 447
ok. But for the colors i need some table with ordered values or can i put right color at the right place doing some maths? I tought about a fast fade because i would use it with another effect at same time...
2011-12-28 12:42
Conjuror

Registered: Aug 2004
Posts: 168
Create 3 tables for your colour data using the luma values from this article:

http://www.pepto.de/projects/colorvic/

0
6, 9
2, B
4, 8
C, E
5, A
3, F
7, D
1

So using colour values which look right for the other colours in the picture, create a range using colours which get brighter (or darker). I like to set up a continuos fade in and out and adjust colours until I'm happy.

You can then go a step further and use a sine curve to create values which get lighter/darker slowly then faster as it gets close to the final colours.

2011-12-28 13:44
Digger

Registered: Mar 2005
Posts: 422
Have a look how it's done in Color Fade Editor

source: https://gist.github.com/628387
2011-12-28 13:45
ready.

Registered: Feb 2003
Posts: 441
also the guide AAY64 can help you out:
VIC's 16 Colors:

0/$0 = Black 8/$8 = Orange
1/$1 = White 9/$9 = Brown
2/$2 = Red 10/$A = Light Red
3/$3 = Cyan 11/$B = Dark Grey
4/$4 = Purple 12/$C = Grey
5/$5 = Green 13/$D = Light Green
6/$6 = Blue 14/$E = Light Blue
7/$7 = Yellow 15/$F = Light Grey

sorted by Brightness:

White
Yellow Light Green
Cyan Light Grey
Green Light Red
Grey Light Blue
Purple Orange
Red Dark Grey
Blue Brown
Black

but that's the same thing as Conjuror said.
2011-12-28 14:48
STE'86

Registered: Jul 2009
Posts: 274
also please bear in mind that when using characters in MC format, the char colours available to d800 colour RAM are only the lower 8 so just be aware your colour fades for character colour can only use these 8 and not the whole 16 which the MC registers can use.

which, if the logo is only 3 colours and background points right back at Jackassers suggestion of how to do it simply and efficiently.

Steve
2011-12-28 18:37
JackAsser

Registered: Jun 2002
Posts: 1997
Quote: also please bear in mind that when using characters in MC format, the char colours available to d800 colour RAM are only the lower 8 so just be aware your colour fades for character colour can only use these 8 and not the whole 16 which the MC registers can use.

which, if the logo is only 3 colours and background points right back at Jackassers suggestion of how to do it simply and efficiently.

Steve


Or if you want fancy pansy fading per char, simply convert to MC-bitmap first and manipulate screen and color ram.
2011-12-29 09:30
Radiant

Registered: Sep 2004
Posts: 639
As a side note, it's actually possible to fade even a fullsize bitmap picture in full framerate, if you pregenerate the color fading code so that it doesn't contain any superflous LDAs. I.e. iterate over the color and screen RAM and group together all positions that contain the same value, and then generate code like this (pseudocode):
lda #values[0]
sta positions[0][0]
sta positions[0][1]
...
lda #values[1]
sta positions[1][0]
sta positions[1][1]


EDIT: And of course you need to add a fade table lookup based on the original value and the fade sequence, after the LDA.
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Fred/Channel 4
JEZ
Clayboy
Apollyon/ALD
w4rp8
Guests online: 50
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 No Bounds  (9.6)
9 Aliens in Wonderland  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Dawnfall V1.1  (9.5)
8 Birth of a Flower  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Offence  (9.3)
Top Original Suppliers
1 Black Beard  (9.7)
2 Derbyshire Ram  (9.5)
3 Fungus  (9.3)
4 hedning  (9.2)
5 Baracuda  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.041 sec.