added line numbers, compact rendering
This commit is contained in:
parent
9e48f3d71d
commit
44314f248b
3
Makefile
3
Makefile
|
@ -4,3 +4,6 @@ run: rom.bin
|
||||||
|
|
||||||
rom.bin: $(SRC)
|
rom.bin: $(SRC)
|
||||||
uxnasm $(SRC) rom.bin
|
uxnasm $(SRC) rom.bin
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm rom.bin
|
||||||
|
|
8
main.usm
8
main.usm
|
@ -305,6 +305,10 @@ RTN
|
||||||
|
|
||||||
( draw-pattern-line draws a single line in a pattern )
|
( draw-pattern-line draws a single line in a pattern )
|
||||||
@draw-pattern-line ( addr )
|
@draw-pattern-line ( addr )
|
||||||
|
.Draw/row LDZ ;draw-byte JSR2 ( draw the row number )
|
||||||
|
;line .Screen/addr DEO2
|
||||||
|
#21 .Screen/color DEO
|
||||||
|
.Screen/x DEI2 #0008 ADD2 .Screen/x DEO2 ( move right a sprite )
|
||||||
#00 .Draw/col STZ
|
#00 .Draw/col STZ
|
||||||
&loop
|
&loop
|
||||||
#00 .Draw/col LDZ NEQ ,&else JCN ( if it's not the note value, draw a byte )
|
#00 .Draw/col LDZ NEQ ,&else JCN ( if it's not the note value, draw a byte )
|
||||||
|
@ -326,7 +330,7 @@ RTN
|
||||||
&loop
|
&loop
|
||||||
.Draw/pattern-y LDZ2 .Screen/x DEO2
|
.Draw/pattern-y LDZ2 .Screen/x DEO2
|
||||||
DUP2 ;draw-pattern-line JSR2
|
DUP2 ;draw-pattern-line JSR2
|
||||||
.Screen/y DEI2 #0008 .Draw/pattern-vspacing LDZ2 ADD2 ADD2 .Screen/y DEO2 ( add spacing between rows )
|
.Screen/y DEI2 #0008 ( .Draw/pattern-vspacing LDZ2 ADD2 ) ADD2 .Screen/y DEO2 ( add spacing between rows )
|
||||||
PTN_WIDTH ADD2 ( get the next byte in the pattern )
|
PTN_WIDTH ADD2 ( get the next byte in the pattern )
|
||||||
#01 .Draw/row LDZ ADD .Draw/row STZ
|
#01 .Draw/row LDZ ADD .Draw/row STZ
|
||||||
.Draw/row LDZ PTN_LEN LOB NEQ ,&loop JCN
|
.Draw/row LDZ PTN_LEN LOB NEQ ,&loop JCN
|
||||||
|
@ -402,6 +406,8 @@ BRK
|
||||||
|
|
||||||
@hex-chars [ 10 11 12 13 14 15 16 17 18 19 21 22 23 24 25 26 ] ( adding a hex digit to this address and loading will be that hex digit's code for the font )
|
@hex-chars [ 10 11 12 13 14 15 16 17 18 19 21 22 23 24 25 26 ] ( adding a hex digit to this address and loading will be that hex digit's code for the font )
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@line [ 1818 1818 1818 1818 ] ( 8 pixel vertical bar )
|
||||||
@font ( specter8-frag font )
|
@font ( specter8-frag font )
|
||||||
[
|
[
|
||||||
0000 0000 0000 0000 0008 0808 0800 0800
|
0000 0000 0000 0000 0008 0808 0800 0800
|
||||||
|
|
Reference in New Issue