From a2e01f8a5e0221f3c31d39ba5893e13a8fe51c7e Mon Sep 17 00:00:00 2001 From: neauoire Date: Sun, 29 Oct 2023 12:21:40 -0700 Subject: [PATCH] (sixels) Cleanup --- gui/sixels/build.sh | 5 ++--- gui/sixels/dafu.sixels | 2 +- gui/sixels/icnsix.tal | 14 -------------- gui/sixels/sixels.tal | 37 +++++++------------------------------ 4 files changed, 10 insertions(+), 48 deletions(-) diff --git a/gui/sixels/build.sh b/gui/sixels/build.sh index 325c81c..87ea5d4 100755 --- a/gui/sixels/build.sh +++ b/gui/sixels/build.sh @@ -26,9 +26,8 @@ fi # convert an image to sixels $ASM icnsix.tal icnsix.rom -# uxncli icnsix.rom dafu10x10.icn > dafu.sixels - -uxncli icnsix.rom test02x02.icn > dafu.sixels +uxncli icnsix.rom dafu10x10.icn > dafu.sixels +# uxncli icnsix.rom test02x02.icn > dafu.sixels $EMU $DST $ARG diff --git a/gui/sixels/dafu.sixels b/gui/sixels/dafu.sixels index f192a43..49ae149 100644 --- a/gui/sixels/dafu.sixels +++ b/gui/sixels/dafu.sixels @@ -1 +1 @@ -!4~!4F!8_-!16?-!16?- \ No newline at end of file +!44?!3_!3owo!10wow!3o!3_!58?-!32?__oww{{}}~!3^!3nvv~r~J!8z~zvz!5vn!3m!3[!4wowoo!4_!38?-!25?o_ww}}^Nnvvzz||}}!11~?n!23~!3}~|~||~|z~z~}{{o!32?-!17?_ow{{}^nvrz|{}!22~s@!40~J!32?-!10?Go!3wy!3|{|}}!31~_n!37~n@!33?-!11?^!23~^~^!3n!3vzvzz|z!3|^{FL\~}|~}~|}~|}~!6|~x!3z~v~v!6~^B!35?-!12?@F^!10~^^nv~r|z{}}!17~}w{{y!33~O!36?-!15?@BF^~vvx|}!9~^^n^nn!3vrv!3zjHB`@``p_p_tsu}mvm~u}~u~e~}k~|{|~x~zz~~F~n^t!36?-!19?@!3~^~nvvz|z{}}!14~^~V@@!4?VZv~N!22~^nRz}~}v!36?-!19?]lpnoz!16~^~^~^~^T^?O_!3OGOwOv~~v~vz~Z!3~!3^n^nNZVr|bdACD|~fO?OO_!32?-!19?C@RaFN~~vVfeNfMFnVMfMVFVFVFUBVBV`e_aAqApJHPLPKA]KF?a_pop!4o_o__O!4?QP!3?iC!33?-!20?A?E@QKJ~h??@A@FxA?WFHDDL@DLBkOB@It@?W!8?_cKEJPJCJJDFCDBB!7?|?AGs!35?-!22?@@CQ`?jO!5?vOoDYOo?xOwHoYL??weW_O?o?c__?_??@!19?tAWD!37?-!28?PfS_WcJCB?@AA?B?A?@A?@?@@!3?@@?@?A?BC@DADC@E@EACHAGE?ACIAIe!41?-!29?offDO!31?_!18?_{x_W?O!3_!34?-!18?G?!3_wOWcy|{u?\~}{o!20?`apaqcqpop__!12?_w]bN!5~}{{|xwzqqacACC!5G!3O_O__?_!6?_??-!8?_O_W?kouw}x]Mfp{!5~A|~wf!4~}{wo_G!11?nuvdlNT\LTfTr~F!6?A?_x{Np}~g!14~^Nbo{~~}}{KEcq!3wx{!3xyxyqsc-OGCCaa`@_{}}!5~J?{}!7~^?!3~}~z^!7~}{{oo_a!6?BBFFDLDeEb@_!4?__w{~^np}!3~}!12~Nbw}!4~^Fpw}!14~^NF-{}!6~oN!7~h?^!8~nO!8~|~v~^~^!7~}}{{!3w!4o}@u@F[ow{}!5~}^~^!13~N`s}!5~Fp}!14~NFB??_o-!9~{B^!5~}?T!8~|A!14~}~|zzvvN^NNFF!3B@B@bA|FKOJxopwo!4w}{}}!10~Fq{!6~nA{!12~NF@?_w{}!3~-N^!9~wF!5~ch!9~oF!3~^^N^NFNFF!3B!3@!11?CBYPoH}_@IsN!5^~^~^!12~{!8~Gq!9~NF@?_w{!8~-B??@!8B?!5BA?!9BA!3@!31?A??B!3?B!13?A!16B?!9B!3?A!11B@- \ No newline at end of file diff --git a/gui/sixels/icnsix.tal b/gui/sixels/icnsix.tal index add5899..124b624 100644 --- a/gui/sixels/icnsix.tal +++ b/gui/sixels/icnsix.tal @@ -25,7 +25,6 @@ #00 ;img/width LDA #00 ;img/height LDA #30 SFT2 MUL2 .File/length DEO2 ;img/data .File/read DEO2 - #010e DEO #800f DEO BRK @@ -41,8 +40,6 @@ @| core ) @ ( -- ) - #0000 #0000 get-sixel #19 DEO - #0a19 DEO #00 ;img/height LDA #30 SFT2 #0000 &v ( -- ) STH2k #00 ;img/width LDA #30 SFT2 #0000 @@ -106,9 +103,6 @@ ( hex ) #27 SUB DUP #0f GTH ?{ JMP2r } ( err ) POP #ff JMP2r -@slen ( str* -- len* ) - DUP2 scap SWP2 SUB2 JMP2r - @scap ( str* -- end* ) LDAk #00 NEQ [ JMP JMP2r ] &w INC2 LDAk ?&w JMP2r @@ -122,14 +116,6 @@ POP2 #000a DIV2 SWPr INCr STHkr ?&w POP2r POP2 POP2 JMP2r -@phex ( short* -- ) - SWP phex/b - &b ( -- ) - DUP #04 SFT phex/c - &c ( -- ) - #0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD #19 DEO - JMP2r - ( @|memory ) diff --git a/gui/sixels/sixels.tal b/gui/sixels/sixels.tal index 3b91b34..1cbfe0d 100644 --- a/gui/sixels/sixels.tal +++ b/gui/sixels/sixels.tal @@ -15,8 +15,8 @@ #f0e2 .System/b DEO2 #0010 DUP2 .Screen/x DEO2 .Screen/y DEO2 - #0120 DUP2 .Screen/width DEO2 - .Screen/height DEO2 + #00a0 .Screen/width DEO2 + #00b0 .Screen/height DEO2 ( | begin ) ;on-console .Console/vector DEO2 BRK @@ -31,6 +31,7 @@ #8000 .File/length DEO2 ;img/data .File/read DEO2 ;img/data + ;sample BRK @ ( data* -- ) @@ -50,27 +51,20 @@ !& @/op-rle ( addr* -- addr* ) - LDAk #19 DEO - INC2k sdec pdec #2019 DEO - LDA #19 DEO - #0a19 DEO - - ( rune ) INC2 ( length ) sdec - ( target ) OVR2 LDA [ LIT "? ] SUB ,&t STR #0000 &l ( -- ) - [ LIT &t $1 ] DUP #19 DEO /op-col - INC2 GTH2k ?&l #0a19 DEO - POP2 POP2 INC2 !/ + [ LIT &t $1 ] /op-col + INC2 GTH2k ?&l + POP2 POP2 !/ @/op-col ( byte -- ) ,&t STR #0600 &l ( -- ) - [ LIT &t $1 ] OVR SFT #01 AND .Screen/pixel DEO + [ LIT &t $1 ] OVR SFT #01 AND INC INC .Screen/pixel DEO INC GTHk ?&l POP2 ( | advance ) @@ -94,23 +88,6 @@ LDAk #00 NEQ [ JMP JMP2r ] &w INC2 LDAk ?&w JMP2r -@phex ( short* -- ) - SWP phex/b - &b ( -- ) - DUP #04 SFT phex/c - &c ( -- ) - #0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD #18 DEO - JMP2r - -@pdec ( short* -- ) - #2710 [ LIT2r 00fb ] - &w ( -- ) - DIV2k #000a DIV2k MUL2 SUB2 SWPr EQUk OVR STHkr EQU AND ?{ - DUP [ LIT "0 ] ADD #19 DEO - INCr } - POP2 #000a DIV2 SWPr INCr STHkr ?&w - POP2r POP2 POP2 JMP2r - ( @|memory )