(neralie) Faster drawing
This commit is contained in:
parent
395d1c1447
commit
84a439355c
|
@ -8,16 +8,13 @@
|
||||||
|000
|
|000
|
||||||
|
|
||||||
@fps ¤t $1 &next $1 &second $1
|
@fps ¤t $1 &next $1 &second $1
|
||||||
@number &started $1 &count $1
|
|
||||||
@lines &addr $1
|
|
||||||
@neralie &n0123 $2 &n4 $1 &n5 $1 &n6 $1 &n7 $1 &n8 $1 &n9 $1 &color $1 &x $2 &y $2 &w $2 &h $2
|
@neralie &n0123 $2 &n4 $1 &n5 $1 &n6 $1 &n7 $1 &n8 $1 &n9 $1 &color $1 &x $2 &y $2 &w $2 &h $2
|
||||||
@mul &ahi $1 &alo $1 &bhi $1 &blo $1
|
@mul &ahi $1 &alo $1 &bhi $1 &blo $1
|
||||||
@frame &x1 $2 &x2 $2 &y1 $2 &y2 $2
|
@frame &x1 $2 &x2 $2 &y1 $2 &y2 $2
|
||||||
|
|
||||||
( program )
|
|100
|
||||||
|
|
||||||
|100 @on-reset ( -> )
|
|
||||||
|
|
||||||
|
@on-reset ( -> )
|
||||||
( | theme )
|
( | theme )
|
||||||
#0f3d .System/r DEO2
|
#0f3d .System/r DEO2
|
||||||
#0fe3 .System/g DEO2
|
#0fe3 .System/g DEO2
|
||||||
|
@ -55,8 +52,7 @@
|
||||||
[ LIT2 01 -neralie/color ] STZ
|
[ LIT2 01 -neralie/color ] STZ
|
||||||
<draw-date>
|
<draw-date>
|
||||||
<draw-clock>
|
<draw-clock>
|
||||||
|
BRK
|
||||||
BRK
|
|
||||||
|
|
||||||
@update-fps ( -- )
|
@update-fps ( -- )
|
||||||
.fps/next LDZ INC .fps/next STZ
|
.fps/next LDZ INC .fps/next STZ
|
||||||
|
@ -82,7 +78,7 @@ BRK
|
||||||
( | add up hundreds of pulses + 10 x beats, store in n0123 )
|
( | add up hundreds of pulses + 10 x beats, store in n0123 )
|
||||||
( ) #01a0 [ LIT2 00 -DateTime/hour ] DEI MUL2 ADD2
|
( ) #01a0 [ LIT2 00 -DateTime/hour ] DEI MUL2 ADD2
|
||||||
( ) #0006 [ LIT2 00 -DateTime/minute ] DEI MUL2 ADD2 .neralie/n0123 STZ2
|
( ) #0006 [ LIT2 00 -DateTime/minute ] DEI MUL2 ADD2 .neralie/n0123 STZ2
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
(
|
(
|
||||||
@|drawing )
|
@|drawing )
|
||||||
|
@ -114,8 +110,7 @@ JMP2r
|
||||||
[ LIT2 00 -neralie/n4 ] LDZ <draw-digit>
|
[ LIT2 00 -neralie/n4 ] LDZ <draw-digit>
|
||||||
[ LIT2 00 -neralie/n5 ] LDZ <draw-digit>
|
[ LIT2 00 -neralie/n5 ] LDZ <draw-digit>
|
||||||
( auto none ) [ LIT2 00 -Screen/auto ] DEO
|
( auto none ) [ LIT2 00 -Screen/auto ] DEO
|
||||||
|
JMP2r
|
||||||
JMP2r
|
|
||||||
|
|
||||||
@<draw-digit> ( index* -- )
|
@<draw-digit> ( index* -- )
|
||||||
#30 SFT2 ;font-numbers ADD2 .Screen/addr DEO2
|
#30 SFT2 ;font-numbers ADD2 .Screen/addr DEO2
|
||||||
|
@ -123,7 +118,6 @@ JMP2r
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
@<draw-clock> ( -- )
|
@<draw-clock> ( -- )
|
||||||
|
|
||||||
.frame/x2 LDZ2 .frame/x1 LDZ2
|
.frame/x2 LDZ2 .frame/x1 LDZ2
|
||||||
DUP2 .neralie/x STZ2 SUB2 .neralie/w STZ2
|
DUP2 .neralie/x STZ2 SUB2 .neralie/w STZ2
|
||||||
.frame/y2 LDZ2 .frame/y1 LDZ2
|
.frame/y2 LDZ2 .frame/y1 LDZ2
|
||||||
|
@ -133,15 +127,21 @@ JMP2r
|
||||||
|
|
||||||
DUP2 /h
|
DUP2 /h
|
||||||
|
|
||||||
/next #0008 .Screen/x DEO2 .neralie/y LDZ2 #0003 SUB2 .Screen/y DEO2 <draw-digit>
|
/next #0008 .Screen/x DEO2
|
||||||
|
.neralie/y LDZ2 #0003 SUB2 .Screen/y DEO2
|
||||||
|
<draw-digit>
|
||||||
|
|
||||||
DUP2 /v
|
DUP2 /v
|
||||||
#04 ;<draw-line>/spacing STA
|
#04 ;<draw-line>/spacing STA
|
||||||
.frame/y1 LDZ2 #0003 SUB2 .neralie/y LDZ2 .neralie/x LDZ2 <draw-ver>
|
.frame/y1 LDZ2 #0003 SUB2 .neralie/y LDZ2 .neralie/x LDZ2 <draw-ver>
|
||||||
#01 ;<draw-line>/spacing STA
|
#01 ;<draw-line>/spacing STA
|
||||||
/next #0008 .Screen/y DEO2 .neralie/x LDZ2 #0003 SUB2 .Screen/x DEO2 <draw-digit>
|
/next #0008 .Screen/y DEO2
|
||||||
|
.neralie/x LDZ2 #0003 SUB2 .Screen/x DEO2
|
||||||
|
<draw-digit>
|
||||||
DUP2 /h
|
DUP2 /h
|
||||||
/next .Screen/width DEI2 #0010 SUB2 .Screen/x DEO2 .neralie/y LDZ2 #0003 SUB2 .Screen/y DEO2 <draw-digit>
|
/next .Screen/width DEI2 #0010 SUB2 .Screen/x DEO2
|
||||||
|
.neralie/y LDZ2 #0003 SUB2 .Screen/y DEO2
|
||||||
|
<draw-digit>
|
||||||
DUP2 /v
|
DUP2 /v
|
||||||
/next POP2
|
/next POP2
|
||||||
DUP2 /h
|
DUP2 /h
|
||||||
|
@ -175,12 +175,12 @@ JMP2r
|
||||||
|
|
||||||
@<draw-hor> ( x1* x2* y* -- )
|
@<draw-hor> ( x1* x2* y* -- )
|
||||||
.Screen/y DEO2
|
.Screen/y DEO2
|
||||||
[ LIT2 -Screen/x -lines/addr ] STZ
|
.Screen/x ;<draw-line>/port STA
|
||||||
!<draw-line>
|
!<draw-line>
|
||||||
|
|
||||||
@<draw-ver> ( y1* y2* x* -- )
|
@<draw-ver> ( y1* y2* x* -- )
|
||||||
.Screen/x DEO2
|
.Screen/x DEO2
|
||||||
[ LIT2 -Screen/y -lines/addr ] STZ
|
.Screen/y ;<draw-line>/port STA
|
||||||
( >> )
|
( >> )
|
||||||
|
|
||||||
@<draw-line> ( v1* v2* -- )
|
@<draw-line> ( v1* v2* -- )
|
||||||
|
@ -189,7 +189,7 @@ JMP2r
|
||||||
&>loop ( -- )
|
&>loop ( -- )
|
||||||
[ LIT2 00 &spacing 01 ] ADD2
|
[ LIT2 00 &spacing 01 ] ADD2
|
||||||
DUP2 DUP2r STH2r LTH2 ?{ POP2 POP2r JMP2r }
|
DUP2 DUP2r STH2r LTH2 ?{ POP2 POP2r JMP2r }
|
||||||
DUP2 .lines/addr LDZ DEO2
|
DUP2 [ LIT &port $1 ] DEO2
|
||||||
.neralie/color LDZ .Screen/pixel DEO
|
.neralie/color LDZ .Screen/pixel DEO
|
||||||
!&>loop
|
!&>loop
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue