load ripple precomputed.2bit data from external files and transform it at runtime

This commit is contained in:
4am 2020-11-13 15:14:20 -05:00
parent 579577d66f
commit 4b481ca433
15 changed files with 179 additions and 46115 deletions

View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2019 by 4am
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/BUTTERFLYRIPPLE",plain
@ -7,8 +7,11 @@
!source "src/fx/fx.hgr.precomputed.2bit.a"
+FX_PRECOMPUTED_2BIT Coordinates
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
Start
+FX_PRECOMPUTED_2BIT Coordinates2Bit
Coordinates
!source "src/fx/fx.hgr.butterfly.ripple.data.a"
!byte $00
CoordinatesFile
!byte 17
!text "FX/BUTTERFLY.DATA"

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2019 by 4am
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/HEART.RIPPLE",plain
@ -7,8 +7,11 @@
!source "src/fx/fx.hgr.precomputed.2bit.a"
+FX_PRECOMPUTED_2BIT Coordinates
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
Start
+FX_PRECOMPUTED_2BIT Coordinates2Bit
Coordinates
!source "src/fx/fx.hgr.heart.ripple.data.a"
!byte $00
CoordinatesFile
!byte 13
!text "FX/HEART.DATA"

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2019 by 4am
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/MAPLE.RIPPLE",plain
@ -7,8 +7,11 @@
!source "src/fx/fx.hgr.precomputed.2bit.a"
+FX_PRECOMPUTED_2BIT Coordinates
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
Start
+FX_PRECOMPUTED_2BIT Coordinates2Bit
Coordinates
!source "src/fx/fx.hgr.maple.ripple.data.a"
!byte $00
CoordinatesFile
!byte 13
!text "FX/MAPLE.DATA"

File diff suppressed because it is too large Load Diff

View File

@ -130,9 +130,7 @@ hgr1himirror = $BF40 ; $C0 bytes
sta $FF, x
dex
bne -
txa
pha
pha
jmp InputLoop
start
!pseudopc 0 {
Exit1Bit rts

View File

@ -134,6 +134,134 @@ InitOnce
++
}
!macro FX_RIPPLE_2BIT {
ldy #0
sty Coordinates2Bit + $3C00
ldx #$33
- lda ptrtbl, x
sta $c0, x
dex
bpl -
lda #$9b
sta $fe
iny
sty $ff
ldx #6
- lda Coordinates2Bit + 1, x
sta $7f, x
lda Coordinates2Bit + 9, x
sta $85, x
lda Coordinates2Bit + 17, x
sta $8b, x
lda Coordinates2Bit + 65, x
sta $9b, x
dex
bne -
lda Coordinates2Bit + 28
sta $92
lda Coordinates2Bit + 29
sta $93
ldx #4
- lda Coordinates2Bit + 33, x
sta $93, x
lda Coordinates2Bit + 41, x
sta $97, x
lda Coordinates2Bit + 83, x
sta $a1, x
dex
bne -
ldx #2
- lda Coordinates2Bit + 125, x
sta $a5, x
lda Coordinates2Bit + 131, x
sta $a7, x
lda Coordinates2Bit + 139, x
sta $a9, x
lda Coordinates2Bit + 169, x
sta $ab, x
lda Coordinates2Bit + 237, x
sta $ad, x
lda Coordinates2Bit + 2193, x
sta $af, x
lda Coordinates2Bit + 6581, x
sta $b1, x
dex
bne -
--- ldx #$34
-- lda $be, x
tay
ora $bf, x
beq +
lda $bf, x
jsr aslmod
sty $be, x
sta $bf, x
sty $fc
clc
adc #>Coordinates2Bit
sta $fd
ldy #0
!byte $24
- sec
lda ($fc), y
pha
lda $7e, x
sta ($fc), y
pla
sta $7e, x
inx
iny
bcc -
dex
dex
+ dex
dex
bne --
ldy #1
lda $fe
eor #<(411 - 2)
beq +
ldy #9
eor #<(411 - 2) xor <(411 - 136)
bne ++
+
- ldx zerotbl, y
sta $0, x
sta $1, x
dey
bpl -
++ dec $fe
bne ---
dec $ff
bpl ---
bmi ++ ; always branches
aslmod
jsr +
+ cmp #$1E
bcc +
iny
+ pha
tya
asl
tay
pla
rol
cmp #$3C
bcc +
sbc #$3C
+ rts
ptrtbl !word 2, 4, 6, 10, 12, 14, 18, 20
!word 22, 28, 34, 36, 42, 44, 66, 68
!word 70, 84, 86, 126, 132, 140, 170, 238
!word 2194, 6582
zerotbl !byte $f0, $f2, $ca, $d2, $d8, $e0, $e2, $e6, $ea, $ee
++
}
!macro FX_PRECOMPUTED_2BIT .coords {
+BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi
+BUILD_MIRROR_COLS mirror_cols
@ -143,7 +271,7 @@ InitOnce
sta $0, x
dex
bpl -
jmp $1
jmp InputLoop
start
!pseudopc 0 {
Exit2Bit rts

View File

@ -233,7 +233,7 @@ ripplezp
sta $0, x
dex
bpl -
jmp $1
jmp InputLoop
start
!pseudopc 0 {
Exit3Bit rts

View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2019 by 4am
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/STAR.RIPPLE",plain
@ -7,8 +7,11 @@
!source "src/fx/fx.hgr.precomputed.2bit.a"
+FX_PRECOMPUTED_2BIT Coordinates
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
Start
+FX_PRECOMPUTED_2BIT Coordinates2Bit
Coordinates
!source "src/fx/fx.hgr.star.ripple.data.a"
!byte $00
CoordinatesFile
!byte 12
!text "FX/STAR.DATA"

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2019 by 4am
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/WAVY.RIPPLE",plain
@ -7,8 +7,11 @@
!source "src/fx/fx.hgr.precomputed.2bit.a"
+FX_PRECOMPUTED_2BIT Coordinates
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
Start
+FX_PRECOMPUTED_2BIT Coordinates2Bit
Coordinates
!source "src/fx/fx.hgr.wavy.ripple.data.a"
!byte $00
CoordinatesFile
!byte 17
!text "FX/WAVY.IRIS.DATA"

View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2019 by 4am
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/W.RIPPLE.BLOOM",plain
@ -7,8 +7,11 @@
!source "src/fx/fx.hgr.precomputed.2bit.a"
+FX_PRECOMPUTED_2BIT Coordinates
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
Start
+FX_PRECOMPUTED_2BIT Coordinates2Bit
Coordinates
!source "src/fx/fx.hgr.wavy.ripple.bloom.data.a"
!byte $00
CoordinatesFile
!byte 18
!text "FX/W.IR.BLOOM.DATA"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff