add another SHR radial effect

This commit is contained in:
4am 2021-12-17 19:46:17 -05:00
parent 7cc1505b15
commit a4bb7a9c11
38 changed files with 153 additions and 37 deletions

View File

@ -52,6 +52,7 @@ SHR.DIAGONAL
SHR.80.DOWN
SHR.IRIS
SHR.LR
SHR.RADIAL2
SHR.80.SPIRAL
SHR.FADEIN
SHR.IRIS.IN

115
src/fx/fx.shr.radial2.a Normal file
View File

@ -0,0 +1,115 @@
;license:MIT
;(c) 2021 by 4am
;
!cpu 6502
!to "build/FX.INDEXED/SHR.RADIAL2",plain
*=$A000
shrlo = $201 ; $C8 bytes
CoordinatesFileCopy = $2C8; $11 bytes
shrhi = $301 ; $C8 bytes
mirror_cols = $1E29 ; $A0 bytes but clobbers $28 bytes before
mirror_rows = $1F01 ; $C7 bytes
coords = $9F00 ; $1F41 bytes
last_coords = coords+$1F3E
!source "src/fx/macros.a"
!source "src/fx/fx.shr.common.a"
start
+BUILD_SHR_MIRROR_ROWS_AND_COLS mirror_rows, mirror_cols
;X=0
+BUILD_SHR_LOOKUP_TABLES shrlo, shrhi
;X=0
+COPY_SCB_AND_PALETTES
;X=0
;WRITEAUXMEM active
+SHR_COPY_TO_STAGE_2
jmp stage2
!pseudopc *-$300 {
stage2
+LOAD_SHR_COORDINATES_AT coords, CoordinatesFile, CoordinatesFileCopy
;WRITEMAINMEM active
lda #$80
sta coords-2
+COPY_TO_0 startzp, endzp
+WRITE_AUX
jsr input
+WRITE_MAIN
+SHR_RESTORE_FROM_STAGE_2
+READ_RAM1_WRITE_RAM1
rts
startzp
!pseudopc 0 {
; top-left quadrant (original row, original column, original input order)
input ldx coords ; SMC
bmi exit
ldy #1
lda (input+1), y
tay
jsr copy
; bottom-right quadrant (opposite row, opposite column, original input order)
lda mirror_rows, x
tax
lda mirror_cols, y
tay
jsr copy
; bottom-left quadrant (opposite row, original column, reverse input order)
reverse_input
ldx last_coords ; SMC
lda mirror_rows, x
tax
ldy #1
lda (reverse_input+1), y
tay
jsr copy
; top-right quadrant (original row, opposite column, reverse input order)
lda mirror_rows, x ; mirror of the mirror
tax
lda mirror_cols, y
tay
jsr copy
inc <input+1
inc <input+1
bne +
inc <input+2
+ lda <reverse_input+1
php
dec <reverse_input+1
dec <reverse_input+1
plp
bne +
dec <reverse_input+2
+ bit $C000
bpl input
copy
lda shrlo, x
sta <src1+1
lda shrhi, x
sta <src1+2
lda shrlo+1, x
sta <src2+1
lda shrhi+1, x
sta <src2+2
src1 lda $FD00, y ; SMC high byte
sta (src1+1), y
src2 lda $FD00, y ; SMC high byte
sta (src2+1), y
exit rts
}
endzp
}
CoordinatesFile
!byte 18
!text "FX/SHR.RADIAL.DATA"

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10962655
!be24 10962979
!le16 4281

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10915374
!be24 10915680
!le16 5239

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10858233
!be24 10858539
!le16 3586

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10870603
!be24 10870909
!le16 3946

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10886002
!be24 10886308
!le16 4998

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10903654
!be24 10903960
!le16 5571

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10966936
!be24 10967260
!le16 410

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10967690
!be24 10968014
!le16 448

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10968138
!be24 10968462
!le16 303

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10922759
!be24 10923065
!le16 1242

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10967422
!be24 10967746
!le16 67

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10962596
!be24 10962920
!le16 59

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10961266
!be24 10961590
!le16 1249

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10947256
!be24 10947580
!le16 464

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10920613
!be24 10920919
!le16 2146

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10924299
!be24 10924623
!le16 6149

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10967346
!be24 10967670
!le16 76

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10962515
!be24 10962839
!le16 81

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10967489
!be24 10967813
!le16 201

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10947720
!be24 10948044
!le16 4407

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10952127
!be24 10952451
!le16 1533

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10953660
!be24 10953984
!le16 1040

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10954700
!be24 10955024
!le16 3237

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10957937
!be24 10958261
!le16 2764

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10960701
!be24 10961025
!le16 460

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10961161
!be24 10961485
!le16 105

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10968441
!be24 10968765
!le16 2370

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10935361
!be24 10935685
!le16 6149

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10909225
!be24 10909531
!le16 6149

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10850201
!be24 10850507
!le16 8032

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10861819
!be24 10862125
!le16 8784

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10874549
!be24 10874855
!le16 11453

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10891000
!be24 10891306
!le16 12654

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10924001
!le16 298
!be24 10924307
!le16 316

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10930448
!be24 10930772
!le16 4913

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10941510
!be24 10941834
!le16 5746