refactor fx/fx.hgr.interlock.lr

This commit is contained in:
4am
2018-10-30 21:17:35 -04:00
parent 0733f2d0ca
commit 797a519532
4 changed files with 30 additions and 62 deletions

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -1 +1 @@
#
#

View File

@@ -2,72 +2,40 @@
!to "build/FX/INTERLOCK.LR",plain
*=$6000
index1 = $FE
index2 = $FF
row = $FF
lda #$27
sta index1
lda #$00
sta index2
sta @h1
lda #$27
sta @h2
@outerloop
ldy #$5F ; logical row index
@innerloop
lda @data1,y
sta @sub2+2
clc
adc #$20
sta @sub1+2
lda @data2,y
sta @sub1+1
sta @sub2+1
lda @data3,y
sta @sub4+2
clc
adc #$20
sta @sub3+2
lda @data4,y
sta @sub3+1
sta @sub4+1
ldx index1
@sub1 lda $FDFD,x
@sub2 sta $FDFD,x
ldx index2
@sub3 lda $FDFD,x
@sub4 sta $FDFD,x
dey
bpl @innerloop
lda #$40
lda #$BF
sta row
@loop lda row
jsr HGRCalc
@h1=*+1
ldy #$00
lda ($3c),y
sta ($26),y
dec row
lda row
jsr HGRCalc
@h2=*+1
ldy #$27
lda ($3c),y
sta ($26),y
dec row
lda row
cmp #$FF
bne @loop
lda #$20
jsr WaitForKeyWithTimeout
lda $C000
bmi @exit
inc index2
dec index1
inc @h1
dec @h2
bpl @outerloop
@exit rts
@data1 !hex 20283038202830382129313921293139
!hex 222A323A222A323A232B333B232B333B
!hex 20283038202830382129313921293139
!hex 222A323A222A323A232B333B232B333B
!hex 20283038202830382129313921293139
!hex 222A323A222A323A232B333B232B333B
@data2 !hex 00000000808080800000000080808080
!hex 00000000808080800000000080808080
!hex 28282828A8A8A8A828282828A8A8A8A8
!hex 28282828A8A8A8A828282828A8A8A8A8
!hex 50505050D0D0D0D050505050D0D0D0D0
!hex 50505050D0D0D0D050505050D0D0D0D0
@data3 !hex 3F372F273F372F273E362E263E362E26
!hex 3D352D253D352D253C342C243C342C24
!hex 3F372F273F372F273E362E263E362E26
!hex 3D352D253D352D253C342C243C342C24
!hex 3F372F273F372F273E362E263E362E26
!hex 3D352D253D352D253C342C243C342C24
@data4 !hex D0D0D0D050505050D0D0D0D050505050
!hex D0D0D0D050505050D0D0D0D050505050
!hex A8A8A8A828282828A8A8A8A828282828
!hex A8A8A8A828282828A8A8A8A828282828
!hex 80808080000000008080808000000000
!hex 80808080000000008080808000000000
!source "src/wait.a"
!source "src/fx/fx.hgr.common.a"