From 1505fe686a5683c2329d98a973b21f67554026bb Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sun, 21 Mar 2021 19:55:54 +0100 Subject: [PATCH] updated vtui example --- examples/cx16/vtui/VTUI0.6.BIN | Bin 954 -> 0 bytes examples/cx16/vtui/VTUI0.8.BIN | Bin 0 -> 1008 bytes examples/cx16/vtui/testvtui.p8 | 69 ++++++++++++++++++++++++--------- 3 files changed, 50 insertions(+), 19 deletions(-) delete mode 100644 examples/cx16/vtui/VTUI0.6.BIN create mode 100644 examples/cx16/vtui/VTUI0.8.BIN diff --git a/examples/cx16/vtui/VTUI0.6.BIN b/examples/cx16/vtui/VTUI0.6.BIN deleted file mode 100644 index f5e7111c53bc739bcdee3b15785fd80b3038eee1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 954 zcmbtSJ%|%Q6rP!##Qa?X(IQyLZj$3Xu&_F=5Da$efM?;gx6P>${3-l_17V9iNO3u0 zDvQ8`BYQAlBuOQrg^f5@9E(^e3TokLnscoV8_&1dTsU%eF3aqD-}}D(-neeS20S%dfZvhj#Jqu4(hWI2}) z1(87Dyt6g&W19I~?|Fu~v}bqnvd-hwVY7c~d1)u`0fyjgCc*+BtjDmv8>F>@Tq_`2 zkWcXwW>s%@6m6Lj-yKUQeSyUPb>9i|p-UFycP*^QPFi-Tx_lvi1bv+kXpEa^TC!=%)LDc5O-QN|q+m*&gEVBE>)PO3;8Ambu3Emue$M3$8Kuex*H3_@ig1fYSqn5fH-28;e1`=c+HYXanpwxTb6W_Asm=Zg&`hT z_-{860yd5iFUI9{x;8Dt6W_lPicVgMkt>=ur{xCk6lAR^!*$d9wZZWm!r^~&W`^Yk m+h!iyHjuL)ZhGGj5I_Exe^KHlI>YrJ{(Xkk(EmU<>HilyNQDUi diff --git a/examples/cx16/vtui/VTUI0.8.BIN b/examples/cx16/vtui/VTUI0.8.BIN new file mode 100644 index 0000000000000000000000000000000000000000..7202dac8961eb4e49e9ff76c595834fbbd59769f GIT binary patch literal 1008 zcma)4O-oc!7(Vx$bEo-GXZ*-aCC=zb7%f~H2udrn1J$AyZaf=fCg@`k1wwF%d0`MI zMj>z^oLP9K6HS=(1A;#26vzz{B7`6+xC>*Th0r2$ciJ6Ida4iHAh-1k1`2N5@PZ|%?vOz3EYf> zYZSx;CBxx4po<{^=F_eM1Maf|0k`Tr;&n%@@qlB{+qK50=>mq+Y@YkPL3AUcx2Y_t z$1SaMyAv=mwWDf%y22BVM+bkD`?N~p2Nc1usi))J^X!g zXE9W>QF{DOK3@vH?t|8a#{X+pWA3w>%j#rVXk|quWydNBt5#V!s>}st$5szmvFaAa zl)0gR7hNME1BdhXhQk(U&5vUf+7`PC9J=#ZSx=QbbL;6xG{=XSI7~!_y!5uzQdTbs zT|Ham)sbTCfzU;|Oy`7N=J-%7pcHK5Q(nY^P+2G7=At)aX>i0`fw;K_33CgQ<}#$r z7&Jk%ISDP0_VShmZRQj*&LiVAGA1D9ZCW1mnX`zVL39RDiMpH6WUiv}I<%Nes6B37 z)J`F*fUFQ%A5i50MLJAuPZqCj07^gg-P3tN(8C-^6E@-kepjUXUU+3JR ubyte @A, ubyte @X romsub $101a = hline(ubyte char @A, ubyte length @Y, ubyte colors @X) clobbers(A) romsub $101d = vline(ubyte char @A, ubyte height @Y, ubyte colors @X) clobbers(A) - romsub $1020 = print_str(str string @R0, ubyte colors @X, ubyte convertchars @A) clobbers(A, Y) + romsub $1020 = print_str(str txtstring @R0, ubyte length @Y, ubyte colors @X, ubyte convertchars @A) clobbers(A, Y) romsub $1023 = fill_box(ubyte char @A, ubyte width @R1, ubyte height @R2, ubyte colors @X) clobbers(A, Y) romsub $1026 = pet2scr(ubyte char @A) -> ubyte @A romsub $1029 = scr2pet(ubyte char @A) -> ubyte @A romsub $102c = border(ubyte mode @A, ubyte width @R1, ubyte height @R2, ubyte colors @X) clobbers(Y) ; NOTE: mode 6 means 'custom' characters taken from r3 - r6 romsub $102f = save_rect(ubyte ramtype @A, ubyte vbank @Pc, uword address @R0, ubyte width @R1, ubyte height @R2) clobbers(A, X, Y) romsub $1032 = rest_rect(ubyte ramtype @A, ubyte vbank @Pc, uword address @R0, ubyte width @R1, ubyte height @R2) clobbers(A, X, Y) + romsub $1035 = input_str(uword buffer @R0, ubyte buflen @Y, ubyte colors @X) clobbers (A) -> ubyte @Y + + ; -- helper function to do string length counting for you internally + asmsub print_str2(str txtstring @R0, ubyte colors @X, ubyte convertchars @A) clobbers(A, Y) { + %asm {{ + pha + lda cx16.r0 + ldy cx16.r0+1 + jsr prog8_lib.strlen + pla + jmp print_str + }} + } }