Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .proc create_hdma_table
- ;it's OK to trash all registers here
- lda #0
- pha ;"done" flag on stack
- lda #127 ;there are 127 scanlines of data following
- tay
- ora #$80
- sta rainbow_hdma+0
- ldx #0 ;start offset
- lda #0
- loop:
- sta rainbow_hdma+1,x
- inc
- dey
- bne after
- inx
- inx
- jmp loop
- after:
- pla ;if set, we have gone through part 2
- beq part2
- ret
- part2:
- lda #1
- pha
- lda #97
- tay
- ora #$80
- sta rainbow_hdma+255
- ldx #256
- lda #128
- jmp loop
- .endproc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement