From 7180744cbfd7d50b86012301a1893d473232658f Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 25 Aug 2024 20:14:00 -0700 Subject: [PATCH] (m291) Starting UI --- gui/m291/src/m291.tal | 51 +++++++++++++++++++++++++++++++++++++++++- gui/m291/ss10x10.chr | Bin 0 -> 4096 bytes 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 gui/m291/ss10x10.chr diff --git a/gui/m291/src/m291.tal b/gui/m291/src/m291.tal index 81064ca..2921507 100644 --- a/gui/m291/src/m291.tal +++ b/gui/m291/src/m291.tal @@ -99,6 +99,7 @@ ( | route ) DUP [ LIT "S ] EQU ?handle-status DUP [ LIT "F ] EQU ?handle-frame + DUP [ LIT "I ] EQU ?handle-id3 POP ( | not-handled ) @@ -126,6 +127,10 @@ POP #0a19 DEO !message/ +@handle-id3 ( buf* char -- ) + POP + #0a19 DEO !message/ + ( @|core ) @@ -313,6 +318,20 @@ JMP2r @ ( -- ) + #0080 .Screen/x DEO2 + #0020 .Screen/y DEO2 + ;placeholder/track #01 + #0080 .Screen/x DEO2 + #0030 .Screen/y DEO2 + ;placeholder/artist #01 + #0080 .Screen/x DEO2 + #0040 .Screen/y DEO2 + ;placeholder/album #01 + #0070 .Screen/x DEO2 + #0058 .Screen/y DEO2 + [ LIT2 36 -Screen/auto ] DEO + ;button-icn .Screen/addr DEO2 + [ LIT2 01 -Screen/sprite ] DEOk DEOk DEOk DEO JMP2r @ ( addr* -- ) @@ -363,7 +382,20 @@ INC GTHk ?&>l POP2 JMP2r -@ ( addr* color -- ) +@get-uf2-width ( text* -- width* ) + [ LIT2r 0000 ] + &>while ( -- ) + LDAk #20 SUB #0000 ROT ;font ADD2 LDA STH2 + ADD2r INC2 LDAk ?&>while + POP2 STH2r JMP2r + +@ ( text* color -- ) + STH + .Screen/x DEI2 OVR2 get-uf2-width #01 SFT2 SUB2 .Screen/x DEO2 + STHr + ( >> ) + +@ ( text* color -- ) ,&color STR [ LIT2 15 -Screen/auto ] DEO &>w ( -- ) @@ -470,6 +502,13 @@ &mpg-cmd "mpg123 20 "-R $1 &load-cmd "load 20 $1 +@placeholder + &artist "Blood 20 "Girl $1 + &track "Always 20 "Wrong $1 + &album "Unknown 20 "Album $1 + &time-a "0:23 $1 + &time-b "-3:46 $1 + @touch-chr [ 0000 0000 0814 1417 0000 0000 0008 0808 0000 0000 0000 00c0 0000 0000 0000 0000 @@ -481,6 +520,16 @@ 1010 2010 1008 0700 0f0f 1f0f 0f07 0000 2010 1010 2020 c000 c0e0 e0e0 c0c0 0000 ] +@button-icn [ + 0000 0000 0102 0408 0000 1f60 8000 0000 + 0000 f806 0100 0000 0000 0000 8040 2010 + 0810 1020 2020 2020 0000 0000 0000 0000 + 0000 0000 0000 0000 1008 0804 0404 0404 + 2020 2020 2010 1008 0000 0000 0000 0000 + 0000 0000 0000 0000 0404 0404 0408 0810 + 0804 0201 0000 0000 0000 0080 601f 0000 + 0000 0001 06f8 0000 1020 4080 0000 0000 ] + @fill-icn [ ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ] diff --git a/gui/m291/ss10x10.chr b/gui/m291/ss10x10.chr new file mode 100644 index 0000000000000000000000000000000000000000..5ebb8111b15a07f6a2639c54dadf414e7e152e18 GIT binary patch literal 4096 zcmeHKF%H5o40PIntct-y_GZk;6Z(WcfnTupC-9WMh#4kuQi-INfUuE>lOp+=8*;Hv zN&y-quoj-UJgcRUd?o~~g{WL=*}Gr4(Cpo>TJWX+#e7Zvfv^?LJig%?kOr||G;Mc8 z>HOb?8_DNAVmqJDGnu@(I@(aX%N< zk-~L*+p2^EOv8CxeJGf8#yF2$3!`(!BUk_Hx?tXzr2p?v9LzgcPyaWK7;YZ_KDh(M z