mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-03 18:29:53 +00:00
lovebyte2024: work on plasma
This commit is contained in:
parent
e4b2215288
commit
8a504fb5c8
@ -1,32 +0,0 @@
|
||||
include ../../../Makefile.inc
|
||||
|
||||
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||
LINKERSCRIPTS = ../../../linker_scripts
|
||||
EMPTYDISK = ../../../empty_disk/empty.dsk
|
||||
|
||||
all: plasmag.dsk
|
||||
|
||||
plasmag.dsk: HELLO PLASMAG_TINY
|
||||
cp $(EMPTYDISK) plasmag.dsk
|
||||
$(DOS33) -y plasmag.dsk SAVE A HELLO
|
||||
$(DOS33) -y plasmag.dsk BSAVE -a 0x4000 PLASMAG_TINY
|
||||
|
||||
###
|
||||
|
||||
HELLO: hello.bas
|
||||
$(TOKENIZE) < hello.bas > HELLO
|
||||
|
||||
###
|
||||
|
||||
PLASMAG_TINY: plasmag_tiny.o
|
||||
ld65 -o PLASMAG_TINY plasmag_tiny.o -C $(LINKERSCRIPTS)/apple2_4000.inc
|
||||
|
||||
plasmag_tiny.o: plasmag_tiny.s gr_gbascalc.s make_tables.s \
|
||||
graphics/dsr_big.gr.zx02
|
||||
ca65 -o plasmag_tiny.o plasmag_tiny.s -l plasmag_tiny.lst
|
||||
|
||||
###
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst HELLO PLASMAG_TINY
|
@ -1,20 +0,0 @@
|
||||
include ../../../../Makefile.inc
|
||||
|
||||
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
|
||||
PNG2GR = ../../../../utils/gr-utils/png2gr
|
||||
|
||||
all: dsr_big.gr.zx02
|
||||
|
||||
|
||||
####
|
||||
|
||||
dsr_big.gr: dsr_big.png
|
||||
$(PNG2GR) dsr_big.png dsr_big.gr
|
||||
|
||||
dsr_big.gr.zx02: dsr_big.gr
|
||||
$(ZX02) dsr_big.gr dsr_big.gr.zx02
|
||||
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -f *~
|
@ -1,2 +0,0 @@
|
||||
5 HOME
|
||||
10 PRINT CHR$(4)"BRUN PLASMAG_TINY"
|
1
demos/lovebyte2024/plasma_mask_1k/LICENSE
Normal file
1
demos/lovebyte2024/plasma_mask_1k/LICENSE
Normal file
@ -0,0 +1 @@
|
||||
The core plasma code was released by FrenchTouch as GPLv3
|
32
demos/lovebyte2024/plasma_mask_1k/Makefile
Normal file
32
demos/lovebyte2024/plasma_mask_1k/Makefile
Normal file
@ -0,0 +1,32 @@
|
||||
include ../../../Makefile.inc
|
||||
|
||||
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||
LINKERSCRIPTS = ../../../linker_scripts
|
||||
EMPTYDISK = ../../../empty_disk/empty.dsk
|
||||
|
||||
all: plasma_mask.dsk
|
||||
|
||||
plasma_mask.dsk: HELLO PLASMA_MASK
|
||||
cp $(EMPTYDISK) plasma_mask.dsk
|
||||
$(DOS33) -y plasma_mask.dsk SAVE A HELLO
|
||||
$(DOS33) -y plasma_mask.dsk BSAVE -a 0x4000 PLASMA_MASK
|
||||
|
||||
###
|
||||
|
||||
HELLO: hello.bas
|
||||
$(TOKENIZE) < hello.bas > HELLO
|
||||
|
||||
###
|
||||
|
||||
PLASMA_MASK: plasma_mask.o
|
||||
ld65 -o PLASMA_MASK plasma_mask.o -C $(LINKERSCRIPTS)/apple2_4000.inc
|
||||
|
||||
plasma_mask.o: plasma_mask.s gr_gbascalc.s make_tables.s \
|
||||
graphics/dsr_big.gr.zx02
|
||||
ca65 -o plasma_mask.o plasma_mask.s -l plasma_mask.lst
|
||||
|
||||
###
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst HELLO PLASMA_MASK
|
@ -2,3 +2,5 @@ optimize music code:
|
||||
+ depending on alignment can hard-code the high value for track0/track1
|
||||
+ check the frequencies, high freq might always be 0
|
||||
|
||||
optimize other:
|
||||
+ can hardcode zx if only use it once?
|
10
demos/lovebyte2024/plasma_mask_1k/file_id.diz
Normal file
10
demos/lovebyte2024/plasma_mask_1k/file_id.diz
Normal file
@ -0,0 +1,10 @@
|
||||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-
|
||||
Spiraling Shape
|
||||
--------------------------------------
|
||||
Hi-res Xdraw Pattern
|
||||
with Sound!
|
||||
by Deater / dSr
|
||||
|
||||
31-byte Intro for Apple II
|
||||
Lovebyte 2024
|
||||
--------------------------------------
|
47
demos/lovebyte2024/plasma_mask_1k/graphics/Makefile
Normal file
47
demos/lovebyte2024/plasma_mask_1k/graphics/Makefile
Normal file
@ -0,0 +1,47 @@
|
||||
include ../../../../Makefile.inc
|
||||
|
||||
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
|
||||
PNG2GR = ../../../../utils/gr-utils/png2gr
|
||||
|
||||
all: dsr_big.gr.zx02 dsr_big2.gr.zx02 dsr_small.gr.zx02 dsr_empty.gr.zx02
|
||||
|
||||
|
||||
####
|
||||
|
||||
dsr_big.gr: dsr_big.png
|
||||
$(PNG2GR) dsr_big.png dsr_big.gr
|
||||
|
||||
dsr_big.gr.zx02: dsr_big.gr
|
||||
$(ZX02) dsr_big.gr dsr_big.gr.zx02
|
||||
|
||||
####
|
||||
|
||||
dsr_small.gr: dsr_small.png
|
||||
$(PNG2GR) dsr_small.png dsr_small.gr
|
||||
|
||||
dsr_small.gr.zx02: dsr_small.gr
|
||||
$(ZX02) dsr_small.gr dsr_small.gr.zx02
|
||||
|
||||
|
||||
####
|
||||
|
||||
dsr_big2.gr: dsr_big2.png
|
||||
$(PNG2GR) dsr_big2.png dsr_big2.gr
|
||||
|
||||
dsr_big2.gr.zx02: dsr_big2.gr
|
||||
$(ZX02) dsr_big2.gr dsr_big2.gr.zx02
|
||||
|
||||
####
|
||||
|
||||
dsr_empty.gr: dsr_empty.png
|
||||
$(PNG2GR) dsr_empty.png dsr_empty.gr
|
||||
|
||||
dsr_empty.gr.zx02: dsr_empty.gr
|
||||
$(ZX02) dsr_empty.gr dsr_empty.gr.zx02
|
||||
|
||||
|
||||
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -f *~
|
Before Width: | Height: | Size: 680 B After Width: | Height: | Size: 680 B |
BIN
demos/lovebyte2024/plasma_mask_1k/graphics/dsr_big2.png
Normal file
BIN
demos/lovebyte2024/plasma_mask_1k/graphics/dsr_big2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 668 B |
BIN
demos/lovebyte2024/plasma_mask_1k/graphics/dsr_empty.png
Normal file
BIN
demos/lovebyte2024/plasma_mask_1k/graphics/dsr_empty.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 638 B |
BIN
demos/lovebyte2024/plasma_mask_1k/graphics/dsr_small.png
Normal file
BIN
demos/lovebyte2024/plasma_mask_1k/graphics/dsr_small.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 677 B |
@ -22,22 +22,12 @@ LORES = $C056 ; Enable LORES graphics
|
||||
HIRES = $C057 ; Enable HIRES graphics
|
||||
AN3 = $C05E ; Annunciator 3
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PADDLE_BUTTON0 = $C061
|
||||
PADDLE_BUTTON1 = $C062
|
||||
PADDL0 = $C064
|
||||
PTRIG = $C070
|
||||
|
||||
;; BASIC ROUTINES
|
||||
; BASIC ROUTINES
|
||||
|
||||
NORMAL = $F273
|
||||
HGR = $F3E2
|
||||
|
||||
;; MONITOR ROUTINES
|
||||
; MONITOR ROUTINES
|
||||
|
||||
PLOT = $F800 ;; PLOT AT Y,A
|
||||
PLOT1 = $F80E ;; PLOT at (GBASL),Y (need MASK to be $0f or $f0)
|
||||
@ -66,38 +56,3 @@ COUT1 = $FDF0 ;; output A to screen
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
COLOR_BLACK = 0
|
||||
COLOR_RED = 1
|
||||
COLOR_DARKBLUE = 2
|
||||
COLOR_PURPLE = 3
|
||||
COLOR_DARKGREEN = 4
|
||||
COLOR_GREY = 5
|
||||
COLOR_MEDIUMBLUE = 6
|
||||
COLOR_LIGHTBLUE = 7
|
||||
COLOR_BROWN = 8
|
||||
COLOR_ORANGE = 9
|
||||
COLOR_GREY2 = 10
|
||||
COLOR_PINK = 11
|
||||
COLOR_LIGHTGREEN = 12
|
||||
COLOR_YELLOW = 13
|
||||
COLOR_AQUA = 14
|
||||
COLOR_WHITE = 15
|
||||
|
||||
COLOR_BOTH_BLACK = $00
|
||||
COLOR_BOTH_RED = $11
|
||||
COLOR_BOTH_DARKBLUE = $22
|
||||
COLOR_BOTH_DARKGREEN = $44
|
||||
COLOR_BOTH_GREY = $55
|
||||
COLOR_BOTH_MEDIUMBLUE = $66
|
||||
COLOR_BOTH_LIGHTBLUE = $77
|
||||
COLOR_BOTH_BROWN = $88
|
||||
COLOR_BOTH_ORANGE = $99
|
||||
COLOR_BOTH_PINK = $BB
|
||||
COLOR_BOTH_LIGHTGREEN = $CC
|
||||
COLOR_BOTH_YELLOW = $DD
|
||||
COLOR_BOTH_AQUA = $EE
|
||||
COLOR_BOTH_WHITE = $FF
|
||||
|
10
demos/lovebyte2024/plasma_mask_1k/hello.bas
Normal file
10
demos/lovebyte2024/plasma_mask_1k/hello.bas
Normal file
@ -0,0 +1,10 @@
|
||||
5 HOME
|
||||
10 PRINT " -= PLASMA MASK -- 1K =-"
|
||||
12 PRINT " -------------------"
|
||||
13 PRINT " BY: DEATER/DSR"
|
||||
14 PRINT " LOVEBYTE 2024"
|
||||
20 PRINT CHR$(4)"CATALOG"
|
||||
25 PRINT:PRINT "PRESS ANY KEY TO 'BRUN PLASMA_MASK'"
|
||||
30 GET A$
|
||||
35 PRINT
|
||||
40 PRINT CHR$(4)"BRUN PLASMA_MASK"
|
@ -1,39 +1,40 @@
|
||||
; Plasma Tiny
|
||||
; Plasma Mask
|
||||
|
||||
; originally based on Plasmagoria code by French Touch
|
||||
; for Lovebyte 2024
|
||||
|
||||
; trying to see how small I can get it
|
||||
; by Vince `deater` Weaver / Dsr
|
||||
|
||||
; originally based on Plasmagoria (GPL3) code by French Touch
|
||||
|
||||
; note can use $F000 (or similar) for color lookup to get passable
|
||||
; effect on fewer bytes
|
||||
|
||||
; 347 bytes -- initial with FAC
|
||||
; 343 bytes -- optimize init
|
||||
; 340 bytes -- move Table1 + Table2 to zero page
|
||||
; 331 bytes -- init not necessary
|
||||
; 319 bytes -- inline precalc + display + init lores colors
|
||||
; 316 bytes -- fallthrough in make_tiny
|
||||
|
||||
.include "hardware.inc"
|
||||
.include "zp.inc"
|
||||
|
||||
;Table1 = $8000
|
||||
;Table2 = $8000+64
|
||||
|
||||
|
||||
lores_colors_fine=$8100
|
||||
|
||||
;======================================
|
||||
; start of code
|
||||
;======================================
|
||||
|
||||
plasma_tiny:
|
||||
plasma_mask:
|
||||
|
||||
jsr HGR ; have table gen appear on hgr page1
|
||||
bit FULLGR
|
||||
|
||||
|
||||
|
||||
ldx #0
|
||||
load_graphics_loop:
|
||||
lda graphics_src_l,X
|
||||
sta zx_src_l+1
|
||||
lda graphics_src_h,X
|
||||
sta zx_src_h+1
|
||||
lda graphics_loc,X
|
||||
stx XSAVE
|
||||
jsr zx02_full_decomp
|
||||
ldx XSAVE
|
||||
inx
|
||||
cpx #4
|
||||
bne load_graphics_loop
|
||||
|
||||
;=================
|
||||
; init music
|
||||
@ -42,7 +43,7 @@ plasma_tiny:
|
||||
sta FRAME
|
||||
sta WHICH_TRACK
|
||||
|
||||
;===================
|
||||
;===================
|
||||
; music Player Setup
|
||||
|
||||
tracker_song = peasant_song
|
||||
@ -57,7 +58,7 @@ tracker_song = peasant_song
|
||||
|
||||
cli ; start music
|
||||
|
||||
jsr make_tables
|
||||
; jsr make_tables
|
||||
|
||||
bit LORES ; set lo-res
|
||||
|
||||
@ -96,19 +97,13 @@ done_init_lores_colors:
|
||||
do_plasma:
|
||||
; init
|
||||
|
||||
; lda #02
|
||||
; ldx #5
|
||||
;init_loop:
|
||||
; sta COMPT1,X
|
||||
; dex
|
||||
; bne init_loop
|
||||
|
||||
BP3:
|
||||
|
||||
; ============================================================================
|
||||
; Precalculate some values (inlined)
|
||||
; ROUTINES PRE CALCUL
|
||||
; ============================================================================
|
||||
|
||||
precalc:
|
||||
lda PARAM1 ; self modify various parts
|
||||
sta pc_off1+1
|
||||
@ -151,11 +146,8 @@ pc_off4:
|
||||
|
||||
; ============================================================================
|
||||
; Display Routines
|
||||
; ROUTINES AFFICHAGES
|
||||
; ============================================================================
|
||||
|
||||
; Display "Normal"
|
||||
; AFFICHAGE "NORMAL"
|
||||
|
||||
display_normal:
|
||||
|
||||
@ -166,6 +158,20 @@ display_line_loop:
|
||||
txa
|
||||
jsr GBASCALC
|
||||
|
||||
; set up pointer for mask
|
||||
|
||||
ldy WHICH_TRACK ; CURRENT_EFFECT
|
||||
|
||||
lda GBASL
|
||||
sta INL
|
||||
lda GBASH
|
||||
|
||||
clc
|
||||
adc graphics_loc,Y
|
||||
sec ; blurgh
|
||||
sbc #4 ;
|
||||
sta INH
|
||||
|
||||
ldy #39 ; col 0-39
|
||||
|
||||
lda Table2,X ; setup base sine value for row
|
||||
@ -174,6 +180,10 @@ display_col_loop:
|
||||
lda Table1,Y ; load in column sine value
|
||||
display_row_sin_smc:
|
||||
adc #00 ; add in row value
|
||||
|
||||
; MASKING happens HERE
|
||||
and (INL),Y
|
||||
|
||||
sta display_lookup_smc+1 ; patch in low byte of lookup
|
||||
display_lookup_smc:
|
||||
lda lores_colors_fine ; attention: must be aligned
|
||||
@ -197,20 +207,51 @@ display_lookup_smc:
|
||||
|
||||
|
||||
|
||||
;lores_colors_lookup = $F000
|
||||
|
||||
lores_colors_lookup:
|
||||
.byte $00,$88,$55,$99,$ff,$bb,$33,$22,$66,$77,$44,$cc,$ee,$dd,$99,$11
|
||||
|
||||
|
||||
.include "make_tables.s"
|
||||
;.include "make_tables.s"
|
||||
|
||||
|
||||
.include "interrupt_handler.s"
|
||||
.include "mockingboard_constants.s"
|
||||
|
||||
.include "zx02_optim.s"
|
||||
|
||||
|
||||
graphics_src_l:
|
||||
.byte <dsr_empty,<dsr_small,<dsr_big,<dsr_big2
|
||||
graphics_src_h:
|
||||
.byte >dsr_empty,>dsr_small,>dsr_big,>dsr_big2
|
||||
|
||||
graphics_loc:
|
||||
.byte $A0,$A4,$A8,$AC
|
||||
|
||||
; graphics
|
||||
dsr_big:
|
||||
.incbin "graphics/dsr_big.gr.zx02"
|
||||
dsr_big2:
|
||||
.incbin "graphics/dsr_big2.gr.zx02"
|
||||
dsr_small:
|
||||
.incbin "graphics/dsr_small.gr.zx02"
|
||||
dsr_empty:
|
||||
.incbin "graphics/dsr_empty.gr.zx02"
|
||||
|
||||
; music
|
||||
.include "mA2E_2.s"
|
||||
|
||||
|
||||
|
||||
;sin1 = $2000
|
||||
;sin2 = $2100
|
||||
;sin3 = $2200
|
||||
save = $2300
|
||||
|
||||
.align $100
|
||||
sin1:
|
||||
.incbin "precalc/tables"
|
||||
sin2=sin1+$100
|
||||
sin3=sin1+$200
|
BIN
demos/lovebyte2024/plasma_mask_1k/precalc/tables
Normal file
BIN
demos/lovebyte2024/plasma_mask_1k/precalc/tables
Normal file
Binary file not shown.
@ -37,18 +37,20 @@ REGISTER = $85
|
||||
A_COUNTDOWN = $86
|
||||
B_COUNTDOWN = $87
|
||||
|
||||
Table1 = $A0 ; 40 bytes ($28)
|
||||
Table2 = $D0 ; 40 bytes ($28)
|
||||
Table1 = $A0 ; 40 bytes ($28) A0-C7
|
||||
Table2 = $C8 ; 40 bytes ($28) C8-EF
|
||||
|
||||
OUR_ROT = $A5
|
||||
;OUR_ROT = $A5
|
||||
;HGR_X = $E0
|
||||
;HGR_XH = $E1
|
||||
;HGR_Y = $E2
|
||||
;HGR_COLOR = $E4
|
||||
;HGR_PAGE = $E6
|
||||
;HGR_SCALE = $E7
|
||||
|
||||
HGR_X = $E0
|
||||
HGR_XH = $E1
|
||||
HGR_Y = $E2
|
||||
HGR_COLOR = $E4
|
||||
HGR_PAGE = $E6
|
||||
HGR_SCALE = $E7
|
||||
|
||||
COUNT = $FB
|
||||
FRAME = $FC
|
||||
WHICH_TRACK = $FD
|
||||
XSAVE = $FA
|
||||
COUNT = $FB
|
||||
FRAME = $FC
|
||||
WHICH_TRACK = $FD
|
||||
INL = $FE
|
||||
INH = $FF
|
Loading…
Reference in New Issue
Block a user