mirror of
https://github.com/a2-4am/4cade.git
synced 2024-07-04 18:29:51 +00:00
load precomputed.1bit data from external files and transform it at runtime
This commit is contained in:
parent
4b481ca433
commit
23e8e0f030
@ -1,5 +1,5 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2019 by 4am
|
;(c) 2019-2020 by 4am/qkumba
|
||||||
;
|
;
|
||||||
!cpu 6502
|
!cpu 6502
|
||||||
!to "build/FX/BUBBLES",plain
|
!to "build/FX/BUBBLES",plain
|
||||||
@ -7,8 +7,10 @@
|
|||||||
|
|
||||||
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
||||||
|
|
||||||
+FX_PRECOMPUTED_1BIT Coordinates
|
+FX_INITONCE_1BIT CoordinatesFile, Start
|
||||||
|
Start
|
||||||
|
+FX_PRECOMPUTED_1BIT Coordinates1Bit
|
||||||
|
|
||||||
Coordinates
|
CoordinatesFile
|
||||||
!source "src/fx/fx.hgr.bubbles.data.a"
|
!byte 15
|
||||||
!byte $80
|
!text "FX/BUBBLES.DATA"
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
!cpu 6502
|
||||||
|
!to "build/FX/BUBBLES.DATA",plain
|
||||||
|
*=$8800
|
||||||
!byte $0C,%01100010
|
!byte $0C,%01100010
|
||||||
!byte $0C,%01110001
|
!byte $0C,%01110001
|
||||||
!byte $54,%01110001
|
!byte $54,%01110001
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2019 by 4am
|
;(c) 2019-2020 by 4am/qkumba
|
||||||
;
|
;
|
||||||
!cpu 6502
|
!cpu 6502
|
||||||
!to "build/FX/BUBBLES.IN",plain
|
!to "build/FX/BUBBLES.IN",plain
|
||||||
@ -7,8 +7,11 @@
|
|||||||
|
|
||||||
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
||||||
|
|
||||||
+FX_PRECOMPUTED_1BIT Coordinates
|
+FX_INITONCE_1BIT CoordinatesFile, Start
|
||||||
|
+FX_REVERSE_1BIT
|
||||||
|
Start
|
||||||
|
+FX_PRECOMPUTED_1BIT Coordinates1Bit
|
||||||
|
|
||||||
Coordinates
|
CoordinatesFile
|
||||||
!source "src/fx/fx.hgr.bubbles.in.data.a"
|
!byte 15
|
||||||
!byte $80
|
!text "FX/BUBBLES.DATA"
|
||||||
|
File diff suppressed because it is too large
Load Diff
16
src/fx/fx.hgr.corner4.a
Normal file
16
src/fx/fx.hgr.corner4.a
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
;license:MIT
|
||||||
|
;(c) 2019-2020 by 4am/qkumba
|
||||||
|
;
|
||||||
|
!cpu 6502
|
||||||
|
!to "build/FX/CORNER4.OUT",plain
|
||||||
|
*=$6000
|
||||||
|
|
||||||
|
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
||||||
|
|
||||||
|
+FX_INITONCE_1BIT CoordinatesFile, Start
|
||||||
|
Start
|
||||||
|
+FX_PRECOMPUTED_1BIT Coordinates1Bit
|
||||||
|
|
||||||
|
CoordinatesFile
|
||||||
|
!byte 15
|
||||||
|
!text "FX/CORNER4.DATA"
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2019 by 4am
|
;(c) 2019-2020 by 4am/qkumba
|
||||||
;
|
;
|
||||||
!cpu 6502
|
!cpu 6502
|
||||||
!to "build/FX/CORNER4.IN",plain
|
!to "build/FX/CORNER4.IN",plain
|
||||||
@ -7,8 +7,11 @@
|
|||||||
|
|
||||||
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
||||||
|
|
||||||
+FX_PRECOMPUTED_1BIT Coordinates
|
+FX_INITONCE_1BIT CoordinatesFile, Start
|
||||||
|
+FX_REVERSE_1BIT
|
||||||
|
Start
|
||||||
|
+FX_PRECOMPUTED_1BIT Coordinates1Bit
|
||||||
|
|
||||||
Coordinates
|
CoordinatesFile
|
||||||
!source "src/fx/fx.hgr.corner4.in.data.a"
|
!byte 15
|
||||||
!byte $80
|
!text "FX/CORNER4.DATA"
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
;license:MIT
|
|
||||||
;(c) 2019 by 4am
|
|
||||||
;
|
|
||||||
!cpu 6502
|
|
||||||
!to "build/FX/CORNER4.OUT",plain
|
|
||||||
*=$6000
|
|
||||||
|
|
||||||
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
|
||||||
|
|
||||||
+FX_PRECOMPUTED_1BIT Coordinates
|
|
||||||
|
|
||||||
Coordinates
|
|
||||||
!source "src/fx/fx.hgr.corner4.out.data.a"
|
|
||||||
!byte $80
|
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2019 by 4am
|
;(c) 2019-2020 by 4am/qkumba
|
||||||
;
|
;
|
||||||
!cpu 6502
|
!cpu 6502
|
||||||
!to "build/FX/IRIS",plain
|
!to "build/FX/IRIS",plain
|
||||||
@ -7,8 +7,10 @@
|
|||||||
|
|
||||||
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
||||||
|
|
||||||
+FX_PRECOMPUTED_1BIT Coordinates
|
+FX_INITONCE_1BIT CoordinatesFile, Start
|
||||||
|
Start
|
||||||
|
+FX_PRECOMPUTED_1BIT Coordinates1Bit
|
||||||
|
|
||||||
Coordinates
|
CoordinatesFile
|
||||||
!source "src/fx/fx.hgr.iris.data.a"
|
!byte 12
|
||||||
!byte $80
|
!text "FX/IRIS.DATA"
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
!cpu 6502
|
||||||
|
!to "build/FX/IRIS.DATA",plain
|
||||||
|
*=$8800
|
||||||
!byte $5E,%10110011
|
!byte $5E,%10110011
|
||||||
!byte $5E,%11010011
|
!byte $5E,%11010011
|
||||||
!byte $5E,%10010011
|
!byte $5E,%10010011
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2019 by 4am
|
;(c) 2019-2020 by 4am/qkumba
|
||||||
;
|
;
|
||||||
!cpu 6502
|
!cpu 6502
|
||||||
!to "build/FX/IRIS.IN",plain
|
!to "build/FX/IRIS.IN",plain
|
||||||
@ -7,8 +7,11 @@
|
|||||||
|
|
||||||
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
||||||
|
|
||||||
+FX_PRECOMPUTED_1BIT Coordinates
|
+FX_INITONCE_1BIT CoordinatesFile, Start
|
||||||
|
+FX_REVERSE_1BIT
|
||||||
|
Start
|
||||||
|
+FX_PRECOMPUTED_1BIT Coordinates1Bit
|
||||||
|
|
||||||
Coordinates
|
CoordinatesFile
|
||||||
!source "src/fx/fx.hgr.iris.in.data.a"
|
!byte 12
|
||||||
!byte $80
|
!text "FX/IRIS.DATA"
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -8,6 +8,7 @@ hgrlomirror = $BD40 ; $C0 bytes
|
|||||||
mirror_cols = $BE00 ; $28 bytes
|
mirror_cols = $BE00 ; $28 bytes
|
||||||
hgr1hi = $BE40 ; $C0 bytes
|
hgr1hi = $BE40 ; $C0 bytes
|
||||||
hgr1himirror = $BF40 ; $C0 bytes
|
hgr1himirror = $BF40 ; $C0 bytes
|
||||||
|
Coordinates1Bit= $8800 ; $3481 bytes ($3480 on disk + 1 byte EOF marker)
|
||||||
|
|
||||||
!source "src/fx/macros.a"
|
!source "src/fx/macros.a"
|
||||||
|
|
||||||
@ -120,6 +121,148 @@ hgr1himirror = $BF40 ; $C0 bytes
|
|||||||
+ rts
|
+ rts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
!macro FX_INITONCE_1BIT .CoordinatesFile, .Start {
|
||||||
|
InitOnce
|
||||||
|
bit .Start
|
||||||
|
lda #$4C
|
||||||
|
sta InitOnce
|
||||||
|
+READ_RAM2_WRITE_RAM2
|
||||||
|
+LOAD_FILE_AT .CoordinatesFile, Coordinates1Bit
|
||||||
|
+READ_RAM1_WRITE_RAM1
|
||||||
|
lda #$80
|
||||||
|
sta Coordinates1Bit + $3480
|
||||||
|
}
|
||||||
|
|
||||||
|
!macro FX_REVERSE_1BIT {
|
||||||
|
lda #$80
|
||||||
|
sta Coordinates1Bit + $3480
|
||||||
|
ldy #0 ; <Coordinates1Bit
|
||||||
|
sty $f0
|
||||||
|
lda #>Coordinates1Bit
|
||||||
|
sta $f1
|
||||||
|
lda #<(Coordinates1Bit + $3480 - 2)
|
||||||
|
sta $f2
|
||||||
|
lda #>(Coordinates1Bit + $3480 - 2)
|
||||||
|
sta $f3
|
||||||
|
clc
|
||||||
|
!byte $24
|
||||||
|
- sec
|
||||||
|
-- lda ($f0), y
|
||||||
|
pha
|
||||||
|
lda ($f2), y
|
||||||
|
sta ($f0), y
|
||||||
|
pla
|
||||||
|
sta ($f2), y
|
||||||
|
iny
|
||||||
|
bcc -
|
||||||
|
ldy #0
|
||||||
|
!byte $24
|
||||||
|
- clc
|
||||||
|
inc $f0
|
||||||
|
bne +
|
||||||
|
inc $f1
|
||||||
|
+ lda $f1
|
||||||
|
eor #>(Coordinates1Bit + $1A40)
|
||||||
|
bne +
|
||||||
|
lda $f0
|
||||||
|
eor #<(Coordinates1Bit + $1A40)
|
||||||
|
beq ++
|
||||||
|
+ lda $f2
|
||||||
|
bne +
|
||||||
|
dec $f3
|
||||||
|
+ dec $f2
|
||||||
|
bcs -
|
||||||
|
bcc -- ; always
|
||||||
|
++
|
||||||
|
}
|
||||||
|
|
||||||
|
!macro FX_RIPPLE_1BIT {
|
||||||
|
lda #$80
|
||||||
|
sta Coordinates1Bit + $3480
|
||||||
|
|
||||||
|
lda #2 ; <(Coordinates1Bit + 2)
|
||||||
|
sta $f0
|
||||||
|
ldy #0
|
||||||
|
sty $f1
|
||||||
|
lda #$16 ; <(Coordinates1Bit + 22)
|
||||||
|
sta $f2
|
||||||
|
sty $f3
|
||||||
|
|
||||||
|
lda #$1f
|
||||||
|
sta $ee
|
||||||
|
lda #$0d
|
||||||
|
sta $ef
|
||||||
|
|
||||||
|
lda Coordinates1Bit + 2
|
||||||
|
sta $e0
|
||||||
|
lda Coordinates1Bit + 3
|
||||||
|
sta $e1
|
||||||
|
lda Coordinates1Bit + 22
|
||||||
|
sta $e2
|
||||||
|
lda Coordinates1Bit + 23
|
||||||
|
sta $e3
|
||||||
|
|
||||||
|
--- ldx #4
|
||||||
|
-- ldy $ee, x
|
||||||
|
lda $ef, x
|
||||||
|
jsr aslmod
|
||||||
|
sty $ee, x
|
||||||
|
sta $ef, x
|
||||||
|
sty $ec
|
||||||
|
clc
|
||||||
|
adc #>Coordinates1Bit
|
||||||
|
sta $ed
|
||||||
|
ldy #0
|
||||||
|
!byte $24
|
||||||
|
- sec
|
||||||
|
lda ($ec), y
|
||||||
|
pha
|
||||||
|
lda $de, x
|
||||||
|
sta ($ec), y
|
||||||
|
pla
|
||||||
|
sta $de, x
|
||||||
|
inx
|
||||||
|
iny
|
||||||
|
bcc -
|
||||||
|
dex
|
||||||
|
dex
|
||||||
|
dex
|
||||||
|
dex
|
||||||
|
bne --
|
||||||
|
dec $ee
|
||||||
|
bne ---
|
||||||
|
dec $ef
|
||||||
|
bpl ---
|
||||||
|
bmi +++ ; always branches
|
||||||
|
aslmod
|
||||||
|
jsr +
|
||||||
|
+ cmp #$1A
|
||||||
|
bcc +
|
||||||
|
bne ++
|
||||||
|
cpy #$40
|
||||||
|
bcc +
|
||||||
|
++ iny
|
||||||
|
+ pha
|
||||||
|
tya
|
||||||
|
asl
|
||||||
|
tay
|
||||||
|
pla
|
||||||
|
rol
|
||||||
|
cmp #$34
|
||||||
|
bcc +
|
||||||
|
bne ++
|
||||||
|
cpy #$80
|
||||||
|
bcc +
|
||||||
|
++ pha
|
||||||
|
tya
|
||||||
|
sbc #$80
|
||||||
|
tay
|
||||||
|
pla
|
||||||
|
sbc #$34
|
||||||
|
+ rts
|
||||||
|
+++
|
||||||
|
}
|
||||||
|
|
||||||
!macro FX_PRECOMPUTED_1BIT .coords {
|
!macro FX_PRECOMPUTED_1BIT .coords {
|
||||||
+BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi
|
+BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi
|
||||||
+BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror
|
+BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2019 by 4am
|
;(c) 2019-2020 by 4am/qkumba
|
||||||
;
|
;
|
||||||
!cpu 6502
|
!cpu 6502
|
||||||
!to "build/FX/RIPPLE",plain
|
!to "build/FX/RIPPLE",plain
|
||||||
@ -7,8 +7,11 @@
|
|||||||
|
|
||||||
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
||||||
|
|
||||||
+FX_PRECOMPUTED_1BIT Coordinates
|
+FX_INITONCE_1BIT CoordinatesFile, Start
|
||||||
|
+FX_RIPPLE_1BIT
|
||||||
|
Start
|
||||||
|
+FX_PRECOMPUTED_1BIT Coordinates1Bit
|
||||||
|
|
||||||
Coordinates
|
CoordinatesFile
|
||||||
!source "src/fx/fx.hgr.ripple.data.a"
|
!byte 12
|
||||||
!byte $80
|
!text "FX/IRIS.DATA"
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2019 by 4am
|
;(c) 2019-2020 by 4am/qkumba
|
||||||
;
|
;
|
||||||
!cpu 6502
|
!cpu 6502
|
||||||
!to "build/FX/SLOW.STAR",plain
|
!to "build/FX/SLOW.STAR",plain
|
||||||
@ -7,8 +7,10 @@
|
|||||||
|
|
||||||
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
||||||
|
|
||||||
+FX_PRECOMPUTED_1BIT Coordinates
|
+FX_INITONCE_1BIT CoordinatesFile, Start
|
||||||
|
Start
|
||||||
|
+FX_PRECOMPUTED_1BIT Coordinates1Bit
|
||||||
|
|
||||||
Coordinates
|
CoordinatesFile
|
||||||
!source "src/fx/fx.hgr.slow.star.data.a"
|
!byte 17
|
||||||
!byte $80
|
!text "FX/SLOW.STAR.DATA"
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
!cpu 6502
|
||||||
|
!to "build/FX/SLOW.STAR.DATA",plain
|
||||||
|
*=$8800
|
||||||
!byte $30,%00001010
|
!byte $30,%00001010
|
||||||
!byte $30,%00101010
|
!byte $30,%00101010
|
||||||
!byte $30,%11001001
|
!byte $30,%11001001
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2019 by 4am
|
;(c) 2019-2020 by 4am/qkumba
|
||||||
;
|
;
|
||||||
!cpu 6502
|
!cpu 6502
|
||||||
!to "build/FX/SLOW.STAR.IN",plain
|
!to "build/FX/SLOW.STAR.IN",plain
|
||||||
@ -7,8 +7,11 @@
|
|||||||
|
|
||||||
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
||||||
|
|
||||||
+FX_PRECOMPUTED_1BIT Coordinates
|
+FX_INITONCE_1BIT CoordinatesFile, Start
|
||||||
|
+FX_REVERSE_1BIT
|
||||||
|
Start
|
||||||
|
+FX_PRECOMPUTED_1BIT Coordinates1Bit
|
||||||
|
|
||||||
Coordinates
|
CoordinatesFile
|
||||||
!source "src/fx/fx.hgr.slow.star.in.data.a"
|
!byte 17
|
||||||
!byte $80
|
!text "FX/SLOW.STAR.DATA"
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2019 by 4am
|
;(c) 2019-2020 by 4am/qkumba
|
||||||
;
|
;
|
||||||
!cpu 6502
|
!cpu 6502
|
||||||
!to "build/FX/SNOWFLAKE",plain
|
!to "build/FX/SNOWFLAKE",plain
|
||||||
@ -7,8 +7,10 @@
|
|||||||
|
|
||||||
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
||||||
|
|
||||||
+FX_PRECOMPUTED_1BIT Coordinates
|
+FX_INITONCE_1BIT CoordinatesFile, Start
|
||||||
|
Start
|
||||||
|
+FX_PRECOMPUTED_1BIT Coordinates1Bit
|
||||||
|
|
||||||
Coordinates
|
CoordinatesFile
|
||||||
!source "src/fx/fx.hgr.snowflake.data.a"
|
!byte 17
|
||||||
!byte $80
|
!text "FX/SNOWFLAKE.DATA"
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
!cpu 6502
|
||||||
|
!to "build/FX/SNOWFLAKE.DATA",plain
|
||||||
|
*=$8800
|
||||||
!byte $5E,%10110011
|
!byte $5E,%10110011
|
||||||
!byte $5E,%11010011
|
!byte $5E,%11010011
|
||||||
!byte $5C,%01010011
|
!byte $5C,%01010011
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2019 by 4am
|
;(c) 2019-2020 by 4am/qkumba
|
||||||
;
|
;
|
||||||
!cpu 6502
|
!cpu 6502
|
||||||
!to "build/FX/SNOWFLAKE.IN",plain
|
!to "build/FX/SNOWFLAKE.IN",plain
|
||||||
@ -7,8 +7,11 @@
|
|||||||
|
|
||||||
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
||||||
|
|
||||||
+FX_PRECOMPUTED_1BIT Coordinates
|
+FX_INITONCE_1BIT CoordinatesFile, Start
|
||||||
|
+FX_REVERSE_1BIT
|
||||||
|
Start
|
||||||
|
+FX_PRECOMPUTED_1BIT Coordinates1Bit
|
||||||
|
|
||||||
Coordinates
|
CoordinatesFile
|
||||||
!source "src/fx/fx.hgr.snowflake.in.data.a"
|
!byte 17
|
||||||
!byte $80
|
!text "FX/SNOWFLAKE.DATA"
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2019 by 4am
|
;(c) 2019-2020 by 4am/qkumba
|
||||||
;
|
;
|
||||||
!cpu 6502
|
!cpu 6502
|
||||||
!to "build/FX/SNOWFLAKE.RIP",plain
|
!to "build/FX/SNOWFLAKE.RIP",plain
|
||||||
@ -7,8 +7,11 @@
|
|||||||
|
|
||||||
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
!source "src/fx/fx.hgr.precomputed.1bit.a"
|
||||||
|
|
||||||
+FX_PRECOMPUTED_1BIT Coordinates
|
+FX_INITONCE_1BIT CoordinatesFile, Start
|
||||||
|
+FX_RIPPLE_1BIT
|
||||||
|
Start
|
||||||
|
+FX_PRECOMPUTED_1BIT Coordinates1Bit
|
||||||
|
|
||||||
Coordinates
|
CoordinatesFile
|
||||||
!source "src/fx/fx.hgr.snowflake.ripple.data.a"
|
!byte 17
|
||||||
!byte $80
|
!text "FX/SNOWFLAKE.DATA"
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user