From 50fcc9ec8d0b210e1f457a55f1a41e3f17247d58 Mon Sep 17 00:00:00 2001 From: Derek Stevens Date: Sun, 15 Aug 2021 22:26:23 -0600 Subject: [PATCH] fix scanline rendering, update tileset, add script for staritng and terminating 9p client --- uxn-client/uxn-xrxs.sh | 8 ++++++ uxn-client/xrxs.chr | Bin 8192 -> 8192 bytes uxn-client/xrxs.tal | 57 +++++++++++++++++++---------------------- 3 files changed, 35 insertions(+), 30 deletions(-) create mode 100644 uxn-client/uxn-xrxs.sh diff --git a/uxn-client/uxn-xrxs.sh b/uxn-client/uxn-xrxs.sh new file mode 100644 index 0000000..860b83b --- /dev/null +++ b/uxn-client/uxn-xrxs.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +ADDR=localhost +PORT=2650 + +9pfuse 'tcp!${ADDR}!${PORT}' ./n/ & +uxnemu ./xrxs.rom +echo "logout" >> ./n/ctl \ No newline at end of file diff --git a/uxn-client/xrxs.chr b/uxn-client/xrxs.chr index 805633cd242faeee50a93fa66cf594bb1527404e..469814bc8abfd7a26aad5e1318252441eddfb301 100644 GIT binary patch delta 168 zcmZp0XmD7-GSPvno{@=#LqLH61{&s10D}22E(3$yLLjh5@a-Hx0KsqRn6Ti%1Q=g{ rgN2C^#sSh`!x|6*Aj1?9Tm}abpka1M0v#R82&SW5uDFp&%nSB6oUfh%?nwsGvZPHhk@Y(LiquZa!CM6&_A{S diff --git a/uxn-client/xrxs.tal b/uxn-client/xrxs.tal index ed663af..47a2d1f 100644 --- a/uxn-client/xrxs.tal +++ b/uxn-client/xrxs.tal @@ -40,8 +40,8 @@ &y $2 ] -@cart $64 -@realm $64 +@cart $32 +@realm $32 ( program ) @@ -74,35 +74,40 @@ BRK @on-frame ( -> ) - - ( draw a piece of the logos ~ every half second ) .ticker LDZ #01 ADD DUP .anim-speed LDZ EQU ,&next-render JCN .ticker STZ BRK - - &next-render POP #00 .ticker STZ .state LDZ + ( draw uxn logo ) DUP #00 NEQ ,&state1 JCN ;draw-uxn-logo JSR2 #01 ADD .state STZ BRK + + ( draw first syllable of xrxs logo ) &state1 DUP #01 NEQ ,&state2 JCN ;draw-xrxs-logo-xr JSR2 #01 ADD .state STZ BRK + + ( draw second syllable of xrxs logo ) &state2 DUP #02 NEQ ,&state3 JCN ;draw-xrxs-logo-xs JSR2 #01 ADD .state STZ BRK + + ( clear screen ) &state3 ;clear-screen JSR2 + + ( move shove logo into top-left corner ) DUP #03 NEQ ,&state4 JCN #04 .anim-speed STZ ;scoot-logos JSR2 @@ -113,12 +118,14 @@ BRK #01 ADD .state STZ BRK &keep-state POP BRK + + ( render the logo and window decorations ) &state4 DUP #04 NEQ ,&state5 JCN ;draw-gray-borders JSR2 - ( ;draw-bl-scanlines JSR2 + ;draw-bl-scanlines JSR2 ;draw-tl-scanlines JSR2 ;draw-tr-scanlines JSR2 - ;draw-br-scanlines JSR2 ) + ;draw-br-scanlines JSR2 ;draw-uxn-logo JSR2 ;draw-xrxs-logo-xr JSR2 ;draw-xrxs-logo-xs JSR2 @@ -251,11 +258,8 @@ RTN CENTER-Y ,&y STR2 #0008 ,&x STR2 - ,&x LDR2 .Screen/x DEO2 - ,&y LDR2 .Screen/y DEO2 - &whileld - ,&y LDR2 CENTER-Y SUB2 #0004 DIV2 #0008 ADD2 ,&x STR2 + ,&y LDR2 CENTER-Y SUB2 #0010 DIV2 DUP2 ADD2 #0008 ADD2 ,&x STR2 .Screen/height DEI2 #0028 SUB2 ,&y LDR2 LTH2 ,&endld JCN &dlscan #0040 ,&x LDR2 EQU2 ,&enddlscan JCN ,&x LDR2 .Screen/x DEO2 @@ -271,10 +275,8 @@ RTN #0028 ,&y STR2 #0008 ,&x STR2 - ,&x LDR2 .Screen/x DEO2 - ,&y LDR2 .Screen/y DEO2 -&whilelu - CENTER-Y ,&y LDR2 SUB2 #0004 DIV2 #0008 ADD2 ,&x STR2 + &whilelu + CENTER-Y ,&y LDR2 SUB2 #0010 DIV2 DUP2 ADD2 #0008 ADD2 ,&x STR2 CENTER-Y ,&y LDR2 LTH2 ,&endlu JCN &ulscan #0040 ,&x LDR2 EQU2 ,&endulscan JCN ,&x LDR2 .Screen/x DEO2 @@ -289,19 +291,16 @@ RTN @draw-br-scanlines ( -> ) CENTER-Y ,&y STR2 - .Screen/width #0008 SUB2 ,&x STR2 - - ,&x LDR2 .Screen/x DEO2 - ,&y LDR2 .Screen/y DEO2 + .Screen/width DEI2 #0008 SUB2 ,&x STR2 &whilerd - .Screen/width DEI2 ,&y LDR2 CENTER-Y SUB2 #0004 DIV2 #0008 ADD2 SUB2 ,&x STR2 + .Screen/width DEI2 #0040 SUB2 ,&x STR2 .Screen/height DEI2 #0028 SUB2 ,&y LDR2 LTH2 ,&endrd JCN - &drscan .Screen/width DEI2 #0040 SUB2 ,&x LDR2 EQU2 ,&enddrscan JCN + &drscan .Screen/width DEI2 #0008 SUB2 ,&y LDR2 CENTER-Y SUB2 #0010 DIV2 DUP2 ADD2 SUB2 ,&x LDR2 EQU2 ,&enddrscan JCN ,&x LDR2 .Screen/x DEO2 ,&y LDR2 .Screen/y DEO2 #03 .Screen/pixel DEO - ,&x LDR2 #0001 SUB2 ,&x STR2 ,&drscan JMP &enddrscan + ,&x LDR2 #0001 ADD2 ,&x STR2 ,&drscan JMP &enddrscan ,&y LDR2 #0004 ADD2 ,&y STR2 ,&whilerd JMP &endrd RTN &x $2 @@ -309,18 +308,16 @@ RTN @draw-tr-scanlines #0028 ,&y STR2 - .Screen/width #0008 SUB2 ,&x STR2 + .Screen/width DEI2 #0008 SUB2 ,&x STR2 - ,&x LDR2 .Screen/x DEO2 - ,&y LDR2 .Screen/y DEO2 -&whileru - .Screen/width DEI2 CENTER-Y ,&y LDR2 SUB2 #0004 DIV2 #0008 ADD2 SUB2 ,&x STR2 + &whileru + .Screen/width DEI2 #0040 SUB2 ,&x STR2 CENTER-Y ,&y LDR2 LTH2 ,&endru JCN - &urscan .Screen/width DEI2 #0040 SUB2 ,&x LDR2 EQU2 ,&endurscan JCN + &urscan .Screen/width DEI2 #0008 SUB2 CENTER-Y ,&y LDR2 SUB2 #0010 DIV2 DUP2 ADD2 SUB2 ,&x LDR2 EQU2 ,&endurscan JCN ,&x LDR2 .Screen/x DEO2 ,&y LDR2 .Screen/y DEO2 #03 .Screen/pixel DEO - ,&x LDR2 #0001 SUB2 ,&x STR2 ,&urscan JMP &endurscan + ,&x LDR2 #0001 ADD2 ,&x STR2 ,&urscan JMP &endurscan ,&y LDR2 #0004 ADD2 ,&y STR2 ,&whileru JMP &endru RTN