fix scanline rendering, update tileset, add script for staritng and terminating 9p client

This commit is contained in:
Iris Lightshard 2021-08-15 22:26:23 -06:00
parent dd3d318039
commit 50fcc9ec8d
Signed by: Iris Lightshard
GPG key ID: 3B7FBC22144E6398
3 changed files with 35 additions and 30 deletions

8
uxn-client/uxn-xrxs.sh Normal file
View file

@ -0,0 +1,8 @@
#!/bin/sh
ADDR=localhost
PORT=2650
9pfuse 'tcp!${ADDR}!${PORT}' ./n/ &
uxnemu ./xrxs.rom
echo "logout" >> ./n/ctl

Binary file not shown.

View file

@ -40,8 +40,8 @@
&y $2
]
@cart $64
@realm $64
@cart $32
@realm $32
( program )
@ -75,34 +75,39 @@ 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
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
.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