wipes: add star wipe

This commit is contained in:
Vince Weaver 2024-12-17 13:36:21 -05:00
parent ecf1f25379
commit c21bbd84e6
9 changed files with 8012 additions and 1 deletions

View File

@ -10,6 +10,7 @@ all: wipes.dsk
wipes.dsk: HELLO \
bubbles/WIPE_BUBBLES \
star/WIPE_STAR \
cascade/WIPE_CASCADE \
center/WIPE_CENTER \
diamond/WIPE_DIAMOND \
@ -21,6 +22,7 @@ wipes.dsk: HELLO \
cp $(EMPTY_DISK)/empty.dsk wipes.dsk
$(DOS33) -y wipes.dsk SAVE A HELLO
$(DOS33) -y wipes.dsk BSAVE -a 0x5700 bubbles/WIPE_BUBBLES
$(DOS33) -y wipes.dsk BSAVE -a 0x1000 star/WIPE_STAR
$(DOS33) -y wipes.dsk BSAVE -a 0x6000 diamond/WIPE_DIAMOND
$(DOS33) -y wipes.dsk BSAVE -a 0x6000 diamond_stripes/WIPE_DIAMOND_STRIPE
$(DOS33) -y wipes.dsk BSAVE -a 0x6000 crystal/WIPE_CRYSTAL
@ -60,6 +62,9 @@ fizzle/WIPE_FIZZLE:
lr/WIPE_LR:
cd lr && make
star/WIPE_STAR:
cd star && make
thin_bar/WIPE_THIN_BAR:
cd thin_bar && make
@ -75,4 +80,5 @@ clean:
cd diamond_stripes && make clean
cd fizzle && make clean
cd lr && make clean
cd star && make clean
cd thin_bar && make clean

View File

@ -319,6 +319,7 @@ ReverseCoordinates1Bit:
bcs -
bcc -- ; always
++ rts
.endif
BuildHGRSparseBitmasks2Bit:
lda #%10000011
@ -353,7 +354,7 @@ BuildHGRSparseBitmasks2Bit:
sta copymasks2bit+$E0
sta mirror_copymasks2bit
rts
.if 0
BuildDHGRSparseBitmasks2Bit:
ldx #$00
txa

View File

@ -0,0 +1,39 @@
include ../../../../Makefile.inc
LINKER_SCRIPTS = ../../../../linker_scripts
ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f
all: WIPE_STAR
###
WIPE_STAR: wipe_star.o
ld65 -o WIPE_STAR wipe_star.o -C $(LINKER_SCRIPTS)/apple2_1000.inc
wipe_star.o: wipe_star.s \
../zp.inc ../hardware.inc ../wait_keypress.s ../zx02_optim.s \
code.hgr.precomputed.2bit.s \
../main_macros.s \
fx.hgr.star.s \
fx.hgr.precomputed.2bit.s \
fx.hgr.star.data \
../fx.lib.s \
../macros.s
ca65 -o wipe_star.o wipe_star.s -l wipe_star.lst
###
star_data.zx02: fx.hgr.star.data
$(ZX02) fx.hgr.star.data star_data.zx02
fx.hgr.star.data: fx.hgr.star.data.o
ld65 -o fx.hgr.star.data fx.hgr.star.data.o -C $(LINKER_SCRIPTS)/apple2_8100.inc
fx.hgr.star.data.o: fx.hgr.star.data.s
ca65 -o fx.hgr.star.data.o fx.hgr.star.data.s -l fx.hgr.star.data.lst
###
clean:
rm -f *~ *.o *.lst *.zx02 HELLO WIPE_STAR fx.hgr.star.data

View File

@ -0,0 +1,64 @@
; !cpu 6502
; !to "build/FXCODE/HGR2",plain
; *=$6200
; !source "src/fx/macros.a"
;HGRPrecomputed2Bit
; jsr iBuildHGRTables
; jsr iBuildHGRMirrorCols
; jsr iBuildHGRSparseBitmasks2Bit
COPY_TO_0 start, end
jmp InputLoop
start:
.org $00
;!pseudopc 0 {
Exit2Bit:
rts
InputLoop:
ldy #0
input=*+1
ldx Coordinates2Bit ; first value: HGR row + 1
beq Exit2Bit ; if 0 then we're done
ROW_X_TO_2BIT_BASE_ADDRESSES src1, src2, dest1, dest2
inc <input
lda (<input), y
HIGH_3_LOW_5 input
; main 2x2 block in left half
src1=*+1
lda $FDFD, y
eor (<dest1), y
and copymasks2bit, x
eor (<dest1), y
dest1=*+1
sta $FDFD, y
src2=*+1
lda $FDFD, y
eor (<dest2), y
and copymasks2bit, x
eor (<dest2), y
dest2=*+1
sta $FDFD, y
; corresponding 2x2 block in right half (same row, opposite column)
lda mirror_cols, y
tay
COPY_BIT src1, dest1, mirror_copymasks2bit
COPY_BIT src2, dest2, mirror_copymasks2bit
inc <input
bne InputLoop
bit KBD
bmi Exit2Bit
inc <input+1
bne InputLoop ; always branches
;}
;.end
.reloc
end:

View File

@ -0,0 +1,46 @@
;license:MIT
;(c) 2019-2024 by 4am
;
;------------------------------------------------------------------------------
; YE OLDE GRAND UNIFIED MEMORY MAP
;
; 0201..02C0 - hgrlo
; 02C1..02E8 - mirror_cols
; 02E9..0300
; 0301..03C0 - hgrhi
; 03C1..03EE
; 6000..61FF - module-specific code ($200 max)
; 6200.. - shared FX code (loaded once by module-specific code)
; 80FE..BD00 - Coordinates2Bit (8100 but dither variants clobber Coordinates2Bit-2)
; BD01..BDA7
; BDA8..BDFF - dithermasks
; BE00..BEFF - copymasks2bit
; BF00..BFFF - ProRWTS glue
;
; !source "src/fx/macros.a"
.include "../macros.s"
;!macro FX_INITONCE_2BIT .FXCodeFile, .CoordinatesFile, .Start {
.macro FX_INITONCE_2BIT FXCodeFile, CoordinatesFile, Start
InitOnce:
bit Start
lda #$4C
sta InitOnce
LDADDR FXCodeFile
ldx #>FXCode
jsr iLoadFXCODE
LDADDR CoordinatesFile
ldx #>Coordinates2Bit
jsr iLoadFXDATA
lda #$00
sta EndCoordinates2Bit
;}
.endmacro

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,46 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
;!cpu 6502
;!to "build/FX.INDEXED/STAR",plain
;*=$6000
; !source "src/fx/fx.hgr.precomputed.2bit.a"
.include "fx.hgr.precomputed.2bit.s"
; +FX_INITONCE_2BIT FXCodeFile, CoordinatesFile, Start
InitOnce:
bit Start
lda #$4C ; jmp
sta InitOnce
; Load fxcode to $6200
; LDADDR FXCodeFile
; ldx #>FXCode
; jsr iLoadFXCODE
; Load co-ordinates file
; LDADDR CoordinatesFile
; ldx #>Coordinates2Bit
; jsr iLoadFXDATA
; ???
lda #$00
sta EndCoordinates2Bit
Start:
; jmp FXCode
.include "code.hgr.precomputed.2bit.s"
;FXCodeFile
; +PSTRING "HGR2"
;CoordinatesFile
; +PSTRING "STAR.DATA"

View File

@ -0,0 +1,114 @@
; test some of the 4cade wipes
.include "../zp.inc"
.include "../hardware.inc"
Coordinates2Bit=$8100
EndCoordinates2Bit = Coordinates2Bit + (origEndCoordinates2Bit-origCoordinates2Bit)
wipe_test:
; jmp after
test_graphic:
; .incbin "../graphics/a2_dating.hgr.zx02"
;.include "../zx02_optim.s"
after:
; from code.hgr.precomputed.2bit
jsr BuildHGRTables
jsr BuildHGRMirrorCols
jsr BuildHGRSparseBitmasks2Bit
bit SET_GR
bit HIRES
bit FULLGR
bit PAGE1
;=================================
; intro
;=================================
; copy data table to $8100
ldx #((>origEndCoordinates2Bit)-(>origCoordinates2Bit))
outer_copy_coords_loop:
ldy #0
copy_coords_loop:
col_smc1:
lda origCoordinates2Bit,Y
col_smc2:
sta Coordinates2Bit,Y
iny
bne copy_coords_loop
inc col_smc1+2
inc col_smc2+2
dex
bpl outer_copy_coords_loop
; lda #<test_graphic
; sta zx_src_l+1
; lda #>test_graphic
; sta zx_src_h+1
; lda #$20
; jsr zx02_full_decomp
; ldy #0
;fake_hgr2:
; lda #$0
; sta $4000,Y
; dey
; bne fake_hgr2
;
; inc fake_hgr2+2
; lda fake_hgr2+2
; cmp #$60
; bne fake_hgr2
jsr HGR2
jsr HGR
bit FULLGR
do_it_again:
oog:
lda #$FF
jsr BKGND0
jsr wait_until_keypress
;=================================
; test wipe...
;=================================
test_loop:
jsr InitOnce
jsr wait_until_keypress
dec oog+1
jmp do_it_again
.include "../wait_keypress.s"
.include "../fx.lib.s"
.include "fx.hgr.star.s"
; possibly some bytes before get chewed on with some effects?
.align $100
origCoordinates2Bit:
.incbin "fx.hgr.star.data"
origEndCoordinates2Bit:

View File

@ -0,0 +1,12 @@
MEMORY {
ZP: start = $00, size = $1A, type = rw;
RAM: start = $8100, size = $3F00, file = %O;
}
SEGMENTS {
CODE: load = RAM, type = ro, align=$100;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
}