From 84a439355c4f9558c2fe07fcc55d37175806173f Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Fri, 14 Jun 2024 10:42:23 -0800 Subject: [PATCH] (neralie) Faster drawing --- gui/neralie/src/neralie.tal | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/gui/neralie/src/neralie.tal b/gui/neralie/src/neralie.tal index 9743459..e4b6dc5 100644 --- a/gui/neralie/src/neralie.tal +++ b/gui/neralie/src/neralie.tal @@ -8,16 +8,13 @@ |000 @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 @mul &ahi $1 &alo $1 &bhi $1 &blo $1 @frame &x1 $2 &x2 $2 &y1 $2 &y2 $2 -( program ) - -|100 @on-reset ( -> ) +|100 +@on-reset ( -> ) ( | theme ) #0f3d .System/r DEO2 #0fe3 .System/g DEO2 @@ -55,8 +52,7 @@ [ LIT2 01 -neralie/color ] STZ - -BRK + BRK @update-fps ( -- ) .fps/next LDZ INC .fps/next STZ @@ -82,7 +78,7 @@ BRK ( | add up hundreds of pulses + 10 x beats, store in n0123 ) ( ) #01a0 [ LIT2 00 -DateTime/hour ] DEI MUL2 ADD2 ( ) #0006 [ LIT2 00 -DateTime/minute ] DEI MUL2 ADD2 .neralie/n0123 STZ2 -JMP2r + JMP2r ( @|drawing ) @@ -114,8 +110,7 @@ JMP2r [ LIT2 00 -neralie/n4 ] LDZ [ LIT2 00 -neralie/n5 ] LDZ ( auto none ) [ LIT2 00 -Screen/auto ] DEO - -JMP2r + JMP2r @ ( index* -- ) #30 SFT2 ;font-numbers ADD2 .Screen/addr DEO2 @@ -123,7 +118,6 @@ JMP2r JMP2r @ ( -- ) - .frame/x2 LDZ2 .frame/x1 LDZ2 DUP2 .neralie/x STZ2 SUB2 .neralie/w STZ2 .frame/y2 LDZ2 .frame/y1 LDZ2 @@ -133,15 +127,21 @@ JMP2r DUP2 /h - /next #0008 .Screen/x DEO2 .neralie/y LDZ2 #0003 SUB2 .Screen/y DEO2 + /next #0008 .Screen/x DEO2 + .neralie/y LDZ2 #0003 SUB2 .Screen/y DEO2 + DUP2 /v #04 ;/spacing STA .frame/y1 LDZ2 #0003 SUB2 .neralie/y LDZ2 .neralie/x LDZ2 #01 ;/spacing STA - /next #0008 .Screen/y DEO2 .neralie/x LDZ2 #0003 SUB2 .Screen/x DEO2 + /next #0008 .Screen/y DEO2 + .neralie/x LDZ2 #0003 SUB2 .Screen/x DEO2 + DUP2 /h - /next .Screen/width DEI2 #0010 SUB2 .Screen/x DEO2 .neralie/y LDZ2 #0003 SUB2 .Screen/y DEO2 + /next .Screen/width DEI2 #0010 SUB2 .Screen/x DEO2 + .neralie/y LDZ2 #0003 SUB2 .Screen/y DEO2 + DUP2 /v /next POP2 DUP2 /h @@ -175,12 +175,12 @@ JMP2r @ ( x1* x2* y* -- ) .Screen/y DEO2 - [ LIT2 -Screen/x -lines/addr ] STZ + .Screen/x ;/port STA ! @ ( y1* y2* x* -- ) .Screen/x DEO2 - [ LIT2 -Screen/y -lines/addr ] STZ + .Screen/y ;/port STA ( >> ) @ ( v1* v2* -- ) @@ -189,7 +189,7 @@ JMP2r &>loop ( -- ) [ LIT2 00 &spacing 01 ] ADD2 DUP2 DUP2r STH2r LTH2 ?{ POP2 POP2r JMP2r } - DUP2 .lines/addr LDZ DEO2 + DUP2 [ LIT &port $1 ] DEO2 .neralie/color LDZ .Screen/pixel DEO !&>loop