4cade/src/fx/fx.hgr.crystal.a
2018-12-29 13:43:59 -05:00

57 lines
1.1 KiB
Plaintext

;license:MIT
;(c) 2018 by 4am
;
; reverse engineered from Sapphire's crack screen of 'Crystal Castles'
;
!cpu 6502
!to "build/FX/CRYSTAL",plain
*=$6000
lda #$01
sta $FD
@outerloop
dec $FD
lda #<@coords
sta $FE
lda #>@coords
sta $FF
ldy #$00
@loop
lda ($fe),y
bpl @copy
lda #$10
jsr WaitForKeyWithTimeout
bmi @exit
bpl @next ; always branches
@copy
tax
iny
lda ($fe),y
tay
txa
bit $FD
bpl +
jsr HGRBlockCopy
beq @next ; always branches
+ jsr HGRBlockToWhite
@next
inc $FE
bne +
inc $FF
+ inc $FE
bne +
inc $FF
+ ldy #$00
lda ($FE),y
cmp #$80
bne @loop
bit $FD
bpl @outerloop
@exit rts
@coords
!source "src/fx/fx.hgr.crystal.data.a"
!byte $80
!source "src/wait.a"
!source "src/fx/fx.hgr.common.a"