wozza
Registered: May 2003 Posts: 18 |
Beginner: Raster Bars etc
As a beginner in ML C64 coding, I would like to ask for assitance in a programming related matter. I'm trying not to be a 'lamer' and ask 'how to do this?'without trying to work it out myself - Rather is it permitted to post my crap code that kinda works - for members to help me understand what basics I am doing wrong.
If the forum considers that this post is not what should be here, please say so, and I wont bother you again.
If this is the case please ignore the following, Otherwise I'm sure that you gurus will easily guide me in the right direction.
I'm am trying to create a rather simple effect, moving some raster bars, but I'm having problems with my loop, as for some reason the rotation of the bars and the colours also increases the same colours in the border and screen.
What am I doing wrong so I can just rotate the bars colours.
Thanking you in advance.
Regards, Wozza.
*= $2000
sei
lda #147
jsr $ffd2
lda #$7f
sta $dc0d
lda #$60
sta $d012
lda #<irq
sta $0314
lda #>irq
sta $0315
lda #$f1
sta $d01a
cli
ever jmp ever
irq lda #01
sta $d019
lda $d011
and #$7f
sta $d011
lda #$60
sta $d012
ldx #00
back lda colr,x
sta $d020
sta $d021
jsr delay
inx
cpx #78
bne back
ldx #00
ldy colr
loop lda colr+1,x
sta colr,x
inx
cpx #78
bne loop
tya
sta colr,x
jmp $ea31
delay ldy #05
del1 nop
dey
bne del1
rts
colr
!byte $00,$09,$09,$08,$0a,$07,$01,$00,$09,$09,$02,$02,$08,$08
!byte $0a,$0a,$07,$07,$01,$01,$00,$09,$09,$09,$02,$02,$02,$08,$08,$08
!byte $0a,$0a,$0a,$07,$07,$07,$01,$01,$01,$01,$01,$01,$07,$07,$07,$0a
!byte $0a,$0a,$08,$08,$08,$02,$02,$02,$09,$09,$09,$00,$01,$01,$07,$07
!byte $0a,$0a,$08,$08,$02,$02,$09,$09,$00,$01,$07,$0a,$08,$02,$09,$00
|