Compare commits

...

24 Commits

Author SHA1 Message Date
~d6 469f0348eb Use start/select instead of A/B for controller inputs.
When using a keyboard A and B are Control and Alt.

This interviews with window managers or desktops that use control and
alt for navigation shortcuts (for example alt-tab will pause/unpause
music when m291 is in focus).

After this change, the short cuts are moved to start/select, which
correspond to shift/home. These are less likely to interfere with
shortcuts.
2024-09-07 19:33:47 -04:00
Devine Lu Linvega fe5a9321d0 (catty) Parsing input 2024-09-06 14:56:02 -07:00
Devine Lu Linvega 18ad732a24 Starting catty 2024-09-06 14:48:52 -07:00
Devine Lu Linvega e5f695d09f Fix mouse-picking issue 2024-09-06 13:25:51 -07:00
Devine Lu Linvega 4430c2eb3d Skip printing .mp3 2024-09-05 16:06:42 -07:00
Devine Lu Linvega 94dbf747c2 (m291) Fixed truncating bug 2024-09-05 15:55:38 -07:00
Devine Lu Linvega 0150e67e11 (m291) Formatted for Uxnfor 2024-09-05 09:09:43 -07:00
~d6 6e635d94a3 Fix stack imbalance 2024-09-05 09:04:16 -07:00
~d6 54fa407a68 Abbreviate common prefixes.
If all the entries of a folder have a common prefix replace the prefix
with "..." when displaying them.

(If the prefix is 3 bytes or less it will not be shortened, since no
space is saved in that case.)
2024-09-04 19:54:28 -07:00
Devine Lu Linvega bf99790adb (m291) Added README 2024-08-31 10:53:04 -07:00
Devine Lu Linvega d16798dc7b (m291) Do not reset scroll on file picking 2024-08-31 10:41:12 -07:00
Devine Lu Linvega 7adfa6906f (m291) Fixed mouse-picking issue 2024-08-30 18:45:22 -07:00
Devine Lu Linvega 041f3dda07 (m291) Disable pause message before play 2024-08-30 14:21:17 -07:00
Devine Lu Linvega f194db1610 (m291) Follow cursor 2024-08-30 14:19:58 -07:00
Devine Lu Linvega 3e41f3b3b2 (m291) Fixed leak 2024-08-30 14:01:02 -07:00
Devine Lu Linvega 9b15f5f079 (m291) Clamp scroll bounds 2024-08-30 13:55:05 -07:00
Devine Lu Linvega c57be86439 (m291) Scrolling tracks again 2024-08-30 13:47:12 -07:00
Devine Lu Linvega 2d1b4b2670 (m291) Progress on merging lists 2024-08-30 13:30:44 -07:00
Devine Lu Linvega f8cf42530f (m291) Redesigning scroll 2024-08-30 13:20:55 -07:00
Devine Lu Linvega 8859196212 (m291) Correct offset via jump 2024-08-30 12:47:52 -07:00
Devine Lu Linvega a47bc38042 Characters allow to jump 2024-08-30 12:41:28 -07:00
Devine Lu Linvega fe35aadb66 Loop long title around 2024-08-29 20:05:49 -07:00
Devine Lu Linvega c535dbf3d4 (m291) Scroll long track names 2024-08-29 19:37:40 -07:00
Devine Lu Linvega c149d1b9e7 (m291) Only sort when files are present 2024-08-29 18:47:14 -07:00
5 changed files with 668 additions and 100 deletions

30
gui/catty/makefile Normal file
View File

@ -0,0 +1,30 @@
ID=catty
DIR=~/roms
ASM=uxncli ${DIR}/drifblim.rom
LIN=uxncli ${DIR}/uxnlin.rom
EMU=uxn11
ROM=bin/${ID}.rom
all: ${ROM}
lint:
@ ${LIN} src/${ID}.tal
run: all
@ ${EMU} ${ROM}
clean:
@ rm -f ${ROM} ${ROM}.sym
install: ${ROM}
@ cp ${ROM} ${DIR}
uninstall:
@ rm -f ${DIR}/${ID}.rom
archive:
cat src/${ID}.tal src/assets.tal | sed 's/~[^[:space:]]\+//' > ~/Git/oscean/etc/${ID}.tal.txt
uxnasm ~/Git/oscean/etc/${ID}.tal.txt ${ROM}
@ ${EMU} ${ROM}
.PHONY: all clean lint run install uninstall archive
${ROM}: src/${ID}.tal src/assets.tal
@ mkdir -p bin
@ ${ASM} src/${ID}.tal ${ROM}

272
gui/catty/src/assets.tal Normal file
View File

@ -0,0 +1,272 @@
( assets )
@check-icn [ aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55 ]
@font [
0405 0509 0709 0903 0505 0807 0407 0307
0808 0808 0808 0808 0808 0304 0607 0608
0a09 0908 0807 0708 0806 0708 070b 0a08
0808 0808 0809 090b 0707 0706 0706 0408
0108 0807 0707 0607 0704 0606 040b 0707
0807 0607 0608 070a 0707 0705 0405 0801 ]
&glyphs [
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 1010 1010 2020 2000 2000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0050 5050 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0001 0a3f 147e 2420 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0008 3854 5030 1028 24a4 7820 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 3e51 9264 0816 2949 8600 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0018 2424 2830 508a 848a 7100 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0040 4040 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0008 1020 2040 4040 4040 2020 1000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0020 1008 0808 0808 0810 1020 4000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 4428 fe28 4402 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 1010 7c10 1000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 2020 4000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 7e00 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 4000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0004 0408 0810 1020 2040 4000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0018 2442 4282 8282 8244 3800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0808 0808 0808 1010 1000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 3c42 0204 1820 4080 fc00 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 1c22 0418 0402 8284 7800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 2022 4244 84fe 0408 0808 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 3e40 8070 0804 0484 7800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0010 2040 409c a2c2 8244 3800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 7e82 0404 0808 1010 1000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0018 2444 4830 4884 8484 7800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 7884 8282 423e 0404 0810 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0020 0000 0000 4000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0010 1000 0000 2020 4000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0408 1020 2010 0800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 7c00 7c00 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 4020 1008 0810 2000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 3c42 0204 0810 2000 2000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 001f 204e 5253 4c21 1e00 0000 0000
0000 0000 8080 8000 0000 0000 0000 0000
0001 0305 0912 1227 fa42 8280 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0e11 1122 2621 4141 829c 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 1c22 4480 8080 8044 3800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0010 7824 2242 4242 8284 f800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 1c20 4040 7880 8080 7800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 1c20 4040 7880 8080 8000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0c30 4080 8c92 8244 3800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 2222 2242 7c44 8488 8800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0808 1010 1010 2020 2000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0e34 0404 0448 8888 7000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 1126 2830 2050 4844 4200 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 1010 2020 2040 4040 3c00 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0008 1818 292a 4a4c 4881 8100 0000 0000
0000 40c0 4040 4080 8000 0000 0000 0000
0000 1010 2829 2945 4542 4200 0000 0000
0000 8080 8000 0000 0000 0000 0000 0000
0000 3844 8282 8284 8448 3000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 1c22 4242 8498 8080 8000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 1824 4242 8284 9448 3400 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 3844 8488 f0a0 9088 8402 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 1c22 2018 0442 8284 7800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0004 7e08 0810 1010 2020 2000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 2121 4142 8282 8244 3800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 4142 4244 2428 2810 1000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 8080 8888 4955 5522 2200 0000 0000
0000 4040 8080 0000 0000 0000 0000 0000
0004 4428 2810 1028 4844 8400 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 8444 2828 1010 1020 2000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 3cc4 0810 1020 408c f000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0018 2020 2020 4040 4040 4030 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0020 2020 1010 1010 0808 0808 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0018 0404 0408 0808 1010 1060 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 2050 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 ff00 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 1e22 4284 848c 7400 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0020 2040 5864 4242 8284 b800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 3844 8880 8088 7000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0002 0204 043c 4484 8888 7000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 3844 84f8 8088 7000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
000c 1020 2078 2020 4040 4000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 1824 4444 8c94 6808 9060 0000
0000 0000 0000 0000 0000 0000 0000 0000
0020 4040 98a4 c4c4 8888 9000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 1000 2020 2020 4040 4000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0400 0404 0408 0808 1010 9060 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 2020 4048 5060 a090 8800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 2020 2040 4040 8080 8000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 5867 4444 8888 8800 0000 0000
0000 0000 0080 4040 4080 8000 0000 0000
0000 0000 5864 4484 8488 8800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 1824 4484 8488 7000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 2834 2222 2244 5840 8080 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 344c 4484 8c94 6808 1010 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 5c60 4040 8080 8000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 1824 4038 0488 7000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 1010 f820 2020 4040 4000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 2242 4484 8c94 6400 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0002 8484 8848 5020 2000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0091 91aa aa44 4400 0000 0000
0000 0000 8000 0000 0000 0000 0000 0000
0000 0000 4448 2810 2848 4480 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 8484 8850 5020 2040 4080 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 7c88 1020 4084 f800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
1820 2040 4040 8040 4040 4040 3000 0000
0000 0000 0000 0000 0000 0000 0000 0000
1010 1010 2020 2020 2020 4040 4000 0000
0000 0000 0000 0000 0000 0000 0000 0000
2010 1010 1008 1010 1010 2020 4000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 3946 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0200 0305 0912 1227 fa42 8280 0000 0000
8000 0000 0000 0000 0000 0000 0000 0000
0c12 0c04 0c14 244e 7484 8484 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 1c22 4284 8080 8044 3810 1060 0000
0000 0000 0000 0000 0000 0000 0000 0000
0810 003c 4040 f880 8080 7800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
3946 0022 5252 524a 8a8a 8480 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
2400 3844 8282 8282 8444 3800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
1200 2121 2141 4141 4122 1c00 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0004 0800 1e22 4282 848c 7400 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0008 0400 1e22 4282 848c 7400 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
000c 1200 1e22 4284 848c 7400 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 1200 1e22 4282 848c 7400 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0032 4c00 1e22 4282 848c 7400 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0c12 0c00 1e22 4282 848c 7400 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 3844 8880 8088 7020 1060 0000
0000 0000 0000 0000 0000 0000 0000 0000
0008 1000 3844 88f0 8088 7000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0020 1000 3844 88f0 8088 7000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0030 4800 3844 88f0 8088 7000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 2800 3844 88f0 8088 7000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0010 2000 2020 4040 4080 8000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0020 1000 1010 2020 2040 4000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0030 4800 1010 2020 2040 4000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 5000 2020 4040 4080 8000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0064 9800 5864 4484 8488 8800 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0008 1000 3844 8484 8488 7000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0020 1000 3844 8484 8488 7000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0030 4800 3844 8484 8488 7000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 4800 3844 8484 8488 7000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0064 9800 3844 8484 8488 7000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0004 0800 2242 4484 848c 7400 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0010 0800 2242 4484 848c 7400 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
000c 1200 2242 4284 848c 7400 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 1400 2242 4484 848c 7400 0000 0000 ]
@message/buf $200
@input/buf $200

140
gui/catty/src/catty.tal Normal file
View File

@ -0,0 +1,140 @@
( listen! )
|10 @Console &vector $2 &read $5 &type $1 &write $1 &error $3 &addr $2 &mode $1 &exec $1
|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1
|20 @Screen &vector $2 &width $2 &height $2 &auto $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|80 @Controller &vector $2 &button $1 &key $1
|90 @Mouse &vector $2 &x $2 &y $2 &state $6 &scrolly &scrolly-hb $1 &scrolly-lb $1
|a0 @File &vector $2 &success $1 &success-lb $1 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
|c0 @DateTime &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1
|000
|100
@on-reset ( -> )
( | theme )
#f0e1 DUP2 .System/r DEO2
DUP2 .System/g DEO2
.System/b DEO2
( | size )
#0200 .Screen/width DEO2
#0100 .Screen/height DEO2
#0010 .Screen/x DEO2
#0010 .Screen/y DEO2
( | request )
;dict/test .Console/addr DEO2
[ LIT2 03 -Console/mode ] DEO
[ LIT2 01 -Console/exec ] DEO
;on-console .Console/vector DEO2
;on-control .Controller/vector DEO2
BRK
@on-console ( -> )
[ LIT2 01 -Console/type ] DEI EQU ?{ BRK }
[ LIT2 0a -Console/read ] DEI EQUk ?{ message/<append>
POP BRK }
POP2 message/<parse>
BRK
@on-control ( -> )
.Controller/key DEI DUP ?{ POP BRK }
DUP #0d NEQ ?{ POP input/<send>
BRK }
input/<append>
BRK
(
@|input )
@input/<send> ( -- )
;message/pen LDA2 #0010 ADD2 ;message/pen STA2
;&buf .Console/addr DEO2
[ LIT2 01 -Console/exec ] DEO
JMP2r
@input/<append> ( c -- )
[ LIT2 &ptr =&buf ] INC2k ,&ptr STR2
STA
( >> )
@input/<draw> ( -- )
#0010 .Screen/x DEO2
;message/pen LDA2 .Screen/y DEO2
;&buf #01 !<draw-uf2>
(
@|message )
@message/<parse> ( -- )
#00 /<append>
#0010 .Screen/x DEO2
[ LIT2 &pen 0010 ] DUP2 #0010 ADD2 ,&pen STR2
.Screen/y DEO2
;&buf #01 <draw-uf2>
( >> )
@message/<new> ( -- )
( reset ) ;&buf ,&ptr STR2
JMP2r
@message/<append> ( c -- )
[ LIT2 &ptr =&buf ] INC2k ,&ptr STR2
STA
JMP2r
(
@|drawing )
@<draw-uf2> ( text* color -- )
,<draw-glyph>/color STR
[ LIT2 15 -Screen/auto ] DEO
&>w ( -- )
LDAk <draw-glyph>
&continue ( -- )
next-glyph LDAk ?&>w &end POP2 JMP2r
@<draw-glyph> ( char -- )
DUP #7f LTH ?{
POP ;check-icn .Screen/addr DEO2
,&color LDR .Screen/sprite DEO
JMP2r }
#20 SUB #00 SWP
( ) DUP2 #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2
( ) ;font ADD2 LDA #00 SWP .Screen/x DEI2 ADD2
( ) [ LIT &color 05 ] .Screen/sprite DEOk DEO
.Screen/x DEO2
JMP2r
@next-glyph ( addr* -- addr* )
INC2 LDAk
( utf8 ) #06 SFT #02 EQU ?next-glyph
JMP2r
(
@|stdlib )
@<pstr> ( str* -- )
LDAk #18 DEO
INC2 & LDAk ?<pstr>
POP2 JMP2r
@<perr> ( str* -- )
LDAk #19 DEO
INC2 & LDAk ?<perr>
POP2 JMP2r
@<phex> ( short* -: )
SWP /b
&b ( byte -: )
DUP #04 SFT /c
&c ( byte -: )
#0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD #19 DEO
JMP2r
(
@|strings )
@dict
&test "ls $1
~src/assets.tal

25
gui/m291/README.md Normal file
View File

@ -0,0 +1,25 @@
# m291
A music player, written in [Uxntal](https://wiki.xxiivv.com/site/uxntal.html).
## Build
You must have the [Uxn11](https://git.sr.ht/~rabbits/uxn/) assembler and emulator.
```sh
uxnasm src/m291.tal bin/m291.rom
```
## Usage
The following command will read a `tal` file and raise warnings if optimizations can be found.
```sh
ux11 bin/m291.rom
```
## Extras
- [Need a hand?](https://llllllll.co/t/uxn-virtual-computer/46103)
- Linted with [uxnlin](https://git.sr.ht/~rabbits/uxnlin)
- Assembled with [drifblim](https://git.sr.ht/~rabbits/drifblim)

View File

@ -16,6 +16,7 @@
@playing $1 @playing $1
@mode $1 @mode $1
@paused $1 @paused $1
@prefix &folders $1 &tracks $1
@secfrom $2 @secfrom $2
@secto $2 @secto $2
@secprog $2 @secprog $2
@ -51,12 +52,15 @@
( name ) "m291 0a ( name ) "m291 0a
( desc ) "Audio 20 "Player 0a ( desc ) "Audio 20 "Player 0a
( auth ) "By 20 "Linvega 20 "& 20 "d6 0a ( auth ) "By 20 "Linvega 20 "& 20 "d6 0a
( date ) "29 20 "Aug 20 "2024 $2 ( date ) "6 20 "Sep 20 "2024 $2
%min ( x y -- min ) {
LTHk [ JMP SWP POP ] }
( (
@|vectors ) @|vectors )
@on-console ( -> brk ) @on-console ( -> )
[ LIT2 01 -Console/type ] DEI EQU ?{ BRK } [ LIT2 01 -Console/type ] DEI EQU ?{ BRK }
[ LIT2 0a -Console/read ] DEI EQUk ?{ message/<append> [ LIT2 0a -Console/read ] DEI EQUk ?{ message/<append>
POP BRK } POP BRK }
@ -78,7 +82,7 @@
POP2 <update-cursor> POP2 <update-cursor>
( | route events ) ( | route events )
.Mouse/y DEI2 .Mouse/y DEI2
( > ) DUP2 #0014 LTH2 ?&status-bar ( > ) DUP2 #0018 LTH2 ?&status-bar
( > ) [ LIT2 00 -playing ] LDZ EQU ?{ DUP2 #0098 LTH2 ?&player } ( > ) [ LIT2 00 -playing ] LDZ EQU ?{ DUP2 #0098 LTH2 ?&player }
( | on list ) ( | on list )
<y-id> <y-id>
@ -116,11 +120,12 @@
POP2 BRK POP2 BRK
&scroll ( distance -> ) &scroll ( distance -> )
.selection/scroll LDZ ADD .selection/scroll LDZ ADD INCk ?{ POP BRK }
( above ) DUP #ff EQU ?{ .lines/folders LDZ .lines/tracks LDZ ADD #18 SUB
( below ) DUP #18 ADD .lines/tracks LDZ GTH ?{ DUP .selection/scroll STZ ( needs scroll ) DUP #80 LTH ?{ POP2 BRK }
<redraw-dir> } } ( max scroll ) min .selection/scroll STZ
POP BRK <redraw-dir>
BRK
@on-control ( -> ) @on-control ( -> )
( | mod ) ( | mod )
@ -130,6 +135,7 @@
( esc ) DUP #1b NEQ ?{ <escape> } ( esc ) DUP #1b NEQ ?{ <escape> }
( enter ) DUP #0d NEQ ?{ .selection LDZ <pick> } ( enter ) DUP #0d NEQ ?{ .selection LDZ <pick> }
( space ) DUP #20 NEQ ?{ <send-pause> } ( space ) DUP #20 NEQ ?{ <send-pause> }
DUP #20 SUB #5f GTH ?{ DUP <find-any> }
POP POP
( | button ) ( | button )
.Controller/button DEI .Controller/button DEI
@ -137,8 +143,8 @@
( down ) DUP #20 NEQ ?{ #01 <move> } ( down ) DUP #20 NEQ ?{ #01 <move> }
( left ) DUP #40 NEQ ?{ <escape> } ( left ) DUP #40 NEQ ?{ <escape> }
( right ) DUP #80 NEQ ?{ .selection LDZ <pick> } ( right ) DUP #80 NEQ ?{ .selection LDZ <pick> }
( A ) DUP #01 NEQ ?{ .selection LDZ <pick> } ( select [shift] ) DUP #04 NEQ ?{ <send-pause> }
( B ) DUP #02 NEQ ?{ <send-pause> } ( start [home] ) DUP #08 NEQ ?{ .selection LDZ <pick> }
POP BRK POP BRK
( (
@ -192,7 +198,7 @@
@<seek> ( x* -- ) @<seek> ( x* -- )
pos-to-seconds DUP2 #00e7 LTH2 #00 SWP ADD2 ;dict/jump-cmd <pstr> pos-to-seconds DUP2 #00e7 LTH2 #00 SWP ADD2 ;dict/jump-cmd <pstr>
<pdec> <pdec>
LIT2 "s 18 DEO [ LIT2 "s 18 ] DEO
#0a18 DEO #0a18 DEO
JMP2r JMP2r
@ -208,16 +214,26 @@
JMP2r JMP2r
@<send-pause> ( -- ) @<send-pause> ( -- )
.playing LDZ ?{ JMP2r }
[ LIT2 02 -paused ] LDZ ORA .paused STZ [ LIT2 02 -paused ] LDZ ORA .paused STZ
;dict/pause-cmd <pstr> !<draw-play> ;dict/pause-cmd <pstr> !<draw-play>
@<move> ( mod -- ) @<move> ( mod -- )
.selection LDZ ADD .selection LDZ ADD
( top ) DUP .selection/scroll LDZ #ff00 NEQ2 ?{ POP JMP2r } ( top ) INCk ?{ POP JMP2r }
( bottom ) DUP .lines/folders LDZ .lines/tracks LDZ ADD NEQ ?{ POP JMP2r } ( bottom ) DUP .lines/folders LDZ .lines/tracks LDZ ADD NEQ ?{ POP JMP2r }
( >> ) ( >> )
@<select> ( id -- ) @<select> ( id -- )
( | follow )
DUP .selection/scroll LDZ SUB
( top ) DUP #80 AND #00 EQU ?{
DUP .selection/scroll LDZ ADD .selection/scroll STZ !&resume }
( bottom ) DUP #18 LTH ?{
DUP .selection/scroll LDZ ADD #17 SUB .selection/scroll STZ }
&resume ( id scroll -- )
POP
( | continue )
[ LIT &last ff ] NEQk ?{ POP2 JMP2r } [ LIT &last ff ] NEQk ?{ POP2 JMP2r }
POP DUP ,&last STR POP DUP ,&last STR
.selection STZ !<redraw-dir> .selection STZ !<redraw-dir>
@ -228,7 +244,7 @@
POP JMP2r POP JMP2r
&tracks ( id -- ) &tracks ( id -- )
.selection/scroll LDZ ADD DUP .selection/track STZ DUP .selection/track STZ
#00 SWP #00 SWP
( CELLSIZE ) #70 SFT2 ;mem/tracks ADD2 !<send-load> ( CELLSIZE ) #70 SFT2 ;mem/tracks ADD2 !<send-load>
@ -240,13 +256,31 @@
path/<push> !<refresh-dir> path/<push> !<refresh-dir>
@<escape> ( -- ) @<escape> ( -- )
( > ) [ LIT2 00 -selection/scroll ] STZ
;path/null LDA ?{ JMP2r } ;path/null LDA ?{ JMP2r }
[ LIT2 00 -selection/scroll ] STZ
path/pop !<refresh-dir> path/pop !<refresh-dir>
@<change-mode> ( -- ) @<change-mode> ( -- )
.mode LDZk INC #03 DIVk MUL SUB SWP STZ !<draw-mode> .mode LDZk INC #03 DIVk MUL SUB SWP STZ !<draw-mode>
@<find-any> ( letter -- )
( case insensitive ) cflc STH
( | folders )
.lines/folders LDZ #00
&>folders ( -- )
#00 OVR
( CELLSIZE ) #70 SFT2 ;mem/folders ADD2 LDA cflc STHkr NEQ ?{ POPr NIP !<select> }
INC GTHk ?&>folders
POP2
( | tracks )
.lines/tracks LDZ #00
&>tracks ( -- )
#00 OVR
( CELLSIZE ) #70 SFT2 ;mem/tracks ADD2 LDA cflc STHkr NEQ ?{
POPr NIP .lines/folders LDZ ADD !<select> }
INC GTHk ?&>tracks
POP2 POPr JMP2r
( (
@|events ) @|events )
@ -279,6 +313,7 @@
POP2 STH2r STH2r SWP2 OVR2 ADD2 SWP2 POP2 STH2r STH2r SWP2 OVR2 ADD2 SWP2
( | print ) ( | print )
calc-width .secprog STZ2 calc-width .secprog STZ2
<draw-title-scroll>
<draw-progress> <draw-progress>
<draw-timestamp> !message/<new> <draw-timestamp> !message/<new>
@ -308,20 +343,7 @@
@<y-id> ( y* -- id ) @<y-id> ( y* -- id )
[ LIT2 00 -playing ] LDZ EQU ?{ #0080 SUB2 } [ LIT2 00 -playing ] LDZ EQU ?{ #0080 SUB2 }
#0018 SUB2 #0018 SUB2 #04 SFT2 NIP #17 min .selection/scroll LDZ ADD JMP2r
( | above )
DUP2 #8000 GTH2 ?&outside
( | spacer )
has-spacer #00 EQU ?{
DUP2 [ LIT2 00 -lines/folders ] LDZ #40 SFT2 SUB2 #0008 LTH2 ?&outside
DUP2 [ LIT2 00 -lines/folders ] LDZ #40 SFT2 GTH2 #00 SWP #30 SFT2 SUB2 }
#04 SFT2 NIP
( | below )
DUP count-lines LTH ?{ POP #ff }
JMP2r
&outside ( y* -- id )
POP2 #ff JMP2r
@<refresh-dir> ( -- ) @<refresh-dir> ( -- )
;path .File/name DEO2 ;path .File/name DEO2
@ -335,16 +357,15 @@
&w ( -- ) &w ( -- )
DUP2 <parse-line> DUP2 <parse-line>
lcap/ INC2 LDAk ?&w lcap/ INC2 LDAk ?&w
POP2 sort-folders sort-tracks POP2 <post-refresh>
( >> ) ( >> )
@<fit-window> ( -- ) @<fit-window> ( -- )
#00 #00
( folders ) .lines/folders LDZ ( folders ) .lines/folders LDZ
( tracks ) .lines/tracks LDZ ( tracks ) .lines/tracks LDZ ADD
( scroll ) #18 LTHk [ JMP SWP ] POP ADD ( scroll ) #18 LTHk [ JMP SWP ] POP
( empty ) DUP #00 EQU ADD #40 SFT2 ( empty ) DUP #00 EQU ADD #40 SFT2
( no-folder spacer ) has-spacer #00 EQU ?{ #0008 ADD2 }
( padding ) #0020 ADD2 ( padding ) #0020 ADD2
( playing ) [ LIT2 00 -playing ] LDZ EQU ?{ #0080 ADD2 } ( playing ) [ LIT2 00 -playing ] LDZ EQU ?{ #0080 ADD2 }
.Screen/height DEO2 .Screen/height DEO2
@ -382,43 +403,84 @@
@str-lth ( a* b* -- a>b ) @str-lth ( a* b* -- a>b )
STH2 STH2
&>loop ( -- ) &>loop ( -- )
LDAk LDAkr STHr SUBk ?&done LDAk LDAkr STHr SUBk ?{
DUP2 #0000 EQU2 ?&done DUP2 #0000 EQU2 ?{ POP2 INC2 INC2r !&>loop } }
POP2 INC2 INC2r !&>loop NIP2 LTH POP2r JMP2r
&done NIP2 LTH POP2r JMP2r
@str-len ( a* -- len )
[ LITr 00 ]
&>loop ( -- )
LDAk ?{ POP2 STHr JMP2r }
INCr INC2 !&>loop
@str-prefix ( a* b* -- len )
STH2
DUP2 ,&a0 STR2
&>loop ( -- )
LDAk LDAkr STHr NEQk ?{
DUP2 #0000 EQU2 ?{ POP2 INC2 INC2r !&>loop } }
POP2 POP2r [ LIT2 &a0 $2 ] SUB2 NIP JMP2r
@<post-refresh> ( -- )
common-folder-prefix .prefix/folders STZ
common-track-prefix .prefix/tracks STZ
sort-folders !sort-tracks
@sort-folders ( -- ) @sort-folders ( -- )
;mem/folders DUP2 LIT2 [ 00 -lines/folders ] LDZ #01 SUB #70 SFT2 ADD2 !sort-tracks-0 .lines/folders LDZ ?{ JMP2r }
;mem/folders DUP2 [ LIT2 00 -lines/folders ] LDZ #01 SUB
( CELLSIZE ) #70 SFT2 ADD2 !sort-files
@sort-tracks ( -- ) @sort-tracks ( -- )
;mem/tracks DUP2 LIT2 [ 00 -lines/tracks ] LDZ #01 SUB #70 SFT2 ADD2 .lines/tracks LDZ ?{ JMP2r }
;mem/tracks DUP2 [ LIT2 00 -lines/tracks ] LDZ #01 SUB
( CELLSIZE ) #70 SFT2 ADD2
( >> ) ( >> )
@sort-tracks-0 ( first* last* -- ) @sort-files ( first* last* -- )
SWP2 &loop GTH2k ?&ok SWP2
POP2 POP2 JMP2r &>loop ( -- )
&ok OVR2 OVR2 STH2k #0080 ADD2 &loop2 LTH2k ?&done GTH2k ?{ POP2 POP2 JMP2r }
OVR2 OVR2 STH2k #0080 ADD2
&>loop2 ( -- )
LTH2k ?&done
DUP2 STH2kr str-lth ?&replace DUP2 STH2kr str-lth ?&replace
!&inc !{
&replace POP2r STH2k &inc #0080 ADD2 !&loop2 &replace POP2r STH2k }
&done POP2 POP2 DUP2 STH2r swap-tracks #0080 ADD2 !&loop #0080 ADD2 !&>loop2
&done ( -- )
POP2 POP2 DUP2 STH2r swap-tracks #0080 ADD2 !&>loop
@swap-tracks ( src* dst* -- ) @swap-tracks ( src* dst* -- )
EQU2k ?&skip EQU2k ?{
DUP2 ;tmp <scpy> DUP2 ;tmp <scpy>
OVR2 STH2 OVR2 STH2
<scpy> <scpy>
;tmp STH2r <scpy> ;tmp STH2r !<scpy> }
JMP2r POP2 POP2 JMP2r
&skip POP2 POP2 JMP2r
@common-folder-prefix ( -- len )
[ LIT2 01 -lines/folders ] LDZ LTH ?{ #00 JMP2r }
;mem/folders DUP2 [ LIT2 00 -lines/folders ] LDZ #70 SFT2 ADD2 !common-prefix-0
@common-track-prefix ( -- len )
[ LIT2 01 -lines/tracks ] LDZ LTH ?{ #00 JMP2r }
;mem/tracks DUP2 [ LIT2 00 -lines/tracks ] LDZ #70 SFT2 ADD2
( >> )
@common-prefix-0 ( first* limit* -- len )
SWP2 DUP2k str-len STH
,&s0 STR2
#0080 ADD2
&>loop ( -- )
GTH2k ?{ POP2 POP2 STHr JMP2r }
DUP2 [ LIT2 &s0 $2 ] str-prefix STHr min STH
#0080 ADD2 !&>loop
@count-lines ( -- lines ) @count-lines ( -- lines )
.lines/folders LDZ .lines/tracks LDZ ADD JMP2r .lines/folders LDZ .lines/tracks LDZ ADD JMP2r
@has-spacer ( -- f )
[ LIT2 00 -lines/folders ] LDZ NEQ
( .. ) [ LIT2 00 -lines/tracks ] LDZ NEQ AND JMP2r
@is-folder ( line* -- line* f ) @is-folder ( line* -- line* f )
DUP2 lcap/ #0001 SUB2 LDA [ LIT "/ ] EQU JMP2r DUP2 lcap/ #0001 SUB2 LDA [ LIT "/ ] EQU JMP2r
@ -513,32 +575,54 @@
#0008 .Screen/x DEO2 #0008 .Screen/x DEO2
;dict/empty #0f !<draw-uf2> } ;dict/empty #0f !<draw-uf2> }
( | folders ) ( | folders )
;mem/folders .lines/folders LDZ .selection LDZ <draw-folders> <draw-folders>
has-spacer #00 EQU ?{ ;dash-icn <draw-spacer> }
;mem/tracks .lines/tracks LDZ .selection LDZ .lines/folders LDZ SUB
( >> ) ( >> )
@<draw-files> ( addr* length selection -- ) @<draw-tracks> ( -- )
,&sel STR .selection LDZ .lines/folders LDZ SUB ,&sel STR
DUP ?{ POP2 POP JMP2r }
#0008 .Screen/x DEO2 #0008 .Screen/x DEO2
#00 SWP2 ,&t STR2 .lines/tracks LDZ #00 NEQk ?{ POP2 JMP2r }
.selection/scroll LDZ .lines/folders LDZ LTH ?{
.selection/scroll LDZ .lines/folders LDZ SUB ADD }
&>l ( -- ) &>l ( -- )
( scroll ) DUP #18 LTH ?{ POP2 JMP2r }
[ LITr 05 ] [ LITr 05 ]
( | selected ) ( | selected )
DUP [ LIT &sel $1 ] NEQ ?{ DUP [ LIT &sel $1 ] NEQ ?{
POPr [ LITr 06 ] ;fill-icn <draw-background> } POPr [ LITr 06 ] ;fill-icn <draw-background> }
( | marker ) ( | marker )
DUP .selection/scroll LDZ ADD .selection/track LDZ NEQ ?{ DUP .selection/track LDZ NEQ ?{
[ LIT2 15 -Screen/auto ] DEO [ LIT2 15 -Screen/auto ] DEO
#0000 .Screen/x DEO2 #0000 .Screen/x DEO2
;poke-icn .Screen/addr DEO2 ;poke-icn .Screen/addr DEO2
DUPr [ LITr -Screen/sprite ] DEOr } DUPr [ LITr -Screen/sprite ] DEOr }
( | normal ) ( | normal )
#0008 .Screen/x DEO2 #0008 .Screen/x DEO2
#00 OVR .selection/scroll LDZ ADD #00 OVR
( CELLSIZE ) #70 SFT2 [ LIT2 &t $2 ] ADD2 STHr <draw-uf2> ( CELLSIZE ) #70 SFT2 ;mem/tracks ADD2 STHr <draw-uf2-track>
.Screen/y DEI2k #0010 ADD2 ROT DEO2
INC GTHk ?&>l
POP2 JMP2r
@<draw-folders> ( -- )
.selection LDZ ,&sel STR
#0008 .Screen/x DEO2
.lines/folders LDZ #00 NEQk ?{ POP2 JMP2r }
.selection/scroll LDZ ADD GTHk ?{ POP2 JMP2r }
&>l ( -- )
[ LITr 05 ]
( | selected )
DUP [ LIT &sel $1 ] NEQ ?{
POPr [ LITr 06 ] ;fill-icn <draw-background> }
( | gizmo )
.Screen/y DEI2 [ LIT2 15 -Screen/auto ] DEO
.Screen/width DEI2 #0010 SUB2 .Screen/x DEO2
[ LIT2 00 "> ] #20 SUB #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2
DUPr [ LITr -Screen/sprite ] DEOr
.Screen/y DEO2
( | normal )
#0008 .Screen/x DEO2
#00 OVR
( CELLSIZE ) #70 SFT2 ;mem/folders ADD2 STHr <draw-uf2-folder>
.Screen/y DEI2k #0010 ADD2 ROT DEO2 .Screen/y DEI2k #0010 ADD2 ROT DEO2
INC GTHk ?&>l INC GTHk ?&>l
POP2 JMP2r POP2 JMP2r
@ -576,10 +660,23 @@
<draw-next> <draw-next>
<draw-progress> !<draw-timestamp> <draw-progress> !<draw-timestamp>
@<draw-title-scroll> ( -- )
;id3/title get-uf2-width #00d0 LTH2 ?{
[ LIT2 &f $2 ] INC2k ,&f STR2
DUP #0f AND ?{
#0020 .Screen/y DEO2
<clear-line>
#0001 .Screen/x DEO2
#0020 .Screen/y DEO2
#04 SFT2 ;id3/title !<draw-uf2-scroll> }
POP2 }
JMP2r
@<draw-title> ( -- ) @<draw-title> ( -- )
( | clear ) ( | clear )
#0020 .Screen/y DEO2 #0020 .Screen/y DEO2
<clear-line> <clear-line>
#0000 ;<draw-title-scroll>/f STA2
( | draw ) ( | draw )
#0020 .Screen/y DEO2 #0020 .Screen/y DEO2
;id3/title get-uf2-width #00d0 LTH2 ?{ ;id3/title get-uf2-width #00d0 LTH2 ?{
@ -744,30 +841,6 @@
.Screen/y DEO2 .Screen/y DEO2
JMP2r JMP2r
@<draw-folders> ( addr* length selection -- )
,&sel STR
DUP ?{ POP2 POP JMP2r }
#0008 .Screen/x DEO2
#00 SWP2 ,&t STR2
&>l ( -- )
[ LITr 05 ]
( | selected )
DUP [ LIT &sel $1 ] NEQ ?{
POPr [ LITr 06 ] ;fill-icn <draw-background> }
( | gizmo )
.Screen/y DEI2 [ LIT2 15 -Screen/auto ] DEO
.Screen/width DEI2 #0010 SUB2 .Screen/x DEO2
[ LIT2 00 "> ] #20 SUB #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2
DUPr [ LITr -Screen/sprite ] DEOr
.Screen/y DEO2
( | normal )
#0008 .Screen/x DEO2
#00 OVR
( CELLSIZE ) #70 SFT2 [ LIT2 &t $2 ] ADD2 STHr <draw-uf2>
.Screen/y DEI2k #0010 ADD2 ROT DEO2
INC GTHk ?&>l
POP2 JMP2r
@get-uf2-width ( text* -- width* ) @get-uf2-width ( text* -- width* )
[ LIT2r 0000 ] [ LIT2r 0000 ]
&>while ( -- ) &>while ( -- )
@ -775,10 +848,33 @@
ADD2r next-glyph LDAk ?&>while ADD2r next-glyph LDAk ?&>while
POP2 STH2r JMP2r POP2 STH2r JMP2r
@<draw-uf2-scroll> ( offset* text* -- )
[ LIT2 15 -Screen/auto ] DEO
.Screen/width DEI2 ,&bound STR2
STH2k llen DIV2k MUL2 SUB2 STH2kr ADD2
&>w ( -- )
.Screen/x DEI2 [ LIT2 &bound $2 ] LTH2 ?{ POP2 POP2r JMP2r }
LDAk DUP ?{
POP2 POP STH2kr #20 <draw-glyph> !&>w }
<draw-glyph>
next-glyph !&>w
@<draw-uf2-center> ( text* color -- ) @<draw-uf2-center> ( text* color -- )
STH STH
.Screen/x DEI2 OVR2 get-uf2-width #01 SFT2 SUB2 .Screen/x DEO2 .Screen/x DEI2 OVR2 get-uf2-width #01 SFT2 SUB2 .Screen/x DEO2
STHr STHr !<draw-uf2>
@<draw-uf2-folder> ( text* color -- )
STH
.prefix/folders LDZ #03 GTH ?{ STHr !<draw-uf2> }
;dict/ellipses STHkr <draw-uf2>
[ LIT2 00 -prefix/folders ] LDZ ADD2 STHr !<draw-uf2>
@<draw-uf2-track> ( text* color -- )
STH
.prefix/tracks LDZ #03 GTH ?{ STHr !<draw-uf2> }
;dict/ellipses STHkr <draw-uf2>
[ LIT2 00 -prefix/tracks ] LDZ ADD2 STHr
( >> ) ( >> )
@<draw-uf2> ( text* color -- ) @<draw-uf2> ( text* color -- )
@ -786,18 +882,13 @@
[ LIT2 15 -Screen/auto ] DEO [ LIT2 15 -Screen/auto ] DEO
.Screen/width DEI2 #0018 SUB2 ,&bound STR2 .Screen/width DEI2 #0018 SUB2 ,&bound STR2
&>w ( -- ) &>w ( -- )
LDAk [ LIT ". ] NEQ ?{ INC2k ;dict/mp3-ext scmp3 ?&end }
LDAk <draw-glyph> LDAk <draw-glyph>
( | trim ) ( | trim )
.Screen/x DEI2 [ LIT2 &bound $2 ] LTH2 ?{ .Screen/x DEI2 [ LIT2 &bound $2 ] LTH2 ?{
POP2 [ LIT ". ] <draw-glyph> POP2 [ LIT ". ] <draw-glyph>
[ LIT ". ] !<draw-glyph> } [ LIT ". ] !<draw-glyph> }
next-glyph LDAk ?&>w next-glyph LDAk ?&>w &end POP2 JMP2r
POP2 JMP2r
@next-glyph ( addr* -- addr* )
INC2 LDAk
( utf8 ) #06 SFT #02 EQU ?next-glyph
JMP2r
@<draw-glyph> ( char -- ) @<draw-glyph> ( char -- )
DUP #7f LTH ?{ DUP #7f LTH ?{
@ -811,6 +902,11 @@
.Screen/x DEO2 .Screen/x DEO2
JMP2r JMP2r
@next-glyph ( addr* -- addr* )
INC2 LDAk
( utf8 ) #06 SFT #02 EQU ?next-glyph
JMP2r
@<update-cursor> ( color addr* -- ) @<update-cursor> ( color addr* -- )
;fill-icn .Screen/addr DEO2 ;fill-icn .Screen/addr DEO2
#40 <draw-cursor> #40 <draw-cursor>
@ -829,6 +925,10 @@
( (
@|stdlib ) @|stdlib )
@cflc ( c -- lowercase )
DUP #41 SUB #1a GTH ?{ #20 ADD }
JMP2r
@scap ( str* -- end* ) @scap ( str* -- end* )
INC2 & LDAk ?scap INC2 & LDAk ?scap
JMP2r JMP2r
@ -939,6 +1039,7 @@
&pause-cmd "pause 0a $1 &pause-cmd "pause 0a $1
&no-artist "Unknown 20 "Artist $1 &no-artist "Unknown 20 "Artist $1
&no-album "Unknown 20 "Album $1 &no-album "Unknown 20 "Album $1
&ellipses "... 20 $1
~src/assets.tal ~src/assets.tal