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

This commit is contained in:
4am 2020-11-12 23:26:15 -05:00
parent 31c4f73ae6
commit 579577d66f
31 changed files with 187 additions and 53839 deletions

View File

@ -25,7 +25,7 @@ CADIUS=cadius
# https://bitbucket.org/magli143/exomizer/wiki/Home
EXOMIZER=exomizer mem -q -P23 -lnone
dsk: md asm
dsk: asm
cp res/blank.hdv build/"$(DISK)" >>build/log
cp res/_FileInformation.txt build/ >>build/log
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/LAUNCHER.SYSTEM" >>build/log
@ -56,17 +56,19 @@ dsk: md asm
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/GAMEHELP" "build/GAMEHELP" >>build/log
bin/changebootloader.sh build/"$(DISK)" res/proboothd
asm: md asmlauncher asmfx asmprelaunch
asm: asmlauncher asmfx asmprelaunch
asmlauncher:
asmlauncher: md
$(ACME) -DBUILDNUMBER=`git rev-list --count HEAD` src/4cade.a 2>build/relbase.log
$(ACME) -r build/4cade.lst -DBUILDNUMBER=`git rev-list --count HEAD` -DRELBASE=`cat build/relbase.log | grep "RELBASE =" | cut -d"=" -f2 | cut -d"(" -f2 | cut -d")" -f1` src/4cade.a
asmfx:
asmfx: md
touch build/log
for f in src/fx/*.a; do grep "^\!to" $${f} >/dev/null && $(ACME) $${f} >> build/log || true; done
bin/buildfileinfo.sh build/FX "06" "6000" >>build/log
asmprelaunch:
asmprelaunch: md
touch build/log
for f in src/prelaunch/*.a; do grep "^\!to" $${f} >/dev/null && $(ACME) $${f} >> build/log; done
for f in res/TITLE.HGR/* res/TITLE.DHGR/*; do rsync --ignore-existing build/PRELAUNCH/STANDARD build/PRELAUNCH/$$(basename $$f); done

View File

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

View File

@ -1,3 +1,6 @@
!cpu 6502
!to "build/FX/BUTTERFLY.DATA",plain
*=$8100
!byte $5F,%11110011
!byte $61,%11110011
!byte $5D,%11110011

View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2019 by 4am
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/BUTTERFLY.IN",plain
@ -7,8 +7,11 @@
!source "src/fx/fx.hgr.precomputed.2bit.a"
+FX_PRECOMPUTED_2BIT Coordinates
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
Start
+FX_PRECOMPUTED_2BIT Coordinates2Bit
Coordinates
!source "src/fx/fx.hgr.butterfly.in.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",plain
@ -7,8 +7,10 @@
!source "src/fx/fx.hgr.precomputed.2bit.a"
+FX_PRECOMPUTED_2BIT Coordinates
+FX_INITONCE_2BIT CoordinatesFile, Start
Start
+FX_PRECOMPUTED_2BIT Coordinates2Bit
Coordinates
!source "src/fx/fx.hgr.heart.data.a"
!byte $00
CoordinatesFile
!byte 13
!text "FX/HEART.DATA"

View File

@ -1,3 +1,6 @@
!cpu 6502
!to "build/FX/HEART.DATA",plain
*=$8100
!byte $5F,%11110011
!byte $5D,%11110011
!byte $61,%11110011

View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2019 by 4am
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/HEART.IN",plain
@ -7,8 +7,11 @@
!source "src/fx/fx.hgr.precomputed.2bit.a"
+FX_PRECOMPUTED_2BIT Coordinates
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
Start
+FX_PRECOMPUTED_2BIT Coordinates2Bit
Coordinates
!source "src/fx/fx.hgr.heart.in.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",plain
@ -7,8 +7,10 @@
!source "src/fx/fx.hgr.precomputed.2bit.a"
+FX_PRECOMPUTED_2BIT Coordinates
+FX_INITONCE_2BIT CoordinatesFile, Start
Start
+FX_PRECOMPUTED_2BIT Coordinates2Bit
Coordinates
!source "src/fx/fx.hgr.maple.data.a"
!byte $00
CoordinatesFile
!byte 13
!text "FX/MAPLE.DATA"

View File

@ -1,3 +1,6 @@
!cpu 6502
!to "build/FX/MAPLE.DATA",plain
*=$8100
!byte $61,%11110011
!byte $5F,%11010011
!byte $61,%10110011

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -8,6 +8,7 @@ hgrlomirror = $BD40 ; $C0 bytes
mirror_cols = $BE00 ; $28 bytes
hgr1hi = $BE40 ; $C0 bytes
hgr1himirror = $BF40 ; $C0 bytes
Coordinates2Bit= $8100 ; $3C01 bytes ($3C00 on disk + 1 byte as EOF)
!source "src/fx/macros.a"
@ -82,6 +83,57 @@ hgr1himirror = $BF40 ; $C0 bytes
tay
}
!macro FX_INITONCE_2BIT .CoordinatesFile, .Start {
InitOnce
bit .Start
lda #$4C
sta InitOnce
+READ_RAM2_WRITE_RAM2
+LOAD_FILE_AT .CoordinatesFile, Coordinates2Bit
+READ_RAM1_WRITE_RAM1
lda #$00
sta Coordinates2Bit + $3C00
}
!macro FX_REVERSE_2BIT {
ldy #0 ; <Coordinates2Bit
sty $f0
lda #>Coordinates2Bit
sta $f1
lda #<(Coordinates2Bit + $3C00 - 2)
sta $f2
lda #>(Coordinates2Bit + $3C00 - 2)
sta $f3
ldx #$1E ; #$3C/2
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
dex
beq ++
+ lda $f2
bne +
dec $f3
+ dec $f2
bcs -
bcc -- ; always branches
++
}
!macro FX_PRECOMPUTED_2BIT .coords {
+BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi
+BUILD_MIRROR_COLS mirror_cols
@ -91,9 +143,7 @@ hgr1himirror = $BF40 ; $C0 bytes
sta $0, x
dex
bpl -
lda #0
pha
pha
jmp $1
start
!pseudopc 0 {
Exit2Bit rts

View File

@ -133,7 +133,7 @@ InitOnce
lda #>(Coordinates3Bit + $5000 - 2)
sta $f3
ldx #$28
ldx #$28 ; #$50/2
clc
!byte $24
- sec

View File

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

View File

@ -1,3 +1,6 @@
!cpu 6502
!to "build/FX/SOFT.IRIS.DATA",plain
*=$8100
!byte $5F,%11110011
!byte $5D,%11110011
!byte $61,%11110011

View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2019 by 4am
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/SOFT.IRIS.IN",plain
@ -7,8 +7,11 @@
!source "src/fx/fx.hgr.precomputed.2bit.a"
+FX_PRECOMPUTED_2BIT Coordinates
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
Start
+FX_PRECOMPUTED_2BIT Coordinates2Bit
Coordinates
!source "src/fx/fx.hgr.soft.iris.in.data.a"
!byte $00
CoordinatesFile
!byte 17
!text "FX/SOFT.IRIS.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/STAR",plain
@ -7,8 +7,10 @@
!source "src/fx/fx.hgr.precomputed.2bit.a"
+FX_PRECOMPUTED_2BIT Coordinates
+FX_INITONCE_2BIT CoordinatesFile, Start
Start
+FX_PRECOMPUTED_2BIT Coordinates2Bit
Coordinates
!source "src/fx/fx.hgr.star.data.a"
!byte $00
CoordinatesFile
!byte 12
!text "FX/STAR.DATA"

View File

@ -1,3 +1,6 @@
!cpu 6502
!to "build/FX/STAR.DATA",plain
*=$8100
!byte $5F,%11110011
!byte $61,%11110011
!byte $5F,%11010011

View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2019 by 4am
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/STAR.IN",plain
@ -7,8 +7,11 @@
!source "src/fx/fx.hgr.precomputed.2bit.a"
+FX_PRECOMPUTED_2BIT Coordinates
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
Start
+FX_PRECOMPUTED_2BIT Coordinates2Bit
Coordinates
!source "src/fx/fx.hgr.star.in.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.IRIS",plain
@ -7,8 +7,10 @@
!source "src/fx/fx.hgr.precomputed.2bit.a"
+FX_PRECOMPUTED_2BIT Coordinates
+FX_INITONCE_2BIT CoordinatesFile, Start
Start
+FX_PRECOMPUTED_2BIT Coordinates2Bit
Coordinates
!source "src/fx/fx.hgr.wavy.iris.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.IRIS.BLOOM",plain
@ -7,8 +7,10 @@
!source "src/fx/fx.hgr.precomputed.2bit.a"
+FX_PRECOMPUTED_2BIT Coordinates
+FX_INITONCE_2BIT CoordinatesFile, Start
Start
+FX_PRECOMPUTED_2BIT Coordinates2Bit
Coordinates
!source "src/fx/fx.hgr.wavy.iris.bloom.data.a"
!byte $00
CoordinatesFile
!byte 18
!text "FX/W.IR.BLOOM.DATA"

View File

@ -1,3 +1,6 @@
!cpu 6502
!to "build/FX/W.IR.BLOOM.DATA",plain
*=$8100
!byte $5F,%11110011
!byte $61,%11110011
!byte $5D,%11110011

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,6 @@
!cpu 6502
!to "build/FX/WAVY.IRIS.DATA",plain
*=$8100
!byte $5F,%11110011
!byte $61,%11110011
!byte $5D,%11110011

View File

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

File diff suppressed because it is too large Load Diff