fix scanline rendering, update tileset, add script for staritng and terminating 9p client
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmEZ6O8ACgkQO3+8IhRO Y5iicxAAkukhve+jLHAlhY/tIgYugnlHKoQxCniRDMopywdyOyGY6ZXb0ohgaLBS O3kqYIcKsqY78rUfFEdbKh4E2jaEzFIYdFWyX0aUEL7oWyXbbtvRuCDdwjYE62FV SLlaPrRezrEjcThwmqbO1vEP+ycYta9zWT27IZS60Lr72U1LPEkVV1ewFpOlBRKC ALjl3FToWwO9zmEDhZ0nq6lMWIdF7htAqGQ2Qjil31e3J6wJB/OaqF9e4KBWHGGe XMG69pvHH/R0CiuJrvxnMVsnYOKhsIbxlOycIvmAAi4yQWl4H3lekTmiVBx/9TKE 4wG3K2ThGzYYPd80hDyzd4Ap/DfcT6CMyetSu/9sdKQubpbGaiUZAMVL4xB7bey/ qFggIMYfrZbZsGhd7ORpnQmKqk6JYRItIt7Z68FW/QtVq2o5z7+Q9cHkBwqPGUtV qknFXpxEp96hNM1OO8g43W4P7quwy1RTgGEak3CWJHHrCONfhzQ7pDYg6YdoahdJ 1A+eS2eDiF2IDLqkUxvgI2SqC1b8AtQOyObBjnmw1ICu41zHoFV6CZ0ts0l0xyCF zjQj5QHVfCKh3gSpXDQul+kUS9RCI2YXnP+UNu6yB7Ooolme6gdaCA9uYJZYHmHH meAawVquJY/cR/HTZgiI5A0/5b8yBxd67eTf9YrUzzyn/TyZg1o= =SpK6 -----END PGP SIGNATURE-----
3 files changed,
35 insertions(+),
30 deletions(-)
A
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
M
uxn-client/xrxs.tal
→
uxn-client/xrxs.tal
@@ -40,8 +40,8 @@ &x $2
&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 @@ .logo-coords/x LDZ2 #0020 GTH2 ,&keep-state JCN
#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 @@ @draw-bl-scanlines ( -> )
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 @@ @draw-tl-scanlines
#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 @@ &y $2
@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 @@ &y $2
@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