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 > flashing and coloring a char logo
2008-09-13 14:02
wozza

Registered: May 2003
Posts: 18
flashing and coloring a char logo

Hi guys, need a little help. (again)

Trying to code a routine that will change the color of a multi-color char logo via a table with the $d021,$d022,$d023 values stored.

I thought something like this : (call from irq)

time lda #$01
dec time+$01
lda time+$01
bne out

counter ldx #$00
lda logocoldata,x
sta colour1+$01
lda logocoldata+$01,x
sta colour2+$01
lda logocoldata+$02,x
sta colour3+$01
lda logocoldata+$03,x
sta time+$01
lda counter+$01
clc
adc #$03
sta counter+$01
cmp #$09
bcc out
...
etc

out rts


colour1 lda #$00
sta $d023
colour2 lda #$00
sta $d022
colour3 lda #$00
sta $d021

logocoldata
!byte $08,$08,$0f
!byte $02,$03,$09 etc..

All I get is slow increase in the colours and they seem out
of 'time' and not correctly displaying the next set of color
data.
What am I doing wrong and can you help.

Thanks in advance.


2008-09-13 14:48
chatGPZ

Registered: Dec 2001
Posts: 11386
the adc#3 should be adc #4 ? :)
2008-09-13 16:24
TNT
Account closed

Registered: Oct 2004
Posts: 189
Quote: the adc#3 should be adc #4 ? :)

Alternatively change clc to sec just to confuse everyone (including yourself) :)

No matter how you bump counter by 4 your routine works better if you actually add the time field to your data lines.
2008-09-13 16:33
Oswald

Registered: Apr 2002
Posts: 5094
also you dont need lda time+1, because dec will set Z bit for bne out.
2008-09-13 16:40
Testa
Account closed

Registered: Oct 2004
Posts: 197
dec fr+1 ;
fr lda #4 ;
bne end ;
lda #4 ;here you can control speed.
sta fr+1 ;

next ldx #0
lda data1,x
sta $d021
lda data2,x
sta $d022
lda data3,x
sta $d023
inx
cpx #? ;lengte of your color table.(+1).
bne con
ldx #0
con stx next+1
end rts


ofcourse use a interupt to run this.
greetings,
testa




2008-09-13 16:49
Testa
Account closed

Registered: Oct 2004
Posts: 197
wozza, shit forgot to say that: (in your code)

logocoldata+$03
sta time+$01

fucks up your routine...
you put your colortable at the the timer adress!!!!

bye


2008-09-13 21:23
wozza

Registered: May 2003
Posts: 18
Stuff me! - really had some problems there didn't I.
Thanks gentlemen
I'll give it another shot or maybe a new approach - dunno.
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
Impetigo/Crescent
kbs/Pht/Lxt
radius75
iAN CooG/HVSC
A3/AFL
Bieno/Commodore Plus
zscs
Guests online: 95
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.1)

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