Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- color_irq:
- sta $10
- stx $11
- sty $12
- // set the colors
- lda new_color_1
- sta $d021
- lda new_color_2
- sta $d022
- lda new_color_3
- sta $d023
- // test d012
- lda $d012
- cmp #$f9
- bcc less_than_249
- // set d011 here and now
- lda #$13
- sta $d011
- // set music_irq
- lda #<music_irq
- sta $fffe
- lda #>music_irq
- sta $ffff
- lda #20 // some top line
- sta $d012
- bne color_irq_end
- less_than_249:
- // set the special d011 write irq
- lda #<d011_irq
- sta $fffe
- lda #>d011_irq
- sta $ffff
- lda #249
- sta $d012
- color_irq_end:
- lda #1
- sta $d019
- lda $10
- ldx $11
- ldy $12
- rti
- d011_irq:
- sta $10
- lda #$13
- sta $d011
- // set music_irq
- lda #<music_irq
- sta $fffe
- lda #>music_irq
- sta $ffff
- lda #20 // some top line
- sta $d012
- lda #01
- sta $d019
- lda $10
- rti
- music_irq:
- sta $10
- stx $11
- sty $12
- jsr $1003
- // rest of the code that sets up color_change_irq when
- // its time and moves it down and all that....
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement