0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-27 00:03:00 +00:00

Migrated Screen/color to Screen/pixel and/or Screen/sprite

This commit is contained in:
Andrew Alderwick 2021-07-31 21:58:33 +01:00
parent 4257f9818a
commit 19b0aa2083
29 changed files with 297 additions and 298 deletions

View file

@ -14,7 +14,7 @@
|00 @System [ &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 &debug $1 &halt $1 ] |00 @System [ &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 &debug $1 &halt $1 ]
|10 @Console [ &vector $2 &read $1 &pad $5 &write $1 &error $1 ] |10 @Console [ &vector $2 &read $1 &pad $5 &write $1 &error $1 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ] |30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|40 @Audio1 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ] |40 @Audio1 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|50 @Audio2 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ] |50 @Audio2 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]

View file

@ -8,7 +8,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|b0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ] |b0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
|0000 |0000
@ -47,7 +47,7 @@ BRK
( copy ) OVR #00 SWP DUP2 ( copy ) OVR #00 SWP DUP2
( pos ) .Screen/x DEO2 ( pos ) .Screen/x DEO2
( addr ) CELL ADD2 ( addr ) CELL ADD2
( draw ) LDA .Screen/color DEO ( draw ) LDA .Screen/pixel DEO
( incr ) INCR ( incr ) INCR
( loop ) LTHk ,&loop JCN ( loop ) LTHk ,&loop JCN
POP2 POP2

View file

@ -12,7 +12,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ] |90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ]
|b0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ] |b0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
@ -113,7 +113,7 @@ RTN
( set tile ) 8** ;tiles ADD2 ( set tile ) 8** ;tiles ADD2
( set style ) .style LDZ #10 MUL TOS ADD2 ( set style ) .style LDZ #10 MUL TOS ADD2
.Screen/addr DEO2 .Screen/addr DEO2
( draw ) #21 .Screen/color DEO ( draw ) #01 .Screen/sprite DEO
( incr ) SWP #01 ADD SWP ( incr ) SWP #01 ADD SWP
LTHk ,&loop JCN LTHk ,&loop JCN
POP2 POP2
@ -130,7 +130,7 @@ RTN
#0000 .Screen/width DEI2 #0000 .Screen/width DEI2
&hor &hor
( save ) OVR2 .Screen/x DEO2 ( save ) OVR2 .Screen/x DEO2
( draw ) #21 .Screen/color DEO ( draw ) #01 .Screen/sprite DEO
( incr ) SWP2 #0008 ADD2 SWP2 ( incr ) SWP2 #0008 ADD2 SWP2
LTH2k ,&hor JCN LTH2k ,&hor JCN
POP2 POP2 POP2 POP2
@ -146,12 +146,12 @@ RTN
;cursor .Screen/addr DEO2 ;cursor .Screen/addr DEO2
.pointer/x LDZ2 .Screen/x DEO2 .pointer/x LDZ2 .Screen/x DEO2
.pointer/y LDZ2 .Screen/y DEO2 .pointer/y LDZ2 .Screen/y DEO2
#30 .Screen/color DEO #40 .Screen/sprite DEO
( record pointer positions ) ( record pointer positions )
.Mouse/x DEI2 DUP2 .pointer/x STZ2 .Screen/x DEO2 .Mouse/x DEI2 DUP2 .pointer/x STZ2 .Screen/x DEO2
.Mouse/y DEI2 DUP2 .pointer/y STZ2 .Screen/y DEO2 .Mouse/y DEI2 DUP2 .pointer/y STZ2 .Screen/y DEO2
( colorize on state ) ( colorize on state )
#31 [ .Mouse/state DEI #00 NEQ ] ADD .Screen/color DEO #41 [ .Mouse/state DEI #00 NEQ ] ADD .Screen/sprite DEO
RTN RTN

View file

@ -13,8 +13,8 @@
%anispeedmask_normal { #03 } %anispeedmask_normal { #03 }
%anispeedmask_slow { #07 } %anispeedmask_slow { #07 }
%c_color_normal { #33 } %c_color_normal { #43 }
%c_color_flipx { #73 } %c_color_flipx { #53 }
%index_norock { #ff } %index_norock { #ff }
( output macros ) ( output macros )
@ -34,7 +34,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|80 @Controller [ &vector $2 &button $1 &key $1 ] |80 @Controller [ &vector $2 &button $1 &key $1 ]
( variables ) ( variables )
@ -125,7 +125,7 @@ BRK
DUP ( get rocks_y[i] ) DUP ( get rocks_y[i] )
;rocks_y ROT #00 SWP ADD2 out_screen_y ;rocks_y ROT #00 SWP ADD2 out_screen_y
#30 .Screen/color DEO #40 .Screen/sprite DEO
#01 ADD #01 ADD
DUP2 DUP2
@ -142,7 +142,7 @@ JMP2r
;tog/x out_screen_x ;tog/x out_screen_x
;tog/x out_screen_y ;tog/x out_screen_y
;s_stand .Screen/addr DEO2 ;s_stand .Screen/addr DEO2
#23 .Screen/color DEO #03 .Screen/sprite DEO
( draw rocks ) ( draw rocks )
;s_bola .Screen/addr DEO2 ;s_bola .Screen/addr DEO2
@ -157,10 +157,10 @@ JMP2r
;rocks_y ROT #00 SWP ADD2 out_screen_y ;rocks_y ROT #00 SWP ADD2 out_screen_y
( DUP ( get color bitwise ) ) ( DUP ( get color bitwise ) )
( ;r_color LDA SWP get_bit_n #31 ADD .Screen/color DEO ) ( ;r_color LDA SWP get_bit_n #41 ADD .Screen/sprite DEO )
DUP DUP
;r_color ROT #00 SWP ADD2 LDA #31 ADD .Screen/color DEO ;r_color ROT #00 SWP ADD2 LDA #41 ADD .Screen/sprite DEO
#01 ADD #01 ADD
@ -440,14 +440,14 @@ JMP2r
;c_sprite LDA2 ADD2 .Screen/addr DEO2 ;c_sprite LDA2 ADD2 .Screen/addr DEO2
;c_pos/x out_screen_x ;c_pos/x out_screen_x
;c_pos/y out_screen_y ;c_pos/y out_screen_y
;c_color LDA .Screen/color DEO ;c_color LDA .Screen/sprite DEO
JMP2r JMP2r
@clear_c ( clear character ) @clear_c ( clear character )
;s_clear .Screen/addr DEO2 ;s_clear .Screen/addr DEO2
;c_pos/x out_screen_x ;c_pos/x out_screen_x
;c_pos/y out_screen_y ;c_pos/y out_screen_y
#30 .Screen/color DEO #40 .Screen/sprite DEO
JMP2r JMP2r
@init_bg @init_bg
@ -467,7 +467,7 @@ JMP2r
STH2r STH2r
DUP2 .Screen/x DEO2 DUP2 .Screen/x DEO2
#23 .Screen/color DEO #03 .Screen/sprite DEO
#0008 ADD2 DUP2 STH2 #0008 ADD2 DUP2 STH2
GTH2 ,&horizontal0loop JCN GTH2 ,&horizontal0loop JCN
@ -497,7 +497,7 @@ JMP2r
STH2r STH2r
DUP2 .Screen/x DEO2 DUP2 .Screen/x DEO2
#20 .Screen/color DEO #00 .Screen/sprite DEO
#0008 ADD2 DUP2 STH2 #0008 ADD2 DUP2 STH2
GTH2 ,&horizontal0loop_clear JCN GTH2 ,&horizontal0loop_clear JCN

View file

@ -21,7 +21,7 @@
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|10 @Console [ &vector $2 &read $1 &pad $5 &write $1 ] |10 @Console [ &vector $2 &read $1 &pad $5 &write $1 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ] |30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|40 @Audio1 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ] |40 @Audio1 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|50 @Audio2 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ] |50 @Audio2 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
@ -340,13 +340,13 @@ RTN
( dotted line ) ( dotted line )
OVR #01 AND ,&no-dot JCN OVR #01 AND ,&no-dot JCN
.wav-view/y1 LDZ2 #0010 ++ .Screen/y DEO2 .wav-view/y1 LDZ2 #0010 ++ .Screen/y DEO2
#01 .Screen/color DEO #01 .Screen/pixel DEO
&no-dot &no-dot
OVR TOS #0010 ** [ DUP2r STH2r ] ++ LDA OVR TOS #0010 ** [ DUP2r STH2r ] ++ LDA
#02 / #02 /
TOS 4// .wav-view/y1 LDZ2 ++ .Screen/y DEO2 TOS 4// .wav-view/y1 LDZ2 ++ .Screen/y DEO2
.Screen/x DEI2 #0001 ++ .Screen/x DEO2 .Screen/x DEI2 #0001 ++ .Screen/x DEO2
( draw ) #02 .Screen/color DEO ( draw ) #02 .Screen/pixel DEO
( incr ) SWP #01 + SWP ( incr ) SWP #01 + SWP
LTHk ,&loop JCN LTHk ,&loop JCN
POP2 POP2
@ -399,7 +399,7 @@ RTN
OVR2 #0002 ++ OVR2 #0002 ++
OVR2 #0002 ++ OVR2 #0002 ++
;pad-name STHkr TOS #0005 ** ++ ;pad-name STHkr TOS #0005 ** ++
#20 OVRr STHr + #00 OVRr STHr +
;draw-label JSR2 ;draw-label JSR2
( draw note ) ( draw note )
@ -407,14 +407,14 @@ RTN
DUP2 #0014 ++ .Screen/y DEO2 DUP2 #0014 ++ .Screen/y DEO2
( get pitch ) STHkr TOS ;pad-pitch ++ LDA ( get pitch ) STHkr TOS ;pad-pitch ++ LDA
#0c / TOS 8** ;font-hex ++ .Screen/addr DEO2 #0c / TOS 8** ;font-hex ++ .Screen/addr DEO2
#21 .Screen/color DEO #01 .Screen/sprite DEO
( draw octave ) ( draw octave )
OVR2 #000b ++ .Screen/x DEO2 OVR2 #000b ++ .Screen/x DEO2
DUP2 #0014 ++ .Screen/y DEO2 DUP2 #0014 ++ .Screen/y DEO2
( get pitch ) STHkr TOS ;pad-pitch ++ LDA ( get pitch ) STHkr TOS ;pad-pitch ++ LDA
#0c MOD TOS 8** ;font-notes ++ .Screen/addr DEO2 #0c MOD TOS 8** ;font-notes ++ .Screen/addr DEO2
#21 .Screen/color DEO #01 .Screen/sprite DEO
POP2 POP2 POP2 POP2
@ -426,27 +426,27 @@ RTN
.oct-view/x1 LDZ2 .oct-view/y1 LDZ2 .oct-view/x1 LDZ2 .oct-view/y1 LDZ2
OVR2 OVR2 ;keys-left-icns #21 .piano/last LDZ #00 = + ;draw-key JSR2 OVR2 OVR2 ;keys-left-icns #01 .piano/last LDZ #00 = + ;draw-key JSR2
OVR2 #0008 ++ OVR2 ;keys-middle-icns #21 .piano/last LDZ #01 = + ;draw-key JSR2 OVR2 #0008 ++ OVR2 ;keys-middle-icns #01 .piano/last LDZ #01 = + ;draw-key JSR2
OVR2 #0010 ++ OVR2 ;keys-right-icns #21 .piano/last LDZ #02 = + ;draw-key JSR2 OVR2 #0010 ++ OVR2 ;keys-right-icns #01 .piano/last LDZ #02 = + ;draw-key JSR2
OVR2 #0018 ++ OVR2 ;keys-left-icns #21 .piano/last LDZ #03 = + ;draw-key JSR2 OVR2 #0018 ++ OVR2 ;keys-left-icns #01 .piano/last LDZ #03 = + ;draw-key JSR2
OVR2 #0020 ++ OVR2 ;keys-middle-icns #21 .piano/last LDZ #04 = + ;draw-key JSR2 OVR2 #0020 ++ OVR2 ;keys-middle-icns #01 .piano/last LDZ #04 = + ;draw-key JSR2
OVR2 #0028 ++ OVR2 ;keys-middle-icns #21 .piano/last LDZ #05 = + ;draw-key JSR2 OVR2 #0028 ++ OVR2 ;keys-middle-icns #01 .piano/last LDZ #05 = + ;draw-key JSR2
SWP2 #0030 ++ SWP2 ;keys-right-icns #21 .piano/last LDZ #06 = + ;draw-key JSR2 SWP2 #0030 ++ SWP2 ;keys-right-icns #01 .piano/last LDZ #06 = + ;draw-key JSR2
.oct-view/x1 LDZ2 #0040 ++ .Screen/x DEO2 .oct-view/x1 LDZ2 #0040 ++ .Screen/x DEO2
;arrow-icns .Screen/addr DEO2 ;arrow-icns .Screen/addr DEO2
.oct-view/y1 LDZ2 .Screen/y DEO2 .oct-view/y1 LDZ2 .Screen/y DEO2
#21 .Screen/color DEO #01 .Screen/sprite DEO
;arrow-icns #0008 ++ .Screen/addr DEO2 ;arrow-icns #0008 ++ .Screen/addr DEO2
.oct-view/y1 LDZ2 #0010 ++ .Screen/y DEO2 .oct-view/y1 LDZ2 #0010 ++ .Screen/y DEO2
#21 .Screen/color DEO #01 .Screen/sprite DEO
;font-hex .piano/octave LDZ #03 + #00 SWP 8** ++ .Screen/addr DEO2 ;font-hex .piano/octave LDZ #03 + #00 SWP 8** ++ .Screen/addr DEO2
.oct-view/y1 LDZ2 #0008 ++ .Screen/y DEO2 .oct-view/y1 LDZ2 #0008 ++ .Screen/y DEO2
#23 .Screen/color DEO #03 .Screen/sprite DEO
RTN RTN
@ -459,9 +459,9 @@ RTN
#00 #0f #00 #0f
&loop &loop
OVR #10 SWP - STHkr #0f AND < #01 + .Screen/color DEO OVR #10 SWP - STHkr #0f AND < #01 + .Screen/pixel DEO
.Screen/x DEI2 #0002 ++ .Screen/x DEO2 .Screen/x DEI2 #0002 ++ .Screen/x DEO2
OVR #10 SWP - STHkr #04 SFT < #01 + .Screen/color DEO OVR #10 SWP - STHkr #04 SFT < #01 + .Screen/pixel DEO
.Screen/x DEI2 #0002 -- .Screen/x DEO2 .Screen/x DEI2 #0002 -- .Screen/x DEO2
.Screen/y DEI2 #0002 ++ .Screen/y DEO2 .Screen/y DEI2 #0002 ++ .Screen/y DEO2
( incr ) SWP #01 + SWP ( incr ) SWP #01 + SWP
@ -480,7 +480,7 @@ RTN
DUP2 #0018 ++ DUP2 #0018 ++
&loop &loop
( move ) OVR2 .Screen/y DEO2 ( move ) OVR2 .Screen/y DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
( incr ) .Screen/addr DEI2 #0008 ++ .Screen/addr DEO2 ( incr ) .Screen/addr DEI2 #0008 ++ .Screen/addr DEO2
( incr ) SWP2 #0008 ++ SWP2 ( incr ) SWP2 #0008 ++ SWP2
LTH2k ,&loop JCN LTH2k ,&loop JCN
@ -495,12 +495,12 @@ RTN
;cursor-icn .Screen/addr DEO2 ;cursor-icn .Screen/addr DEO2
.pointer/x LDZ2 .Screen/x DEO2 .pointer/x LDZ2 .Screen/x DEO2
.pointer/y LDZ2 .Screen/y DEO2 .pointer/y LDZ2 .Screen/y DEO2
#30 .Screen/color DEO #40 .Screen/sprite DEO
( record pointer positions ) ( record pointer positions )
.Mouse/x DEI2 DUP2 .pointer/x STZ2 .Screen/x DEO2 .Mouse/x DEI2 DUP2 .pointer/x STZ2 .Screen/x DEO2
.Mouse/y DEI2 DUP2 .pointer/y STZ2 .Screen/y DEO2 .Mouse/y DEI2 DUP2 .pointer/y STZ2 .Screen/y DEO2
( colorize on state ) ( colorize on state )
#33 [ .Mouse/state DEI #00 ! ] - .Screen/color DEO #43 [ .Mouse/state DEI #00 ! ] - .Screen/sprite DEO
RTN RTN
@ -508,24 +508,24 @@ RTN
( load ) STH .Screen/y DEO2 .Screen/x DEO2 ( load ) STH .Screen/y DEO2 .Screen/x DEO2
;knob-icns .Screen/addr DEO2 ;knob-icns .Screen/addr DEO2
( draw ) #21 .Screen/color DEO ( draw ) #01 .Screen/sprite DEO
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 .Screen/x DEI2 #0008 ++ .Screen/x DEO2
;knob-icns #0008 ++ .Screen/addr DEO2 ;knob-icns #0008 ++ .Screen/addr DEO2
( draw ) #21 .Screen/color DEO ( draw ) #01 .Screen/sprite DEO
.Screen/y DEI2 #0008 ++ .Screen/y DEO2 .Screen/y DEI2 #0008 ++ .Screen/y DEO2
;knob-icns #0018 ++ .Screen/addr DEO2 ;knob-icns #0018 ++ .Screen/addr DEO2
( draw ) #21 .Screen/color DEO ( draw ) #01 .Screen/sprite DEO
.Screen/x DEI2 #0008 -- .Screen/x DEO2 .Screen/x DEI2 #0008 -- .Screen/x DEO2
;knob-icns #0010 ++ .Screen/addr DEO2 ;knob-icns #0010 ++ .Screen/addr DEO2
( draw ) #21 .Screen/color DEO ( draw ) #01 .Screen/sprite DEO
.Screen/x DEI2 #0004 ++ .Screen/x DEO2 .Screen/x DEI2 #0004 ++ .Screen/x DEO2
.Screen/y DEI2 #0008 ++ .Screen/y DEO2 .Screen/y DEI2 #0008 ++ .Screen/y DEO2
;font-hex #00 STHkr #08 * ++ .Screen/addr DEO2 ;font-hex #00 STHkr #08 * ++ .Screen/addr DEO2
( draw ) #21 .Screen/color DEO ( draw ) #01 .Screen/sprite DEO
.Screen/x DEI2 #0004 -- #00 #00 STHkr ;knob-offsetx ++ LDA ++ .Screen/x DEO2 .Screen/x DEI2 #0004 -- #00 #00 STHkr ;knob-offsetx ++ LDA ++ .Screen/x DEO2
.Screen/y DEI2 #0010 -- #00 #00 STHr ;knob-offsety ++ LDA ++ .Screen/y DEO2 .Screen/y DEI2 #0010 -- #00 #00 STHr ;knob-offsety ++ LDA ++ .Screen/y DEO2
;knob-icns #0020 ++ .Screen/addr DEO2 ;knob-icns #0020 ++ .Screen/addr DEO2
( draw ) #25 .Screen/color DEO ( draw ) #05 .Screen/sprite DEO
RTN RTN
@ -534,17 +534,17 @@ RTN
STH .Screen/y DEO2 .Screen/x DEO2 STH .Screen/y DEO2 .Screen/x DEO2
STHkr #20 * #00 SWP ;switch-icns ++ STHkr #20 * #00 SWP ;switch-icns ++
DUP2 .Screen/addr DEO2 DUP2 .Screen/addr DEO2
( draw ) #21 STHkr + .Screen/color DEO ( draw ) #01 STHkr + .Screen/sprite DEO
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 .Screen/x DEI2 #0008 ++ .Screen/x DEO2
DUP2 #0008 ++ .Screen/addr DEO2 DUP2 #0008 ++ .Screen/addr DEO2
( draw ) #21 STHkr + .Screen/color DEO ( draw ) #01 STHkr + .Screen/sprite DEO
.Screen/y DEI2 #0008 ++ .Screen/y DEO2 .Screen/y DEI2 #0008 ++ .Screen/y DEO2
.Screen/x DEI2 #0008 -- .Screen/x DEO2 .Screen/x DEI2 #0008 -- .Screen/x DEO2
DUP2 #0010 ++ .Screen/addr DEO2 DUP2 #0010 ++ .Screen/addr DEO2
( draw ) #21 STHkr + .Screen/color DEO ( draw ) #01 STHkr + .Screen/sprite DEO
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 .Screen/x DEI2 #0008 ++ .Screen/x DEO2
#0018 ++ .Screen/addr DEO2 #0018 ++ .Screen/addr DEO2
( draw ) #21 STHr + .Screen/color DEO ( draw ) #01 STHr + .Screen/sprite DEO
RTN RTN
@ -554,16 +554,16 @@ RTN
STH2r #0001 ++ STH2r STH2r #0001 ++ STH2r
&ver &ver
( save ) OVR2 .Screen/y DEO2 ( save ) OVR2 .Screen/y DEO2
( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ DUP .Screen/color DEO ( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ DUP .Screen/pixel DEO
( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .Screen/color DEO ( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .Screen/pixel DEO
( incr ) SWP2 #0001 ++ SWP2 ( incr ) SWP2 #0001 ++ SWP2
OVR2 OVR2 LTS2 ,&ver JCN OVR2 OVR2 LTS2 ,&ver JCN
POP2 POP2 POP2 POP2
.rect/x1 LDZ2 #0001 ++ .rect/x2 LDZ2 #0001 -- .rect/x1 LDZ2 #0001 ++ .rect/x2 LDZ2 #0001 --
&hor &hor
( save ) OVR2 .Screen/x DEO2 ( save ) OVR2 .Screen/x DEO2
( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ DUP .Screen/color DEO ( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ DUP .Screen/pixel DEO
( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .Screen/color DEO ( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .Screen/pixel DEO
( incr ) SWP2 #0001 ++ SWP2 ( incr ) SWP2 #0001 ++ SWP2
OVR2 OVR2 #0001 ++ LTS2 ,&hor JCN OVR2 OVR2 #0001 ++ LTS2 ,&hor JCN
POP2 POP2 POP2 POP2
@ -576,7 +576,7 @@ RTN
STH2r STH2r
&loop &loop
DUP2 LDA #00 SWP #0030 -- 8** ;font-num-uc ++ .Screen/addr DEO2 DUP2 LDA #00 SWP #0030 -- 8** ;font-num-uc ++ .Screen/addr DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
( incr ) #0001 ++ ( incr ) #0001 ++
( incr ) .Screen/x DEI2 #0008 ++ .Screen/x DEO2 ( incr ) .Screen/x DEI2 #0008 ++ .Screen/x DEO2
DUP2 LDA #00 ! ,&loop JCN DUP2 LDA #00 ! ,&loop JCN
@ -594,7 +594,7 @@ RTN
STH2 STH2 OVR2 OVR2 STH2 STH2 OVR2 OVR2
&hor &hor
( save ) OVR2 .Screen/x DEO2 ( save ) OVR2 .Screen/x DEO2
( draw ) .color LDZ .Screen/color DEO ( draw ) .color LDZ .Screen/pixel DEO
( incr ) SWP2 #0001 ++ SWP2 ( incr ) SWP2 #0001 ++ SWP2
OVR2 OVR2 LTS2 ,&hor JCN OVR2 OVR2 LTS2 ,&hor JCN
POP2 POP2 STH2r STH2r POP2 POP2 STH2r STH2r

View file

@ -12,7 +12,7 @@
( devices ) ( devices )
|00 @System &vector $2 &pad $6 &r $2 &g $2 &b $2 |00 @System &vector $2 &pad $6 &r $2 &g $2 &b $2
|20 @Screen &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 |20 @Screen &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|a0 @File &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 |a0 @File &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2
( variables ) ( variables )
@ -33,21 +33,21 @@
;font-path-large .File/name DEO2 ;font-path-large .File/name DEO2
;font-data .File/load DEO2 ;font-data .File/load DEO2
( draw label ) ( draw label )
#0020 #0020 ;title #21 ;draw-uf3 JSR2 #0020 #0020 ;title #01 ;draw-uf3 JSR2
( load font ) ( load font )
#2100 .File/length DEO2 #2100 .File/length DEO2
;font-path-medium .File/name DEO2 ;font-path-medium .File/name DEO2
;font-data .File/load DEO2 ;font-data .File/load DEO2
( draw label ) ( draw label )
#0020 #0048 ;body #22 ;draw-uf2 JSR2 #0020 #0048 ;body #02 ;draw-uf2 JSR2
( load font ) ( load font )
#0900 .File/length DEO2 #0900 .File/length DEO2
;font-path-small .File/name DEO2 ;font-path-small .File/name DEO2
;font-data .File/load DEO2 ;font-data .File/load DEO2
( draw label ) ( draw label )
#0030 #00b8 ;footer #23 ;draw-uf1 JSR2 #0030 #00b8 ;footer #03 ;draw-uf1 JSR2
BRK BRK
@ -64,7 +64,7 @@ BRK
POP ,&continue JMP &no-linebreak POP ,&continue JMP &no-linebreak
( get addr ) STHk TOS #0008 ** ;font-data #0100 ++ ++ .Screen/addr DEO2 ( get addr ) STHk TOS #0008 ** ;font-data #0100 ++ ++ .Screen/addr DEO2
( get width ) STHr TOS ;font-data ++ LDA TOS ( get width ) STHr TOS ;font-data ++ LDA TOS
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
( use width ) .Screen/x DEI2 ++ .Screen/x DEO2 ( use width ) .Screen/x DEI2 ++ .Screen/x DEO2
&continue &continue
( incr addr ) #0001 ++ ( incr addr ) #0001 ++
@ -96,18 +96,18 @@ RTN
( get addr ) STHk TOS #0020 ** ;font-data #0100 ++ ++ .Screen/addr DEO2 ( get addr ) STHk TOS #0020 ** ;font-data #0100 ++ ++ .Screen/addr DEO2
( get width ) STHkr TOS ;font-data ++ LDA TOS ( get width ) STHkr TOS ;font-data ++ LDA TOS
SWPr SWPr
( left-top ) STHkr .Screen/color DEO ( left-top ) STHkr .Screen/sprite DEO
.Screen/y DEI2 #0008 ++ .Screen/y DEO2 .Screen/y DEI2 #0008 ++ .Screen/y DEO2
.Screen/addr DEI2 #0010 ++ .Screen/addr DEO2 .Screen/addr DEI2 #0010 ++ .Screen/addr DEO2
( left-bottom ) STHkr .Screen/color DEO ( left-bottom ) STHkr .Screen/sprite DEO
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 .Screen/x DEI2 #0008 ++ .Screen/x DEO2
.Screen/y DEI2 #0008 -- .Screen/y DEO2 .Screen/y DEI2 #0008 -- .Screen/y DEO2
DUP #0a < ,&thin JCN DUP #0a < ,&thin JCN
.Screen/addr DEI2 #0008 -- .Screen/addr DEO2 .Screen/addr DEI2 #0008 -- .Screen/addr DEO2
( right-top ) STHkr .Screen/color DEO ( right-top ) STHkr .Screen/sprite DEO
.Screen/addr DEI2 #0010 ++ .Screen/addr DEO2 .Screen/addr DEI2 #0010 ++ .Screen/addr DEO2
.Screen/y DEI2 #0008 ++ .Screen/y DEO2 .Screen/y DEI2 #0008 ++ .Screen/y DEO2
( right-bottom ) STHkr .Screen/color DEO ( right-bottom ) STHkr .Screen/sprite DEO
.Screen/y DEI2 #0008 -- .Screen/y DEO2 &thin .Screen/y DEI2 #0008 -- .Screen/y DEO2 &thin
SWPr SWPr
( use width ) .Screen/x DEI2 ++ #0008 -- .Screen/x DEO2 ( use width ) .Screen/x DEI2 ++ #0008 -- .Screen/x DEO2
@ -142,7 +142,7 @@ RTN
&ver &ver
#00 #03 #00 #03
&hor &hor
STHkr .Screen/color DEO STHkr .Screen/sprite DEO
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 .Screen/x DEI2 #0008 ++ .Screen/x DEO2
.Screen/addr DEI2 #0008 ++ .Screen/addr DEO2 .Screen/addr DEI2 #0008 ++ .Screen/addr DEO2
INCR LTHk ,&hor JCN INCR LTHk ,&hor JCN

View file

@ -27,7 +27,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|80 @Controller [ &vector $2 &button $1 &key $1 ] |80 @Controller [ &vector $2 &button $1 &key $1 ]
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ] |90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ]
@ -101,7 +101,7 @@ BRK
( draw cell count ) ( draw cell count )
.anchor/x LDZ2 .Screen/x DEO2 .anchor/x LDZ2 .Screen/x DEO2
.anchor/y LDZ2 HEIGHT #02 * TOS ++ .Screen/y DEO2 .anchor/y LDZ2 HEIGHT #02 * TOS ++ .Screen/y DEO2
.world/count LDZ2 #22 ;draw-short JSR2 .world/count LDZ2 #02 ;draw-short JSR2
BRK BRK
@ -111,14 +111,14 @@ BRK
;cursor .Screen/addr DEO2 ;cursor .Screen/addr DEO2
.pointer/x LDZ2 .Screen/x DEO2 .pointer/x LDZ2 .Screen/x DEO2
.pointer/y LDZ2 .Screen/y DEO2 .pointer/y LDZ2 .Screen/y DEO2
#30 .Screen/color DEO #40 .Screen/sprite DEO
( record pointer positions ) ( record pointer positions )
.Mouse/x DEI2 DUP2 .pointer/x STZ2 .Screen/x DEO2 .Mouse/x DEI2 DUP2 .pointer/x STZ2 .Screen/x DEO2
.Mouse/y DEI2 DUP2 .pointer/y STZ2 .Screen/y DEO2 .Mouse/y DEI2 DUP2 .pointer/y STZ2 .Screen/y DEO2
( colorize on state ) ( colorize on state )
#32 [ .Mouse/state DEI #00 ! ] + .Screen/color DEO #42 [ .Mouse/state DEI #00 ! ] + .Screen/sprite DEO
.Mouse/state DEI #00 ! #01 JCN [ BRK ] .Mouse/state DEI #00 ! #01 JCN [ BRK ]
@ -152,7 +152,7 @@ BRK
#00 WIDTH #00 WIDTH
&hor &hor
OVR TOS 2** .anchor/x LDZ2 ++ .Screen/x DEO2 OVR TOS 2** .anchor/x LDZ2 ++ .Screen/x DEO2
GET-ITERATORS ,get-cell JSR #01 + .Screen/color DEO GET-ITERATORS ,get-cell JSR #01 + .Screen/pixel DEO
INCR INCR
NEQk ,&hor JCN NEQk ,&hor JCN
POP2 POP2
@ -254,16 +254,16 @@ RTN
STH SWP STH SWP
DUP #04 SFT TOS 8** ;font-hex ++ .Screen/addr DEO2 DUP #04 SFT TOS 8** ;font-hex ++ .Screen/addr DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
#0f AND TOS 8** ;font-hex ++ .Screen/addr DEO2 #0f AND TOS 8** ;font-hex ++ .Screen/addr DEO2
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 .Screen/x DEI2 #0008 ++ .Screen/x DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
DUP #04 SFT TOS 8** ;font-hex ++ .Screen/addr DEO2 DUP #04 SFT TOS 8** ;font-hex ++ .Screen/addr DEO2
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 .Screen/x DEI2 #0008 ++ .Screen/x DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
#0f AND TOS 8** ;font-hex ++ .Screen/addr DEO2 #0f AND TOS 8** ;font-hex ++ .Screen/addr DEO2
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 .Screen/x DEI2 #0008 ++ .Screen/x DEO2
( draw ) STHr .Screen/color DEO ( draw ) STHr .Screen/sprite DEO
RTN RTN

View file

@ -23,7 +23,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &len $2 &addr $2 &volume $1 &pitch $1 ] |30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &len $2 &addr $2 &volume $1 &pitch $1 ]
|40 @Audio1 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &len $2 &addr $2 &volume $1 &pitch $1 ] |40 @Audio1 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &len $2 &addr $2 &volume $1 &pitch $1 ]
|50 @Audio2 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &len $2 &addr $2 &volume $1 &pitch $1 ] |50 @Audio2 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &len $2 &addr $2 &volume $1 &pitch $1 ]
@ -227,11 +227,11 @@ RTN
.trkframe/y1 LDZ2 8-- .Screen/y DEO2 .trkframe/y1 LDZ2 8-- .Screen/y DEO2
.trkframe/x1 LDZ2 #00 .head/pos LDZ ADD2 .Screen/x DEO2 .trkframe/x1 LDZ2 #00 .head/pos LDZ ADD2 .Screen/x DEO2
;head_icn .Screen/addr DEO2 ;head_icn .Screen/addr DEO2
#20 .Screen/color DEO #00 .Screen/sprite DEO
( incr ) .head/pos LDZ #01 ADD .head/pos STZ ( incr ) .head/pos LDZ #01 ADD .head/pos STZ
.trkframe/x1 LDZ2 #00 .head/pos LDZ ADD2 .Screen/x DEO2 .trkframe/x1 LDZ2 #00 .head/pos LDZ ADD2 .Screen/x DEO2
;head_icn .Screen/addr DEO2 ;head_icn .Screen/addr DEO2
#21 ( if note ) TRACK #00 .head/pos LDZ #08 DIV ADD2 LDA #00 NEQ ADD .Screen/color DEO #01 ( if note ) TRACK #00 .head/pos LDZ #08 DIV ADD2 LDA #00 NEQ ADD .Screen/sprite DEO
RTN RTN
@ -243,7 +243,7 @@ RTN
DUP STH #00 SWP #0e SWP SUB 8** .trkframe/y1 LDZ2 ADD2 .Screen/y DEO2 DUP STH #00 SWP #0e SWP SUB 8** .trkframe/y1 LDZ2 ADD2 .Screen/y DEO2
OVR #00 SWP 8** .trkframe/x1 LDZ2 ADD2 .Screen/x DEO2 OVR #00 SWP 8** .trkframe/x1 LDZ2 ADD2 .Screen/x DEO2
STHr #00 EQU ,&skip JCN STHr #00 EQU ,&skip JCN
#20 .Screen/color DEO #00 .Screen/sprite DEO
&skip &skip
( incr ) SWP #01 ADD SWP ( incr ) SWP #01 ADD SWP
DUP2 LTH ,&loop JCN DUP2 LTH ,&loop JCN
@ -260,7 +260,7 @@ RTN
OVR #00 SWP 8** .trkframe/x1 LDZ2 ADD2 .Screen/x DEO2 OVR #00 SWP 8** .trkframe/x1 LDZ2 ADD2 .Screen/x DEO2
;note_icn .Screen/addr DEO2 ;note_icn .Screen/addr DEO2
STHr #00 EQU ,&skip JCN STHr #00 EQU ,&skip JCN
#25 .Screen/color DEO #05 .Screen/sprite DEO
&skip &skip
( incr ) SWP #01 ADD SWP ( incr ) SWP #01 ADD SWP
DUP2 LTH ,&notes-loop JCN DUP2 LTH ,&notes-loop JCN
@ -281,7 +281,7 @@ RTN
OVR2 SWP POP #02 DIV #0f AND ,&skip JCN OVR2 SWP POP #02 DIV #0f AND ,&skip JCN
OVR2 .trkframe/x1 LDZ2 ADD2 .Screen/x DEO2 OVR2 .trkframe/x1 LDZ2 ADD2 .Screen/x DEO2
.trkframe/y1 LDZ2 #0010 SUB2 .Screen/y DEO2 .trkframe/y1 LDZ2 #0010 SUB2 .Screen/y DEO2
#22 .Screen/color DEO #02 .Screen/sprite DEO
.Screen/addr DEI2 8++ .Screen/addr DEO2 .Screen/addr DEI2 8++ .Screen/addr DEO2
OVR2 .trkframe/x1 LDZ2 ADD2 .trkframe/y1 LDZ2 ++ .trkframe/y2 LDZ2 #01 ;line-vertical-dotted JSR2 OVR2 .trkframe/x1 LDZ2 ADD2 .trkframe/y1 LDZ2 ++ .trkframe/y2 LDZ2 #01 ;line-vertical-dotted JSR2
&skip &skip
@ -303,10 +303,10 @@ RTN
.Screen/y DEI2 .Screen/y DEI2 #0038 ADD2 .Screen/y DEI2 .Screen/y DEI2 #0038 ADD2
&loop &loop
OVR2 .Screen/y DEO2 OVR2 .Screen/y DEO2
#21 .Screen/color DEO #01 .Screen/sprite DEO
.Screen/addr DEI2 8++ .Screen/addr DEO2 .Screen/addr DEI2 8++ .Screen/addr DEO2
.Screen/x DEI2 8++ .Screen/x DEO2 .Screen/x DEI2 8++ .Screen/x DEO2
#21 .Screen/color DEO #01 .Screen/sprite DEO
.Screen/addr DEI2 8++ .Screen/addr DEO2 .Screen/addr DEI2 8++ .Screen/addr DEO2
.Screen/x DEI2 8-- .Screen/x DEO2 .Screen/x DEI2 8-- .Screen/x DEO2
SWP2 8++ SWP2 SWP2 8++ SWP2
@ -323,17 +323,17 @@ RTN
.trkframe/x1 LDZ2 #0028 SUB2 .Screen/x DEO2 .trkframe/x1 LDZ2 #0028 SUB2 .Screen/x DEO2
.trkframe/y1 LDZ2 #0030 ADD2 .Screen/y DEO2 .trkframe/y1 LDZ2 #0030 ADD2 .Screen/y DEO2
;font_hex #0020 ADD2 .Screen/addr DEO2 ;font_hex #0020 ADD2 .Screen/addr DEO2
#23 .Screen/color DEO #03 .Screen/sprite DEO
.trkframe/x1 LDZ2 #0030 SUB2 .Screen/x DEO2 .trkframe/x1 LDZ2 #0030 SUB2 .Screen/x DEO2
;font_hex #0060 ADD2 .Screen/addr DEO2 ;font_hex #0060 ADD2 .Screen/addr DEO2
#23 .Screen/color DEO #03 .Screen/sprite DEO
.trkframe/x1 LDZ2 #0028 SUB2 .Screen/x DEO2 .trkframe/x1 LDZ2 #0028 SUB2 .Screen/x DEO2
.trkframe/y1 LDZ2 #0068 ADD2 .Screen/y DEO2 .trkframe/y1 LDZ2 #0068 ADD2 .Screen/y DEO2
;font_hex #0018 ADD2 .Screen/addr DEO2 ;font_hex #0018 ADD2 .Screen/addr DEO2
#23 .Screen/color DEO #03 .Screen/sprite DEO
.trkframe/x1 LDZ2 #0030 SUB2 .Screen/x DEO2 .trkframe/x1 LDZ2 #0030 SUB2 .Screen/x DEO2
;font_hex #0060 ADD2 .Screen/addr DEO2 ;font_hex #0060 ADD2 .Screen/addr DEO2
#23 .Screen/color DEO #03 .Screen/sprite DEO
RTN RTN
@ -351,18 +351,18 @@ RTN
( load ) .knob/value STZ .knob/y STZ2 .knob/x STZ2 ( load ) .knob/value STZ .knob/y STZ2 .knob/x STZ2
.knob/x LDZ2 .Screen/x DEO2 .knob/x LDZ2 .Screen/x DEO2
.knob/y LDZ2 .Screen/y DEO2 ;knob_icns .Screen/addr DEO2 #21 .Screen/color DEO .knob/y LDZ2 .Screen/y DEO2 ;knob_icns .Screen/addr DEO2 #01 .Screen/sprite DEO
.knob/x LDZ2 8++ .Screen/x DEO2 ;knob_icns 8++ .Screen/addr DEO2 #21 .Screen/color DEO .knob/x LDZ2 8++ .Screen/x DEO2 ;knob_icns 8++ .Screen/addr DEO2 #01 .Screen/sprite DEO
.knob/y LDZ2 8++ .Screen/y DEO2 ;knob_icns #0018 ADD2 .Screen/addr DEO2 #21 .Screen/color DEO .knob/y LDZ2 8++ .Screen/y DEO2 ;knob_icns #0018 ADD2 .Screen/addr DEO2 #01 .Screen/sprite DEO
.knob/x LDZ2 .Screen/x DEO2 ;knob_icns #0010 ADD2 .Screen/addr DEO2 #21 .Screen/color DEO .knob/x LDZ2 .Screen/x DEO2 ;knob_icns #0010 ADD2 .Screen/addr DEO2 #01 .Screen/sprite DEO
.knob/x LDZ2 #00 #00 .knob/value LDZ ;knob_offsetx ADD2 LDA ADD2 .Screen/x DEO2 .knob/x LDZ2 #00 #00 .knob/value LDZ ;knob_offsetx ADD2 LDA ADD2 .Screen/x DEO2
.knob/y LDZ2 #00 #00 .knob/value LDZ ;knob_offsety ADD2 LDA ADD2 .Screen/y DEO2 .knob/y LDZ2 #00 #00 .knob/value LDZ ;knob_offsety ADD2 LDA ADD2 .Screen/y DEO2
;knob_icns #0020 ADD2 .Screen/addr DEO2 ;knob_icns #0020 ADD2 .Screen/addr DEO2
#25 .Screen/color DEO #05 .Screen/sprite DEO
.knob/x LDZ2 #0004 ADD2 .Screen/x DEO2 .knob/x LDZ2 #0004 ADD2 .Screen/x DEO2
.knob/y LDZ2 #0010 ADD2 .Screen/y DEO2 .knob/y LDZ2 #0010 ADD2 .Screen/y DEO2
;font_hex #00 .knob/value LDZ #08 MUL ADD2 .Screen/addr DEO2 ;font_hex #00 .knob/value LDZ #08 MUL ADD2 .Screen/addr DEO2
#21 .Screen/color DEO #01 .Screen/sprite DEO
RTN RTN
@ -371,20 +371,20 @@ RTN
( load ) .knob/value STZ .knob/y STZ2 .knob/x STZ2 ( load ) .knob/value STZ .knob/y STZ2 .knob/x STZ2
.knob/x LDZ2 .Screen/x DEO2 .knob/x LDZ2 .Screen/x DEO2
.knob/y LDZ2 .Screen/y DEO2 #20 .Screen/color DEO .knob/y LDZ2 .Screen/y DEO2 #00 .Screen/sprite DEO
.knob/x LDZ2 8++ .Screen/x DEO2 #20 .Screen/color DEO .knob/x LDZ2 8++ .Screen/x DEO2 #00 .Screen/sprite DEO
.knob/y LDZ2 8++ .Screen/y DEO2 #20 .Screen/color DEO .knob/y LDZ2 8++ .Screen/y DEO2 #00 .Screen/sprite DEO
.knob/x LDZ2 .Screen/x DEO2 #20 .Screen/color DEO .knob/x LDZ2 .Screen/x DEO2 #00 .Screen/sprite DEO
.knob/x LDZ2 #0004 ADD2 .Screen/x DEO2 .knob/x LDZ2 #0004 ADD2 .Screen/x DEO2
.knob/y LDZ2 #0010 ADD2 .Screen/y DEO2 .knob/y LDZ2 #0010 ADD2 .Screen/y DEO2
#20 .Screen/color DEO #00 .Screen/sprite DEO
RTN RTN
@draw-controls ( -- ) @draw-controls ( -- )
.ctlframe/x1 LDZ2 .ctlframe/y1 LDZ2 .ctlframe/x2 LDZ2 .ctlframe/y2 LDZ2 #01 ;line-rect JSR2 .ctlframe/x1 LDZ2 .ctlframe/y1 LDZ2 .ctlframe/x2 LDZ2 .ctlframe/y2 LDZ2 #01 ;line-rect JSR2
( env ) ( env )
.ctlframe/x1 LDZ2 8++ .ctlframe/y1 LDZ2 8++ #22 ;env_txt ;draw-label JSR2 .ctlframe/x1 LDZ2 8++ .ctlframe/y1 LDZ2 8++ #02 ;env_txt ;draw-label JSR2
.ctlframe/x1 LDZ2 8++ .ctlframe/y1 LDZ2 #0010 ADD2 .ctlframe/x1 LDZ2 8++ .ctlframe/y1 LDZ2 #0010 ADD2
.Audio0/adsr .track/active LDZ #10 MUL ADD DEI #04 SFT .Audio0/adsr .track/active LDZ #10 MUL ADD DEI #04 SFT
;draw-knob JSR2 ;draw-knob JSR2
@ -398,7 +398,7 @@ RTN
.Audio0/adsr .track/active LDZ #10 MUL ADD #01 ADD DEI #0f AND .Audio0/adsr .track/active LDZ #10 MUL ADD #01 ADD DEI #0f AND
;draw-knob JSR2 ;draw-knob JSR2
( vol ) ( vol )
.ctlframe/x1 LDZ2 #0058 ADD2 .ctlframe/y1 LDZ2 8++ #22 ;vol_txt ;draw-label JSR2 .ctlframe/x1 LDZ2 #0058 ADD2 .ctlframe/y1 LDZ2 8++ #02 ;vol_txt ;draw-label JSR2
.ctlframe/x1 LDZ2 #0058 ADD2 .ctlframe/y1 LDZ2 #0010 ADD2 .ctlframe/x1 LDZ2 #0058 ADD2 .ctlframe/y1 LDZ2 #0010 ADD2
.Audio0/volume .track/active LDZ #10 MUL ADD DEI #04 SFT .Audio0/volume .track/active LDZ #10 MUL ADD DEI #04 SFT
;draw-knob/force JSR2 ;draw-knob/force JSR2
@ -421,10 +421,10 @@ RTN
@draw-channels @draw-channels
.chnframe/x1 LDZ2 .chnframe/y1 LDZ2 .chnframe/x2 LDZ2 .chnframe/y2 LDZ2 #01 ;line-rect JSR2 .chnframe/x1 LDZ2 .chnframe/y1 LDZ2 .chnframe/x2 LDZ2 .chnframe/y2 LDZ2 #01 ;line-rect JSR2
.chnframe/x1 LDZ2 8++ .chnframe/y1 LDZ2 8++ #21 .track/active LDZ #00 EQU #07 MUL ADD ;ch1_txt ;draw-label JSR2 .chnframe/x1 LDZ2 8++ .chnframe/y1 LDZ2 8++ #01 .track/active LDZ #00 EQU #07 MUL ADD ;ch1_txt ;draw-label JSR2
.chnframe/x1 LDZ2 8++ .chnframe/y1 LDZ2 #0010 ADD2 #21 .track/active LDZ #01 EQU #07 MUL ADD ;ch2_txt ;draw-label JSR2 .chnframe/x1 LDZ2 8++ .chnframe/y1 LDZ2 #0010 ADD2 #01 .track/active LDZ #01 EQU #07 MUL ADD ;ch2_txt ;draw-label JSR2
.chnframe/x1 LDZ2 8++ .chnframe/y1 LDZ2 #0018 ADD2 #21 .track/active LDZ #02 EQU #07 MUL ADD ;ch3_txt ;draw-label JSR2 .chnframe/x1 LDZ2 8++ .chnframe/y1 LDZ2 #0018 ADD2 #01 .track/active LDZ #02 EQU #07 MUL ADD ;ch3_txt ;draw-label JSR2
.chnframe/x1 LDZ2 8++ .chnframe/y1 LDZ2 #0020 ADD2 #21 .track/active LDZ #03 EQU #07 MUL ADD ;ch4_txt ;draw-label JSR2 .chnframe/x1 LDZ2 8++ .chnframe/y1 LDZ2 #0020 ADD2 #01 .track/active LDZ #03 EQU #07 MUL ADD ;ch4_txt ;draw-label JSR2
RTN RTN
@ -434,14 +434,14 @@ RTN
;clear_icn .Screen/addr DEO2 ;clear_icn .Screen/addr DEO2
.pointer/x LDZ2 .Screen/x DEO2 .pointer/x LDZ2 .Screen/x DEO2
.pointer/y LDZ2 .Screen/y DEO2 .pointer/y LDZ2 .Screen/y DEO2
#30 .Screen/color DEO #40 .Screen/sprite DEO
( record pointer positions ) ( record pointer positions )
.Mouse/x DEI2 .pointer/x STZ2 .Mouse/y DEI2 .pointer/y STZ2 .Mouse/x DEI2 .pointer/x STZ2 .Mouse/y DEI2 .pointer/y STZ2
( draw new cursor ) ( draw new cursor )
;cursor_icn .Screen/addr DEO2 ;cursor_icn .Screen/addr DEO2
.pointer/x LDZ2 .Screen/x DEO2 .pointer/x LDZ2 .Screen/x DEO2
.pointer/y LDZ2 .Screen/y DEO2 .pointer/y LDZ2 .Screen/y DEO2
#32 .Mouse/state DEI #00 NEQ ADD .Screen/color DEO #42 .Mouse/state DEI #00 NEQ ADD .Screen/sprite DEO
RTN RTN
@ -452,7 +452,7 @@ RTN
( load ) .label/addr STZ2 .label/color STZ .Screen/y DEO2 .Screen/x DEO2 ( load ) .label/addr STZ2 .label/color STZ .Screen/y DEO2 .Screen/x DEO2
.label/addr LDZ2 .label/addr LDZ2
&loop &loop
( draw ) DUP2 LDA #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/color DEO ( draw ) DUP2 LDA #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/sprite DEO
( incr ) ++ ( incr ) ++
( incr ) .Screen/x DEI2 8++ .Screen/x DEO2 ( incr ) .Screen/x DEI2 8++ .Screen/x DEO2
DUP2 LDA ,&loop JCN DUP2 LDA ,&loop JCN
@ -464,7 +464,7 @@ RTN
.color STZ STH2 SWP2 .Screen/x DEO2 STH2r OVR2 .Screen/y DEO2 .color STZ STH2 SWP2 .Screen/x DEO2 STH2r OVR2 .Screen/y DEO2
&draw-ver &draw-ver
( draw ) .color LDZ .Screen/color DEO ( draw ) .color LDZ .Screen/pixel DEO
( incr ) SWP2 #0002 ADD2 DUP2 .Screen/y DEO2 SWP2 ( incr ) SWP2 #0002 ADD2 DUP2 .Screen/y DEO2 SWP2
OVR2 OVR2 LTH2 ,&draw-ver JCN OVR2 OVR2 LTH2 ,&draw-ver JCN
POP2 POP2 POP2 POP2
@ -475,7 +475,7 @@ RTN
.color STZ .Screen/y DEO2 OVR2 .Screen/x DEO2 .color STZ .Screen/y DEO2 OVR2 .Screen/x DEO2
&draw-hor &draw-hor
( draw ) .color LDZ .Screen/color DEO ( draw ) .color LDZ .Screen/pixel DEO
( incr ) SWP2 #0002 ADD2 DUP2 .Screen/x DEO2 SWP2 ( incr ) SWP2 #0002 ADD2 DUP2 .Screen/x DEO2 SWP2
OVR2 OVR2 LTH2 ,&draw-hor JCN OVR2 OVR2 LTH2 ,&draw-hor JCN
POP2 POP2 POP2 POP2
@ -487,13 +487,13 @@ RTN
( load ) .color STZ .rect/y2 STZ2 .rect/x2 STZ2 DUP2 .Screen/y DEO2 .rect/y1 STZ2 DUP2 .Screen/x DEO2 .rect/x1 STZ2 ( load ) .color STZ .rect/y2 STZ2 .rect/x2 STZ2 DUP2 .Screen/y DEO2 .rect/y1 STZ2 DUP2 .Screen/x DEO2 .rect/x1 STZ2
&hor &hor
( incr ) .Screen/x DEI2 ++ .Screen/x DEO2 ( incr ) .Screen/x DEI2 ++ .Screen/x DEO2
( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ .Screen/color DEO ( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .color LDZ .Screen/color DEO ( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
.Screen/x DEI2 .rect/x2 LDZ2 LTH2 ,&hor JCN .Screen/x DEI2 .rect/x2 LDZ2 LTH2 ,&hor JCN
.rect/y1 LDZ2 .Screen/y DEO2 .rect/y1 LDZ2 .Screen/y DEO2
&ver &ver
( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ .Screen/color DEO ( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ .Screen/pixel DEO
( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .color LDZ .Screen/color DEO ( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .color LDZ .Screen/pixel DEO
( incr ) .Screen/y DEI2 ++ .Screen/y DEO2 ( incr ) .Screen/y DEI2 ++ .Screen/y DEO2
.Screen/y DEI2 .rect/y2 LDZ2 ++ LTH2 ,&ver JCN .Screen/y DEI2 .rect/y2 LDZ2 ++ LTH2 ,&ver JCN

View file

@ -13,7 +13,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|b0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ] |b0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
( variables ) ( variables )
@ -59,7 +59,7 @@
;neralie-lines JSR2 ;neralie-lines JSR2
BRK BRK
#22 .Screen/color DEO #02 .Screen/sprite DEO
#0000 #00 .number/count LDZ DUP2 ;h JSR2 #0000 #00 .number/count LDZ DUP2 ;h JSR2
.number/count LDZ #01 ADD .number/count STZ .number/count LDZ #01 ADD .number/count STZ
@ -115,7 +115,7 @@
@digit ( index* -- ) @digit ( index* -- )
8** ;font-numbers ADD2 .Screen/addr DEO2 8** ;font-numbers ADD2 .Screen/addr DEO2
&middle &middle
.neralie/color LDZ #20 ADD .Screen/color DEO .neralie/color LDZ .Screen/sprite DEO
.Screen/x DEI2 #0008 ADD2 .Screen/x DEO2 .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
JMP2r JMP2r
@ -190,7 +190,7 @@
&keep-going &keep-going
DUP2 .lines/addr LDZ DEO2 DUP2 .lines/addr LDZ DEO2
.neralie/color LDZ .Screen/color DEO .neralie/color LDZ .Screen/pixel DEO
,&loop JMP ,&loop JMP
@update-fps ( -- ) @update-fps ( -- )

View file

@ -22,7 +22,7 @@
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|10 @Console [ &vector $2 &read $1 &pad $5 &write $1 ] |10 @Console [ &vector $2 &read $1 &pad $5 &write $1 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ] |30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|70 @Midi [ &vector $2 &channel $1 &note $1 &velocity $1 ] |70 @Midi [ &vector $2 &channel $1 &note $1 &velocity $1 ]
|80 @Controller [ &vector $2 &button $1 &key $1 ] |80 @Controller [ &vector $2 &button $1 &key $1 ]
@ -100,9 +100,9 @@ BRK
#00 #10 #00 #10
&loop &loop
.adsr-view/x2 LDZ2 #003a -- .Screen/x DEO2 .adsr-view/x2 LDZ2 #003a -- .Screen/x DEO2
OVR #10 SWP - .Audio0/output DEI #0f AND < .Screen/color DEO OVR #10 SWP - .Audio0/output DEI #0f AND < .Screen/pixel DEO
.adsr-view/x2 LDZ2 #003a -- #0002 ++ .Screen/x DEO2 .adsr-view/x2 LDZ2 #003a -- #0002 ++ .Screen/x DEO2
OVR #10 SWP - .Audio0/output DEI #04 SFT < .Screen/color DEO OVR #10 SWP - .Audio0/output DEI #04 SFT < .Screen/pixel DEO
.Screen/y DEI2 #0002 ++ .Screen/y DEO2 .Screen/y DEI2 #0002 ++ .Screen/y DEO2
( incr ) INCR ( incr ) INCR
LTHk ,&loop JCN LTHk ,&loop JCN
@ -115,7 +115,7 @@ BRK
( clear last cursor ) ( clear last cursor )
.pointer/x LDZ2 .Screen/x DEO2 .pointer/x LDZ2 .Screen/x DEO2
.pointer/y LDZ2 .Screen/y DEO2 .pointer/y LDZ2 .Screen/y DEO2
#30 .Screen/color DEO #40 .Screen/sprite DEO
.Controller/key DEI .Controller/key DEI
DUP #61 ! ,&no-c JCN DUP #61 ! ,&no-c JCN
@ -260,12 +260,12 @@ RTN
;cursor .Screen/addr DEO2 ;cursor .Screen/addr DEO2
.pointer/x LDZ2 .Screen/x DEO2 .pointer/x LDZ2 .Screen/x DEO2
.pointer/y LDZ2 .Screen/y DEO2 .pointer/y LDZ2 .Screen/y DEO2
#30 .Screen/color DEO #40 .Screen/sprite DEO
( record pointer positions ) ( record pointer positions )
.Mouse/x DEI2 DUP2 .pointer/x STZ2 .Screen/x DEO2 .Mouse/x DEI2 DUP2 .pointer/x STZ2 .Screen/x DEO2
.Mouse/y DEI2 DUP2 .pointer/y STZ2 .Screen/y DEO2 .Mouse/y DEI2 DUP2 .pointer/y STZ2 .Screen/y DEO2
( colorize on state ) ( colorize on state )
#31 [ .Mouse/state DEI #00 ! ] + .Screen/color DEO #41 [ .Mouse/state DEI #00 ! ] + .Screen/sprite DEO
RTN RTN
@ -273,27 +273,27 @@ RTN
.octave-view/x1 LDZ2 .octave-view/y1 LDZ2 .octave-view/x1 LDZ2 .octave-view/y1 LDZ2
OVR2 OVR2 ;keys-left-icns #21 .last-note LDZ #00 = + ;draw-key JSR2 OVR2 OVR2 ;keys-left-icns #01 .last-note LDZ #00 = + ;draw-key JSR2
OVR2 #0008 ++ OVR2 ;keys-middle-icns #21 .last-note LDZ #02 = + ;draw-key JSR2 OVR2 #0008 ++ OVR2 ;keys-middle-icns #01 .last-note LDZ #02 = + ;draw-key JSR2
OVR2 #0010 ++ OVR2 ;keys-right-icns #21 .last-note LDZ #04 = + ;draw-key JSR2 OVR2 #0010 ++ OVR2 ;keys-right-icns #01 .last-note LDZ #04 = + ;draw-key JSR2
OVR2 #0018 ++ OVR2 ;keys-left-icns #21 .last-note LDZ #05 = + ;draw-key JSR2 OVR2 #0018 ++ OVR2 ;keys-left-icns #01 .last-note LDZ #05 = + ;draw-key JSR2
OVR2 #0020 ++ OVR2 ;keys-middle-icns #21 .last-note LDZ #07 = + ;draw-key JSR2 OVR2 #0020 ++ OVR2 ;keys-middle-icns #01 .last-note LDZ #07 = + ;draw-key JSR2
OVR2 #0028 ++ OVR2 ;keys-middle-icns #21 .last-note LDZ #09 = + ;draw-key JSR2 OVR2 #0028 ++ OVR2 ;keys-middle-icns #01 .last-note LDZ #09 = + ;draw-key JSR2
SWP2 #0030 ++ SWP2 ;keys-right-icns #21 .last-note LDZ #0b = + ;draw-key JSR2 SWP2 #0030 ++ SWP2 ;keys-right-icns #01 .last-note LDZ #0b = + ;draw-key JSR2
.octave-view/x1 LDZ2 #0048 ++ .Screen/x DEO2 .octave-view/x1 LDZ2 #0048 ++ .Screen/x DEO2
;arrow-icns .Screen/addr DEO2 ;arrow-icns .Screen/addr DEO2
.octave-view/y1 LDZ2 .Screen/y DEO2 .octave-view/y1 LDZ2 .Screen/y DEO2
#21 .Screen/color DEO #01 .Screen/sprite DEO
;arrow-icns #0008 ++ .Screen/addr DEO2 ;arrow-icns #0008 ++ .Screen/addr DEO2
.octave-view/y1 LDZ2 #0010 ++ .Screen/y DEO2 .octave-view/y1 LDZ2 #0010 ++ .Screen/y DEO2
#21 .Screen/color DEO #01 .Screen/sprite DEO
;font-hex .octave LDZ #03 + #00 SWP 8** ++ .Screen/addr DEO2 ;font-hex .octave LDZ #03 + #00 SWP 8** ++ .Screen/addr DEO2
.octave-view/y1 LDZ2 #0008 ++ .Screen/y DEO2 .octave-view/y1 LDZ2 #0008 ++ .Screen/y DEO2
#23 .Screen/color DEO #03 .Screen/sprite DEO
RTN RTN
@ -305,7 +305,7 @@ RTN
DUP2 #0018 ++ DUP2 #0018 ++
&loop &loop
( move ) OVR2 .Screen/y DEO2 ( move ) OVR2 .Screen/y DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
( incr ) .Screen/addr DEI2 #0008 ++ .Screen/addr DEO2 ( incr ) .Screen/addr DEI2 #0008 ++ .Screen/addr DEO2
( incr ) SWP2 #0008 ++ SWP2 ( incr ) SWP2 #0008 ++ SWP2
LTH2k ,&loop JCN LTH2k ,&loop JCN
@ -358,7 +358,7 @@ RTN
( dotted line ) ( dotted line )
OVR #01 AND ,&no-dot JCN OVR #01 AND ,&no-dot JCN
.wave-view/y1 LDZ2 #0010 ++ .Screen/y DEO2 .wave-view/y1 LDZ2 #0010 ++ .Screen/y DEO2
#03 .Screen/color DEO #03 .Screen/pixel DEO
&no-dot &no-dot
OVR TOS .Audio0/addr DEI2 ++ LDA OVR TOS .Audio0/addr DEI2 ++ LDA
#02 / #02 /
@ -366,7 +366,7 @@ RTN
.Screen/x DEI2 #0001 ++ .Screen/x DEO2 .Screen/x DEI2 #0001 ++ .Screen/x DEO2
( draw ) OVR ( draw ) OVR
.Audio0/length DEI2 TOB > .Audio0/length DEI2 TOB >
.Audio0/length DEI2 #0100 !! #0101 == #02 * #01 + .Screen/color DEO .Audio0/length DEI2 #0100 !! #0101 == #02 * #01 + .Screen/pixel DEO
( incr ) INCR ( incr ) INCR
LTHk ,&loop JCN LTHk ,&loop JCN
POP2 POP2
@ -374,9 +374,9 @@ RTN
( range ) ( range )
.wave-view/x1 LDZ2 .Screen/x DEO2 .wave-view/x1 LDZ2 .Screen/x DEO2
.wave-view/y1 LDZ2 #0010 -- .Screen/y DEO2 .wave-view/y1 LDZ2 #0010 -- .Screen/y DEO2
.Audio0/addr DEI2 #22 ;draw-short JSR2 .Audio0/addr DEI2 #02 ;draw-short JSR2
.wave-view/x2 LDZ2 #0020 -- .Screen/x DEO2 .wave-view/x2 LDZ2 #0020 -- .Screen/x DEO2
.Audio0/length DEI2 #22 ;draw-short JSR2 .Audio0/length DEI2 #02 ;draw-short JSR2
RTN RTN
@ -387,7 +387,7 @@ RTN
.wave-view/y1 LDZ2 DUP2 #0020 ++ .wave-view/y1 LDZ2 DUP2 #0020 ++
&loop &loop
OVR2 .Screen/y DEO2 OVR2 .Screen/y DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/pixel DEO
( incr ) SWP2 #0001 ++ SWP2 ( incr ) SWP2 #0001 ++ SWP2
LTH2k ,&loop JCN LTH2k ,&loop JCN
POP2 POP2 POP2 POP2
@ -399,24 +399,24 @@ RTN
( load ) STH .Screen/y DEO2 .Screen/x DEO2 ( load ) STH .Screen/y DEO2 .Screen/x DEO2
;knob-icns .Screen/addr DEO2 ;knob-icns .Screen/addr DEO2
( draw ) #21 .Screen/color DEO ( draw ) #01 .Screen/sprite DEO
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 .Screen/x DEI2 #0008 ++ .Screen/x DEO2
;knob-icns #0008 ++ .Screen/addr DEO2 ;knob-icns #0008 ++ .Screen/addr DEO2
( draw ) #21 .Screen/color DEO ( draw ) #01 .Screen/sprite DEO
.Screen/y DEI2 #0008 ++ .Screen/y DEO2 .Screen/y DEI2 #0008 ++ .Screen/y DEO2
;knob-icns #0018 ++ .Screen/addr DEO2 ;knob-icns #0018 ++ .Screen/addr DEO2
( draw ) #21 .Screen/color DEO ( draw ) #01 .Screen/sprite DEO
.Screen/x DEI2 #0008 -- .Screen/x DEO2 .Screen/x DEI2 #0008 -- .Screen/x DEO2
;knob-icns #0010 ++ .Screen/addr DEO2 ;knob-icns #0010 ++ .Screen/addr DEO2
( draw ) #21 .Screen/color DEO ( draw ) #01 .Screen/sprite DEO
.Screen/x DEI2 #0004 ++ .Screen/x DEO2 .Screen/x DEI2 #0004 ++ .Screen/x DEO2
.Screen/y DEI2 #0008 ++ .Screen/y DEO2 .Screen/y DEI2 #0008 ++ .Screen/y DEO2
;font-hex #00 STHkr #08 * ++ .Screen/addr DEO2 ;font-hex #00 STHkr #08 * ++ .Screen/addr DEO2
( draw ) #21 .Screen/color DEO ( draw ) #01 .Screen/sprite DEO
.Screen/x DEI2 #0004 -- #00 #00 STHkr ;knob-offsetx ++ LDA ++ .Screen/x DEO2 .Screen/x DEI2 #0004 -- #00 #00 STHkr ;knob-offsetx ++ LDA ++ .Screen/x DEO2
.Screen/y DEI2 #0010 -- #00 #00 STHr ;knob-offsety ++ LDA ++ .Screen/y DEO2 .Screen/y DEI2 #0010 -- #00 #00 STHr ;knob-offsety ++ LDA ++ .Screen/y DEO2
;knob-icns #0020 ++ .Screen/addr DEO2 ;knob-icns #0020 ++ .Screen/addr DEO2
( draw ) #25 .Screen/color DEO ( draw ) #05 .Screen/sprite DEO
RTN RTN
@ -424,16 +424,16 @@ RTN
STH SWP STH SWP
DUP #04 SFT TOS 8** ;font-hex ++ .Screen/addr DEO2 DUP #04 SFT TOS 8** ;font-hex ++ .Screen/addr DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
#0f AND TOS 8** ;font-hex ++ .Screen/addr DEO2 #0f AND TOS 8** ;font-hex ++ .Screen/addr DEO2
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 .Screen/x DEI2 #0008 ++ .Screen/x DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
DUP #04 SFT TOS 8** ;font-hex ++ .Screen/addr DEO2 DUP #04 SFT TOS 8** ;font-hex ++ .Screen/addr DEO2
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 .Screen/x DEI2 #0008 ++ .Screen/x DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
#0f AND TOS 8** ;font-hex ++ .Screen/addr DEO2 #0f AND TOS 8** ;font-hex ++ .Screen/addr DEO2
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 .Screen/x DEI2 #0008 ++ .Screen/x DEO2
( draw ) STHr .Screen/color DEO ( draw ) STHr .Screen/sprite DEO
RTN RTN
@ -446,7 +446,7 @@ RTN
STH2 STH2 OVR2 OVR2 STH2 STH2 OVR2 OVR2
&hor &hor
( save ) OVR2 .Screen/x DEO2 ( save ) OVR2 .Screen/x DEO2
( draw ) .color LDZ .Screen/color DEO ( draw ) .color LDZ .Screen/pixel DEO
( incr ) SWP2 #0001 ++ SWP2 ( incr ) SWP2 #0001 ++ SWP2
OVR2 OVR2 LTS2 ,&hor JCN OVR2 OVR2 LTS2 ,&hor JCN
POP2 POP2 STH2r STH2r POP2 POP2 STH2r STH2r

View file

@ -7,7 +7,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ] |90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ]
( variables ) ( variables )
@ -68,10 +68,10 @@ BRK
.cat/y LDZ2 .Screen/y DEO2 .cat/y LDZ2 .Screen/y DEO2
.cat/x LDZ2 STH2k #0008 SUB2 .Screen/x DEO2 .cat/x LDZ2 STH2k #0008 SUB2 .Screen/x DEO2
;ears .Screen/addr DEO2 ;ears .Screen/addr DEO2
#41 .Screen/color DEO #81 .Screen/sprite DEO
STH2r .Screen/x DEO2 STH2r .Screen/x DEO2
;ears #0010 ADD2 .Screen/addr DEO2 ;ears #0010 ADD2 .Screen/addr DEO2
#41 .Screen/color DEO #81 .Screen/sprite DEO
#0000 ,draw-eye JSR #0000 ,draw-eye JSR
#0000 ,draw-tail JSR #0000 ,draw-tail JSR
@ -83,10 +83,10 @@ RTN
.cat/y LDZ2 #0008 ADD2 .Screen/y DEO2 .cat/y LDZ2 #0008 ADD2 .Screen/y DEO2
.cat/x LDZ2 STH2k #0008 SUB2 .Screen/x DEO2 .cat/x LDZ2 STH2k #0008 SUB2 .Screen/x DEO2
DUP2 ;eye ADD2 .Screen/addr DEO2 DUP2 ;eye ADD2 .Screen/addr DEO2
( draw ) #41 .Screen/color DEO ( draw ) #81 .Screen/sprite DEO
STH2r .Screen/x DEO2 STH2r .Screen/x DEO2
;eye #0010 ADD2 ADD2 .Screen/addr DEO2 ;eye #0010 ADD2 ADD2 .Screen/addr DEO2
( draw ) #41 .Screen/color DEO ( draw ) #81 .Screen/sprite DEO
RTN RTN
@ -95,10 +95,10 @@ RTN
.cat/y LDZ2 #0010 ADD2 .Screen/y DEO2 .cat/y LDZ2 #0010 ADD2 .Screen/y DEO2
.cat/x LDZ2 STH2k #0008 SUB2 .Screen/x DEO2 .cat/x LDZ2 STH2k #0008 SUB2 .Screen/x DEO2
;body .Screen/addr DEO2 ;body .Screen/addr DEO2
( draw ) #41 .Screen/color DEO ( draw ) #81 .Screen/sprite DEO
STH2r .Screen/x DEO2 STH2r .Screen/x DEO2
#0010 MUL2 ;body #0010 ADD2 ADD2 .Screen/addr DEO2 #0010 MUL2 ;body #0010 ADD2 ADD2 .Screen/addr DEO2
( draw ) #41 .Screen/color DEO ( draw ) #81 .Screen/sprite DEO
RTN RTN
@ -108,14 +108,14 @@ RTN
;cursor .Screen/addr DEO2 ;cursor .Screen/addr DEO2
.pointer/x LDZ2 .Screen/x DEO2 .pointer/x LDZ2 .Screen/x DEO2
.pointer/y LDZ2 .Screen/y DEO2 .pointer/y LDZ2 .Screen/y DEO2
#30 .Screen/color DEO #40 .Screen/sprite DEO
( record pointer positions ) ( record pointer positions )
.Mouse/x DEI2 DUP2 .pointer/x STZ2 .Screen/x DEO2 .Mouse/x DEI2 DUP2 .pointer/x STZ2 .Screen/x DEO2
.Mouse/y DEI2 DUP2 .pointer/y STZ2 .Screen/y DEO2 .Mouse/y DEI2 DUP2 .pointer/y STZ2 .Screen/y DEO2
( colorize on state ) ( colorize on state )
#31 [ .Mouse/state DEI #00 NEQ ] ADD .Screen/color DEO #41 [ .Mouse/state DEI #00 NEQ ] ADD .Screen/sprite DEO
RTN RTN
@ -127,7 +127,7 @@ RTN
#00 #10 #00 #10
&loop &loop
( draw ) #21 .Screen/color DEO ( draw ) #01 .Screen/sprite DEO
( sety ) .Screen/addr DEI2 #0008 ADD2 .Screen/addr DEO2 ( sety ) .Screen/addr DEI2 #0008 ADD2 .Screen/addr DEO2
( setx ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2 ( setx ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
( incr ) SWP #01 ADD SWP ( incr ) SWP #01 ADD SWP

View file

@ -12,7 +12,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ] |90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ]
( variables ) ( variables )
@ -128,7 +128,7 @@ RTN
#0000 .Screen/x DEO2 .center/y LDZ2 .Screen/y DEO2 #0000 .Screen/x DEO2 .center/y LDZ2 .Screen/y DEO2
#0000 .Screen/width DEI2 ( from/to ) #0000 .Screen/width DEI2 ( from/to )
&draw-hor &draw-hor
( draw ) #01 .Screen/color DEO ( draw ) #01 .Screen/pixel DEO
( incr ) SWP2 #0002 ADD2 DUP2 .Screen/x DEO2 SWP2 ( incr ) SWP2 #0002 ADD2 DUP2 .Screen/x DEO2 SWP2
LTH2k ,&draw-hor JCN LTH2k ,&draw-hor JCN
POP2 POP2 POP2 POP2
@ -137,7 +137,7 @@ RTN
.center/x LDZ2 .Screen/x DEO2 #0000 .Screen/y DEO2 .center/x LDZ2 .Screen/x DEO2 #0000 .Screen/y DEO2
#0000 .Screen/height DEI2 ( from/to ) #0000 .Screen/height DEI2 ( from/to )
&draw-ver &draw-ver
( draw ) #02 .Screen/color DEO ( draw ) #02 .Screen/pixel DEO
( incr ) SWP2 #0002 ADD2 DUP2 .Screen/y DEO2 SWP2 ( incr ) SWP2 #0002 ADD2 DUP2 .Screen/y DEO2 SWP2
LTH2k ,&draw-ver JCN LTH2k ,&draw-ver JCN
POP2 POP2 POP2 POP2
@ -148,7 +148,7 @@ RTN
#00 #08 #00 #08
&draw-pixel1 &draw-pixel1
( move ) OVR #08 MUL #00 SWP #0010 ADD2 .Screen/x DEO2 ( move ) OVR #08 MUL #00 SWP #0010 ADD2 .Screen/x DEO2
( draw ) OVR .Screen/color DEO ( draw ) OVR .Screen/pixel DEO
( incr ) SWP #01 ADD SWP ( incr ) SWP #01 ADD SWP
LTHk ,&draw-pixel1 JCN LTHk ,&draw-pixel1 JCN
POP POP POP POP
@ -156,7 +156,7 @@ RTN
#00 #08 #00 #08
&draw-pixel2 &draw-pixel2
( move ) OVR #08 MUL #00 SWP #0010 ADD2 .Screen/x DEO2 ( move ) OVR #08 MUL #00 SWP #0010 ADD2 .Screen/x DEO2
( draw ) OVR #08 ADD .Screen/color DEO ( draw ) OVR #08 ADD .Screen/pixel DEO
( incr ) SWP #01 ADD SWP ( incr ) SWP #01 ADD SWP
LTHk ,&draw-pixel2 JCN LTHk ,&draw-pixel2 JCN
POP POP POP POP
@ -164,7 +164,7 @@ RTN
#00 #08 #00 #08
&draw-icn1 &draw-icn1
( move ) OVR #08 MUL #00 SWP #0010 ADD2 .Screen/x DEO2 ( move ) OVR #08 MUL #00 SWP #0010 ADD2 .Screen/x DEO2
( draw ) OVR #20 ADD .Screen/color DEO ( draw ) OVR #00 ADD .Screen/sprite DEO
( incr ) SWP #01 ADD SWP ( incr ) SWP #01 ADD SWP
LTHk ,&draw-icn1 JCN LTHk ,&draw-icn1 JCN
POP POP POP POP
@ -172,7 +172,7 @@ RTN
#00 #08 #00 #08
&draw-icn2 &draw-icn2
( move ) OVR #08 MUL #00 SWP #0010 ADD2 .Screen/x DEO2 ( move ) OVR #08 MUL #00 SWP #0010 ADD2 .Screen/x DEO2
( draw ) OVR #28 ADD .Screen/color DEO ( draw ) OVR #08 ADD .Screen/sprite DEO
( incr ) SWP #01 ADD SWP ( incr ) SWP #01 ADD SWP
LTHk ,&draw-icn2 JCN LTHk ,&draw-icn2 JCN
POP POP POP POP
@ -180,7 +180,7 @@ RTN
#00 #08 #00 #08
&draw-chr1 &draw-chr1
( move ) OVR #08 MUL #00 SWP #0010 ADD2 .Screen/x DEO2 ( move ) OVR #08 MUL #00 SWP #0010 ADD2 .Screen/x DEO2
( draw ) OVR #40 ADD .Screen/color DEO ( draw ) OVR #80 ADD .Screen/sprite DEO
( incr ) SWP #01 ADD SWP ( incr ) SWP #01 ADD SWP
LTHk ,&draw-chr1 JCN LTHk ,&draw-chr1 JCN
POP POP POP POP
@ -188,7 +188,7 @@ RTN
#00 #08 #00 #08
&draw-chr2 &draw-chr2
( move ) OVR #08 MUL #00 SWP #0010 ADD2 .Screen/x DEO2 ( move ) OVR #08 MUL #00 SWP #0010 ADD2 .Screen/x DEO2
( draw ) OVR #48 ADD .Screen/color DEO ( draw ) OVR #88 ADD .Screen/sprite DEO
( incr ) SWP #01 ADD SWP ( incr ) SWP #01 ADD SWP
LTHk ,&draw-chr2 JCN LTHk ,&draw-chr2 JCN
POP POP POP POP
@ -203,17 +203,17 @@ RTN
.window/x1 LDZ2 .window/y1 LDZ2 .window/x2 LDZ2 .window/y2 LDZ2 #01 ;line-rect JSR2 .window/x1 LDZ2 .window/y1 LDZ2 .window/x2 LDZ2 .window/y2 LDZ2 #01 ;line-rect JSR2
.window/x1 LDZ2 #0002 SUB2 .window/y1 LDZ2 #0002 SUB2 .window/x2 LDZ2 #0002 ADD2 .window/y2 LDZ2 #0002 ADD2 #01 ;line-rect JSR2 .window/x1 LDZ2 #0002 SUB2 .window/y1 LDZ2 #0002 SUB2 .window/x2 LDZ2 #0002 ADD2 .window/y2 LDZ2 #0002 ADD2 #01 ;line-rect JSR2
.window/x1 LDZ2 #0008 ADD2 .window/y1 LDZ2 #0010 ADD2 ;red_txt #25 ;draw-label JSR2 .window/x1 LDZ2 #0008 ADD2 .window/y1 LDZ2 #0010 ADD2 ;red_txt #05 ;draw-label JSR2
.window/x1 LDZ2 #0038 ADD2 .Screen/x DEO2 .window/x1 LDZ2 #0038 ADD2 .Screen/x DEO2
.System/r DEI2 #28 ;draw-short JSR2 .System/r DEI2 #08 ;draw-short JSR2
.window/x1 LDZ2 #0008 ADD2 .window/y1 LDZ2 #0020 ADD2 ;green_txt #25 ;draw-label JSR2 .window/x1 LDZ2 #0008 ADD2 .window/y1 LDZ2 #0020 ADD2 ;green_txt #05 ;draw-label JSR2
.window/x1 LDZ2 #0038 ADD2 .Screen/x DEO2 .window/x1 LDZ2 #0038 ADD2 .Screen/x DEO2
.System/g DEI2 #28 ;draw-short JSR2 .System/g DEI2 #08 ;draw-short JSR2
.window/x1 LDZ2 #0008 ADD2 .window/y1 LDZ2 #0030 ADD2 ;blue_txt #25 ;draw-label JSR2 .window/x1 LDZ2 #0008 ADD2 .window/y1 LDZ2 #0030 ADD2 ;blue_txt #05 ;draw-label JSR2
.window/x1 LDZ2 #0038 ADD2 .Screen/x DEO2 .window/x1 LDZ2 #0038 ADD2 .Screen/x DEO2
.System/b DEI2 #28 ;draw-short JSR2 .System/b DEI2 #08 ;draw-short JSR2
.window/x1 LDZ2 #0060 ADD2 .window/y1 LDZ2 #0010 ADD2 .window/x1 LDZ2 #0090 ADD2 #00 ;theme/r1 .selection LDZ ADD LDA 4** #01 ;draw-slider JSR2 .window/x1 LDZ2 #0060 ADD2 .window/y1 LDZ2 #0010 ADD2 .window/x1 LDZ2 #0090 ADD2 #00 ;theme/r1 .selection LDZ ADD LDA 4** #01 ;draw-slider JSR2
.window/x1 LDZ2 #0060 ADD2 .window/y1 LDZ2 #0020 ADD2 .window/x1 LDZ2 #0090 ADD2 #00 ;theme/g1 .selection LDZ ADD LDA 4** #01 ;draw-slider JSR2 .window/x1 LDZ2 #0060 ADD2 .window/y1 LDZ2 #0020 ADD2 .window/x1 LDZ2 #0090 ADD2 #00 ;theme/g1 .selection LDZ ADD LDA 4** #01 ;draw-slider JSR2
@ -222,22 +222,22 @@ RTN
.window/x1 LDZ2 #0050 ADD2 .Screen/x DEO2 .window/x1 LDZ2 #0050 ADD2 .Screen/x DEO2
.window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2 .window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2
;radio_icns #00 .selection LDZ #00 EQU 8** ADD2 .Screen/addr DEO2 ;radio_icns #00 .selection LDZ #00 EQU 8** ADD2 .Screen/addr DEO2
#25 .Screen/color DEO #05 .Screen/sprite DEO
.window/x1 LDZ2 #0060 ADD2 .Screen/x DEO2 .window/x1 LDZ2 #0060 ADD2 .Screen/x DEO2
.window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2 .window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2
;radio_icns #00 .selection LDZ #01 EQU 8** ADD2 .Screen/addr DEO2 ;radio_icns #00 .selection LDZ #01 EQU 8** ADD2 .Screen/addr DEO2
#25 .Screen/color DEO #05 .Screen/sprite DEO
.window/x1 LDZ2 #0070 ADD2 .Screen/x DEO2 .window/x1 LDZ2 #0070 ADD2 .Screen/x DEO2
.window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2 .window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2
;radio_icns #00 .selection LDZ #02 EQU 8** ADD2 .Screen/addr DEO2 ;radio_icns #00 .selection LDZ #02 EQU 8** ADD2 .Screen/addr DEO2
#25 .Screen/color DEO #05 .Screen/sprite DEO
.window/x1 LDZ2 #0080 ADD2 .Screen/x DEO2 .window/x1 LDZ2 #0080 ADD2 .Screen/x DEO2
.window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2 .window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2
;radio_icns #00 .selection LDZ #03 EQU 8** ADD2 .Screen/addr DEO2 ;radio_icns #00 .selection LDZ #03 EQU 8** ADD2 .Screen/addr DEO2
#25 .Screen/color DEO #05 .Screen/sprite DEO
RTN RTN
@ -247,13 +247,13 @@ RTN
;pointer_icn .Screen/addr DEO2 ;pointer_icn .Screen/addr DEO2
.pointer/x LDZ2 .Screen/x DEO2 .pointer/x LDZ2 .Screen/x DEO2
.pointer/y LDZ2 .Screen/y DEO2 .pointer/y LDZ2 .Screen/y DEO2
#30 .Screen/color DEO #40 .Screen/sprite DEO
( record pointer positions ) ( record pointer positions )
.Mouse/x DEI2 DUP2 .pointer/x STZ2 .Screen/x DEO2 .Mouse/x DEI2 DUP2 .pointer/x STZ2 .Screen/x DEO2
.Mouse/y DEI2 DUP2 .pointer/y STZ2 .Screen/y DEO2 .Mouse/y DEI2 DUP2 .pointer/y STZ2 .Screen/y DEO2
#33 .Mouse/state DEI #00 NEQ #02 MUL SUB .Screen/color DEO #43 .Mouse/state DEI #00 NEQ #02 MUL SUB .Screen/sprite DEO
RTN RTN
@ -266,21 +266,21 @@ RTN
;halftone_icn .Screen/addr DEO2 ;halftone_icn .Screen/addr DEO2
;slidera_icn .Screen/addr DEO2 ;slidera_icn .Screen/addr DEO2
( draw ) #25 .Screen/color DEO ( draw ) #05 .Screen/sprite DEO
;sliderb_icn .Screen/addr DEO2 ;sliderb_icn .Screen/addr DEO2
&loop &loop
( incr ) .Screen/x DEI2 8+ .Screen/x DEO2 ( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
( draw ) #25 .Screen/color DEO ( draw ) #05 .Screen/sprite DEO
.Screen/x DEI2 .slider/x2 LDZ2 #0008 ADD2 LTH2 ,&loop JCN .Screen/x DEI2 .slider/x2 LDZ2 #0008 ADD2 LTH2 ,&loop JCN
( incr ) .Screen/x DEI2 #0004 ADD2 .Screen/x DEO2 ( incr ) .Screen/x DEI2 #0004 ADD2 .Screen/x DEO2
;sliderc_icn .Screen/addr DEO2 ;sliderc_icn .Screen/addr DEO2
( draw ) #25 .Screen/color DEO ( draw ) #05 .Screen/sprite DEO
.slider/x1 LDZ2 .slider/pos LDZ2 ADD2 .Screen/x DEO2 .slider/x1 LDZ2 .slider/pos LDZ2 ADD2 .Screen/x DEO2
;sliderd_icn .Screen/addr DEO2 ;sliderd_icn .Screen/addr DEO2
( draw ) #2a .Screen/color DEO ( draw ) #0a .Screen/sprite DEO
RTN RTN
@ -293,7 +293,7 @@ RTN
STH2 STH2 OVR2 OVR2 STH2 STH2 OVR2 OVR2
&hor &hor
( save ) OVR2 .Screen/x DEO2 ( save ) OVR2 .Screen/x DEO2
( draw ) .color LDZ .Screen/color DEO ( draw ) .color LDZ .Screen/pixel DEO
( incr ) SWP2 #0001 ADD2 SWP2 ( incr ) SWP2 #0001 ADD2 SWP2
LTH2k ,&hor JCN LTH2k ,&hor JCN
POP2 POP2 STH2r STH2r POP2 POP2 STH2r STH2r
@ -308,13 +308,13 @@ RTN
( load ) .color STZ .rect/y2 STZ2 .rect/x2 STZ2 DUP2 .Screen/y DEO2 .rect/y1 STZ2 DUP2 .Screen/x DEO2 .rect/x1 STZ2 ( load ) .color STZ .rect/y2 STZ2 .rect/x2 STZ2 DUP2 .Screen/y DEO2 .rect/y1 STZ2 DUP2 .Screen/x DEO2 .rect/x1 STZ2
&hor &hor
( incr ) .Screen/x DEI2 ++ .Screen/x DEO2 ( incr ) .Screen/x DEI2 ++ .Screen/x DEO2
( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ .Screen/color DEO ( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .color LDZ .Screen/color DEO ( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
.Screen/x DEI2 .rect/x2 LDZ2 LTH2 ,&hor JCN .Screen/x DEI2 .rect/x2 LDZ2 LTH2 ,&hor JCN
.rect/y1 LDZ2 .Screen/y DEO2 .rect/y1 LDZ2 .Screen/y DEO2
&ver &ver
( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ .Screen/color DEO ( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ .Screen/pixel DEO
( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .color LDZ .Screen/color DEO ( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .color LDZ .Screen/pixel DEO
( incr ) .Screen/y DEI2 ++ .Screen/y DEO2 ( incr ) .Screen/y DEI2 ++ .Screen/y DEO2
.Screen/y DEI2 .rect/y2 LDZ2 ++ LTH2 ,&ver JCN .Screen/y DEI2 .rect/y2 LDZ2 ++ LTH2 ,&ver JCN
@ -329,7 +329,7 @@ RTN
&loop &loop
DUP2 LDA #00 SWP 8** DUP2 LDA #00 SWP 8**
;font ADD2 .Screen/addr DEO2 ;font ADD2 .Screen/addr DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
( incr ) ++ ( incr ) ++
( incr ) .Screen/x DEI2 8+ .Screen/x DEO2 ( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
DUP2 LDA ,&loop JCN DUP2 LDA ,&loop JCN
@ -341,16 +341,16 @@ RTN
STH SWP STH SWP
DUP #04 SFT #00 SWP 8** ;font-hex ADD2 .Screen/addr DEO2 DUP #04 SFT #00 SWP 8** ;font-hex ADD2 .Screen/addr DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
#0f AND #00 SWP 8** ;font-hex ADD2 .Screen/addr DEO2 #0f AND #00 SWP 8** ;font-hex ADD2 .Screen/addr DEO2
.Screen/x DEI2 8+ .Screen/x DEO2 .Screen/x DEI2 8+ .Screen/x DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
DUP #04 SFT #00 SWP 8** ;font-hex ADD2 .Screen/addr DEO2 DUP #04 SFT #00 SWP 8** ;font-hex ADD2 .Screen/addr DEO2
.Screen/x DEI2 8+ .Screen/x DEO2 .Screen/x DEI2 8+ .Screen/x DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
#0f AND #00 SWP 8** ;font-hex ADD2 .Screen/addr DEO2 #0f AND #00 SWP 8** ;font-hex ADD2 .Screen/addr DEO2
.Screen/x DEI2 8+ .Screen/x DEO2 .Screen/x DEI2 8+ .Screen/x DEO2
( draw ) STHr .Screen/color DEO ( draw ) STHr .Screen/sprite DEO
RTN RTN

View file

@ -7,7 +7,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ] |30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|40 @Audio1 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ] |40 @Audio1 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|50 @Audio2 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ] |50 @Audio2 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]

View file

@ -6,7 +6,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ] |30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
( variables ) ( variables )
@ -46,13 +46,13 @@ BRK
DUP .Audio0/pitch DEO DUP .Audio0/pitch DEO
( erase last note ) ( erase last note )
#20 .Screen/color DEO #00 .Screen/sprite DEO
( draw note ) ( draw note )
#00 SWP 4** #0100 SUB2 .Screen/y DEO2 #00 SWP 4** #0100 SUB2 .Screen/y DEO2
#00 .progress LDZ 8** .Screen/x DEO2 #00 .progress LDZ 8** .Screen/x DEO2
;dot .Screen/addr DEO2 ;dot .Screen/addr DEO2
#21 .Screen/color DEO #01 .Screen/sprite DEO
( incr ) .progress LDZ #01 ADD #1f AND .progress STZ ( incr ) .progress LDZ #01 ADD #1f AND .progress STZ

View file

@ -7,7 +7,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|80 @Controller [ &vector $2 &button $1 &key $1 ] |80 @Controller [ &vector $2 &button $1 &key $1 ]
( variables ) ( variables )
@ -33,23 +33,23 @@
.Screen/height DEI2 2// .Screen/y DEO2 .Screen/height DEI2 2// .Screen/y DEO2
;default_icn .Screen/addr DEO2 ;default_icn .Screen/addr DEO2
#31 .Screen/color DEO #41 .Screen/sprite DEO
#2a .slime STZ #0a .slime STZ
BRK BRK
@on-frame ( -> ) @on-frame ( -> )
#2a .slime STZ #0a .slime STZ
;default_icn .Screen/addr DEO2 ;default_icn .Screen/addr DEO2
( hold ctrl key to change slime color ) ( hold ctrl key to change slime color )
.Controller/button DEI #0f AND .Controller/button DEI #0f AND
DUP #01 NEQ ,&no-ctrl JCN #25 .slime STZ &no-ctrl DUP #01 NEQ ,&no-ctrl JCN #05 .slime STZ &no-ctrl
DUP #02 NEQ ,&no-alt JCN #2f .slime STZ &no-alt DUP #02 NEQ ,&no-alt JCN #0f .slime STZ &no-alt
POP POP
( clear ) #30 .Screen/color DEO ( clear ) #40 .Screen/sprite DEO
( detect movement ) ( detect movement )
.Controller/button DEI #f0 AND .Controller/button DEI #f0 AND
@ -72,11 +72,11 @@ BRK
POP POP
( draw face ) ( draw face )
#31 .Screen/color DEO #41 .Screen/sprite DEO
( draw slime ) ( draw slime )
;slime_icn .Screen/addr DEO2 ;slime_icn .Screen/addr DEO2
.slime LDZ .Screen/color DEO .slime LDZ .Screen/sprite DEO
BRK BRK

View file

@ -15,7 +15,7 @@
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|10 @Console [ &vector $2 &read $1 &pad $5 &write $1 ] |10 @Console [ &vector $2 &read $1 &pad $5 &write $1 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|80 @Controller [ &vector $2 &button $1 &key $1 ] |80 @Controller [ &vector $2 &button $1 &key $1 ]
|a0 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ] |a0 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
@ -55,14 +55,14 @@ BRK
( print button-key code ) ( print button-key code )
#0000 .Screen/x DEO2 #0000 .Screen/x DEO2
.Screen/height DEI2 #0008 -- .Screen/y DEO2 .Screen/height DEI2 #0008 -- .Screen/y DEO2
.Controller/button DEI2 #21 ;draw-short JSR2 .Controller/button DEI2 #01 ;draw-short JSR2
.position/x LDZ2 .Screen/x DEO2 .position/x LDZ2 .Screen/x DEO2
.position/y LDZ2 .Screen/y DEO2 .position/y LDZ2 .Screen/y DEO2
( linebreak ) ( linebreak )
.Controller/key DEI #0d NEQ ,&no-return JCN .Controller/key DEI #0d NEQ ,&no-return JCN
( draw ) #20 .Screen/color DEO ( draw ) #00 .Screen/sprite DEO
( reset ) #0000 .position/x STZ2 ( reset ) #0000 .position/x STZ2
( incr ) .position/y LDZ2 #0010 ++ .position/y STZ2 ( incr ) .position/y LDZ2 #0010 ++ .position/y STZ2
;draw-cursor JSR2 ;draw-cursor JSR2
@ -72,10 +72,10 @@ BRK
.Controller/key DEI TOS #0020 ** DEBUG2 .Controller/key DEI TOS #0020 ** DEBUG2
;font-data .Controller/key DEI TOS #0010 ** ++ .Screen/addr DEO2 ;font-data .Controller/key DEI TOS #0010 ** ++ .Screen/addr DEO2
.Controller/button DEI ;mod-color JSR2 .Screen/color DEO .Controller/button DEI ;mod-color JSR2 .Screen/sprite DEO
.Screen/y DEI2 #0008 ++ .Screen/y DEO2 .Screen/y DEI2 #0008 ++ .Screen/y DEO2
.Screen/addr DEI2 #0008 ++ .Screen/addr DEO2 .Screen/addr DEI2 #0008 ++ .Screen/addr DEO2
.Controller/button DEI ;mod-color JSR2 .Screen/color DEO .Controller/button DEI ;mod-color JSR2 .Screen/sprite DEO
( incr ) .position/x LDZ2 #0008 ++ .position/x STZ2 ( incr ) .position/x LDZ2 #0008 ++ .position/x STZ2
,draw-cursor JSR ,draw-cursor JSR
@ -86,7 +86,7 @@ BRK
( ctrl ) DUP #01 = #01 * STH ( ctrl ) DUP #01 = #01 * STH
( alt ) DUP #02 = #03 * STH ( alt ) DUP #02 = #03 * STH
( shift ) #04 = #05 * STH2r + + ( shift ) #04 = #05 * STH2r + +
#21 + #01 +
RTN RTN
@ -95,10 +95,10 @@ RTN
.position/x LDZ2 .Screen/x DEO2 .position/x LDZ2 .Screen/x DEO2
.position/y LDZ2 .Screen/y DEO2 .position/y LDZ2 .Screen/y DEO2
;cursor .Screen/addr DEO2 ;cursor .Screen/addr DEO2
#22 .Screen/color DEO #02 .Screen/sprite DEO
.position/y LDZ2 #0008 ++ .Screen/y DEO2 .position/y LDZ2 #0008 ++ .Screen/y DEO2
#22 .Screen/color DEO #02 .Screen/sprite DEO
RTN RTN
@ -106,16 +106,16 @@ RTN
STH SWP STH SWP
DUP #04 SFT TOS #0008 ** ;font-hex ++ .Screen/addr DEO2 DUP #04 SFT TOS #0008 ** ;font-hex ++ .Screen/addr DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
#0f AND TOS #0008 ** ;font-hex ++ .Screen/addr DEO2 #0f AND TOS #0008 ** ;font-hex ++ .Screen/addr DEO2
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 .Screen/x DEI2 #0008 ++ .Screen/x DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
DUP #04 SFT TOS #0008 ** ;font-hex ++ .Screen/addr DEO2 DUP #04 SFT TOS #0008 ** ;font-hex ++ .Screen/addr DEO2
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 .Screen/x DEI2 #0008 ++ .Screen/x DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
#0f AND TOS #0008 ** ;font-hex ++ .Screen/addr DEO2 #0f AND TOS #0008 ** ;font-hex ++ .Screen/addr DEO2
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 .Screen/x DEI2 #0008 ++ .Screen/x DEO2
( draw ) STHr .Screen/color DEO ( draw ) STHr .Screen/sprite DEO
RTN RTN

View file

@ -16,7 +16,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|b0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ] |b0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
( variables ) ( variables )
@ -76,7 +76,7 @@ BRK
( load ) OVR #00 SWP 2** ;table ADD2 LDA2 ( load ) OVR #00 SWP 2** ;table ADD2 LDA2
#00 SWP SCALEY .Screen/y DEO2 #00 SWP SCALEY .Screen/y DEO2
#00 SWP SCALEX .Screen/x DEO2 #00 SWP SCALEX .Screen/x DEO2
OVR #0f MOD #00 EQU #01 ADD .Screen/color DEO OVR #0f MOD #00 EQU #01 ADD .Screen/pixel DEO
( incr ) SWP #01 ADD SWP ( incr ) SWP #01 ADD SWP
LTHk ,&loop JCN LTHk ,&loop JCN
POP2 POP2
@ -91,22 +91,22 @@ BRK
.Screen/width DEI2 2// .Screen/width DEI2 2//
DUP2 #0020 SUB2 .Screen/x DEO2 DUP2 #0020 SUB2 .Screen/x DEO2
;font-hex #00 .DateTime/hour DEI #0a DIV #08 MUL ADD2 .Screen/addr DEO2 ;font-hex #00 .DateTime/hour DEI #0a DIV #08 MUL ADD2 .Screen/addr DEO2
#22 .Screen/color DEO #02 .Screen/sprite DEO
DUP2 #0018 SUB2 .Screen/x DEO2 DUP2 #0018 SUB2 .Screen/x DEO2
;font-hex #00 .DateTime/hour DEI #0a MOD #08 MUL ADD2 .Screen/addr DEO2 ;font-hex #00 .DateTime/hour DEI #0a MOD #08 MUL ADD2 .Screen/addr DEO2
#22 .Screen/color DEO #02 .Screen/sprite DEO
DUP2 #0008 SUB2 .Screen/x DEO2 DUP2 #0008 SUB2 .Screen/x DEO2
;font-hex #00 .DateTime/minute DEI #0a DIV #08 MUL ADD2 .Screen/addr DEO2 ;font-hex #00 .DateTime/minute DEI #0a DIV #08 MUL ADD2 .Screen/addr DEO2
#22 .Screen/color DEO #02 .Screen/sprite DEO
DUP2 .Screen/x DEO2 DUP2 .Screen/x DEO2
;font-hex #00 .DateTime/minute DEI #0a MOD #08 MUL ADD2 .Screen/addr DEO2 ;font-hex #00 .DateTime/minute DEI #0a MOD #08 MUL ADD2 .Screen/addr DEO2
#22 .Screen/color DEO #02 .Screen/sprite DEO
DUP2 #0010 ADD2 .Screen/x DEO2 DUP2 #0010 ADD2 .Screen/x DEO2
;font-hex #00 .DateTime/second DEI #0a DIV #08 MUL ADD2 .Screen/addr DEO2 ;font-hex #00 .DateTime/second DEI #0a DIV #08 MUL ADD2 .Screen/addr DEO2
#22 .Screen/color DEO #02 .Screen/sprite DEO
DUP2 #0018 ADD2 .Screen/x DEO2 DUP2 #0018 ADD2 .Screen/x DEO2
;font-hex #00 .DateTime/second DEI #0a MOD #08 MUL ADD2 .Screen/addr DEO2 ;font-hex #00 .DateTime/second DEI #0a MOD #08 MUL ADD2 .Screen/addr DEO2
#22 .Screen/color DEO #02 .Screen/sprite DEO
POP2 POP2
RTN RTN
@ -122,7 +122,7 @@ RTN
&loop &loop
.line/x LDZ2 .Screen/x DEO2 .line/x LDZ2 .Screen/x DEO2
.line/y LDZ2 .Screen/y DEO2 .line/y LDZ2 .Screen/y DEO2
.color LDZ .Screen/color DEO .color LDZ .Screen/pixel DEO
[ .line/x LDZ2 .line/x0 LDZ2 EQU2 ] [ .line/x LDZ2 .line/x0 LDZ2 EQU2 ]
[ .line/y LDZ2 .line/y0 LDZ2 EQU2 ] #0101 EQU2 ,&end JCN [ .line/y LDZ2 .line/y0 LDZ2 EQU2 ] #0101 EQU2 ,&end JCN
.line/e1 LDZ2 2** .line/e2 STZ2 .line/e1 LDZ2 2** .line/e2 STZ2

View file

@ -3,7 +3,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|a0 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ] |a0 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
( variables ) ( variables )
@ -43,7 +43,7 @@
DUP #0a EQU ,&linefeed JCN DUP #0a EQU ,&linefeed JCN
#0005 SFT2 ;font ADD2 #0005 SFT2 ;font ADD2
.Screen/addr DEO2 .Screen/addr DEO2
#29 .Screen/color DEO #09 .Screen/sprite DEO
.Screen/x DEI2 #0008 ADD2 .Screen/x DEO2 .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
&next &next
#0001 ADD2 #0001 ADD2

View file

@ -3,7 +3,6 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|a0 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ] |a0 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
( variables ) ( variables )

View file

@ -7,7 +7,7 @@
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|10 @Console [ &pad $8 &write $1 ] |10 @Console [ &pad $8 &write $1 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|a0 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ] |a0 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
( variables ) ( variables )
@ -46,7 +46,7 @@ BRK
#0000 #0080 #0000 #0080
&hor &hor
( save ) OVR2 .Screen/x DEO2 ( save ) OVR2 .Screen/x DEO2
( draw ) #41 .Screen/color DEO ( draw ) #81 .Screen/sprite DEO
( incr ) .Screen/addr DEI2 #0010 ADD2 .Screen/addr DEO2 ( incr ) .Screen/addr DEI2 #0010 ADD2 .Screen/addr DEO2
( incr ) SWP2 8+ SWP2 ( incr ) SWP2 8+ SWP2
LTH2k ,&hor JCN LTH2k ,&hor JCN

View file

@ -9,7 +9,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ] |90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ]
|0000 |0000
@ -77,7 +77,7 @@ BRK
( clear last cursor ) ( clear last cursor )
.pointer/x LDZ2 .Screen/x DEO2 .pointer/x LDZ2 .Screen/x DEO2
.pointer/y LDZ2 .Screen/y DEO2 .pointer/y LDZ2 .Screen/y DEO2
#30 .Screen/color DEO #40 .Screen/sprite DEO
( record pointer positions ) ( record pointer positions )
.Mouse/x DEI2 .pointer/x STZ2 .Mouse/x DEI2 .pointer/x STZ2
@ -86,7 +86,7 @@ BRK
( draw new cursor ) ( draw new cursor )
.pointer/x LDZ2 .Screen/x DEO2 .pointer/x LDZ2 .Screen/x DEO2
.pointer/y LDZ2 .Screen/y DEO2 .pointer/y LDZ2 .Screen/y DEO2
#33 .Mouse/state DEI #00 NEQ #02 MUL SUB .Screen/color DEO #43 .Mouse/state DEI #00 NEQ #02 MUL SUB .Screen/sprite DEO
RTN RTN
@ -101,7 +101,7 @@ RTN
&loop &loop
.line/x LDZ2 .Screen/x DEO2 .line/x LDZ2 .Screen/x DEO2
.line/y LDZ2 .Screen/y DEO2 .line/y LDZ2 .Screen/y DEO2
.color LDZ .Screen/color DEO .color LDZ .Screen/pixel DEO
[ .line/x LDZ2 .line/x0 LDZ2 EQU2 ] [ .line/x LDZ2 .line/x0 LDZ2 EQU2 ]
[ .line/y LDZ2 .line/y0 LDZ2 EQU2 ] #0101 EQU2 ,&end JCN [ .line/y LDZ2 .line/y0 LDZ2 EQU2 ] #0101 EQU2 ,&end JCN
.line/e1 LDZ2 2** .line/e2 STZ2 .line/e1 LDZ2 2** .line/e2 STZ2

View file

@ -5,7 +5,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|0000 |0000
@ -27,13 +27,13 @@
.Screen/width DEI2 2// .dvd/x STZ2 .Screen/width DEI2 2// .dvd/x STZ2
.Screen/height DEI2 2// .dvd/y STZ2 .Screen/height DEI2 2// .dvd/y STZ2
#21 ;draw-dvd JSR2 #01 ;draw-dvd JSR2
BRK BRK
@on-frame ( -> ) @on-frame ( -> )
( clear ) #20 ;draw-dvd JSR2 ( clear ) #00 ;draw-dvd JSR2
( case: hit-right ) .dvd/x LDZ2 .Screen/width DEI2 #0020 SUB2 EQU2 ( case: hit-right ) .dvd/x LDZ2 .Screen/width DEI2 #0020 SUB2 EQU2
( case: hit-left ) .dvd/x LDZ2 #0000 EQU2 ( case: hit-left ) .dvd/x LDZ2 #0000 EQU2
#0000 EQU2 ,&no-flipx JCN #0000 EQU2 ,&no-flipx JCN
@ -44,7 +44,7 @@ BRK
.dvd/dy LDZ #00 EQU .dvd/dy STZ &no-flipy .dvd/dy LDZ #00 EQU .dvd/dy STZ &no-flipy
( incr ) .dvd/x LDZ2 #0001 #00 .dvd/dx LDZ #00 EQU #fffe MUL2 ADD2 ADD2 .dvd/x STZ2 ( incr ) .dvd/x LDZ2 #0001 #00 .dvd/dx LDZ #00 EQU #fffe MUL2 ADD2 ADD2 .dvd/x STZ2
( incr ) .dvd/y LDZ2 #0001 #00 .dvd/dy LDZ #00 EQU #fffe MUL2 ADD2 ADD2 .dvd/y STZ2 ( incr ) .dvd/y LDZ2 #0001 #00 .dvd/dy LDZ #00 EQU #fffe MUL2 ADD2 ADD2 .dvd/y STZ2
( draw ) #21 ;draw-dvd JSR2 ( draw ) #01 ;draw-dvd JSR2
BRK BRK
@ -58,7 +58,7 @@ BRK
.dvd/x LDZ2 [ .dvd/x LDZ2 #0020 ADD2 ] .dvd/x LDZ2 [ .dvd/x LDZ2 #0020 ADD2 ]
&hor &hor
OVR2 .Screen/x DEO2 OVR2 .Screen/x DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/sprite DEO
( next ) .Screen/addr DEI2 #0008 ADD2 .Screen/addr DEO2 ( next ) .Screen/addr DEI2 #0008 ADD2 .Screen/addr DEO2
( incr ) SWP2 #0008 ADD2 SWP2 ( incr ) SWP2 #0008 ADD2 SWP2
LTH2k ,&hor JCN LTH2k ,&hor JCN

View file

@ -5,7 +5,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ] |90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ]
( variables ) ( variables )
@ -67,7 +67,7 @@ BRK
( clear last cursor ) ( clear last cursor )
.pointer/x LDZ2 .Screen/x DEO2 .pointer/x LDZ2 .Screen/x DEO2
.pointer/y LDZ2 .Screen/y DEO2 .pointer/y LDZ2 .Screen/y DEO2
#30 .Screen/color DEO #40 .Screen/sprite DEO
( record pointer positions ) ( record pointer positions )
.Mouse/x DEI2 .pointer/x STZ2 .Mouse/y DEI2 .pointer/y STZ2 .Mouse/x DEI2 .pointer/x STZ2 .Mouse/y DEI2 .pointer/y STZ2
@ -76,7 +76,7 @@ BRK
.pointer/sprite LDZ2 .Screen/addr DEO2 .pointer/sprite LDZ2 .Screen/addr DEO2
.pointer/x LDZ2 .Screen/x DEO2 .pointer/x LDZ2 .Screen/x DEO2
.pointer/y LDZ2 .Screen/y DEO2 .pointer/y LDZ2 .Screen/y DEO2
#31 .Screen/color DEO #41 .Screen/sprite DEO
RTN RTN
@ -102,13 +102,13 @@ RTN
( load ) .color STZ .rect/y2 STZ2 .rect/x2 STZ2 DUP2 .Screen/y DEO2 .rect/y1 STZ2 DUP2 .Screen/x DEO2 .rect/x1 STZ2 ( load ) .color STZ .rect/y2 STZ2 .rect/x2 STZ2 DUP2 .Screen/y DEO2 .rect/y1 STZ2 DUP2 .Screen/x DEO2 .rect/x1 STZ2
&hor &hor
( incr ) .Screen/x DEI2 #0001 ADD2 .Screen/x DEO2 ( incr ) .Screen/x DEI2 #0001 ADD2 .Screen/x DEO2
( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ .Screen/color DEO ( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .color LDZ .Screen/color DEO ( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
.Screen/x DEI2 .rect/x2 LDZ2 LTH2 ,&hor JCN .Screen/x DEI2 .rect/x2 LDZ2 LTH2 ,&hor JCN
.rect/y1 LDZ2 .Screen/y DEO2 .rect/y1 LDZ2 .Screen/y DEO2
&ver &ver
( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ .Screen/color DEO ( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ .Screen/pixel DEO
( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .color LDZ .Screen/color DEO ( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .color LDZ .Screen/pixel DEO
( incr ) .Screen/y DEI2 #0001 ADD2 .Screen/y DEO2 ( incr ) .Screen/y DEI2 #0001 ADD2 .Screen/y DEO2
.Screen/y DEI2 .rect/y2 LDZ2 #0001 ADD2 LTH2 ,&ver JCN .Screen/y DEI2 .rect/y2 LDZ2 #0001 ADD2 LTH2 ,&ver JCN

View file

@ -7,7 +7,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
( variables ) ( variables )
@ -35,15 +35,15 @@ BRK
( draw ver line ) ( draw ver line )
.center/x LDZ2 .Screen/x DEO2 #0000 .Screen/y DEO2 .center/x LDZ2 .Screen/x DEO2 #0000 .Screen/y DEO2
&draw-ver &draw-ver
( draw ) #02 .Screen/color DEO ( draw ) #02 .Screen/pixel DEO
( incr ) .Screen/y DEI2 #0002 ADD2 .Screen/y DEO2 ( incr ) .Screen/y DEI2 #0002 ADD2 .Screen/y DEO2
.Screen/y DEI2 .Screen/height DEI2 LTH2 ,&draw-ver JCN .Screen/y DEI2 .Screen/height DEI2 LTH2 ,&draw-ver JCN
.center/x LDZ2 .center/y LDZ2 #0010 SUB2 #2c ;text1 ;draw-label-left JSR2 .center/x LDZ2 .center/y LDZ2 #0010 SUB2 #0c ;text1 ;draw-label-left JSR2
.center/x LDZ2 .center/y LDZ2 #2c ;text2 ;draw-label-middle JSR2 .center/x LDZ2 .center/y LDZ2 #0c ;text2 ;draw-label-middle JSR2
.center/x LDZ2 .center/y LDZ2 #0010 ADD2 #2c ;text3 ;draw-label-right JSR2 .center/x LDZ2 .center/y LDZ2 #0010 ADD2 #0c ;text3 ;draw-label-right JSR2
.center/x LDZ2 .center/y LDZ2 #0020 ADD2 #2c ;text4 ;draw-label-middle JSR2 .center/x LDZ2 .center/y LDZ2 #0020 ADD2 #0c ;text4 ;draw-label-middle JSR2
.center/x LDZ2 .center/y LDZ2 #0030 ADD2 #2c ;text5 ;draw-label-middle JSR2 .center/x LDZ2 .center/y LDZ2 #0030 ADD2 #0c ;text5 ;draw-label-middle JSR2
RTN RTN
@ -52,7 +52,7 @@ RTN
( load ) .label/addr STZ2 .label/color STZ .Screen/y DEO2 .Screen/x DEO2 ( load ) .label/addr STZ2 .label/color STZ .Screen/y DEO2 .Screen/x DEO2
.label/addr LDZ2 .label/addr LDZ2
&loop &loop
( draw ) DUP2 LDA #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/color DEO ( draw ) DUP2 LDA #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/sprite DEO
( incr ) #0001 ADD2 ( incr ) #0001 ADD2
( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2 ( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
DUP2 LDA ,&loop JCN DUP2 LDA ,&loop JCN
@ -66,7 +66,7 @@ RTN
( align ) .label/addr LDZ2 ;get-text-length JSR2 8** 2// SUB2 .Screen/x DEO2 ( align ) .label/addr LDZ2 ;get-text-length JSR2 8** 2// SUB2 .Screen/x DEO2
.label/addr LDZ2 .label/addr LDZ2
&loop &loop
( draw ) DUP2 LDA #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/color DEO ( draw ) DUP2 LDA #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/sprite DEO
( incr ) #0001 ADD2 ( incr ) #0001 ADD2
( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2 ( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
DUP2 LDA ,&loop JCN DUP2 LDA ,&loop JCN
@ -80,7 +80,7 @@ RTN
( align ) .label/addr LDZ2 ;get-text-length JSR2 8** SUB2 .Screen/x DEO2 ( align ) .label/addr LDZ2 ;get-text-length JSR2 8** SUB2 .Screen/x DEO2
.label/addr LDZ2 .label/addr LDZ2
&loop &loop
( draw ) DUP2 LDA #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/color DEO ( draw ) DUP2 LDA #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/sprite DEO
( incr ) #0001 ADD2 ( incr ) #0001 ADD2
( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2 ( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
DUP2 LDA ,&loop JCN DUP2 LDA ,&loop JCN

View file

@ -6,7 +6,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|a0 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ] |a0 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
( variables ) ( variables )
@ -23,19 +23,19 @@
( theme ) #037a .System/r DEO2 #032a .System/g DEO2 #052a .System/b DEO2 ( theme ) #037a .System/r DEO2 #032a .System/g DEO2 #052a .System/b DEO2
( background ) ;checker_icn #22 ;cover-pattern JSR2 ( background ) ;checker_icn #02 ;cover-pattern JSR2
( load ) ;icn1_path .File/name DEO2 #1800 .File/length DEO2 ;image .File/load DEO2 ( load ) ;icn1_path .File/name DEO2 #1800 .File/length DEO2 ;image .File/load DEO2
( draw ) #0008 #0008 #0100 #00c0 #27 ;image ;draw-icn JSR2 ( draw ) #0008 #0008 #0100 #00c0 #07 ;image ;draw-icn JSR2
( load ) ;icn2_path .File/name DEO2 #0800 .File/length DEO2 ;image .File/load DEO2 ( load ) ;icn2_path .File/name DEO2 #0800 .File/length DEO2 ;image .File/load DEO2
( draw ) #0010 #0078 #0080 #0080 #27 ;image ;draw-icn JSR2 ( draw ) #0010 #0078 #0080 #0080 #07 ;image ;draw-icn JSR2
( load ) ;chr1_path .File/name DEO2 #4000 .File/length DEO2 ;image .File/load DEO2 ( load ) ;chr1_path .File/name DEO2 #4000 .File/length DEO2 ;image .File/load DEO2
( draw ) #00a8 #0010 #0100 #0100 #4f ;image ;draw-chr JSR2 ( draw ) #00a8 #0010 #0100 #0100 #8f ;image ;draw-chr JSR2
( load ) ;chr2_path .File/name DEO2 #0900 .File/length DEO2 ;image .File/load DEO2 ( load ) ;chr2_path .File/name DEO2 #0900 .File/length DEO2 ;image .File/load DEO2
( draw ) #0088 #0088 #0060 #0060 #41 ;image ;draw-chr JSR2 ( draw ) #0088 #0088 #0060 #0060 #81 ;image ;draw-chr JSR2
BRK BRK
@ -48,7 +48,7 @@ BRK
#0000 .size/width LDZ2 #0000 .size/width LDZ2
&hor &hor
( save ) OVR2 .position/x LDZ2 ADD2 .Screen/x DEO2 ( save ) OVR2 .position/x LDZ2 ADD2 .Screen/x DEO2
( draw ) .color LDZ .Screen/color DEO ( draw ) .color LDZ .Screen/sprite DEO
( incr ) .Screen/addr DEI2 8+ .Screen/addr DEO2 ( incr ) .Screen/addr DEI2 8+ .Screen/addr DEO2
( incr ) SWP2 8+ SWP2 ( incr ) SWP2 8+ SWP2
LTH2k ,&hor JCN LTH2k ,&hor JCN
@ -68,7 +68,7 @@ RTN
#0000 .size/width LDZ2 #0000 .size/width LDZ2
&hor &hor
( save ) OVR2 .position/x LDZ2 ADD2 .Screen/x DEO2 ( save ) OVR2 .position/x LDZ2 ADD2 .Screen/x DEO2
( draw ) .color LDZ .Screen/color DEO ( draw ) .color LDZ .Screen/sprite DEO
( incr ) .Screen/addr DEI2 #0010 ADD2 .Screen/addr DEO2 ( incr ) .Screen/addr DEI2 #0010 ADD2 .Screen/addr DEO2
( incr ) SWP2 8+ SWP2 ( incr ) SWP2 8+ SWP2
LTH2k ,&hor JCN LTH2k ,&hor JCN
@ -88,7 +88,7 @@ RTN
#0000 .Screen/width DEI2 #0000 .Screen/width DEI2
&hor &hor
( save ) OVR2 .Screen/x DEO2 ( save ) OVR2 .Screen/x DEO2
( draw ) .color LDZ .Screen/color DEO ( draw ) .color LDZ .Screen/sprite DEO
( incr ) SWP2 8+ SWP2 ( incr ) SWP2 8+ SWP2
LTH2k ,&hor JCN LTH2k ,&hor JCN
POP2 POP2 POP2 POP2

View file

@ -3,7 +3,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
( variables ) ( variables )
@ -30,7 +30,7 @@ BRK
DUP #0a EQU ,&linefeed JCN DUP #0a EQU ,&linefeed JCN
#0005 SFT2 ;font ADD2 #0005 SFT2 ;font ADD2
DUP2 .Screen/addr DEO2 DUP2 .Screen/addr DEO2
#29 .Screen/color DEO #09 .Screen/sprite DEO
,get-x-advance JSR .Screen/x DEI2 ADD2 STH2kr ADD2 .Screen/x DEO2 ,get-x-advance JSR .Screen/x DEI2 ADD2 STH2kr ADD2 .Screen/x DEO2
&next &next
#0001 ADD2 #0001 ADD2

View file

@ -17,7 +17,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
( variables ) ( variables )
@ -36,7 +36,7 @@
( theme ) #f03f .System/r DEO2 #f03f .System/g DEO2 #003f .System/b DEO2 ( theme ) #f03f .System/r DEO2 #f03f .System/g DEO2 #003f .System/b DEO2
( background ) ;checker_icn #23 ;cover-pattern JSR2 ( background ) ;checker_icn #03 ;cover-pattern JSR2
#0010 #0030 #0020 #0020 SIZE-TO-RECT #01 ;line-slow JSR2 #0010 #0030 #0020 #0020 SIZE-TO-RECT #01 ;line-slow JSR2
#0070 #0040 #0010 #01 ;draw-circle JSR2 #0070 #0040 #0010 #01 ;draw-circle JSR2
@ -54,7 +54,7 @@ BRK
#ffff #00 .line/y LDZ2 .line/y0 LDZ2 LTS2 2** ADD2 .line/sy STZ2 #ffff #00 .line/y LDZ2 .line/y0 LDZ2 LTS2 2** ADD2 .line/sy STZ2
.line/dx LDZ2 .line/dy LDZ2 ADD2 .line/e1 STZ2 .line/dx LDZ2 .line/dy LDZ2 ADD2 .line/e1 STZ2
&loop &loop
.line/x LDZ2 .Screen/x DEO2 .line/y LDZ2 .Screen/y DEO2 .color LDZ .Screen/color DEO .line/x LDZ2 .Screen/x DEO2 .line/y LDZ2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
.line/x LDZ2 .line/x0 LDZ2 EQU2 .line/y LDZ2 .line/y0 LDZ2 EQU2 #0101 EQU2 ,&end JCN .line/x LDZ2 .line/x0 LDZ2 EQU2 .line/y LDZ2 .line/y0 LDZ2 EQU2 #0101 EQU2 ,&end JCN
.line/e1 LDZ2 2** .line/e2 STZ2 .line/e1 LDZ2 2** .line/e2 STZ2
.line/e2 LDZ2 .line/dy LDZ2 LTS2 ,&skipy JCN .line/e2 LDZ2 .line/dy LDZ2 LTS2 ,&skipy JCN
@ -77,16 +77,16 @@ RTN
STH2r STH2r STH2r STH2r
&ver &ver
( save ) OVR2 .Screen/y DEO2 ( save ) OVR2 .Screen/y DEO2
( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ DUP .Screen/color DEO ( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ DUP .Screen/pixel DEO
( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .Screen/color DEO ( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .Screen/pixel DEO
( incr ) SWP2 ++ SWP2 ( incr ) SWP2 ++ SWP2
OVR2 OVR2 LTS2 ,&ver JCN OVR2 OVR2 LTS2 ,&ver JCN
POP2 POP2 POP2 POP2
.rect/x1 LDZ2 .rect/x2 LDZ2 .rect/x1 LDZ2 .rect/x2 LDZ2
&hor &hor
( save ) OVR2 .Screen/x DEO2 ( save ) OVR2 .Screen/x DEO2
( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ DUP .Screen/color DEO ( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ DUP .Screen/pixel DEO
( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .Screen/color DEO ( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .Screen/pixel DEO
( incr ) SWP2 ++ SWP2 ( incr ) SWP2 ++ SWP2
OVR2 OVR2 ++ LTS2 ,&hor JCN OVR2 OVR2 ++ LTS2 ,&hor JCN
POP2 POP2 POP2 POP2
@ -102,7 +102,7 @@ RTN
STH2 STH2 OVR2 OVR2 STH2 STH2 OVR2 OVR2
&hor &hor
( save ) OVR2 .Screen/x DEO2 ( save ) OVR2 .Screen/x DEO2
( draw ) .color LDZ .Screen/color DEO ( draw ) .color LDZ .Screen/pixel DEO
( incr ) SWP2 ++ SWP2 ( incr ) SWP2 ++ SWP2
OVR2 OVR2 LTS2 ,&hor JCN OVR2 OVR2 LTS2 ,&hor JCN
POP2 POP2 STH2r STH2r POP2 POP2 STH2r STH2r
@ -131,14 +131,14 @@ RTN
.circle/y LDZ2 .circle/x LDZ2 -- GTS2 ,&loop JCN .circle/y LDZ2 .circle/x LDZ2 -- GTS2 ,&loop JCN
RTN RTN
&seg &seg
.circle/xc LDZ2 .circle/x LDZ2 ADD2 .Screen/x DEO2 .circle/yc LDZ2 .circle/y LDZ2 ADD2 .Screen/y DEO2 .color LDZ .Screen/color DEO .circle/xc LDZ2 .circle/x LDZ2 ADD2 .Screen/x DEO2 .circle/yc LDZ2 .circle/y LDZ2 ADD2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
.circle/xc LDZ2 .circle/x LDZ2 SUB2 .Screen/x DEO2 .circle/yc LDZ2 .circle/y LDZ2 ADD2 .Screen/y DEO2 .color LDZ .Screen/color DEO .circle/xc LDZ2 .circle/x LDZ2 SUB2 .Screen/x DEO2 .circle/yc LDZ2 .circle/y LDZ2 ADD2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
.circle/xc LDZ2 .circle/x LDZ2 ADD2 .Screen/x DEO2 .circle/yc LDZ2 .circle/y LDZ2 SUB2 .Screen/y DEO2 .color LDZ .Screen/color DEO .circle/xc LDZ2 .circle/x LDZ2 ADD2 .Screen/x DEO2 .circle/yc LDZ2 .circle/y LDZ2 SUB2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
.circle/xc LDZ2 .circle/x LDZ2 SUB2 .Screen/x DEO2 .circle/yc LDZ2 .circle/y LDZ2 SUB2 .Screen/y DEO2 .color LDZ .Screen/color DEO .circle/xc LDZ2 .circle/x LDZ2 SUB2 .Screen/x DEO2 .circle/yc LDZ2 .circle/y LDZ2 SUB2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
.circle/xc LDZ2 .circle/y LDZ2 ADD2 .Screen/x DEO2 .circle/yc LDZ2 .circle/x LDZ2 ADD2 .Screen/y DEO2 .color LDZ .Screen/color DEO .circle/xc LDZ2 .circle/y LDZ2 ADD2 .Screen/x DEO2 .circle/yc LDZ2 .circle/x LDZ2 ADD2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
.circle/xc LDZ2 .circle/y LDZ2 SUB2 .Screen/x DEO2 .circle/yc LDZ2 .circle/x LDZ2 ADD2 .Screen/y DEO2 .color LDZ .Screen/color DEO .circle/xc LDZ2 .circle/y LDZ2 SUB2 .Screen/x DEO2 .circle/yc LDZ2 .circle/x LDZ2 ADD2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
.circle/xc LDZ2 .circle/y LDZ2 ADD2 .Screen/x DEO2 .circle/yc LDZ2 .circle/x LDZ2 SUB2 .Screen/y DEO2 .color LDZ .Screen/color DEO .circle/xc LDZ2 .circle/y LDZ2 ADD2 .Screen/x DEO2 .circle/yc LDZ2 .circle/x LDZ2 SUB2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
.circle/xc LDZ2 .circle/y LDZ2 SUB2 .Screen/x DEO2 .circle/yc LDZ2 .circle/x LDZ2 SUB2 .Screen/y DEO2 .color LDZ .Screen/color DEO .circle/xc LDZ2 .circle/y LDZ2 SUB2 .Screen/x DEO2 .circle/yc LDZ2 .circle/x LDZ2 SUB2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
RTN RTN
@ -151,7 +151,7 @@ RTN
#0000 .Screen/width DEI2 #0000 .Screen/width DEI2
&hor &hor
( save ) OVR2 .Screen/x DEO2 ( save ) OVR2 .Screen/x DEO2
( draw ) .color LDZ .Screen/color DEO ( draw ) .color LDZ .Screen/sprite DEO
( incr ) SWP2 8++ SWP2 ( incr ) SWP2 8++ SWP2
OVR2 OVR2 LTH2 ,&hor JCN OVR2 OVR2 LTH2 ,&hor JCN
POP2 POP2 POP2 POP2
@ -166,7 +166,7 @@ RTN
STH .Screen/y DEO2 STH .Screen/y DEO2
&loop &loop
( save ) OVR2 .Screen/x DEO2 ( save ) OVR2 .Screen/x DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/pixel DEO
( incr ) SWP2 #0002 ++ SWP2 ( incr ) SWP2 #0002 ++ SWP2
LTH2k ,&loop JCN LTH2k ,&loop JCN
POP2 POP2 POPr POP2 POP2 POPr
@ -178,7 +178,7 @@ RTN
STH ROT2 .Screen/x DEO2 STH ROT2 .Screen/x DEO2
&loop &loop
( save ) OVR2 .Screen/y DEO2 ( save ) OVR2 .Screen/y DEO2
( draw ) STHkr .Screen/color DEO ( draw ) STHkr .Screen/pixel DEO
( incr ) SWP2 #0002 ++ SWP2 ( incr ) SWP2 #0002 ++ SWP2
LTH2k ,&loop JCN LTH2k ,&loop JCN
POP2 POP2 POPr POP2 POP2 POPr

View file

@ -1,7 +1,7 @@
( devices ) ( devices )
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
( variables ) ( variables )
@ -48,15 +48,15 @@
POP2 POP2 POP2 POP2
JMP2r JMP2r
#15 .Screen/color DEO #15 .Screen/pixel DEO
JMP2r JMP2r
&draw &draw
OVR2 .Screen/x DEO2 OVR2 .Screen/x DEO2
#05 ADD .Screen/color DEO #05 ADD .Screen/pixel DEO
.Screen/y DEI2 .Screen/y DEI2
DUP2 #0001 ADD2 .Screen/y DEO2 DUP2 #0001 ADD2 .Screen/y DEO2
#00 .Screen/color DEO #00 .Screen/pixel DEO
.Screen/y DEO2 .Screen/y DEO2
POP POP
,&rest JMP ,&rest JMP

View file

@ -8,7 +8,7 @@
( devices ) ( devices )
|00 @System &vector $2 &pad $6 &r $2 &g $2 &b $2 |00 @System &vector $2 &pad $6 &r $2 &g $2 &b $2
|20 @Screen &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 |20 @Screen &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|80 @Controller [ &vector $2 &button $1 &key $1 ] |80 @Controller [ &vector $2 &button $1 &key $1 ]
|a0 @File &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 |a0 @File &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2
@ -85,7 +85,7 @@
#0000 DUP2 .Screen/x DEO2 .Screen/y DEO2 #0000 DUP2 .Screen/x DEO2 .Screen/y DEO2
;ring-buffer ;wrapped-write JSR2 ;ring-buffer ;wrapped-write JSR2
#20 ;draw-glyph JSR2 #00 ;draw-glyph JSR2
BRK BRK
@load-font ( filename* -- ) @load-font ( filename* -- )
@ -156,7 +156,7 @@
&not-end &not-end
#00 SWP #00 ;repl/font-cells LDA MUL2k MUL2 #0008 MUL2 #0100 ADD2 ( string* char* tile* ) #00 SWP #00 ;repl/font-cells LDA MUL2k MUL2 #0008 MUL2 #0100 ADD2 ( string* char* tile* )
;font-data ADD2 .Screen/addr DEO2 ;font-data ADD2 .Screen/addr DEO2
#2d ,draw-glyph JSR #0d ,draw-glyph JSR
#00 ;repl/font-cells LDA #fff8 MUL2 .Screen/y DEI2 ADD2 .Screen/y DEO2 #00 ;repl/font-cells LDA #fff8 MUL2 .Screen/y DEI2 ADD2 .Screen/y DEO2
;font-data ADD2 LDA #00 SWP .Screen/x DEI2 ADD2 .Screen/x DEO2 ;font-data ADD2 LDA #00 SWP .Screen/x DEI2 ADD2 .Screen/x DEO2
LDAk STH LDAk STH
@ -172,7 +172,7 @@
;repl/font-cells LDA ;repl/font-cells LDA
&inner &inner
DUP #00 EQU ,&end-inner JCN DUP #00 EQU ,&end-inner JCN
STHkr .Screen/color DEO STHkr .Screen/sprite DEO
#0008 DUP2 #0008 DUP2
.Screen/x DEI2 ADD2 .Screen/x DEO2 .Screen/x DEI2 ADD2 .Screen/x DEO2
.Screen/addr DEI2 ADD2 .Screen/addr DEO2 .Screen/addr DEI2 ADD2 .Screen/addr DEO2