Skip to content

Instantly share code, notes, and snippets.

@badvision
Created July 15, 2015 07:20
Show Gist options
  • Save badvision/4f56efaad744ce2c663a to your computer and use it in GitHub Desktop.
Save badvision/4f56efaad744ce2c663a to your computer and use it in GitHub Desktop.
Apple II: Kaboom animation
*= $300;
!cpu 65c02;
;Kaboom: Simple Lo-res color cycle just for fun
php
pha
phx
phy
bit $c050
bit $c052
bit $c054
ldx #$f
.outerLoop
;calculate byte value from color (0-F)
lda colors,x
asl
asl
asl
asl
adc colors,x
;fast-fill screen with color
ldy #0
.loop
sta $400,y
sta $500,y
sta $600,y
sta $700,y
iny
bne .loop
;wait a little before advancing
lda #$30
.pause1
ldy #00
.pause2
dey
bne .pause2
dec
bne .pause1
;conclude animation
dex
bpl .outerLoop
;Reset screen
jsr $FC58
bit $c051
ply
plx
pla
plp
rts
colors
!byte %0000, %0001, %0010, %0100, %1000
!byte %1100, %0110, %1010, %0011, %1001, %0101
!byte %1110, %1011, %1101, %1110, %1111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment