mirror of
https://github.com/a2-4am/4cade.git
synced 2024-06-05 20:29:32 +00:00
58 lines
1.1 KiB
Plaintext
58 lines
1.1 KiB
Plaintext
;license:MIT
|
|
;(c) 2018-9 by 4am
|
|
;
|
|
coord = $FE
|
|
|
|
jmp Start
|
|
|
|
!source "src/wait.a"
|
|
!source "src/fx/fx.hgr.common.a"
|
|
!source "src/fx/fx.dhgr.common.a"
|
|
|
|
Start
|
|
jsr CopySelfToAuxmem
|
|
|
|
!macro FX_PRECOMPUTED_DHGR .copy, .coords, .wait {
|
|
lda #<.coords
|
|
sta coord
|
|
lda #>.coords
|
|
sta coord+1
|
|
ldy #0
|
|
@loop
|
|
lda (coord),y
|
|
bpl +
|
|
lda #.wait
|
|
beq @nowait
|
|
jsr WaitForKeyWithTimeout
|
|
@nowait bit $C000
|
|
bmi @exit
|
|
bpl @next
|
|
+ tax
|
|
iny
|
|
lda (coord),y
|
|
lsr
|
|
bcs @aux
|
|
sta $c003
|
|
sta $c005
|
|
bcc + ; always branches
|
|
@aux sta $c002
|
|
sta $c004
|
|
+
|
|
tay
|
|
txa
|
|
jsr .copy
|
|
@next
|
|
inc coord
|
|
bne +
|
|
inc coord+1
|
|
+ inc coord
|
|
bne +
|
|
inc coord+1
|
|
+ ldy #$00
|
|
lda ($FE),y
|
|
cmp #$80
|
|
bne @loop
|
|
@exit sta $c002
|
|
sta $c004
|
|
}
|