fix scanline rendering, update tileset, add script for staritng and terminating 9p client
This commit is contained in:
parent
dd3d318039
commit
50fcc9ec8d
3 changed files with 35 additions and 30 deletions
8
uxn-client/uxn-xrxs.sh
Normal file
8
uxn-client/uxn-xrxs.sh
Normal 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.
|
@ -40,8 +40,8 @@
|
||||||
&y $2
|
&y $2
|
||||||
]
|
]
|
||||||
|
|
||||||
@cart $64
|
@cart $32
|
||||||
@realm $64
|
@realm $32
|
||||||
|
|
||||||
( program )
|
( program )
|
||||||
|
|
||||||
|
@ -74,35 +74,40 @@
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
@on-frame ( -> )
|
@on-frame ( -> )
|
||||||
|
|
||||||
( draw a piece of the logos ~ every half second )
|
|
||||||
|
|
||||||
.ticker LDZ #01 ADD
|
.ticker LDZ #01 ADD
|
||||||
DUP .anim-speed LDZ EQU ,&next-render JCN
|
DUP .anim-speed LDZ EQU ,&next-render JCN
|
||||||
.ticker STZ
|
.ticker STZ
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
&next-render
|
&next-render
|
||||||
POP #00 .ticker STZ
|
POP #00 .ticker STZ
|
||||||
.state LDZ
|
.state LDZ
|
||||||
|
|
||||||
|
( draw uxn logo )
|
||||||
DUP #00 NEQ ,&state1 JCN
|
DUP #00 NEQ ,&state1 JCN
|
||||||
;draw-uxn-logo JSR2
|
;draw-uxn-logo JSR2
|
||||||
#01 ADD .state STZ
|
#01 ADD .state STZ
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
|
( draw first syllable of xrxs logo )
|
||||||
&state1 DUP #01 NEQ ,&state2 JCN
|
&state1 DUP #01 NEQ ,&state2 JCN
|
||||||
;draw-xrxs-logo-xr JSR2
|
;draw-xrxs-logo-xr JSR2
|
||||||
#01 ADD .state STZ
|
#01 ADD .state STZ
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
|
( draw second syllable of xrxs logo )
|
||||||
&state2 DUP #02 NEQ ,&state3 JCN
|
&state2 DUP #02 NEQ ,&state3 JCN
|
||||||
;draw-xrxs-logo-xs JSR2
|
;draw-xrxs-logo-xs JSR2
|
||||||
|
|
||||||
#01 ADD .state STZ
|
#01 ADD .state STZ
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
|
( clear screen )
|
||||||
&state3
|
&state3
|
||||||
;clear-screen JSR2
|
;clear-screen JSR2
|
||||||
|
|
||||||
|
( move shove logo into top-left corner )
|
||||||
DUP #03 NEQ ,&state4 JCN
|
DUP #03 NEQ ,&state4 JCN
|
||||||
#04 .anim-speed STZ
|
#04 .anim-speed STZ
|
||||||
;scoot-logos JSR2
|
;scoot-logos JSR2
|
||||||
|
@ -113,12 +118,14 @@ BRK
|
||||||
#01 ADD .state STZ BRK
|
#01 ADD .state STZ BRK
|
||||||
&keep-state POP
|
&keep-state POP
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
|
( render the logo and window decorations )
|
||||||
&state4 DUP #04 NEQ ,&state5 JCN
|
&state4 DUP #04 NEQ ,&state5 JCN
|
||||||
;draw-gray-borders JSR2
|
;draw-gray-borders JSR2
|
||||||
( ;draw-bl-scanlines JSR2
|
;draw-bl-scanlines JSR2
|
||||||
;draw-tl-scanlines JSR2
|
;draw-tl-scanlines JSR2
|
||||||
;draw-tr-scanlines JSR2
|
;draw-tr-scanlines JSR2
|
||||||
;draw-br-scanlines JSR2 )
|
;draw-br-scanlines JSR2
|
||||||
;draw-uxn-logo JSR2
|
;draw-uxn-logo JSR2
|
||||||
;draw-xrxs-logo-xr JSR2
|
;draw-xrxs-logo-xr JSR2
|
||||||
;draw-xrxs-logo-xs JSR2
|
;draw-xrxs-logo-xs JSR2
|
||||||
|
@ -251,11 +258,8 @@ RTN
|
||||||
CENTER-Y ,&y STR2
|
CENTER-Y ,&y STR2
|
||||||
#0008 ,&x STR2
|
#0008 ,&x STR2
|
||||||
|
|
||||||
,&x LDR2 .Screen/x DEO2
|
|
||||||
,&y LDR2 .Screen/y DEO2
|
|
||||||
|
|
||||||
&whileld
|
&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
|
.Screen/height DEI2 #0028 SUB2 ,&y LDR2 LTH2 ,&endld JCN
|
||||||
&dlscan #0040 ,&x LDR2 EQU2 ,&enddlscan JCN
|
&dlscan #0040 ,&x LDR2 EQU2 ,&enddlscan JCN
|
||||||
,&x LDR2 .Screen/x DEO2
|
,&x LDR2 .Screen/x DEO2
|
||||||
|
@ -271,10 +275,8 @@ RTN
|
||||||
#0028 ,&y STR2
|
#0028 ,&y STR2
|
||||||
#0008 ,&x STR2
|
#0008 ,&x STR2
|
||||||
|
|
||||||
,&x LDR2 .Screen/x DEO2
|
&whilelu
|
||||||
,&y LDR2 .Screen/y DEO2
|
CENTER-Y ,&y LDR2 SUB2 #0010 DIV2 DUP2 ADD2 #0008 ADD2 ,&x STR2
|
||||||
&whilelu
|
|
||||||
CENTER-Y ,&y LDR2 SUB2 #0004 DIV2 #0008 ADD2 ,&x STR2
|
|
||||||
CENTER-Y ,&y LDR2 LTH2 ,&endlu JCN
|
CENTER-Y ,&y LDR2 LTH2 ,&endlu JCN
|
||||||
&ulscan #0040 ,&x LDR2 EQU2 ,&endulscan JCN
|
&ulscan #0040 ,&x LDR2 EQU2 ,&endulscan JCN
|
||||||
,&x LDR2 .Screen/x DEO2
|
,&x LDR2 .Screen/x DEO2
|
||||||
|
@ -289,19 +291,16 @@ RTN
|
||||||
|
|
||||||
@draw-br-scanlines ( -> )
|
@draw-br-scanlines ( -> )
|
||||||
CENTER-Y ,&y STR2
|
CENTER-Y ,&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
|
|
||||||
|
|
||||||
&whilerd
|
&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
|
.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
|
,&x LDR2 .Screen/x DEO2
|
||||||
,&y LDR2 .Screen/y DEO2
|
,&y LDR2 .Screen/y DEO2
|
||||||
#03 .Screen/pixel DEO
|
#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
|
,&y LDR2 #0004 ADD2 ,&y STR2 ,&whilerd JMP &endrd
|
||||||
RTN
|
RTN
|
||||||
&x $2
|
&x $2
|
||||||
|
@ -309,18 +308,16 @@ RTN
|
||||||
|
|
||||||
@draw-tr-scanlines
|
@draw-tr-scanlines
|
||||||
#0028 ,&y STR2
|
#0028 ,&y STR2
|
||||||
.Screen/width #0008 SUB2 ,&x STR2
|
.Screen/width DEI2 #0008 SUB2 ,&x STR2
|
||||||
|
|
||||||
,&x LDR2 .Screen/x DEO2
|
&whileru
|
||||||
,&y LDR2 .Screen/y DEO2
|
.Screen/width DEI2 #0040 SUB2 ,&x STR2
|
||||||
&whileru
|
|
||||||
.Screen/width DEI2 CENTER-Y ,&y LDR2 SUB2 #0004 DIV2 #0008 ADD2 SUB2 ,&x STR2
|
|
||||||
CENTER-Y ,&y LDR2 LTH2 ,&endru JCN
|
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
|
,&x LDR2 .Screen/x DEO2
|
||||||
,&y LDR2 .Screen/y DEO2
|
,&y LDR2 .Screen/y DEO2
|
||||||
#03 .Screen/pixel DEO
|
#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
|
,&y LDR2 #0004 ADD2 ,&y STR2 ,&whileru JMP &endru
|
||||||
|
|
||||||
RTN
|
RTN
|
||||||
|
|
Loading…
Reference in a new issue