~rabbits/zombie

b859ce7c9dbbb0da20f6a5951f705d0ff4e4e949 — Devine Lu Linvega 1 year, 9 months ago d60164b
Draw waveform
3 files changed, 65 insertions(+), 12 deletions(-)

A etc/akwf.pcm
M src/assets.tal
M src/main.tal
A etc/akwf.pcm => etc/akwf.pcm +1 -0
@@ 0,0 1,1 @@
���������������������������������������������������˿������������������޴��������������������������������������������~~woqpleidx�������~}~~}}|}{z{{{~}}wrsssqssokmknoqoptsttuturrpsj^]aA+0/)!'&%%(''+-,-.///47666666;@>?@CABDGFGFDDDFFGFKQQP^mjljiihorqrnhjg
\ No newline at end of file

M src/assets.tal => src/assets.tal +2 -0
@@ 15,6 15,8 @@
    aa55 aa55 aa55 aa55
@fill-icn
    ffff ffff ffff ffff
@line-icn
	00aa 0000 0000 0000
@knob-icns
	0003 0c10 2020 4040
	00c0 3008 0404 0202

M src/main.tal => src/main.tal +62 -12
@@ 80,8 80,6 @@

BRK

@left-txt "bytes 20 "left. 0a $1

(
@|vectors )



@@ 670,18 668,18 @@ JMP2r
	#0050 #00f8 #02 ;draw-knob JSR2
	#0060 #00f8 #07 ;draw-knob JSR2

	( loop )
	#0078 .Screen/x DEO2 
	#0100 .Screen/y DEO2
	#00 ;draw-flip JSR2

	( bal )
	#0090 .Screen/x DEO2 
	#0078 .Screen/x DEO2 
	#00f0 .Screen/y DEO2
	;bal-txt ;draw-str JSR2 POP2

	#0090 #00f8 #08 ;draw-knob JSR2
	#00a0 #00f8 #08 ;draw-knob JSR2
	#0078 #00f8 #08 ;draw-knob JSR2
	#0088 #00f8 #08 ;draw-knob JSR2

	( waveform )
	#00b0 .Screen/x DEO2 
	#00f0 .Screen/y DEO2
	;song/ch1 #00 .sel/chan LDZ #10 SFT ADD2 LDA2 #0100 #0002 ;draw-waveform JSR2

JMP2r
	&channels


@@ 690,8 688,53 @@ JMP2r
		"CH2 $1
		"CH3 $1

@env-txt "ENV $1
@bal-txt "BAL $1
@draw-waveform ( addr* length* zoom* -- )

	.Screen/x DEI2 ,&x STR2
	.Screen/y DEI2 ,&y STR2

	( draw bg )
	#f2 .Screen/auto DEO
	;fill-icn .Screen/addr DEO2
	#02 .Screen/sprite DEOk DEOk DEOk DEO

	.Screen/y DEI2k #0020 SUB2 ROT DEO2

	( draw mid )
	.Screen/y DEI2k #000f ADD2 ROT DEO2
	#10 #0f ;draw-dotted JSR2

	( draw wav )
	,&zoom STR2
	#01 .Screen/auto DEO
	LITr 00
	ADD2k NIP2 SWP2
	&loop
		LDAk #00 SWP #03 SFT2 [ LIT2 &y $2 ] ADD2 .Screen/y DEO2
		#05 .Screen/pixel DEO
		INCr STHkr #00 EQU ,&end JCN
		[ LIT2 &zoom $2 ] ADD2 GTH2k ,&loop JCN
	&end
	POP2 POP2
	POPr

	( rewind )
	[ LIT2 &x $2 ] .Screen/x DEO2
	,&y LDR2 #0048 ADD2 .Screen/y DEO2

JMP2r

@draw-dotted ( w color -- )

	.Screen/x DEI2 SWP2
	,&color STR
	#01 .Screen/auto DEO
	;line-icn .Screen/addr DEO2
	#00 &l [ LIT &color 0a ] .Screen/sprite DEO INC GTHk ,&l JCN POP2
	.Screen/x DEO2

JMP2r


@update-cursor ( color addr* -- )



@@ 799,6 842,13 @@ JMP2r
JMP2r

(
@|strings )

@left-txt "bytes 20 "left. 0a $1
@env-txt "ENV $1
@bal-txt "BAL $1

(
@|tables )

@note-pos