From 33ef9d4450157e8bcae2ae1d09da7092baead8bb Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 25 Aug 2024 18:46:26 -0700 Subject: [PATCH] (m291) Cleanup --- gui/m291/src/m291.tal | 70 +++++-------------------------------------- 1 file changed, 8 insertions(+), 62 deletions(-) diff --git a/gui/m291/src/m291.tal b/gui/m291/src/m291.tal index 7d83cbb..4be27a8 100644 --- a/gui/m291/src/m291.tal +++ b/gui/m291/src/m291.tal @@ -35,7 +35,7 @@ ;on-mouse .Mouse/vector DEO2 ;on-control .Controller/vector DEO2 ( | play something ) - ;dict/mpg .Console/addr DEO2 + ;dict/mpg-cmd .Console/addr DEO2 #03 .Console/mode DEO #01 .Console/exec DEO BRK @@ -157,48 +157,21 @@ POP JMP2r &roms ( id -- ) - #00 SWP #40 SFT2 ;mem/roms ADD2 ! + #00 SWP #40 SFT2 ;mem/roms ADD2 ! &misc ( id -- ) - #00 SWP #40 SFT2 ;mem/misc ADD2 ! + #00 SWP #40 SFT2 ;mem/misc ADD2 ! &folder ( id -- ) #00 SWP #40 SFT2 ;mem/folders ADD2 ! -@ ( file* -- ) - .selection/mod LDZ ?&special +@ ( file* -- ) ;dict/load-cmd ;path / #0a18 DEO JMP2r - &special ( file* -- ) - [ LIT2 01 -Console/type ] DEO - ;path - / - #0a18 DEO - JMP2r - -@ ( file* -- ) - [ LIT2 01 -Console/type ] DEO - .selection/mod LDZ ?&special - ;path ;mem/filepath STH2k - STH2kr scap/ - STH2r .File/name DEO2 - #0001 .File/length DEO2 - &s ( -- ) - ;&b .File/read DEO2 - [ LIT2 &b $1 18 ] DEO - .File/success-lb DEI ?&s - JMP2r - - &special ( file* -- ) - ;path - / - #0a18 DEO - JMP2r - @ ( folder* -- ) .selection/mod LDZ ?&special push-path ! @@ -231,11 +204,6 @@ [ LIT2 00 -lines/misc ] LDZ NEQ ORA } AND JMP2r -@get-cat ( id -- color ) - INC .lines/folders LDZ GTHk ?{ POP2 #02 JMP2r } - SUB .lines/roms LDZ GTH ?{ #02 JMP2r } - #01 JMP2r - @is-folder ( line* -- line* f ) DUP2 lcap/ #0001 SUB2 LDA [ LIT "/ ] EQU JMP2r @@ -312,24 +280,6 @@ .Screen/y DEO2 JMP2r -@ ( id -- ) - ( empty ) count-lines ?{ POP JMP2r } - ;fill-icn .Screen/addr DEO2 - [ LIT2 f2 -Screen/auto ] DEO - #0000 .Screen/x DEO2 - STH - ( lines ) #00 STHkr #40 SFT2 - ( | spacer ) - has-spacer #00 EQU ?{ - #00 STHkr INC .lines/folders LDZ GTH #30 SFT2 ADD2 } - ( padding ) #0013 ADD2 .Screen/y DEO2 - STHr get-cat .Screen/sprite DEOk DEOk - ( | right-side ) - .Screen/x DEI2 #0080 ADD2 .Screen/x DEO2 - .Screen/y DEI2 #0010 SUB2 .Screen/y DEO2 - DEOk DEO - JMP2r - @ ( addr* length folder selection -- ) ,&sel STR ,&folder STR @@ -420,10 +370,8 @@ POP2 POP2r JMP2r @ ( str* -- ) - - &>w ( -- ) - LDAk #18 DEO - INC2 & LDAk ?&>w + LDAk #18 DEO + INC2 & LDAk ? POP2 JMP2r @ ( short* -: ) @@ -431,7 +379,7 @@ &b ( byte -: ) DUP #04 SFT /c &c ( byte -: ) - #0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD #18 DEO + #0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD #19 DEO JMP2r ( @@ -453,13 +401,11 @@ ( @|assets ) -@cmd1 "load 20 "always_wrong.mp3 0a $1 - @dict &home-path "./ $1 &mp3-ext "mp3 $1 &empty "(empty) $1 - &mpg "mpg123 20 "-R $1 + &mpg-cmd "mpg123 20 "-R $1 &load-cmd "load 20 $1 @touch-chr [