4cade/src/fx/fx.hgr.crystal.a

57 lines
1.1 KiB
Plaintext
Raw Normal View History

2018-12-29 18:43:59 +00:00
;license:MIT
;(c) 2018 by 4am
;
; reverse engineered from Sapphire's crack screen of 'Crystal Castles'
;
2018-11-01 02:25:59 +00:00
!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"