(m291) Hooked audio caller

This commit is contained in:
Devine Lu Linvega 2024-08-25 18:34:47 -07:00
parent 0018692a2b
commit 1b1ee22c24
1 changed files with 36 additions and 21 deletions

View File

@ -1,7 +1,15 @@
( .. ) (
| special uxn11 console )
|10 @Console &vector $2
|12 &read $1
|17 &type $1
|18 &write $1
|19 &error $1
|1c &addr $2
|1e &mode $1
|1f &exec $1
|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1 |00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1
|10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 |20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|80 @Controller &vector $2 &button $1 &key $1 |80 @Controller &vector $2 &button $1 &key $1
|90 @Mouse &vector $2 &x $2 &y $2 &state $1 &chord $1 &pad $4 &scrolly &scrolly-hb $1 &scrolly-lb $1 |90 @Mouse &vector $2 &x $2 &y $2 &state $1 &chord $1 &pad $4 &scrolly &scrolly-hb $1 &scrolly-lb $1
@ -26,14 +34,22 @@
;dict/home-path set-path <refresh-dir> ;dict/home-path set-path <refresh-dir>
;on-mouse .Mouse/vector DEO2 ;on-mouse .Mouse/vector DEO2
;on-control .Controller/vector DEO2 ;on-control .Controller/vector DEO2
BRK ( | play something )
;dict/mpg .Console/addr DEO2
#03 .Console/mode DEO
#01 .Console/exec DEO
;cmd1 print ;cmd2 print BRK
@print ( s* -> )
LDAk ?{ POP2 JMP2r }
LDAk .Console/write DEO
INC2 !print
@meta $1 @meta $1
( name ) "m291 0a ( name ) "m291 0a
( desc ) "Audio 20 "Player 0a ( desc ) "Audio 20 "Player 0a
( auth ) "By 20 "Devine 20 "Lu 20 "Linvega 0a ( auth ) "By 20 "Devine 20 "Lu 20 "Linvega 0a
( date ) "25 20 "Aug 20 "2024 $1 ( date ) "25 20 "Aug 20 "2024 $2
( exts ) 00
@on-mouse ( -> ) @on-mouse ( -> )
#c1 ;touch-chr/down ;touch-chr .Mouse/state DEI ?{ SWP2 } #c1 ;touch-chr/down ;touch-chr .Mouse/state DEI ?{ SWP2 }
@ -60,7 +76,7 @@
DUP2 [ LIT2 00 -lines/folders ] LDZ #40 SFT2 GTH2 #00 SWP #30 SFT2 SUB2 } DUP2 [ LIT2 00 -lines/folders ] LDZ #40 SFT2 GTH2 #00 SWP #30 SFT2 SUB2 }
#04 SFT2 NIP #04 SFT2 NIP
( | below ) ( | below )
DUP count-lines LTH ?{ POP #ff JMP2r } DUP count-lines LTH ?{ POP #ff }
JMP2r JMP2r
&outside ( y* -- id ) &outside ( y* -- id )
@ -159,7 +175,8 @@
[ LIT2 ff -Console/type ] DEO [ LIT2 ff -Console/type ] DEO
;path <pstr> ;path <pstr>
<pstr>/ <pstr>/
#0a18 DEO !<exit> #0a18 DEO
JMP2r
&special ( file* -- ) &special ( file* -- )
[ LIT2 01 -Console/type ] DEO [ LIT2 01 -Console/type ] DEO
@ -202,10 +219,6 @@
@<escape> ( -- ) @<escape> ( -- )
;path/null LDA ?<leave> ;path/null LDA ?<leave>
( >> )
@<exit> ( -- )
#800f DEO
JMP2r JMP2r
@<toggle-misc> ( -- ) @<toggle-misc> ( -- )
@ -279,7 +292,7 @@
[ LIT2 00 -lines/folders ] LDZ EQU ?{ ;dash-icn <draw-spacer> } [ LIT2 00 -lines/folders ] LDZ EQU ?{ ;dash-icn <draw-spacer> }
;mem/roms .lines/roms LDZ #00 .selection LDZ .lines/folders LDZ SUB <draw-list> ;mem/roms .lines/roms LDZ #00 .selection LDZ .lines/folders LDZ SUB <draw-list>
[ LIT2 00 -misc ] LDZ EQU ?{ [ LIT2 00 -misc ] LDZ EQU ?{
;mem/misc .lines/misc LDZ #00 .selection LDZ <draw-list> } ;mem/misc .lines/misc LDZ #00 .selection LDZ !<draw-list> }
JMP2r JMP2r
@<draw-spacer> ( addr* -- ) @<draw-spacer> ( addr* -- )
@ -338,7 +351,8 @@
.Screen/y DEI2 [ LIT2 15 -Screen/auto ] DEO .Screen/y DEI2 [ LIT2 15 -Screen/auto ] DEO
.Screen/width DEI2 #0010 SUB2 .Screen/x DEO2 .Screen/width DEI2 #0010 SUB2 .Screen/x DEO2
[ LIT2 00 "> ] #20 SUB #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2 [ LIT2 00 "> ] #20 SUB #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2
STHkr .Screen/sprite DEOk DEO DUPr [ LITr -Screen/sprite ] DEOkr
DEOr
.Screen/y DEO2 } .Screen/y DEO2 }
( | normal ) ( | normal )
#0008 .Screen/x DEO2 #0008 .Screen/x DEO2
@ -444,7 +458,15 @@
( (
@|assets ) @|assets )
@cursor-icn [ 80c0 e0f0 f8e0 1000 ] @cmd1 "loadpaused 20 "always_wrong.mp3 0a $1
@cmd2 "pause 0a $1
@dict
&home-path "./ $1
&mp3-ext "mp3 $1
&empty "(empty) $1
&mpg "mpg123 20 "-R $1
@touch-chr [ @touch-chr [
0000 0000 0814 1417 0000 0000 0008 0808 0000 0000 0814 1417 0000 0000 0008 0808
@ -465,12 +487,5 @@
@line-icn [ 0000 00ff 0000 0000 ] @line-icn [ 0000 00ff 0000 0000 ]
@marker-icn
@dict
&home-path "./ $1
&mp3-ext "mp3 $1
&empty "(empty) $1
~src/assets.tal ~src/assets.tal