1
0
mirror of https://github.com/a2-4am/4cade.git synced 2025-03-25 06:35:08 +00:00

add SHR iris in effect and fix some off-by-1 bugs

This commit is contained in:
4am 2021-12-16 08:02:52 -05:00
parent 66c08f0f35
commit faecc41a56
8 changed files with 4041 additions and 14 deletions

@ -17,7 +17,9 @@
#
# Important: LC RAM bank 1 will be read/write on entry and must be read/write
# on exit. If you need ROM routines, you are responsible for switching to ROM
# then switching back to RAM bank 1 (read/write) before returning.
# then switching back to RAM bank 1 (read/write) before returning. However,
# you can leave WRITEAUXMEM active. The calling code will unconditionally
# switch back to WRITEMAINMEM.
#
# This file is converted to a binary data structure (DFX.IDX) during build
# then added to TOTAL.DATA on the final disk image.

@ -35,7 +35,9 @@
#
# Important: LC RAM bank 1 will be read/write on entry and must be read/write
# on exit. If you need ROM routines, you are responsible for switching to ROM
# then switching back to RAM bank 1 (read/write) before returning.
# then switching back to RAM bank 1 (read/write) before returning. However,
# you can leave WRITEAUXMEM active. The calling code will unconditionally
# switch back to WRITEMAINMEM.
#
# This file is converted to a binary data structure (SFX.IDX) during build
# then added to TOTAL.DATA on the final disk image.
@ -51,6 +53,7 @@ SHR.IRIS
SHR.LR
SHR.80.SPIRAL
SHR.FADEIN
SHR.IRIS.IN
SHR.80.SIDE2
SHR.LR2
SHR.80.ARROW

@ -24,9 +24,19 @@ unique_coords = util.unique(coords)
util.write("../../../src/fx/fx.shr.iris.data.a", unique_coords, header="""!cpu 6502
!to "build/FX/SHR.IRIS.DATA",plain
*=$9F00
""", footer=""" !byte 128
""")
unique_coords.reverse()
util.write("../../../src/fx/fx.shr.iris.in.data.a", unique_coords, header="""!cpu 6502
!to "build/FX/SHR.IRISIN.DATA",plain
*=$9F00
""", footer=""" !byte 128
""")
unique_coords.reverse()
util.write("../../../src/fx/fx.shr.ripple.data.a", util.ripple(unique_coords), header="""!cpu 6502
!to "build/FX/SHR.RIPPLE.DATA",plain
*=$9F00
""", footer=""" !byte 128
""")

@ -4001,3 +4001,4 @@
!byte 2,1
!byte 0,1
!byte 0,0
!byte 128

12
src/fx/fx.shr.iris.in.a Normal file

@ -0,0 +1,12 @@
;license:MIT
;(c) 2021 by 4am
;
!cpu 6502
!to "build/FX.INDEXED/SHR.IRIS.IN",plain
*=$A000
!source "src/fx/fx.shr.precomputed.a"
CoordinatesFile
!byte 18
!text "FX/SHR.IRISIN.DATA"

4004
src/fx/fx.shr.iris.in.data.a Normal file

File diff suppressed because it is too large Load Diff

@ -1,22 +1,22 @@
;license:MIT
;(c) 2021 by 4am
;
mirror_cols = $126 ; $A0 bytes but clobbers $20 bytes before
shrlo = $201 ; $C8 bytes
CoordinatesFileCopy = $2C8; $11 bytes
shrhi = $301 ; $C8 bytes
coords = $9F00 ; $1F40 bytes
mirror_rows = $BE40 ; $C0 bytes
mirror_cols = $1E29 ; $A0 bytes but clobbers $28 bytes before
mirror_rows = $1F01 ; $C7 bytes
coords = $9F00 ; $1F41 bytes
!source "src/constants.a"
!source "src/macros.a"
!source "src/fx/fx.shr.common.a"
start
ldx #$C0
ldx #$C6
ldy #$00
- tya
sta mirror_cols-$21, x
sta mirror_cols-$27, x
sta mirror_rows-1, x
iny
dex
@ -74,7 +74,7 @@ InputLoop
ldy #0
input ldx coords, y ; first value: SHR row (only 0..99 will be in input array)
bmi exit ; if > 127 then we're done
inc <input+1 ; (technically the first byte of mirror_rows serves as this EOF delimiter)
inc <input+1
lda (<input+1), y
tay
@ -85,7 +85,6 @@ input ldx coords, y ; first value: SHR row (only 0..99 will be
lda mirror_cols, y
tay
jsr copy_block
dey
; corresponding 2x2 block in bottom-right quadrant
lda mirror_rows, x
@ -117,11 +116,6 @@ copy_block
src1 lda $FD00, y ; SMC high byte
sta (src1+1), y
src2 lda $FD00, y ; SMC high byte
sta (src2+1), y
iny
lda (src1+1), y
sta (src1+1), y
lda (src2+1), y
sta (src2+1), y
rts
}

@ -4001,3 +4001,4 @@
!byte 86,27
!byte 28,24
!byte 0,0
!byte 128