(m291) Fixed issue with id3

This commit is contained in:
Devine Lu Linvega 2024-08-26 11:21:00 -07:00
parent 09e44959c1
commit 6439bacdd6
1 changed files with 39 additions and 18 deletions

View File

@ -271,6 +271,11 @@
#00 SWP #40 SFT2 ;mem/folders ADD2 !<enter>
@<send-load> ( file* -- )
( | start ID3 )
;dict/no-title ;id3/title <scpy>
;dict/no-artist ;id3/artist <scpy>
;dict/no-album ;id3/album <scpy>
( | request )
;dict/load-cmd <pstr>
;path <pstr>
<pstr>/
@ -322,16 +327,16 @@
@|id3 )
@<set-title> ( id3* -- )
[ LIT ": ] find-next INC2 ;id3/title <scpy>
JMP2r
;id3/title <sclr>
[ LIT ": ] find-next INC2 ;id3/title !<scpy>
@<set-artist> ( id3* -- )
[ LIT ": ] find-next INC2 ;id3/artist <scpy>
JMP2r
;id3/artist <sclr>
[ LIT ": ] find-next INC2 ;id3/artist !<scpy>
@<set-album> ( id3* -- )
[ LIT ": ] find-next INC2 ;id3/album <scpy>
JMP2r
;id3/album <sclr>
[ LIT ": ] find-next INC2 ;id3/album !<scpy>
(
@|path )
@ -386,21 +391,27 @@
@<redraw-player> ( -- )
#ffff ;<draw-timestamp>/last STA2
#ffff ;<draw-progress>/last STA2
( >> )
@<draw-player> ( -- )
#0080 .Screen/x DEO2
#0020 .Screen/y DEO2
;id3/title #01 <draw-uf2-center>
#0080 .Screen/x DEO2
#0030 .Screen/y DEO2
;id3/artist #01 <draw-uf2-center>
#0080 .Screen/x DEO2
#0040 .Screen/y DEO2
;id3/album #01 <draw-uf2-center>
<draw-title>
<draw-artist>
<draw-album>
<draw-play>
<draw-progress> !<draw-timestamp>
@<draw-title> ( -- )
#0080 .Screen/x DEO2
#0020 .Screen/y DEO2
;id3/title #01 !<draw-uf2-center>
@<draw-artist> ( -- )
#0080 .Screen/x DEO2
#0030 .Screen/y DEO2
;id3/artist #01 !<draw-uf2-center>
@<draw-album> ( -- )
#0080 .Screen/x DEO2
#0040 .Screen/y DEO2
;id3/album #01 !<draw-uf2-center>
@<draw-play> ( -- )
#0070 .Screen/x DEO2
#0058 .Screen/y DEO2
@ -618,6 +629,13 @@
INC2r INC2 LDAk ?&>w
POP2 POP2r JMP2r
@<sclr> ( str* -- )
#00 ROT ROT
&>w ( -- )
STAk INC2 LDAk ?&>w
STA
JMP2r
@lcap ( str* -- next-line* )
&w ( -- )
@ -677,6 +695,9 @@
&mpg-cmd "mpg123 20 "-R $1
&load-cmd "load 20 $1
&pause-cmd "pause 0a $1
&no-title "Unknown 20 "Title $1
&no-artist "Unknown 20 "Artist $1
&no-album "Unknown 20 "Album $1
~src/assets.tal