diff --git a/code/sub_colorwash.asm b/code/sub_colorwash.asm index 1a5c499..3eeec8d 100644 --- a/code/sub_colorwash.asm +++ b/code/sub_colorwash.asm @@ -1,6 +1,6 @@ colwash ldx #$27 ; load x-register with #$27 to work through 0-39 iterations lda color+$27 ; init accumulator with the last color from first color table -cycle1 ldy color-1,x ; use y-register to remember color at current position in iteration +cycle1 ldy color-1,x ; use y-register to remember color at next position in iteration sta color-1,x ; write the stored color from accumulator to that location sta $d990,x ; put it into Color Ram tya ; transfer our remembered color back to accumulator @@ -11,7 +11,7 @@ cycle1 ldy color-1,x ; use y-register to remember color at current position ; do the reverse for the second line of text in the intro colwash2 ldx #$00 ; load x-register with #$00 to track iterations lda color2+$27 ; load the last color from the second table -cycle2 ldy color2,x ; remember currently pointed at color of second table in y-register +cycle2 ldy color2,x ; remember previously used color of second table in y-register sta color2,x ; store that color into accumulator sta $d9e0,x ; ... and write it to Color Ram tya ; transfer our remembered color back to accumulator