diff --git a/gui/m291/src/m291.tal b/gui/m291/src/m291.tal index fc5de78..5f4f48d 100644 --- a/gui/m291/src/m291.tal +++ b/gui/m291/src/m291.tal @@ -25,6 +25,7 @@ @secfrom $2 @secto $2 @secprog $2 + @frames &a $2 &b $2 |100 @@ -173,10 +174,30 @@ .selection/track LDZ INC .lines/tracks LDZ DIVk MUL SUB !/tracks @ ( x* -- ) - - #0a19 DEO + ;dict/jump-cmd + .frames/a LDZ2 .frames/b LDZ2 ADD2 #00e7 DIV2 + ( At least 1 ) DUP2 #0000 EQU2 #00 SWP ADD2 MUL2 + #0a18 DEO JMP2r +@ ( file* -- ) + ( | start ID3 ) + ;dict/no-title ;id3/title + ;dict/no-artist ;id3/artist + ;dict/no-album ;id3/album + [ LIT2 01 -playing ] STZ + + ( | request ) + ;dict/load-cmd + ;path + / + #0a18 DEO + JMP2r + +@ ( -- ) + [ LIT2 02 -paused ] LDZ ORA .paused STZ + ;dict/pause-cmd ! + ( @|events ) @@ -192,8 +213,10 @@ @handle-frame ( buf* char -- ) POP ( skip key ) #0003 ADD2 - ( skip curr-frame ) #20 find-next INC2 - ( skip next-frame ) #20 find-next INC2 + ( skip curr-frame ) parse-dec .frames/a STZ2 + INC2 + ( skip next-frame ) parse-dec .frames/b STZ2 + INC2 ( | ) parse-dec STH2k .secfrom STZ2 INC2 LDAk [ LIT "5 ] LTH ?{ INC2r } @@ -322,24 +345,6 @@ #00 SWP ( CELLSIZE ) #70 SFT2 ;mem/folders ADD2 ! -@ ( file* -- ) - ( | start ID3 ) - ;dict/no-title ;id3/title - ;dict/no-artist ;id3/artist - ;dict/no-album ;id3/album - [ LIT2 01 -playing ] STZ - - ( | request ) - ;dict/load-cmd - ;path - / - #0a18 DEO - JMP2r - -@ ( -- ) - [ LIT2 02 -paused ] LDZ ORA .paused STZ - ;dict/pause-cmd ! - @ ( folder* -- ) .selection/mod LDZ ?&special push-path ! @@ -768,6 +773,18 @@ LDAk #00 STH2kr STA2 INC2r INC2 !&w +@ ( short* -- ) + ORAk ?{ + POP2 [ LIT2 "0 18 ] DEO + JMP2r } + #2710 [ LIT2r 00fb ] + &>w ( -- ) + DIV2k #000a DIV2k MUL2 SUB2 SWPr EQUk OVR STHkr EQU AND ?{ + DUP [ LIT "0 ] ADD #18 DEO + INCr } + POP2 #000a DIV2 SWPr INCr STHkr ?&>w + POP2r POP2 POP2 JMP2r + @ ( str* -- ) LDAk #18 DEO INC2 & LDAk ? @@ -812,6 +829,7 @@ &empty "(empty) $1 &mpg-cmd "mpg123 20 "-R $1 &load-cmd "load 20 $1 + &jump-cmd "jump 20 $1 &pause-cmd "pause 0a $1 &no-title "Unknown 20 "Title $1 &no-artist "Unknown 20 "Artist $1