... | ... |
@@ -53,7 +53,6 @@ BRK |
53 | 53 |
.DateTime/second DEI .last LDZ NEQ #01 JCN [ BRK ] |
54 | 54 |
|
55 | 55 |
.DateTime/second DEI .last STZ |
56 |
- |
|
57 | 56 |
;redraw JSR2 |
58 | 57 |
|
59 | 58 |
BRK |
... | ... |
@@ -107,7 +106,7 @@ RTN |
107 | 106 |
&loop |
108 | 107 |
( save-x ) OVR #03 MOD TOS #0008 MUL2 .anchor/x LDZ2 ADD2 .Screen/x DEO2 |
109 | 108 |
( save-y ) OVR #03 DIV TOS #0008 MUL2 .anchor/y LDZ2 ADD2 .Screen/y DEO2 |
110 |
- ( get digit* ) OVR DUPr STHr #02 MUL TOS ;digits ADD2 LDA2 |
|
109 |
+ ( get digit* ) OVR STHkr #02 MUL TOS ;digits ADD2 LDA2 |
|
111 | 110 |
( get bit ) ROT #0e SWP SUB TOS SFT2 #0001 AND2 |
112 | 111 |
( set tile ) #0008 MUL2 ;tiles ADD2 |
113 | 112 |
( set style ) .style LDZ #10 MUL TOS ADD2 |
... | ... |
@@ -156,7 +156,7 @@ BRK |
156 | 156 |
&loop |
157 | 157 |
OVR STH |
158 | 158 |
( x ) .mix-view/x1 LDZ2 #0074 ++ |
159 |
- ( y ) .mix-view/y1 LDZ2 PAD-HEIGHT DUPr STHr TOS ** ++ #0002 ++ |
|
159 |
+ ( y ) .mix-view/y1 LDZ2 PAD-HEIGHT STHkr TOS ** ++ #0002 ++ |
|
160 | 160 |
( output ) .Audio0/output STHr #10 * + DEI |
161 | 161 |
;draw-monitor JSR2 |
162 | 162 |
( incr ) SWP #01 + SWP |
... | ... |
@@ -246,40 +246,40 @@ BRK |
246 | 246 |
( knob ) .Mouse/x DEI2 .mix-view/x1 LDZ2 -- #0010 // TOB |
247 | 247 |
( adsr ) |
248 | 248 |
DUP #00 ! ,&no-a JCN |
249 |
- .Audio0/adsr [ DUPr STHr #10 * + ] DEI |
|
249 |
+ .Audio0/adsr [ STHkr #10 * + ] DEI |
|
250 | 250 |
#10 .Mouse/state DEI #10 = #e0 * + + |
251 |
- .Audio0/adsr [ DUPr STHr #10 * + ] DEO &no-a |
|
251 |
+ .Audio0/adsr [ STHkr #10 * + ] DEO &no-a |
|
252 | 252 |
DUP #01 ! ,&no-d JCN |
253 |
- .Audio0/adsr [ DUPr STHr #10 * + ] DEI |
|
253 |
+ .Audio0/adsr [ STHkr #10 * + ] DEI |
|
254 | 254 |
DUP #f0 AND STH #01 .Mouse/state DEI #10 = #0e * + + #0f AND STHr + |
255 |
- .Audio0/adsr [ DUPr STHr #10 * + ] DEO &no-d |
|
255 |
+ .Audio0/adsr [ STHkr #10 * + ] DEO &no-d |
|
256 | 256 |
DUP #02 ! ,&no-s JCN |
257 |
- .Audio0/adsr [ DUPr STHr #10 * + ] #01 + DEI |
|
257 |
+ .Audio0/adsr [ STHkr #10 * + ] #01 + DEI |
|
258 | 258 |
#10 .Mouse/state DEI #10 = #e0 * + + |
259 |
- .Audio0/adsr [ DUPr STHr #10 * + ] #01 + DEO &no-s |
|
259 |
+ .Audio0/adsr [ STHkr #10 * + ] #01 + DEO &no-s |
|
260 | 260 |
DUP #03 ! ,&no-r JCN |
261 |
- .Audio0/adsr [ DUPr STHr #10 * + ] #01 + DEI |
|
261 |
+ .Audio0/adsr [ STHkr #10 * + ] #01 + DEI |
|
262 | 262 |
DUP #f0 AND STH #01 .Mouse/state DEI #10 = #0e * + + #0f AND STHr + |
263 |
- .Audio0/adsr [ DUPr STHr #10 * + ] #01 + DEO &no-r |
|
263 |
+ .Audio0/adsr [ STHkr #10 * + ] #01 + DEO &no-r |
|
264 | 264 |
( modes ) |
265 | 265 |
DUP #04 ! ,&no-repeat JCN |
266 |
- .modes [ DUPr STHr + ] LDZ |
|
266 |
+ .modes [ STHkr + ] LDZ |
|
267 | 267 |
#00 = |
268 |
- .modes [ DUPr STHr + ] STZ &no-repeat |
|
268 |
+ .modes [ STHkr + ] STZ &no-repeat |
|
269 | 269 |
( volume ) |
270 | 270 |
DUP #05 ! ,&no-left JCN |
271 |
- .Audio0/volume [ DUPr STHr #10 * + ] DEI |
|
271 |
+ .Audio0/volume [ STHkr #10 * + ] DEI |
|
272 | 272 |
#10 .Mouse/state DEI #10 = #e0 * + + |
273 |
- .Audio0/volume [ DUPr STHr #10 * + ] DEO &no-left |
|
273 |
+ .Audio0/volume [ STHkr #10 * + ] DEO &no-left |
|
274 | 274 |
DUP #06 ! ,&no-right JCN |
275 |
- .Audio0/volume [ DUPr STHr #10 * + ] DEI |
|
275 |
+ .Audio0/volume [ STHkr #10 * + ] DEI |
|
276 | 276 |
DUP #f0 AND STH #01 .Mouse/state DEI #10 = #0e * + + #0f AND STHr + |
277 |
- .Audio0/volume [ DUPr STHr #10 * + ] DEO &no-right |
|
277 |
+ .Audio0/volume [ STHkr #10 * + ] DEO &no-right |
|
278 | 278 |
POP |
279 | 279 |
|
280 | 280 |
( release ) #00 .Mouse/state DEO |
281 | 281 |
|
282 |
- DUPr STHr ;draw-mixer JSR2 |
|
282 |
+ STHkr ;draw-mixer JSR2 |
|
283 | 283 |
|
284 | 284 |
POPr |
285 | 285 |
|
... | ... |
@@ -371,21 +371,21 @@ RTN |
371 | 371 |
|
372 | 372 |
( adsr ) |
373 | 373 |
DUP2 .mix-view/x1 LDZ2 SWP2 |
374 |
- .Audio0/adsr [ DUPr STHr #10 * + ] DEI #04 SFT ;draw-knob JSR2 |
|
374 |
+ .Audio0/adsr [ STHkr #10 * + ] DEI #04 SFT ;draw-knob JSR2 |
|
375 | 375 |
DUP2 .mix-view/x1 LDZ2 #0010 ++ SWP2 |
376 |
- .Audio0/adsr [ DUPr STHr #10 * + ] DEI #0f AND ;draw-knob JSR2 |
|
376 |
+ .Audio0/adsr [ STHkr #10 * + ] DEI #0f AND ;draw-knob JSR2 |
|
377 | 377 |
DUP2 .mix-view/x1 LDZ2 #0020 ++ SWP2 |
378 |
- .Audio0/adsr [ DUPr STHr #10 * + ] #01 + DEI #04 SFT ;draw-knob JSR2 |
|
378 |
+ .Audio0/adsr [ STHkr #10 * + ] #01 + DEI #04 SFT ;draw-knob JSR2 |
|
379 | 379 |
DUP2 .mix-view/x1 LDZ2 #0030 ++ SWP2 |
380 |
- .Audio0/adsr [ DUPr STHr #10 * + ] #01 + DEI #0f AND ;draw-knob JSR2 |
|
380 |
+ .Audio0/adsr [ STHkr #10 * + ] #01 + DEI #0f AND ;draw-knob JSR2 |
|
381 | 381 |
( once/repeat ) |
382 | 382 |
DUP2 .mix-view/x1 LDZ2 #0040 ++ SWP2 |
383 |
- .modes [ DUPr STHr + ] LDZ ;draw-switch JSR2 |
|
383 |
+ .modes [ STHkr + ] LDZ ;draw-switch JSR2 |
|
384 | 384 |
( volume ) |
385 | 385 |
DUP2 .mix-view/x1 LDZ2 #0050 ++ SWP2 |
386 |
- .Audio0/volume [ DUPr STHr #10 * + ] DEI #04 SFT ;draw-knob JSR2 |
|
386 |
+ .Audio0/volume [ STHkr #10 * + ] DEI #04 SFT ;draw-knob JSR2 |
|
387 | 387 |
DUP2 .mix-view/x1 LDZ2 #0060 ++ SWP2 |
388 |
- .Audio0/volume [ DUPr STHr #10 * + ] DEI #0f AND ;draw-knob JSR2 |
|
388 |
+ .Audio0/volume [ STHkr #10 * + ] DEI #0f AND ;draw-knob JSR2 |
|
389 | 389 |
POP2 |
390 | 390 |
POPr |
391 | 391 |
|
... | ... |
@@ -395,7 +395,7 @@ RTN |
395 | 395 |
|
396 | 396 |
STH STH |
397 | 397 |
|
398 |
- DUPr STHr |
|
398 |
+ STHkr |
|
399 | 399 |
|
400 | 400 |
DUP #04 / SWP #04 MOD TOS PAD-WIDTH ** ( center ) .pad-view/x1 LDZ2 ++ |
401 | 401 |
ROT TOS PAD-HEIGHT ** ( center ) .pad-view/y1 LDZ2 ++ |
... | ... |
@@ -409,21 +409,21 @@ RTN |
409 | 409 |
( draw name ) |
410 | 410 |
OVR2 #0002 ++ |
411 | 411 |
OVR2 #0002 ++ |
412 |
- ;pad-name DUPr STHr TOS #0005 ** ++ |
|
412 |
+ ;pad-name STHkr TOS #0005 ** ++ |
|
413 | 413 |
#20 OVRr STHr + |
414 | 414 |
;draw-label JSR2 |
415 | 415 |
|
416 | 416 |
( draw note ) |
417 | 417 |
OVR2 #0003 ++ .Screen/x DEO2 |
418 | 418 |
DUP2 #0014 ++ .Screen/y DEO2 |
419 |
- ( get pitch ) DUPr STHr TOS ;pad-pitch ++ LDA |
|
419 |
+ ( get pitch ) STHkr TOS ;pad-pitch ++ LDA |
|
420 | 420 |
#0c / TOS #0008 ** ;font-hex ++ .Screen/addr DEO2 |
421 | 421 |
#21 .Screen/color DEO |
422 | 422 |
|
423 | 423 |
( draw octave ) |
424 | 424 |
OVR2 #000b ++ .Screen/x DEO2 |
425 | 425 |
DUP2 #0014 ++ .Screen/y DEO2 |
426 |
- ( get pitch ) DUPr STHr TOS ;pad-pitch ++ LDA |
|
426 |
+ ( get pitch ) STHkr TOS ;pad-pitch ++ LDA |
|
427 | 427 |
#0c MOD TOS #0008 ** ;font-notes ++ .Screen/addr DEO2 |
428 | 428 |
#21 .Screen/color DEO |
429 | 429 |
|
... | ... |
@@ -470,9 +470,9 @@ RTN |
470 | 470 |
|
471 | 471 |
#00 #0f |
472 | 472 |
&loop |
473 |
- OVR #10 SWP - DUPr STHr #0f AND < #01 + .Screen/color DEO |
|
473 |
+ OVR #10 SWP - STHkr #0f AND < #01 + .Screen/color DEO |
|
474 | 474 |
.Screen/x DEI2 #0002 ++ .Screen/x DEO2 |
475 |
- OVR #10 SWP - DUPr STHr #04 SFT < #01 + .Screen/color DEO |
|
475 |
+ OVR #10 SWP - STHkr #04 SFT < #01 + .Screen/color DEO |
|
476 | 476 |
.Screen/x DEI2 #0002 -- .Screen/x DEO2 |
477 | 477 |
.Screen/y DEI2 #0002 ++ .Screen/y DEO2 |
478 | 478 |
( incr ) SWP #01 + SWP |
... | ... |
@@ -491,7 +491,7 @@ RTN |
491 | 491 |
DUP2 #0018 ++ |
492 | 492 |
&loop |
493 | 493 |
( move ) OVR2 .Screen/y DEO2 |
494 |
- ( draw ) DUPr STHr .Screen/color DEO |
|
494 |
+ ( draw ) STHkr .Screen/color DEO |
|
495 | 495 |
( incr ) .Screen/addr DEI2 #0008 ++ .Screen/addr DEO2 |
496 | 496 |
( incr ) SWP2 #0008 ++ SWP2 |
497 | 497 |
LTH2k ,&loop JCN |
... | ... |
@@ -534,9 +534,9 @@ RTN |
534 | 534 |
( draw ) #21 .Screen/color DEO |
535 | 535 |
.Screen/x DEI2 #0004 ++ .Screen/x DEO2 |
536 | 536 |
.Screen/y DEI2 #0008 ++ .Screen/y DEO2 |
537 |
- ;font-hex #00 DUPr STHr #08 * ++ .Screen/addr DEO2 |
|
537 |
+ ;font-hex #00 STHkr #08 * ++ .Screen/addr DEO2 |
|
538 | 538 |
( draw ) #21 .Screen/color DEO |
539 |
- .Screen/x DEI2 #0004 -- #00 #00 DUPr STHr ;knob-offsetx ++ LDA ++ .Screen/x DEO2 |
|
539 |
+ .Screen/x DEI2 #0004 -- #00 #00 STHkr ;knob-offsetx ++ LDA ++ .Screen/x DEO2 |
|
540 | 540 |
.Screen/y DEI2 #0010 -- #00 #00 STHr ;knob-offsety ++ LDA ++ .Screen/y DEO2 |
541 | 541 |
;knob-icns #0020 ++ .Screen/addr DEO2 |
542 | 542 |
( draw ) #25 .Screen/color DEO |
... | ... |
@@ -546,16 +546,16 @@ RTN |
546 | 546 |
@draw-switch ( x* y* value -- ) |
547 | 547 |
|
548 | 548 |
STH .Screen/y DEO2 .Screen/x DEO2 |
549 |
- DUPr STHr #20 * #00 SWP ;switch-icns ++ |
|
549 |
+ STHkr #20 * #00 SWP ;switch-icns ++ |
|
550 | 550 |
DUP2 .Screen/addr DEO2 |
551 |
- ( draw ) #21 DUPr STHr + .Screen/color DEO |
|
551 |
+ ( draw ) #21 STHkr + .Screen/color DEO |
|
552 | 552 |
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 |
553 | 553 |
DUP2 #0008 ++ .Screen/addr DEO2 |
554 |
- ( draw ) #21 DUPr STHr + .Screen/color DEO |
|
554 |
+ ( draw ) #21 STHkr + .Screen/color DEO |
|
555 | 555 |
.Screen/y DEI2 #0008 ++ .Screen/y DEO2 |
556 | 556 |
.Screen/x DEI2 #0008 -- .Screen/x DEO2 |
557 | 557 |
DUP2 #0010 ++ .Screen/addr DEO2 |
558 |
- ( draw ) #21 DUPr STHr + .Screen/color DEO |
|
558 |
+ ( draw ) #21 STHkr + .Screen/color DEO |
|
559 | 559 |
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 |
560 | 560 |
#0018 ++ .Screen/addr DEO2 |
561 | 561 |
( draw ) #21 STHr + .Screen/color DEO |
... | ... |
@@ -590,7 +590,7 @@ RTN |
590 | 590 |
STH2r |
591 | 591 |
&loop |
592 | 592 |
DUP2 LDA #00 SWP #0030 -- #0008 ** ;font-num-uc ++ .Screen/addr DEO2 |
593 |
- ( draw ) DUPr STHr .Screen/color DEO |
|
593 |
+ ( draw ) STHkr .Screen/color DEO |
|
594 | 594 |
( incr ) #0001 ++ |
595 | 595 |
( incr ) .Screen/x DEI2 #0008 ++ .Screen/x DEO2 |
596 | 596 |
DUP2 LDA #00 ! ,&loop JCN |
... | ... |
@@ -9,7 +9,8 @@ |
9 | 9 |
%++ { ADD2 } %-- { SUB2 } %** { MUL2 } %// { DIV2 } |
10 | 10 |
%<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 } |
11 | 11 |
|
12 |
-%INCR { #01 + } %DECR { #01 - } |
|
12 |
+%INCR { SWP #01 + SWP } |
|
13 |
+%DECR { SWP #01 - SWP } |
|
13 | 14 |
%TOS { #00 SWP } %TOB { SWP POP } |
14 | 15 |
%RTN { JMP2r } %MOD { DUP2 / * - } |
15 | 16 |
%SFL { #40 SFT SFT } |
... | ... |
@@ -18,6 +19,7 @@ |
18 | 19 |
%BANK1 { #8000 } %BANK2 { #a000 } |
19 | 20 |
|
20 | 21 |
%GET-SIZE { WIDTH TOS #0008 // HEIGHT TOS ** } |
22 |
+%GET-ITERATORS { SWP2k POP SWP POP } |
|
21 | 23 |
|
22 | 24 |
( devices ) |
23 | 25 |
|
... | ... |
@@ -67,10 +69,10 @@ BRK |
67 | 69 |
.Mouse/state DEI #00 = #01 JCN [ BRK ] |
68 | 70 |
.world/paused LDZ #00 ! #01 JCN [ BRK ] |
69 | 71 |
|
70 |
- ( incr frame ) .world/frame LDZ INCR [ DUP ] .world/frame STZ |
|
72 |
+ ( incr frame ) .world/frame LDZ #01 + [ DUP ] .world/frame STZ |
|
71 | 73 |
( reset count ) #0000 .world/count STZ2 |
72 | 74 |
|
73 |
- #10 MOD #00 ! #01 JCN [ BRK ] |
|
75 |
+ #02 MOD #00 = #01 JCN [ BRK ] |
|
74 | 76 |
|
75 | 77 |
( clear buffer ) |
76 | 78 |
BANK2 DUP2 GET-SIZE ++ |
... | ... |
@@ -148,15 +150,14 @@ BRK |
148 | 150 |
#00 HEIGHT |
149 | 151 |
&ver |
150 | 152 |
OVR TOS #0002 ** .anchor/y LDZ2 ++ .Screen/y DEO2 |
151 |
- OVR STH |
|
152 | 153 |
#00 WIDTH |
153 | 154 |
&hor |
154 | 155 |
OVR TOS #0002 ** .anchor/x LDZ2 ++ .Screen/x DEO2 |
155 |
- OVR DUPr STHr ,get-cell JSR INCR .Screen/color DEO |
|
156 |
- SWP INCR SWP |
|
156 |
+ GET-ITERATORS ,get-cell JSR #01 + .Screen/color DEO |
|
157 |
+ INCR |
|
157 | 158 |
NEQk ,&hor JCN |
158 |
- POP2 POPr |
|
159 |
- SWP INCR SWP |
|
159 |
+ POP2 |
|
160 |
+ INCR |
|
160 | 161 |
NEQk ,&ver JCN |
161 | 162 |
POP2 |
162 | 163 |
|
... | ... |
@@ -173,7 +174,7 @@ RTN |
173 | 174 |
|
174 | 175 |
DUP2 ,get-index JSR STH2 |
175 | 176 |
POP #08 MOD #01 SWP SFL |
176 |
- DUP2r LDAr STHr SWP ORA |
|
177 |
+ LDAkr STHr SWP ORA |
|
177 | 178 |
STH2r STA |
178 | 179 |
|
179 | 180 |
RTN |
... | ... |
@@ -189,14 +190,14 @@ RTN |
189 | 190 |
|
190 | 191 |
@get-neighbours ( x y -- neighbours ) |
191 | 192 |
|
192 |
- ( -1,-1 ) DUP2 DECR SWP DECR SWP ,get-cell JSR STH |
|
193 |
- ( 0,-1 ) DUP2 DECR ,get-cell JSR STH ADDr |
|
194 |
- ( +1,-1 ) DUP2 DECR SWP INCR SWP ,get-cell JSR STH ADDr |
|
195 |
- ( -1, 0 ) DUP2 SWP DECR SWP ,get-cell JSR STH ADDr |
|
196 |
- ( +1, 0 ) DUP2 SWP INCR SWP ,get-cell JSR STH ADDr |
|
197 |
- ( -1,+1 ) DUP2 INCR SWP DECR SWP ,get-cell JSR STH ADDr |
|
198 |
- ( 0,+1 ) DUP2 INCR ,get-cell JSR STH ADDr |
|
199 |
- ( +1,+1 ) INCR SWP INCR SWP ,get-cell JSR STH ADDr |
|
193 |
+ ( -1,-1 ) DUP2 #01 - DECR ,get-cell JSR STH |
|
194 |
+ ( 0,-1 ) DUP2 #01 - ,get-cell JSR STH ADDr |
|
195 |
+ ( +1,-1 ) DUP2 #01 - INCR ,get-cell JSR STH ADDr |
|
196 |
+ ( -1, 0 ) DUP2 DECR ,get-cell JSR STH ADDr |
|
197 |
+ ( +1, 0 ) DUP2 INCR ,get-cell JSR STH ADDr |
|
198 |
+ ( -1,+1 ) DUP2 #01 + DECR ,get-cell JSR STH ADDr |
|
199 |
+ ( 0,+1 ) DUP2 #01 + ,get-cell JSR STH ADDr |
|
200 |
+ ( +1,+1 ) #01 + INCR ,get-cell JSR STH ADDr |
|
200 | 201 |
STHr |
201 | 202 |
|
202 | 203 |
RTN |
... | ... |
@@ -205,18 +206,17 @@ RTN |
205 | 206 |
|
206 | 207 |
#00 HEIGHT |
207 | 208 |
&ver |
208 |
- OVR STH |
|
209 | 209 |
#00 WIDTH |
210 | 210 |
&hor |
211 |
- OVR DUPr STHr STH2 |
|
212 |
- ( x y ) DUP2r STH2r |
|
213 |
- ( neighbours ) DUP2r STH2r ,get-neighbours JSR |
|
214 |
- ( state ) STH2r ;get-cell JSR2 |
|
211 |
+ GET-ITERATORS |
|
212 |
+ ( x y ) DUP2 |
|
213 |
+ ( neighbours ) DUP2 ,get-neighbours JSR |
|
214 |
+ ( state ) ROT ROT ;get-cell JSR2 |
|
215 | 215 |
,run-cell JSR |
216 |
- SWP INCR SWP |
|
216 |
+ INCR |
|
217 | 217 |
NEQk ,&hor JCN |
218 |
- POP2 POPr |
|
219 |
- SWP INCR SWP |
|
218 |
+ POP2 |
|
219 |
+ INCR |
|
220 | 220 |
NEQk ,&ver JCN |
221 | 221 |
POP2 |
222 | 222 |
|
... | ... |
@@ -246,7 +246,7 @@ RTN |
246 | 246 |
( save in buffer ) |
247 | 247 |
STH2 |
248 | 248 |
DUP2 POP #08 MOD #01 SWP SFL |
249 |
- DUP2r LDAr STHr SWP ORA |
|
249 |
+ LDAkr STHr SWP ORA |
|
250 | 250 |
STH2r STA |
251 | 251 |
|
252 | 252 |
RTN |
... | ... |
@@ -255,21 +255,23 @@ RTN |
255 | 255 |
|
256 | 256 |
STH SWP |
257 | 257 |
DUP #04 SFT TOS #0008 ** ;font-hex ++ .Screen/addr DEO2 |
258 |
- ( draw ) DUPr STHr .Screen/color DEO |
|
258 |
+ ( draw ) STHkr .Screen/color DEO |
|
259 | 259 |
#0f AND TOS #0008 ** ;font-hex ++ .Screen/addr DEO2 |
260 | 260 |
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 |
261 |
- ( draw ) DUPr STHr .Screen/color DEO |
|
261 |
+ ( draw ) STHkr .Screen/color DEO |
|
262 | 262 |
DUP #04 SFT TOS #0008 ** ;font-hex ++ .Screen/addr DEO2 |
263 | 263 |
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 |
264 |
- ( draw ) DUPr STHr .Screen/color DEO |
|
264 |
+ ( draw ) STHkr .Screen/color DEO |
|
265 | 265 |
#0f AND TOS #0008 ** ;font-hex ++ .Screen/addr DEO2 |
266 | 266 |
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 |
267 | 267 |
( draw ) STHr .Screen/color DEO |
268 | 268 |
|
269 | 269 |
RTN |
270 | 270 |
|
271 |
-@font-hex ( 0-F ) |
|
272 |
-[ |
|
271 |
+@cursor |
|
272 |
+ 80c0 e0f0 f8e0 1000 |
|
273 |
+ |
|
274 |
+@font-hex |
|
273 | 275 |
007c 8282 8282 827c 0030 1010 1010 1010 |
274 | 276 |
007c 8202 7c80 80fe 007c 8202 1c02 827c |
275 | 277 |
000c 1424 4484 fe04 00fe 8080 7c02 827c |
... | ... |
@@ -277,7 +279,4 @@ RTN |
277 | 279 |
007c 8282 7c82 827c 007c 8282 7e02 827c |
278 | 280 |
007c 8202 7e82 827e 00fc 8282 fc82 82fc |
279 | 281 |
007c 8280 8080 827c 00fc 8282 8282 82fc |
280 |
- 007c 8280 f080 827c 007c 8280 f080 8080 ] |
|
281 |
- |
|
282 |
-@cursor [ |
|
283 |
- 80c0 e0f0 f8e0 1000 ] |
|
282 |
+ 007c 8280 f080 827c 007c 8280 f080 8080 |
... | ... |
@@ -310,7 +310,7 @@ RTN |
310 | 310 |
DUP2 #0018 ++ |
311 | 311 |
&loop |
312 | 312 |
( move ) OVR2 .Screen/y DEO2 |
313 |
- ( draw ) STHrk .Screen/color DEO |
|
313 |
+ ( draw ) STHkr .Screen/color DEO |
|
314 | 314 |
( incr ) .Screen/addr DEI2 #0008 ++ .Screen/addr DEO2 |
315 | 315 |
( incr ) SWP2 #0008 ++ SWP2 |
316 | 316 |
LTH2k ,&loop JCN |
... | ... |
@@ -390,7 +390,7 @@ RTN |
390 | 390 |
.wave-view/y1 LDZ2 DUP2 #0020 ++ |
391 | 391 |
&loop |
392 | 392 |
OVR2 .Screen/y DEO2 |
393 |
- ( draw ) STHrk .Screen/color DEO |
|
393 |
+ ( draw ) STHkr .Screen/color DEO |
|
394 | 394 |
( incr ) SWP2 #0001 ++ SWP2 |
395 | 395 |
LTH2k ,&loop JCN |
396 | 396 |
POP2 POP2 |
... | ... |
@@ -414,9 +414,9 @@ RTN |
414 | 414 |
( draw ) #21 .Screen/color DEO |
415 | 415 |
.Screen/x DEI2 #0004 ++ .Screen/x DEO2 |
416 | 416 |
.Screen/y DEI2 #0008 ++ .Screen/y DEO2 |
417 |
- ;font-hex #00 STHrk #08 * ++ .Screen/addr DEO2 |
|
417 |
+ ;font-hex #00 STHkr #08 * ++ .Screen/addr DEO2 |
|
418 | 418 |
( draw ) #21 .Screen/color DEO |
419 |
- .Screen/x DEI2 #0004 -- #00 #00 STHrk ;knob-offsetx ++ LDA ++ .Screen/x DEO2 |
|
419 |
+ .Screen/x DEI2 #0004 -- #00 #00 STHkr ;knob-offsetx ++ LDA ++ .Screen/x DEO2 |
|
420 | 420 |
.Screen/y DEI2 #0010 -- #00 #00 STHr ;knob-offsety ++ LDA ++ .Screen/y DEO2 |
421 | 421 |
;knob-icns #0020 ++ .Screen/addr DEO2 |
422 | 422 |
( draw ) #25 .Screen/color DEO |
... | ... |
@@ -427,13 +427,13 @@ RTN |
427 | 427 |
|
428 | 428 |
STH SWP |
429 | 429 |
DUP #04 SFT TOS #0008 ** ;font-hex ++ .Screen/addr DEO2 |
430 |
- ( draw ) STHrk .Screen/color DEO |
|
430 |
+ ( draw ) STHkr .Screen/color DEO |
|
431 | 431 |
#0f AND TOS #0008 ** ;font-hex ++ .Screen/addr DEO2 |
432 | 432 |
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 |
433 |
- ( draw ) STHrk .Screen/color DEO |
|
433 |
+ ( draw ) STHkr .Screen/color DEO |
|
434 | 434 |
DUP #04 SFT TOS #0008 ** ;font-hex ++ .Screen/addr DEO2 |
435 | 435 |
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 |
436 |
- ( draw ) STHrk .Screen/color DEO |
|
436 |
+ ( draw ) STHkr .Screen/color DEO |
|
437 | 437 |
#0f AND TOS #0008 ** ;font-hex ++ .Screen/addr DEO2 |
438 | 438 |
.Screen/x DEI2 #0008 ++ .Screen/x DEO2 |
439 | 439 |
( draw ) STHr .Screen/color DEO |
... | ... |
@@ -459,49 +459,48 @@ RTN |
459 | 459 |
|
460 | 460 |
RTN |
461 | 461 |
|
462 |
-@cursor [ |
|
463 |
- 80c0 e0f0 f8e0 1000 ] |
|
462 |
+@cursor |
|
463 |
+ 80c0 e0f0 f8e0 1000 |
|
464 | 464 |
|
465 |
-@arrow-icns [ |
|
465 |
+@arrow-icns |
|
466 | 466 |
0010 387c fe10 1000 |
467 |
- 0010 1010 fe7c 3810 ] |
|
467 |
+ 0010 1010 fe7c 3810 |
|
468 | 468 |
|
469 |
-@notes [ |
|
469 |
+@notes |
|
470 | 470 |
3c 3e 40 41 43 45 47 |
471 |
- 48 4a 4c 4d 4f 51 53 ] |
|
471 |
+ 48 4a 4c 4d 4f 51 53 |
|
472 | 472 |
|
473 |
-@keys-left-icns [ |
|
473 |
+@keys-left-icns |
|
474 | 474 |
7c7c 7c7c 7c7c 7c7c |
475 | 475 |
7c7c 7c7c 7c7c 7e7f |
476 |
- 7f7f 7f7f 7f7f 3e00 ] |
|
476 |
+ 7f7f 7f7f 7f7f 3e00 |
|
477 | 477 |
|
478 |
-@keys-middle-icns [ |
|
478 |
+@keys-middle-icns |
|
479 | 479 |
1c1c 1c1c 1c1c 1c1c |
480 | 480 |
1c1c 1c1c 1c1c 3e7f |
481 |
- 7f7f 7f7f 7f7f 3e00 ] |
|
481 |
+ 7f7f 7f7f 7f7f 3e00 |
|
482 | 482 |
|
483 |
-@keys-right-icns [ |
|
483 |
+@keys-right-icns |
|
484 | 484 |
1f1f 1f1f 1f1f 1f1f |
485 | 485 |
1f1f 1f1f 1f1f 3f7f |
486 |
- 7f7f 7f7f 7f7f 3e00 ] |
|
486 |
+ 7f7f 7f7f 7f7f 3e00 |
|
487 | 487 |
|
488 |
-@knob-icns [ |
|
488 |
+@knob-icns |
|
489 | 489 |
0003 0c10 2020 4040 |
490 | 490 |
00c0 3008 0404 0202 |
491 | 491 |
4040 2020 100c 0300 |
492 | 492 |
0202 0404 0830 c000 |
493 |
- 0000 183c 3c18 0000 ] |
|
493 |
+ 0000 183c 3c18 0000 |
|
494 | 494 |
|
495 |
-@knob-offsetx [ |
|
495 |
+@knob-offsetx |
|
496 | 496 |
01 00 00 00 00 01 02 03 |
497 |
- 05 06 07 08 08 08 08 07 ] |
|
497 |
+ 05 06 07 08 08 08 08 07 |
|
498 | 498 |
|
499 |
-@knob-offsety [ |
|
499 |
+@knob-offsety |
|
500 | 500 |
07 06 05 03 02 01 00 00 |
501 |
- 00 00 01 02 03 05 06 07 ] |
|
501 |
+ 00 00 01 02 03 05 06 07 |
|
502 | 502 |
|
503 | 503 |
@font-hex ( 0-F ) |
504 |
-[ |
|
505 | 504 |
007c 8282 8282 827c 0030 1010 1010 1010 |
506 | 505 |
007c 8202 7c80 80fe 007c 8202 1c02 827c |
507 | 506 |
000c 1424 4484 fe04 00fe 8080 7c02 827c |
... | ... |
@@ -509,7 +508,7 @@ RTN |
509 | 508 |
007c 8282 7c82 827c 007c 8282 7e02 827c |
510 | 509 |
007c 8202 7e82 827e 00fc 8282 fc82 82fc |
511 | 510 |
007c 8280 8080 827c 00fc 8282 8282 82fc |
512 |
- 007c 8280 f080 827c 007c 8280 f080 8080 ] |
|
511 |
+ 007c 8280 f080 827c 007c 8280 f080 8080 |
|
513 | 512 |
|
514 | 513 |
@piano-path "projects/sounds/piano.pcm $1 |
515 | 514 |
@violin-path "projects/sounds/violin.pcm $1 |
... | ... |
@@ -64,7 +64,7 @@ BRK |
64 | 64 |
|
65 | 65 |
( ears ) |
66 | 66 |
.cat/y LDZ2 .Screen/y DEO2 |
67 |
- .cat/x LDZ2 DUP2 STH2 #0008 SUB2 .Screen/x DEO2 |
|
67 |
+ .cat/x LDZ2 STH2k #0008 SUB2 .Screen/x DEO2 |
|
68 | 68 |
;ears .Screen/addr DEO2 |
69 | 69 |
#41 .Screen/color DEO |
70 | 70 |
STH2r .Screen/x DEO2 |
... | ... |
@@ -79,7 +79,7 @@ RTN |
79 | 79 |
@draw-eye ( quad* -- ) |
80 | 80 |
|
81 | 81 |
.cat/y LDZ2 #0008 ADD2 .Screen/y DEO2 |
82 |
- .cat/x LDZ2 DUP2 STH2 #0008 SUB2 .Screen/x DEO2 |
|
82 |
+ .cat/x LDZ2 STH2k #0008 SUB2 .Screen/x DEO2 |
|
83 | 83 |
DUP2 ;eye ADD2 .Screen/addr DEO2 |
84 | 84 |
( draw ) #41 .Screen/color DEO |
85 | 85 |
STH2r .Screen/x DEO2 |
... | ... |
@@ -91,7 +91,7 @@ RTN |
91 | 91 |
@draw-tail ( frame* -- ) |
92 | 92 |
|
93 | 93 |
.cat/y LDZ2 #0010 ADD2 .Screen/y DEO2 |
94 |
- .cat/x LDZ2 DUP2 STH2 #0008 SUB2 .Screen/x DEO2 |
|
94 |
+ .cat/x LDZ2 STH2k #0008 SUB2 .Screen/x DEO2 |
|
95 | 95 |
;body .Screen/addr DEO2 |
96 | 96 |
( draw ) #41 .Screen/color DEO |
97 | 97 |
STH2r .Screen/x DEO2 |
... | ... |
@@ -138,14 +138,14 @@ RTN |
138 | 138 |
|
139 | 139 |
RTN |
140 | 140 |
|
141 |
-@cursor [ |
|
142 |
- 80c0 e0f0 f8e0 1000 ] |
|
141 |
+@cursor |
|
142 |
+ 80c0 e0f0 f8e0 1000 |
|
143 | 143 |
|
144 |
-@ears [ |
|
144 |
+@ears |
|
145 | 145 |
081c 3e3e 7f7f ffff 081c 3e3e 7f7f fffc |
146 |
- 081c 3c3e 7e7e ffff 081c 3c3e 7e7e ff1f ] |
|
146 |
+ 081c 3c3e 7e7e ffff 081c 3c3e 7e7e ff1f |
|
147 | 147 |
|
148 |
-@eye [ |
|
148 |
+@eye |
|
149 | 149 |
ffff ffff ff7f 3f0f f7ef cfe7 f07c 3f0f |
150 | 150 |
ffff ffff fffe fcf0 87c3 c183 071e fcf0 |
151 | 151 |
ffff ffff ff7f 3f0f f0e1 c1e0 f07c 3f0f |
... | ... |
@@ -154,17 +154,16 @@ RTN |
154 | 154 |
ffff ffff fffe fcf0 0783 c1c3 871e fcf0 |
155 | 155 |
ffff ffff ff7f 3f0f f0e0 c1e1 f07c 3f0f |
156 | 156 |
ffff ffff fffe fcf0 07f3 f9fb f71e fcf0 |
157 |
-] |
|
158 | 157 |
|
159 |
-@body [ |
|
158 |
+@body |
|
160 | 159 |
0707 0707 0302 0200 0107 0707 0300 0000 |
161 | 160 |
e0f0 f0e0 e080 8000 c0f2 f9f9 fef8 b000 |
162 | 161 |
e0f0 f0e0 e080 8000 c0f2 f9f9 fef8 b000 |
163 | 162 |
e0f0 f0e0 e080 8000 c0f2 faf9 fef8 b000 |
164 | 163 |
e0f0 f0e0 e080 8000 c0f1 faf9 fef8 b000 |
165 | 164 |
0707 0707 0f08 1000 0307 0707 0f00 0000 |
166 |
- e0e0 e0e0 e080 8000 f2f9 f9fe b884 8400 ] |
|
165 |
+ e0e0 e0e0 e080 8000 f2f9 f9fe b884 8400 |
|
167 | 166 |
|
168 |
-@ground [ |
|
167 |
+@ground |
|
169 | 168 |
bf00 5c02 0202 020c ef10 6f90 8080 8074 |
170 |
- ff00 fe01 0100 0116 fd00 3c40 4040 4028 ] |
|
169 |
+ ff00 fe01 0100 0116 fd00 3c40 4040 4028 |
... | ... |
@@ -327,7 +327,7 @@ RTN |
327 | 327 |
&loop |
328 | 328 |
DUP2 LDA #00 SWP #0008 MUL2 |
329 | 329 |
;font ADD2 .Screen/addr DEO2 |
330 |
- ( draw ) DUPr STHr .Screen/color DEO |
|
330 |
+ ( draw ) STHkr .Screen/color DEO |
|
331 | 331 |
( incr ) ++ |
332 | 332 |
( incr ) .Screen/x DEI2 8+ .Screen/x DEO2 |
333 | 333 |
DUP2 LDA #00 NEQ ,&loop JCN |
... | ... |
@@ -339,13 +339,13 @@ RTN |
339 | 339 |
|
340 | 340 |
STH SWP |
341 | 341 |
DUP #04 SFT #00 SWP #0008 MUL2 ;font-hex ADD2 .Screen/addr DEO2 |
342 |
- ( draw ) DUPr STHr .Screen/color DEO |
|
342 |
+ ( draw ) STHkr .Screen/color DEO |
|
343 | 343 |
#0f AND #00 SWP #0008 MUL2 ;font-hex ADD2 .Screen/addr DEO2 |
344 | 344 |
.Screen/x DEI2 8+ .Screen/x DEO2 |
345 |
- ( draw ) DUPr STHr .Screen/color DEO |
|
345 |
+ ( draw ) STHkr .Screen/color DEO |
|
346 | 346 |
DUP #04 SFT #00 SWP #0008 MUL2 ;font-hex ADD2 .Screen/addr DEO2 |
347 | 347 |
.Screen/x DEI2 8+ .Screen/x DEO2 |
348 |
- ( draw ) DUPr STHr .Screen/color DEO |
|
348 |
+ ( draw ) STHkr .Screen/color DEO |
|
349 | 349 |
#0f AND #00 SWP #0008 MUL2 ;font-hex ADD2 .Screen/addr DEO2 |
350 | 350 |
.Screen/x DEI2 8+ .Screen/x DEO2 |
351 | 351 |
( draw ) STHr .Screen/color DEO |
... | ... |
@@ -363,13 +363,14 @@ RTN |
363 | 363 |
@sliderc_icn [ fcfe ffff ffff fefc ] |
364 | 364 |
@sliderd_icn [ 003c 7e7e 7e7e 3c00 ] |
365 | 365 |
|
366 |
-@preview_icn [ |
|
366 |
+@preview_icn |
|
367 | 367 |
183c 66db db66 3c18 |
368 |
- 0000 183c 3c18 0000 ] |
|
368 |
+ 0000 183c 3c18 0000 |
|
369 | 369 |
@radio_icns |
370 |
- [ 3c42 8181 8181 423c ] |
|
371 |
- [ 3c42 99bd bd99 423c ] |
|
372 |
-@font-hex [ |
|
370 |
+ 3c42 8181 8181 423c |
|
371 |
+ 3c42 99bd bd99 423c |
|
372 |
+ |
|
373 |
+@font-hex |
|
373 | 374 |
003c 464a 5262 3c00 0018 0808 0808 1c00 |
374 | 375 |
003c 4202 3c40 7e00 003c 421c 0242 3c00 |
375 | 376 |
000c 1424 447e 0400 007e 407c 0242 3c00 |
... | ... |
@@ -377,9 +378,9 @@ RTN |
377 | 378 |
003c 423c 4242 3c00 003c 4242 3e02 3c00 |
378 | 379 |
003c 4242 7e42 4200 007c 427c 4242 7c00 |
379 | 380 |
003c 4240 4042 3c00 007c 4242 4242 7c00 |
380 |
- 007e 4078 4040 7e00 007e 4078 4040 4000 ] |
|
381 |
+ 007e 4078 4040 7e00 007e 4078 4040 4000 |
|
381 | 382 |
|
382 |
-@font ( spectrum-zx font ) [ |
|
383 |
+@font ( spectrum-zx font ) |
|
383 | 384 |
0000 0000 0000 0000 0000 2400 7e3c 0000 0000 2400 3c42 0000 0000 6c7c 7c38 1000 |
384 | 385 |
0010 387c 7c38 1000 0038 387c 6c10 3800 0010 387c 7c10 3800 0000 0018 1800 0000 |
385 | 386 |
007e 4242 4242 7e00 0000 1824 2418 0000 0018 2442 4224 1800 001e 063a 4a48 3000 |
... | ... |
@@ -411,4 +412,4 @@ RTN |
411 | 412 |
0000 7844 4478 4040 0000 3c44 443c 0406 0000 2c30 2020 2000 0000 3840 3804 7800 |
412 | 413 |
0010 103c 1010 0c00 0000 4444 4444 3800 0000 4444 2828 1000 0000 4454 5454 2800 |
413 | 414 |
0000 4428 1028 4400 0000 4444 443c 0438 0000 7c08 1020 7c00 000c 0810 1008 0c00 |
414 |
- 0008 0808 0808 0800 0030 1008 0810 3000 0000 0032 4c00 0000 3c42 99a1 a199 423c ] |
|
415 |
+ 0008 0808 0808 0800 0030 1008 0810 3000 0000 0032 4c00 0000 3c42 99a1 a199 423c |
... | ... |
@@ -74,7 +74,7 @@ BRK |
74 | 74 |
#00 SWP SCALEX .Screen/x DEO2 |
75 | 75 |
OVR #0f MOD #00 EQU #01 ADD .Screen/color DEO |
76 | 76 |
( incr ) SWP #01 ADD SWP |
77 |
- DUP2 LTH ,&loop JCN |
|
77 |
+ LTHk ,&loop JCN |
|
78 | 78 |
POP2 |
79 | 79 |
|
80 | 80 |
;draw-display JSR2 |
... | ... |
@@ -86,22 +86,22 @@ BRK |
86 | 86 |
.Screen/height DEI2 #0002 DIV2 #0048 ADD2 .Screen/y DEO2 |
87 | 87 |
.Screen/width DEI2 #0002 DIV2 |
88 | 88 |
DUP2 #0020 SUB2 .Screen/x DEO2 |
89 |
- ;font_hex #00 .DateTime/hour DEI #0a DIV #08 MUL ADD2 .Screen/addr DEO2 |
|
89 |
+ ;font-hex #00 .DateTime/hour DEI #0a DIV #08 MUL ADD2 .Screen/addr DEO2 |
|
90 | 90 |
#22 .Screen/color DEO |
91 | 91 |
DUP2 #0018 SUB2 .Screen/x DEO2 |
92 |
- ;font_hex #00 .DateTime/hour DEI #0a MOD #08 MUL ADD2 .Screen/addr DEO2 |
|
92 |
+ ;font-hex #00 .DateTime/hour DEI #0a MOD #08 MUL ADD2 .Screen/addr DEO2 |
|
93 | 93 |
#22 .Screen/color DEO |
94 | 94 |
DUP2 #0008 SUB2 .Screen/x DEO2 |
95 |
- ;font_hex #00 .DateTime/minute DEI #0a DIV #08 MUL ADD2 .Screen/addr DEO2 |
|
95 |
+ ;font-hex #00 .DateTime/minute DEI #0a DIV #08 MUL ADD2 .Screen/addr DEO2 |
|
96 | 96 |
#22 .Screen/color DEO |
97 | 97 |
DUP2 .Screen/x DEO2 |
98 |
- ;font_hex #00 .DateTime/minute DEI #0a MOD #08 MUL ADD2 .Screen/addr DEO2 |
|
98 |
+ ;font-hex #00 .DateTime/minute DEI #0a MOD #08 MUL ADD2 .Screen/addr DEO2 |
|
99 | 99 |
#22 .Screen/color DEO |
100 | 100 |
DUP2 #0010 ADD2 .Screen/x DEO2 |
101 |
- ;font_hex #00 .DateTime/second DEI #0a DIV #08 MUL ADD2 .Screen/addr DEO2 |
|
101 |
+ ;font-hex #00 .DateTime/second DEI #0a DIV #08 MUL ADD2 .Screen/addr DEO2 |
|
102 | 102 |
#22 .Screen/color DEO |
103 | 103 |
DUP2 #0018 ADD2 .Screen/x DEO2 |
104 |
- ;font_hex #00 .DateTime/second DEI #0a MOD #08 MUL ADD2 .Screen/addr DEO2 |
|
104 |
+ ;font-hex #00 .DateTime/second DEI #0a MOD #08 MUL ADD2 .Screen/addr DEO2 |
|
105 | 105 |
#22 .Screen/color DEO |
106 | 106 |
POP2 |
107 | 107 |
|
... | ... |
@@ -136,7 +136,6 @@ RTN |
136 | 136 |
RTN |
137 | 137 |
|
138 | 138 |
@table ( 60 positions on a circle in bytes ) |
139 |
-[ |
|
140 | 139 |
8000 8d00 9a02 a706 b40b c011 cb18 d520 |
141 | 140 |
df2a e734 ee40 f44b f958 fd65 ff72 ff80 |
142 | 141 |
ff8d fd9a f9a7 f4b4 eec0 e7cb dfd5 d5df |
... | ... |
@@ -145,10 +144,8 @@ RTN |
145 | 144 |
11c0 0bb4 06a7 029a 008d 0080 0072 0265 |
146 | 145 |
0658 0b4b 113f 1834 202a 2a20 3418 3f11 |
147 | 146 |
4b0b 5806 6502 7200 |
148 |
-] |
|
149 | 147 |
|
150 |
-@font_hex ( 0-F ) |
|
151 |
-[ |
|
148 |
+@font-hex ( 0-F ) |
|
152 | 149 |
007c 8282 8282 827c 0030 1010 1010 1010 |
153 | 150 |
007c 8202 7c80 80fe 007c 8202 1c02 827c |
154 | 151 |
000c 1424 4484 fe04 00fe 8080 7c02 827c |
... | ... |
@@ -157,4 +154,3 @@ RTN |
157 | 154 |
007c 8202 7e82 827e 00fc 8282 fc82 82fc |
158 | 155 |
007c 8280 8080 827c 00fc 8282 8282 82fc |
159 | 156 |
007c 8280 f080 827c 007c 8280 f080 8080 |
160 |
-] |
... | ... |
@@ -72,6 +72,7 @@ BRK |
72 | 72 |
|
73 | 73 |
@draw-cursor ( -- ) |
74 | 74 |
|
75 |
+ ;pointer_icn .Screen/addr DEO2 |
|
75 | 76 |
( clear last cursor ) |
76 | 77 |
.pointer/x LDZ2 .Screen/x DEO2 |
77 | 78 |
.pointer/y LDZ2 .Screen/y DEO2 |
... | ... |
@@ -82,7 +83,6 @@ BRK |
82 | 83 |
.Mouse/y DEI2 .pointer/y STZ2 |
83 | 84 |
|
84 | 85 |
( draw new cursor ) |
85 |
- ;pointer_icn .Screen/addr DEO2 |
|
86 | 86 |
.pointer/x LDZ2 .Screen/x DEO2 |
87 | 87 |
.pointer/y LDZ2 .Screen/y DEO2 |
88 | 88 |
#33 .Mouse/state DEI #00 NEQ #02 MUL SUB .Screen/color DEO |
... | ... |
@@ -54,20 +54,17 @@ RTN |
54 | 54 |
|
55 | 55 |
#00 #10 |
56 | 56 |
&loop |
57 |
- OVR #08 MUL #00 SWP ;font_hex ADD2 .Screen/addr DEO2 |
|
58 |
- |
|
57 |
+ OVR #08 MUL #00 SWP ;font-hex ADD2 .Screen/addr DEO2 |
|
59 | 58 |
( x-axis ) |
60 | 59 |
OVR #08 MUL #00 SWP |
61 | 60 |
.center/x LDZ2 #0040 SUB2 ADD2 .Screen/x DEO2 |
62 | 61 |
.center/y LDZ2 #0050 SUB2 .Screen/y DEO2 |
63 | 62 |
( draw ) #21 .Screen/color DEO |
64 |
- |
|
65 | 63 |
( y-axis ) |
66 | 64 |
OVR #08 MUL #00 SWP |
67 | 65 |
.center/y LDZ2 #0040 SUB2 ADD2 .Screen/y DEO2 |
68 | 66 |
.center/x LDZ2 #0050 SUB2 .Screen/x DEO2 |
69 | 67 |
( draw ) #21 .Screen/color DEO |
70 |
- |
|
71 | 68 |
( incr ) SWP #01 ADD SWP |
72 | 69 |
LTHk ,&loop JCN |
73 | 70 |
POP2 |
... | ... |
@@ -77,7 +74,6 @@ RTN |
77 | 74 |
@draw-circle ( -- ) |
78 | 75 |
|
79 | 76 |
;preview_icn .Screen/addr DEO2 |
80 |
- |
|
81 | 77 |
.center/x LDZ2 #0048 ADD2 .Screen/x DEO2 |
82 | 78 |
.center/y LDZ2 #0030 ADD2 .Screen/y DEO2 |
83 | 79 |
#21 .Screen/color DEO |
... | ... |
@@ -91,10 +87,10 @@ RTN |
91 | 87 |
|
92 | 88 |
RTN |
93 | 89 |
|
94 |
-@preview_icn [ |
|
95 |
- 0f38 675f dfbf bfbf 0007 1820 2344 4848 ] |
|
90 |
+@preview_icn [ |
|
91 |
+ 0f38 675f dfbf bfbf 0007 1820 2344 4848 |
|
96 | 92 |
|
97 |
-@font_hex [ |
|
93 |
+@font-hex |
|
98 | 94 |
007c 8282 8282 827c 0030 1010 1010 1010 |
99 | 95 |
007c 8202 7c80 80fe 007c 8202 1c02 827c |
100 | 96 |
000c 1424 4484 fe04 00fe 8080 7c02 827c |
... | ... |
@@ -102,4 +98,4 @@ RTN |
102 | 98 |
007c 8282 7c82 827c 007c 8282 7e02 827c |
103 | 99 |
007c 8202 7e82 827e 00fc 8282 fc82 82fc |
104 | 100 |
007c 8280 8080 827c 00fc 8282 8282 82fc |
105 |
- 007c 8280 f080 827c 007c 8280 f080 8080 ] |
|
106 | 101 |
\ No newline at end of file |
102 |
+ 007c 8280 f080 827c 007c 8280 f080 8080 |
|
107 | 103 |
\ No newline at end of file |
... | ... |
@@ -1,4 +1,5 @@ |
1 | 1 |
#include <stdio.h> |
2 |
+#include "uxn.h" |
|
2 | 3 |
|
3 | 4 |
/* |
4 | 5 |
Copyright (c) 2021 Devine Lu Linvega |
... | ... |
@@ -11,8 +12,6 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
11 | 12 |
WITH REGARD TO THIS SOFTWARE. |
12 | 13 |
*/ |
13 | 14 |
|
14 |
-#include "uxn.h" |
|
15 |
- |
|
16 | 15 |
#pragma mark - Core |
17 | 16 |
|
18 | 17 |
int |
... | ... |
@@ -1,3 +1,6 @@ |
1 |
+#include "../uxn.h" |
|
2 |
+#include "apu.h" |
|
3 |
+ |
|
1 | 4 |
/* |
2 | 5 |
Copyright (c) 2021 Devine Lu Linvega |
3 | 6 |
Copyright (c) 2021 Andrew Alderwick |
... | ... |
@@ -10,9 +13,6 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
10 | 13 |
WITH REGARD TO THIS SOFTWARE. |
11 | 14 |
*/ |
12 | 15 |
|
13 |
-#include "../uxn.h" |
|
14 |
-#include "apu.h" |
|
15 |
- |
|
16 | 16 |
#define NOTE_PERIOD 0x10000 |
17 | 17 |
#define ADSR_STEP (SAMPLE_FREQUENCY / 0xf) |
18 | 18 |
|
... | ... |
@@ -1,3 +1,5 @@ |
1 |
+#include "mpu.h" |
|
2 |
+ |
|
1 | 3 |
/* |
2 | 4 |
Copyright (c) 2021 Devine Lu Linvega |
3 | 5 |
Copyright (c) 2021 Andrew Alderwick |
... | ... |
@@ -10,8 +12,6 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
10 | 12 |
WITH REGARD TO THIS SOFTWARE. |
11 | 13 |
*/ |
12 | 14 |
|
13 |
-#include "mpu.h" |
|
14 |
- |
|
15 | 15 |
int |
16 | 16 |
initmpu(Mpu *m, Uint8 device) |
17 | 17 |
{ |
... | ... |
@@ -1,3 +1,5 @@ |
1 |
+#include "ppu.h" |
|
2 |
+ |
|
1 | 3 |
/* |
2 | 4 |
Copyright (c) 2021 Devine Lu Linvega |
3 | 5 |
Copyright (c) 2021 Andrew Alderwick |
... | ... |
@@ -10,8 +12,6 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
10 | 12 |
WITH REGARD TO THIS SOFTWARE. |
11 | 13 |
*/ |
12 | 14 |
|
13 |
-#include "ppu.h" |
|
14 |
- |
|
15 | 15 |
static Uint8 font[][8] = { |
16 | 16 |
{0x00, 0x7c, 0x82, 0x82, 0x82, 0x82, 0x82, 0x7c}, |
17 | 17 |
{0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10}, |
... | ... |
@@ -1,6 +1,10 @@ |
1 | 1 |
#include <SDL2/SDL.h> |
2 | 2 |
#include <stdio.h> |
3 | 3 |
#include <time.h> |
4 |
+#include "uxn.h" |
|
5 |
+#include "devices/ppu.h" |
|
6 |
+#include "devices/apu.h" |
|
7 |
+#include "devices/mpu.h" |
|
4 | 8 |
|
5 | 9 |
/* |
6 | 10 |
Copyright (c) 2021 Devine Lu Linvega |
... | ... |
@@ -13,11 +17,6 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
13 | 17 |
WITH REGARD TO THIS SOFTWARE. |
14 | 18 |
*/ |
15 | 19 |
|
16 |
-#include "uxn.h" |
|
17 |
-#include "devices/ppu.h" |
|
18 |
-#include "devices/apu.h" |
|
19 |
-#include "devices/mpu.h" |
|
20 |
- |
|
21 | 20 |
static SDL_AudioDeviceID audio_id; |
22 | 21 |
static SDL_Window *gWindow; |
23 | 22 |
static SDL_Renderer *gRenderer; |
... | ... |
@@ -1,4 +1,5 @@ |
1 | 1 |
#include <stdio.h> |
2 |
+#include "uxn.h" |
|
2 | 3 |
|
3 | 4 |
/* |
4 | 5 |
Copyright (u) 2021 Devine Lu Linvega |
... | ... |
@@ -11,8 +12,6 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
11 | 12 |
WITH REGARD TO THIS SOFTWARE. |
12 | 13 |
*/ |
13 | 14 |
|
14 |
-#include "uxn.h" |
|
15 |
- |
|
16 | 15 |
#pragma mark - Operations |
17 | 16 |
|
18 | 17 |
/* clang-format off */ |
... | ... |
@@ -28,8 +28,6 @@ typedef struct { |
28 | 28 |
Uint8 dat[65536]; |
29 | 29 |
} Memory; |
30 | 30 |
|
31 |
-struct Uxn; |
|
32 |
- |
|
33 | 31 |
typedef struct Device { |
34 | 32 |
struct Uxn *u; |
35 | 33 |
Uint8 addr, dat[16], *mem; |
... | ... |
@@ -42,10 +40,12 @@ typedef struct Uxn { |
42 | 40 |
Device dev[16]; |
43 | 41 |
} Uxn; |
44 | 42 |
|
45 |
-int loaduxn(Uxn *c, char *filepath); |
|
46 |
-int bootuxn(Uxn *c); |
|
47 |
-int evaluxn(Uxn *u, Uint16 vec); |
|
43 |
+struct Uxn; |
|
44 |
+ |
|
48 | 45 |
void mempoke16(Uint8 *m, Uint16 a, Uint16 b); |
49 | 46 |
Uint16 mempeek16(Uint8 *m, Uint16 a); |
50 | 47 |
|
48 |
+int loaduxn(Uxn *c, char *filepath); |
|
49 |
+int bootuxn(Uxn *c); |
|
50 |
+int evaluxn(Uxn *u, Uint16 vec); |
|
51 | 51 |
Device *portuxn(Uxn *u, Uint8 id, char *name, void (*talkfn)(Device *, Uint8, Uint8)); |