mirror of
https://github.com/a2-4am/4cade.git
synced 2025-01-15 20:30:11 +00:00
83 lines
1.6 KiB
Plaintext
83 lines
1.6 KiB
Plaintext
;license:MIT
|
|
;(c) 2018 by 4am
|
|
;
|
|
!cpu 6502
|
|
!to "build/FX/LITTLE.BOXES",plain
|
|
*=$6000
|
|
|
|
phase = $FC ; byte, $80 or $00
|
|
color = $FD ; byte
|
|
coord = $FE ; word
|
|
|
|
!source "src/fx/macros.a"
|
|
|
|
lda #$80
|
|
sta phase
|
|
@outerloop
|
|
lda #0
|
|
sta color
|
|
lda #<Coordinates
|
|
sta coord
|
|
lda #>Coordinates
|
|
sta coord+1
|
|
@loop
|
|
dec color
|
|
bpl +
|
|
lda #4
|
|
sta color
|
|
+ ldx color
|
|
lda colors,x
|
|
sta @colorLoop+1
|
|
ldy #0
|
|
lda (coord),y
|
|
bmi @nextPhase
|
|
tax
|
|
iny
|
|
lda (coord),y
|
|
tay
|
|
txa
|
|
bit phase
|
|
bmi +
|
|
jsr HGRBlockCopy
|
|
jmp @wait
|
|
+
|
|
+HGR_ROW_CALC
|
|
ldx #7
|
|
@colorLoop
|
|
lda #$FD ; SMC
|
|
sta ($26),y
|
|
clc
|
|
+HGR_INC_WITHIN_BLOCK
|
|
dex
|
|
bpl @colorLoop
|
|
@wait
|
|
lda #$0C
|
|
jsr WaitForKeyWithTimeout
|
|
bmi @exit
|
|
inc coord
|
|
bne +
|
|
inc coord+1
|
|
+ inc coord
|
|
bne +
|
|
inc coord+1
|
|
+ bne @loop
|
|
@nextPhase
|
|
bit phase
|
|
bpl @exit
|
|
asl phase
|
|
+LBCS @outerloop ; always branches
|
|
@exit rts
|
|
|
|
colors
|
|
!byte %00101010
|
|
!byte %00101010
|
|
!byte %11010101
|
|
!byte %11010101
|
|
!byte %11111111
|
|
|
|
Coordinates
|
|
!source "src/fx/fx.hgr.block.fizzle.data.a"
|
|
|
|
!source "src/wait.a"
|
|
!source "src/fx/fx.hgr.common.a"
|