Browse code

Fixed macro names in musictracker

Andrew Alderwick authored on 24/05/2021 21:30:01
Showing 1 changed files
... ...
@@ -1,8 +1,8 @@
1 1
 ( mini music tracker )
2 2
 
3 3
 %RTN { JMP2r }
4
-%8+ { #0008 ADD2 } %8- { #0008 SUB2 }
5
-%8* { #0008 MUL2 } %8/ { #0008 DIV2 }
4
+%8++ { #0008 ADD2 } %8-- { #0008 SUB2 }
5
+%8** { #0008 MUL2 } %8// { #0008 DIV2 }
6 6
 %++ { #0001 ADD2 }
7 7
 %MOD8 { #07 AND }
8 8
 %TRACK { ;track/ch1 #00 .track/active LDZ #0020 MUL2 ADD2 }
... ...
@@ -92,10 +92,10 @@ BRK
92 92
 		.Mouse/y DEI2 .trkframe/y1 LDZ2 GTH2 .Mouse/y DEI2 .trkframe/y2 LDZ2 LTH2 #0101 EQU2
93 93
 		#0101 EQU2 ;touch-trk JCN2
94 94
 		.Mouse/x DEI2 .chnframe/x1 LDZ2 GTH2 .Mouse/x DEI2 .chnframe/x2 LDZ2 LTH2 #0101 EQU2
95
-		.Mouse/y DEI2 .chnframe/y1 LDZ2 8+ GTH2 .Mouse/y DEI2 .chnframe/y2 LDZ2 8- LTH2 #0101 EQU2
95
+		.Mouse/y DEI2 .chnframe/y1 LDZ2 8++ GTH2 .Mouse/y DEI2 .chnframe/y2 LDZ2 8-- LTH2 #0101 EQU2
96 96
 		#0101 EQU2 ;touch-chn JCN2
97 97
 		.Mouse/x DEI2 .ctlframe/x1 LDZ2 GTH2 .Mouse/x DEI2 .ctlframe/x2 LDZ2 LTH2 #0101 EQU2
98
-		.Mouse/y DEI2 .ctlframe/y1 LDZ2 8+ GTH2 .Mouse/y DEI2 .ctlframe/y2 LDZ2 8- LTH2 #0101 EQU2
98
+		.Mouse/y DEI2 .ctlframe/y1 LDZ2 8++ GTH2 .Mouse/y DEI2 .ctlframe/y2 LDZ2 8-- LTH2 #0101 EQU2
99 99
 		#0101 EQU2 ;touch-ctl JCN2	
100 100
 	&click-end
101 101
 
... ...
@@ -158,7 +158,7 @@ BRK
158 158
 
159 159
 @touch-ctl ( -- )
160 160
 	
161
-	.Mouse/x DEI2 .ctlframe/x1 LDZ2 SUB2 8- 8/ SWP POP #02 DIV
161
+	.Mouse/x DEI2 .ctlframe/x1 LDZ2 SUB2 8-- 8// SWP POP #02 DIV
162 162
 	DUP ,&no-a JCN
163 163
 		.Audio0/adsr .track/active LDZ #10 MUL ADD DEI
164 164
 		#10 .Mouse/state DEI #10 EQU #e0 MUL ADD ADD
... ...
@@ -225,7 +225,7 @@ RTN
225 225
 @move-head ( -- )
226 226
 
227 227
 	( clear )
228
-	.trkframe/y1 LDZ2 8- .Screen/y DEO2
228
+	.trkframe/y1 LDZ2 8-- .Screen/y DEO2
229 229
 	.trkframe/x1 LDZ2 #00 .head/pos LDZ ADD2 .Screen/x DEO2
230 230
 	;head_icn .Screen/addr DEO2
231 231
 	#20 .Screen/color DEO
... ...
@@ -241,8 +241,8 @@ RTN
241 241
 	#00 #20
242 242
 	&loop
243 243
 		( load ) OVR #00 SWP TRACK ADD2 LDA
244
-		DUP STH #00 SWP #0e SWP SUB 8* .trkframe/y1 LDZ2 ADD2 .Screen/y DEO2
245
-		OVR #00 SWP 8* .trkframe/x1 LDZ2 ADD2 .Screen/x DEO2
244
+		DUP STH #00 SWP #0e SWP SUB 8** .trkframe/y1 LDZ2 ADD2 .Screen/y DEO2
245
+		OVR #00 SWP 8** .trkframe/x1 LDZ2 ADD2 .Screen/x DEO2
246 246
 		STHr #00 EQU ,&skip JCN
247 247
 			#20 .Screen/color DEO
248 248
 		&skip
... ...
@@ -257,8 +257,8 @@ RTN
257 257
 	#00 #20
258 258
 	&notes-loop
259 259
 		( load ) OVR #00 SWP TRACK ADD2 LDA
260
-		DUP STH #00 SWP #0e SWP SUB 8* .trkframe/y1 LDZ2 ADD2 .Screen/y DEO2
261
-		OVR #00 SWP 8* .trkframe/x1 LDZ2 ADD2 .Screen/x DEO2
260
+		DUP STH #00 SWP #0e SWP SUB 8** .trkframe/y1 LDZ2 ADD2 .Screen/y DEO2
261
+		OVR #00 SWP 8** .trkframe/x1 LDZ2 ADD2 .Screen/x DEO2
262 262
 		;note_icn .Screen/addr DEO2
263 263
 		STHr #00 EQU ,&skip JCN
264 264
 			#25 .Screen/color DEO
... ...
@@ -283,16 +283,16 @@ RTN
283 283
 			OVR2 .trkframe/x1 LDZ2 ADD2 .Screen/x DEO2
284 284
 			.trkframe/y1 LDZ2 #0010 SUB2 .Screen/y DEO2
285 285
 			#22 .Screen/color DEO
286
-			.Screen/addr DEI2 8+ .Screen/addr DEO2
286
+			.Screen/addr DEI2 8++ .Screen/addr DEO2
287 287
 			OVR2 .trkframe/x1 LDZ2 ADD2 .trkframe/y1 LDZ2 ++ .trkframe/y2 LDZ2 #01 ;line-vertical-dotted JSR2
288 288
 		&skip
289 289
 		OVR2 .trkframe/x1 LDZ2 ADD2 .trkframe/y1 LDZ2 .trkframe/y2 LDZ2 #01 ;line-vertical-dotted JSR2
290
-		SWP2 8+ SWP2
290
+		SWP2 8++ SWP2
291 291
 		OVR2 OVR2 LTH2 ,&loop JCN
292 292
 	POP2
293 293
 	POP2
294 294
 
295
-	.trkframe/x1 LDZ2 .trkframe/x2 LDZ2 .trkframe/y1 LDZ2 8- #0040 ADD2 #01 ;line-horizontal-dotted JSR2
295
+	.trkframe/x1 LDZ2 .trkframe/x2 LDZ2 .trkframe/y1 LDZ2 8-- #0040 ADD2 #01 ;line-horizontal-dotted JSR2
296 296
 
297 297
 RTN
298 298
 
... ...
@@ -305,12 +305,12 @@ RTN
305 305
 	&loop
306 306
 		OVR2 .Screen/y DEO2
307 307
 		#21 .Screen/color DEO
308
-		.Screen/addr DEI2 8+ .Screen/addr DEO2
309
-		.Screen/x DEI2 8+ .Screen/x DEO2
308
+		.Screen/addr DEI2 8++ .Screen/addr DEO2
309
+		.Screen/x DEI2 8++ .Screen/x DEO2
310 310
 		#21 .Screen/color DEO
311
-		.Screen/addr DEI2 8+ .Screen/addr DEO2
312
-		.Screen/x DEI2 8- .Screen/x DEO2
313
-		SWP2 8+ SWP2
311
+		.Screen/addr DEI2 8++ .Screen/addr DEO2
312
+		.Screen/x DEI2 8-- .Screen/x DEO2
313
+		SWP2 8++ SWP2
314 314
 		OVR2 OVR2 LTH2 ,&loop JCN
315 315
 	POP2
316 316
 	POP2
... ...
@@ -353,8 +353,8 @@ RTN
353 353
 
354 354
 	.knob/x LDZ2 .Screen/x DEO2
355 355
 	.knob/y LDZ2 .Screen/y DEO2 ;knob_icns .Screen/addr DEO2 #21 .Screen/color DEO
356
-	.knob/x LDZ2 8+ .Screen/x DEO2 ;knob_icns 8+ .Screen/addr DEO2 #21 .Screen/color DEO
357
-	.knob/y LDZ2 8+ .Screen/y DEO2 ;knob_icns #0018 ADD2 .Screen/addr DEO2 #21 .Screen/color DEO
356
+	.knob/x LDZ2 8++ .Screen/x DEO2 ;knob_icns 8++ .Screen/addr DEO2 #21 .Screen/color DEO
357
+	.knob/y LDZ2 8++ .Screen/y DEO2 ;knob_icns #0018 ADD2 .Screen/addr DEO2 #21 .Screen/color DEO
358 358
 	.knob/x LDZ2 .Screen/x DEO2 ;knob_icns #0010 ADD2 .Screen/addr DEO2 #21 .Screen/color DEO
359 359
 	.knob/x LDZ2 #00 #00 .knob/value LDZ ;knob_offsetx ADD2 LDA ADD2 .Screen/x DEO2
360 360
 	.knob/y LDZ2 #00 #00 .knob/value LDZ ;knob_offsety ADD2 LDA ADD2 .Screen/y DEO2
... ...
@@ -373,8 +373,8 @@ RTN
373 373
 
374 374
 	.knob/x LDZ2 .Screen/x DEO2
375 375
 	.knob/y LDZ2 .Screen/y DEO2 #20 .Screen/color DEO
376
-	.knob/x LDZ2 8+ .Screen/x DEO2 #20 .Screen/color DEO
377
-	.knob/y LDZ2 8+ .Screen/y DEO2 #20 .Screen/color DEO
376
+	.knob/x LDZ2 8++ .Screen/x DEO2 #20 .Screen/color DEO
377
+	.knob/y LDZ2 8++ .Screen/y DEO2 #20 .Screen/color DEO
378 378
 	.knob/x LDZ2 .Screen/x DEO2 #20 .Screen/color DEO
379 379
 	.knob/x LDZ2 #0004 ADD2 .Screen/x DEO2
380 380
 	.knob/y LDZ2 #0010 ADD2 .Screen/y DEO2
... ...
@@ -385,8 +385,8 @@ RTN
385 385
 	
386 386
 	.ctlframe/x1 LDZ2 .ctlframe/y1 LDZ2 .ctlframe/x2 LDZ2 .ctlframe/y2 LDZ2 #01 ;line-rect JSR2
387 387
 	( env )
388
-	.ctlframe/x1 LDZ2 8+ .ctlframe/y1 LDZ2 8+ #22 ;env_txt ;draw-label JSR2
389
-	.ctlframe/x1 LDZ2 8+ .ctlframe/y1 LDZ2 #0010 ADD2
388
+	.ctlframe/x1 LDZ2 8++ .ctlframe/y1 LDZ2 8++ #22 ;env_txt ;draw-label JSR2
389
+	.ctlframe/x1 LDZ2 8++ .ctlframe/y1 LDZ2 #0010 ADD2
390 390
 		.Audio0/adsr .track/active LDZ #10 MUL ADD DEI #04 SFT
391 391
 		;draw-knob JSR2
392 392
 	.ctlframe/x1 LDZ2 #0018 ADD2 .ctlframe/y1 LDZ2 #0010 ADD2
... ...
@@ -399,7 +399,7 @@ RTN
399 399
 		.Audio0/adsr .track/active LDZ #10 MUL ADD #01 ADD DEI #0f AND
400 400
 		;draw-knob JSR2
401 401
 	( vol )
402
-	.ctlframe/x1 LDZ2 #0058 ADD2 .ctlframe/y1 LDZ2 8+ #22 ;vol_txt ;draw-label JSR2
402
+	.ctlframe/x1 LDZ2 #0058 ADD2 .ctlframe/y1 LDZ2 8++ #22 ;vol_txt ;draw-label JSR2
403 403
 	.ctlframe/x1 LDZ2 #0058 ADD2 .ctlframe/y1 LDZ2 #0010 ADD2
404 404
 		.Audio0/volume .track/active LDZ #10 MUL ADD DEI #04 SFT
405 405
 	;draw-knob/force JSR2
... ...
@@ -422,10 +422,10 @@ RTN
422 422
 @draw-channels
423 423
 	
424 424
 	.chnframe/x1 LDZ2 .chnframe/y1 LDZ2 .chnframe/x2 LDZ2 .chnframe/y2 LDZ2 #01 ;line-rect JSR2
425
-	.chnframe/x1 LDZ2 8+ .chnframe/y1 LDZ2 8+ #21 .track/active LDZ #00 EQU #07 MUL ADD ;ch1_txt ;draw-label JSR2
426
-	.chnframe/x1 LDZ2 8+ .chnframe/y1 LDZ2 #0010 ADD2 #21 .track/active LDZ #01 EQU #07 MUL ADD ;ch2_txt ;draw-label JSR2
427
-	.chnframe/x1 LDZ2 8+ .chnframe/y1 LDZ2 #0018 ADD2 #21 .track/active LDZ #02 EQU #07 MUL ADD ;ch3_txt ;draw-label JSR2
428
-	.chnframe/x1 LDZ2 8+ .chnframe/y1 LDZ2 #0020 ADD2 #21 .track/active LDZ #03 EQU #07 MUL ADD ;ch4_txt ;draw-label JSR2
425
+	.chnframe/x1 LDZ2 8++ .chnframe/y1 LDZ2 8++ #21 .track/active LDZ #00 EQU #07 MUL ADD ;ch1_txt ;draw-label JSR2
426
+	.chnframe/x1 LDZ2 8++ .chnframe/y1 LDZ2 #0010 ADD2 #21 .track/active LDZ #01 EQU #07 MUL ADD ;ch2_txt ;draw-label JSR2
427
+	.chnframe/x1 LDZ2 8++ .chnframe/y1 LDZ2 #0018 ADD2 #21 .track/active LDZ #02 EQU #07 MUL ADD ;ch3_txt ;draw-label JSR2
428
+	.chnframe/x1 LDZ2 8++ .chnframe/y1 LDZ2 #0020 ADD2 #21 .track/active LDZ #03 EQU #07 MUL ADD ;ch4_txt ;draw-label JSR2
429 429
 
430 430
 RTN
431 431
 
... ...
@@ -453,9 +453,9 @@ RTN
453 453
 	( load ) .label/addr STZ2 .label/color STZ .Screen/y DEO2 .Screen/x DEO2
454 454
 	.label/addr LDZ2
455 455
 	&loop
456
-		( draw ) DUP2 LDA #00 SWP 8* ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/color DEO
456
+		( draw ) DUP2 LDA #00 SWP 8** ;font ADD2 .Screen/addr DEO2 .label/color LDZ .Screen/color DEO
457 457
 		( incr ) ++
458
-		( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
458
+		( incr ) .Screen/x DEI2 8++ .Screen/x DEO2
459 459
 		DUP2 LDA ,&loop JCN
460 460
 	POP2
461 461