(sixels) Cleanup
This commit is contained in:
parent
0ca5b39456
commit
a2e01f8a5e
|
@ -26,9 +26,8 @@ fi
|
||||||
# convert an image to sixels
|
# convert an image to sixels
|
||||||
|
|
||||||
$ASM icnsix.tal icnsix.rom
|
$ASM icnsix.tal icnsix.rom
|
||||||
# uxncli icnsix.rom dafu10x10.icn > dafu.sixels
|
uxncli icnsix.rom dafu10x10.icn > dafu.sixels
|
||||||
|
# uxncli icnsix.rom test02x02.icn > dafu.sixels
|
||||||
uxncli icnsix.rom test02x02.icn > dafu.sixels
|
|
||||||
|
|
||||||
$EMU $DST $ARG
|
$EMU $DST $ARG
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
!4~!4F!8_-!16?-!16?-
|
!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@-
|
|
@ -25,7 +25,6 @@
|
||||||
#00 ;img/width LDA #00 ;img/height LDA #30 SFT2 MUL2 .File/length DEO2
|
#00 ;img/width LDA #00 ;img/height LDA #30 SFT2 MUL2 .File/length DEO2
|
||||||
;img/data .File/read DEO2
|
;img/data .File/read DEO2
|
||||||
<convert>
|
<convert>
|
||||||
#010e DEO
|
|
||||||
#800f DEO
|
#800f DEO
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
|
@ -41,8 +40,6 @@
|
||||||
@| core )
|
@| core )
|
||||||
|
|
||||||
@<convert> ( -- )
|
@<convert> ( -- )
|
||||||
#0000 #0000 get-sixel #19 DEO
|
|
||||||
#0a19 DEO
|
|
||||||
#00 ;img/height LDA #30 SFT2 #0000
|
#00 ;img/height LDA #30 SFT2 #0000
|
||||||
&v ( -- )
|
&v ( -- )
|
||||||
STH2k #00 ;img/width LDA #30 SFT2 #0000
|
STH2k #00 ;img/width LDA #30 SFT2 #0000
|
||||||
|
@ -106,9 +103,6 @@
|
||||||
( hex ) #27 SUB DUP #0f GTH ?{ JMP2r }
|
( hex ) #27 SUB DUP #0f GTH ?{ JMP2r }
|
||||||
( err ) POP #ff JMP2r
|
( err ) POP #ff JMP2r
|
||||||
|
|
||||||
@slen ( str* -- len* )
|
|
||||||
DUP2 scap SWP2 SUB2 JMP2r
|
|
||||||
|
|
||||||
@scap ( str* -- end* )
|
@scap ( str* -- end* )
|
||||||
LDAk #00 NEQ [ JMP JMP2r ] &w INC2 LDAk ?&w
|
LDAk #00 NEQ [ JMP JMP2r ] &w INC2 LDAk ?&w
|
||||||
JMP2r
|
JMP2r
|
||||||
|
@ -122,14 +116,6 @@
|
||||||
POP2 #000a DIV2 SWPr INCr STHkr ?&w
|
POP2 #000a DIV2 SWPr INCr STHkr ?&w
|
||||||
POP2r POP2 POP2 JMP2r
|
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 )
|
@|memory )
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
#f0e2 .System/b DEO2
|
#f0e2 .System/b DEO2
|
||||||
#0010 DUP2 .Screen/x DEO2
|
#0010 DUP2 .Screen/x DEO2
|
||||||
.Screen/y DEO2
|
.Screen/y DEO2
|
||||||
#0120 DUP2 .Screen/width DEO2
|
#00a0 .Screen/width DEO2
|
||||||
.Screen/height DEO2
|
#00b0 .Screen/height DEO2
|
||||||
( | begin )
|
( | begin )
|
||||||
;on-console .Console/vector DEO2
|
;on-console .Console/vector DEO2
|
||||||
BRK
|
BRK
|
||||||
|
@ -31,6 +31,7 @@
|
||||||
#8000 .File/length DEO2
|
#8000 .File/length DEO2
|
||||||
;img/data .File/read DEO2
|
;img/data .File/read DEO2
|
||||||
;img/data <draw-sixels>
|
;img/data <draw-sixels>
|
||||||
|
;sample <draw-sixels>
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
@<draw-sixels> ( data* -- )
|
@<draw-sixels> ( data* -- )
|
||||||
|
@ -50,27 +51,20 @@
|
||||||
!&
|
!&
|
||||||
|
|
||||||
@<draw-sixels>/op-rle ( addr* -- addr* )
|
@<draw-sixels>/op-rle ( addr* -- addr* )
|
||||||
LDAk #19 DEO
|
|
||||||
INC2k sdec pdec #2019 DEO
|
|
||||||
LDA #19 DEO
|
|
||||||
#0a19 DEO
|
|
||||||
|
|
||||||
|
|
||||||
( rune ) INC2
|
( rune ) INC2
|
||||||
( length ) sdec
|
( length ) sdec
|
||||||
|
|
||||||
( target ) OVR2 LDA [ LIT "? ] SUB ,&t STR
|
( target ) OVR2 LDA [ LIT "? ] SUB ,&t STR
|
||||||
#0000
|
#0000
|
||||||
&l ( -- )
|
&l ( -- )
|
||||||
[ LIT &t $1 ] DUP #19 DEO <draw-sixels>/op-col
|
[ LIT &t $1 ] <draw-sixels>/op-col
|
||||||
INC2 GTH2k ?&l #0a19 DEO
|
INC2 GTH2k ?&l
|
||||||
POP2 POP2 INC2 !<draw-sixels>/
|
POP2 POP2 !<draw-sixels>/
|
||||||
|
|
||||||
@<draw-sixels>/op-col ( byte -- )
|
@<draw-sixels>/op-col ( byte -- )
|
||||||
,&t STR
|
,&t STR
|
||||||
#0600
|
#0600
|
||||||
&l ( -- )
|
&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
|
INC GTHk ?&l
|
||||||
POP2
|
POP2
|
||||||
( | advance )
|
( | advance )
|
||||||
|
@ -94,23 +88,6 @@
|
||||||
LDAk #00 NEQ [ JMP JMP2r ] &w INC2 LDAk ?&w
|
LDAk #00 NEQ [ JMP JMP2r ] &w INC2 LDAk ?&w
|
||||||
JMP2r
|
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 )
|
@|memory )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue