/[projet1]/public/atari/tools/MOULINEX/MOULINEG.S
Defence Force logotype

Contents of /public/atari/tools/MOULINEX/MOULINEG.S

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1389 - (show annotations)
Tue Mar 7 19:16:33 2017 UTC (2 years, 6 months ago) by dbug
File size: 89467 byte(s)
Added Moulinex, old tool to convert MOD files to LOW format and vice versa
1 opt w-,o+,d+,m+
2 nombre_de_notes_geres=37
3 fin_ech = 800
4 rsreset * par rapport a ,tailein
5 lenghtins rs.l 1 *0
6 volumein rs.w 1 *4
7 debbou rs.l 1 *6
8 offset_finbou rs.l 1 *10
9 indic_surplus rs.w 1
10
11 ************************ ici toutes les macros de mon prg
12 * kelkes macro ....
13 ye macro
14 move.b (a2)+,(a3)+
15 bne.s .\@
16 move.b #$20,-1(a3)
17 .\@
18 endm
19
20 recuptext macro
21 moveq #\1-1,d0
22 .\@
23 move.b (a0)+,d1
24 beq.s .\@@
25 cmp.b #"@",d1
26 beq.s .\@@
27 move.b d1,(a1)+
28 dbra d0,.\@
29 bra.s .\@@@
30 .\@@
31 move.b #"_",(a1)+
32 dbra d0,.\@@
33 .\@@@
34 endm
35
36 atake macro
37 tst.l d3
38 bmi.s .\@@
39 cmp.b #"@",d0
40 beq.s .\@@@@@@@@@@@@@@@@@@@
41 tst.b d0
42 bne.s .\@@@@@@@@@@@@@@@@@@@@
43 .\@@@@@@@@@@@@@@@@@@@
44 moveq #-1,d3
45 bra.s .\@@
46 .\@@@@@@@@@@@@@@@@@@@@
47 cmp.b #"_",d0
48 beq.s .\@@
49 cmp.b #" ",d0
50 beq.s .\@@
51 cmp.b #"0",d0
52 blt.s .\@@
53 cmp.b #"9",d0
54 bgt.s .\@
55 sub.b #"0",d0
56 and.l #$f,d0
57 bra.s .\@@@@
58 .\@
59 cmp.b #"f",d0
60 bgt.s .\@@
61 cmp.b #"a",d0
62 blt.s .\@@@
63 sub.b #"a"-10,d0
64 and.l #$f,d0
65 bra.s .\@@@@
66 .\@@@
67 cmp.b #"F",d0
68 bgt.s .\@@
69 cmp.b #"A",d0
70 blt.s .\@@
71 sub.b #"A"-10,d0
72 and.l #$f,d0
73 bra.s .\@@@@
74 .\@@
75 moveq #-1,d0
76 .\@@@@
77 endm
78
79 take macro
80 move.b (a2)+,d0
81 cmp.b #$ff,d0
82 beq.s .\@
83 move d0,d1
84 lsr #4,d0
85 and #$f,d0
86 and #$f,d1
87 move.b (a3,d0.w),(a0)+
88 move.b (a3,d1.w),(a0)+
89 bra .\@@
90 .\@
91 move.b #"_",(a0)+
92 move.b #"_",(a0)+
93 .\@@
94 endm
95
96 dtake macro
97 move.b (a2)+,d0
98 move d0,d1
99 lsr #4,d0
100 and #$f,d0
101 and #$f,d1
102 move.b (a3,d0.w),(a0)+
103 move.b (a3,d1.w),(a0)+
104 endm
105
106 dtakea macro
107 move d7,d0
108 lsr #8,d0
109 move d0,d1
110 lsr #4,d0
111 and #$f,d0
112 and #$f,d1
113 move.b (a3,d0.w),(a0)+
114 move.b (a3,d1.w),(a0)+
115 move d7,d0
116 move d0,d1
117 lsr #4,d0
118 and #$f,d0
119 and #$f,d1
120 move.b (a3,d0.w),(a0)+
121 move.b (a3,d1.w),(a0)+
122 endm
123
124 dtakea1 macro
125 move d7,d1
126 lsr #4,d7
127 and #$f,d7
128 and #$f,d1
129 move.b (a3,d7.w),(a0)+
130 move.b (a3,d1.w),(a0)+
131 endm
132
133 dtakeb macro
134 move d7,d0
135 lsr #8,d0
136 move d0,d1
137 lsr #4,d0
138 and #$f,d0
139 and #$f,d1
140 move.b (a3,d0.w),(a1)+
141 move.b (a3,d1.w),(a1)+
142 move d7,d0
143 move d0,d1
144 lsr #4,d0
145 and #$f,d0
146 and #$f,d1
147 move.b (a3,d0.w),(a1)+
148 move.b (a3,d1.w),(a1)+
149 endm
150
151 dtakeb1 macro
152 move d7,d1
153 lsr #4,d7
154 and #$f,d7
155 and #$f,d1
156 move.b (a3,d7.w),(a1)+
157 move.b (a3,d1.w),(a1)+
158 endm
159
160
161 dtakec macro
162 swap d7
163 move d7,d0
164 lsr #8,d0
165 move d0,d1
166 lsr #4,d0
167 and #$f,d0
168 and #$f,d1
169 move.b (a3,d0.w),(a1)+
170 move.b (a3,d1.w),(a1)+
171 move d7,d0
172 move d0,d1
173 lsr #4,d0
174 and #$f,d0
175 and #$f,d1
176 move.b (a3,d0.w),(a1)+
177 move.b (a3,d1.w),(a1)+
178 swap d7
179 move d7,d0
180 lsr #8,d0
181 move d0,d1
182 lsr #4,d0
183 and #$f,d0
184 and #$f,d1
185 move.b (a3,d0.w),(a1)+
186 move.b (a3,d1.w),(a1)+
187 move d7,d0
188 move d0,d1
189 lsr #4,d0
190 and #$f,d0
191 and #$f,d1
192 move.b (a3,d0.w),(a1)+
193 move.b (a3,d1.w),(a1)+
194 endm
195
196
197 take1 macro
198 move.b (a2)+,d0
199 cmp.b #$ff,d0
200 beq.s .\@
201 and #$f,d0
202 move.b (a3,d0.w),(a0)+
203 bra .\@@
204 .\@
205 move.b #"_",(a0)+
206 .\@@
207 endm
208
209 macsplit macro
210 moveq #-1,d2
211 move.b (a0)+,d0
212 atake
213 tst.l d0
214 bmi.s .\@@@@@
215 moveq #0,d2
216 move d0,d2
217 .\@@@@@
218 move.b (a0)+,d0
219 atake
220 tst.l d0
221 bmi.s .\@@@@@@@
222 tst.l d2
223 bmi.s .\@@@@@@
224 lsl #4,d2
225 or.b d0,d2
226 bra.s .\@@@@@@@
227 .\@@@@@@
228 moveq #0,d2
229 move d0,d2
230 .\@@@@@@@
231 move.b d2,(a2)+
232 endm
233
234 macsplit1 macro
235 move.b (a0)+,d0
236 atake
237 move.b d0,(a2)+
238 endm
239
240
241 macsplit2 macro
242 moveq #-1,d2
243
244 move.b (a0)+,d0
245 atake
246 tst.l d0
247 bmi.s .\@@@@@
248 moveq #0,d2
249 move d0,d2
250 .\@@@@@
251
252 move.b (a0)+,d0
253 atake
254 tst.l d0
255 bmi.s .\@@@@@@@
256 tst.l d2
257 bmi.s .\@@@@@@
258 lsl #4,d2
259 or.b d0,d2
260 bra.s .\@@@@@@@
261 .\@@@@@@
262 moveq #0,d2
263 move d0,d2
264 .\@@@@@@@
265
266 move.b (a0)+,d0
267 atake
268 tst.l d0
269 bmi.s .\@@@@@@@@@
270 tst.l d2
271 bmi.s .\@@@@@@@@
272 lsl #4,d2
273 or.b d0,d2
274 bra.s .\@@@@@@@@@
275 .\@@@@@@@@
276 moveq #0,d2
277 move d0,d2
278 .\@@@@@@@@@
279
280 move.b (a0)+,d0
281 atake
282 tst.l d0
283 bmi.s .\@@@@@@@@@@@
284 tst.l d2
285 bmi.s .\@@@@@@@@@@
286 lsl #4,d2
287 or.b d0,d2
288 bra.s .\@@@@@@@@@@@
289 .\@@@@@@@@@@
290 moveq #0,d2
291 move d0,d2
292 .\@@@@@@@@@@@
293 move d2,(a2)+
294 endm
295
296
297
298
299
300
301 ***** donc a cette version je m'arrange pour ne pas effacer ce k'il
302 ***** y a en haut , ok ?
303 ***** les form_dial #0 et frm_dial #3 ont ete carement supprime , merci !
304 c_partiiii
305 ********************************************************************
306 ******************* programm de moulinexisation ****************
307 ************************ by mit format .mod to format .low
308 include moulinex.hs
309 * format a l'instant du .low:
310 * 4 octets "OLLH"
311 * 2 octets nb de d'instruments (x)
312 * instruments
313 * 1 octet nb d'octets ds la partition des patern (x) ki suit
314 * x chaque octet represente le numero du pattern a jouer
315 * mais sur l'adr paire suivante...
316 * pattern puis sample... la pas de probleme.....
317
318
319
320 include gemmacro.s
321
322 move.l 4(a7),a3
323 lea a7_pile,a7
324 move.l $c(a3),d0
325 add.l $14(a3),d0
326 add.l $1c(a3),d0
327 add.l #5000,d0
328 move.l d0,-(sp)
329 move.l a3,-(sp)
330 clr.w -(sp)
331 move.w #$4a,-(sp)
332 trap #1
333 lea 12(sp),sp
334
335 dc.w $a000
336 move.l 4(a1),a1
337 move.l 76(a1),adr_car
338
339 * pour la destination pour l'instant c'est un buffer
340 * mais il faut veiller a ce ke cela soit un malloc par la suite... merci !
341 lea buffersource,a1
342 move.l a1,dest
343
344
345
346 appl_init
347 move.w d0,ap_id
348
349
350 move #3,-(sp)
351 trap #14
352 addq.l #2,sp
353 move.l d0,ecran
354
355 * inti path
356 move #$19,-(sp)
357 trap #1
358 addq.l #2,sp
359 moveq #"A",d1
360 add.b d0,d1
361 move.b d1,path
362
363 *
364 move #4,-(sp)
365 trap #14
366 addq.l #2,sp
367 cmp.b #1,d0
368 beq.s .moyenne_reso
369 form_alert #1,#only_moyenne
370 bra.s .autre_reso
371 .moyenne_reso
372 jsr debut
373 .autre_reso
374
375 rsrc_free
376
377 appl_exit
378
379 clr -(sp)
380 trap #1
381
382 debut
383 pea instore
384 move #$26,-(sp)
385 trap #14
386 addq.l #6,sp
387
388 * init
389
390 * frequence de depart 10.24 Khz
391 move #freq3,frequence_choisi
392 move.b #60,gum
393
394 graf_mouse #0,#0
395 rsrc_load #nom_rsc
396 tst int_out
397 bne.s ok_load_rsc
398 form_alert #1,#pas_rsc
399 bra fin_tout_court
400 ok_load_rsc
401 rsrc_gaddr #0,#form1
402 move.l addr_out,adr_form1
403
404 rsrc_gaddr #0,#form2
405 move.l addr_out,adr_form2
406
407 rsrc_gaddr #0,#form3
408 move.l addr_out,adr_form3
409
410 rsrc_gaddr #0,#form4
411 move.l addr_out,adr_form4
412
413 rsrc_gaddr #0,#form5
414 move.l addr_out,adr_form5
415
416 fuck
417 rsrc_gaddr #0,#midi
418 move.l addr_out,adr_midi
419
420 rsrc_gaddr #0,#pitch
421 move.l addr_out,adr_pitch
422
423 rsrc_gaddr #0,#speed
424 move.l addr_out,adr_speed
425
426 rsrc_gaddr #0,#pattern
427 move.l addr_out,adr_pattern
428
429 rsrc_gaddr #0,#instrum
430 move.l addr_out,adr_instrum
431
432 rsrc_gaddr #0,#midi_rec
433 move.l addr_out,adr_midi_rec
434
435 rsrc_gaddr #0,#first_loading
436 move.l addr_out,adr_first_loading
437
438 rsrc_gaddr #0,#saving
439 move.l addr_out,adr_saving
440
441 rsrc_gaddr #0,#saving_mod
442 move.l addr_out,adr_saving_mod
443
444
445
446 form_center adr_form1
447 move int_out+2,x_center
448 move int_out+4,y_center
449 move int_out+6,w_center
450 move int_out+8,h_center
451
452 form_center adr_form2
453 move int_out+2,xcenter0
454 move int_out+4,ycenter0
455 move int_out+6,wcenter0
456 move int_out+8,hcenter0
457
458 form_center adr_form3
459 move int_out+2,xcenter1
460 move int_out+4,ycenter1
461 move int_out+6,wcenter1
462 move int_out+8,hcenter1
463
464 form_center adr_form4
465 move int_out+2,xcenter2
466 move int_out+4,ycenter2
467 move int_out+6,wcenter2
468 move int_out+8,hcenter2
469
470 form_center adr_form5
471 move int_out+2,xcenter3
472 move int_out+4,ycenter3
473 move int_out+6,wcenter3
474 move int_out+8,hcenter3
475
476 form_center adr_instrum
477 move int_out+2,xcenter_instrum
478 move int_out+4,ycenter_instrum
479 move int_out+6,wcenter_instrum
480 move int_out+8,hcenter_instrum
481
482 form_center adr_pitch
483 move int_out+2,xcenter_pitch
484 move int_out+4,ycenter_pitch
485 move int_out+6,wcenter_pitch
486 move int_out+8,hcenter_pitch
487
488 form_center adr_midi
489 move int_out+2,xcenter_midi
490 move int_out+4,ycenter_midi
491 move int_out+6,wcenter_midi
492 move int_out+8,hcenter_midi
493
494 form_center adr_speed
495 move int_out+2,xcenter_speed
496 move int_out+4,ycenter_speed
497 move int_out+6,wcenter_speed
498 move int_out+8,hcenter_speed
499
500 form_center adr_pattern
501 move int_out+2,xcenter_pattern
502 move int_out+4,ycenter_pattern
503 move int_out+6,wcenter_pattern
504 move int_out+8,hcenter_pattern
505
506 form_center adr_midi_rec
507 move int_out+2,xcenter_midi_rec
508 move int_out+4,ycenter_midi_rec
509 move int_out+6,wcenter_midi_rec
510 move int_out+8,hcenter_midi_rec
511
512 form_center adr_first_loading
513 move int_out+2,xcenter_first_loading
514 move int_out+4,ycenter_first_loading
515 move int_out+6,wcenter_first_loading
516 move int_out+8,hcenter_first_loading
517
518 form_center adr_saving
519 move int_out+2,xcenter_saving
520 move int_out+4,ycenter_saving
521 move int_out+6,wcenter_saving
522 move int_out+8,hcenter_saving
523
524 form_center adr_saving_mod
525 move int_out+2,xcenter_saving_mod
526 move int_out+4,ycenter_saving_mod
527 move int_out+6,wcenter_saving_mod
528 move int_out+8,hcenter_saving_mod
529
530 form_alert #1,#presente
531
532 jsr utilitaire
533
534 fin_tout_court
535 pea restore
536 move #$26,-(sp)
537 trap #14
538 addq.l #6,sp
539 rts
540
541 instore
542 move.b $484.w,s_484
543 move.b #%0010,$484.w
544 movem.l $ffff8240.w,d0-d7
545 movem.l d0-a7,s_color
546 move.l #$7770007,$ffff8240.w
547 move.l #$0700000,$ffff8244.w
548 ; move.l usp,a0
549 ; move.l a0,s_usp
550 ; lea usp_pile,a0
551 ; move.l a0,usp
552 rts
553
554 restore
555 movem.l s_color,d0-d7
556 movem.l d0-d7,$ffff8240.w
557 move.b s_484,$484.w
558 ; move.l s_usp,a0
559 ; move.l a0,usp
560 rts
561
562
563
564 **********************************************************************
565 *************** *****************************************
566 *************** utilitaire *****************************************
567 *************** *****************************************
568 **********************************************************************
569 utilitaire
570 lea path+1,a0
571 move.b #":",(a0)+
572 move.b #"\",(a0)+
573 move.b #"*",(a0)+
574 move.b #".",(a0)+
575
576
577 boucle
578 * init pour pattern rec
579 clr pos_rec_start
580 clr pos_rec_end
581 lea pos,a0
582 move #15000-1,d0
583 moveq #0,d1
584 .cle_pos
585 move d1,(a0)+
586 addq #1,d1
587 dbra d0,.cle_pos
588 * init des noms des instruments !
589 lea name_instruments,a0
590 move #256-1,d0
591 .clearname_instruments
592 rept 5
593 move.l #"____",(a0)+
594 endr
595 move #"__",(a0)+
596 dbra d0,.clearname_instruments
597
598 * init la table pitch split
599 lea table_pitch_split,a0
600 move #(128*4)-1,d0
601 .eff_pitch
602 move.l #-1,(a0)+
603 dbra d0,.eff_pitch
604 * init la table des track par defaut pour le pitch split
605 lea def_track,a0
606 rept 4
607 move.b #1,(a0)+
608 move.b #2,(a0)+
609 move.b #3,(a0)+
610 move.b #4,(a0)+
611 endr
612 lea def_note,a0
613 moveq #15,d0
614 .ec_note
615 move.b #$30,(a0)+
616 dbra d0,.ec_note
617 lea def_note_off,a0
618 moveq #15,d0
619 .ec_note_off
620 move.b #1,(a0)+
621 dbra d0,.ec_note_off
622
623 bsr eff_ecran
624 clr auto?
625
626 form_alert #2,#opt0
627 move int_out,d0
628 cmp #1,d0
629 beq fin_nana
630 move d0,type_fichier
631
632 lea path+1,a0
633 move.b #":",(a0)+
634 move.b #"\",(a0)+
635 move.b #"*",(a0)+
636 move.b #".",(a0)+
637
638 lea type,a1
639 cmp #2,type_fichier
640 bne.s .c_bien_mod
641 addq.l #4,a1
642 .c_bien_mod
643 rept 3
644 move.b (a1)+,(a0)+
645 endr
646 clr.b (a0)+
647 clr.b sourcename
648
649 fsel_input #path,#sourcename
650 tst int_out+2
651 beq boucle
652 bsr eff_ecran
653 bsr clean_path
654 * a0 :path
655 * a1 :name
656 lea path,a0
657 lea sourcename,a1
658 bsr open
659 tst d0
660 beq.s .no_probleme
661 form_alert #1,#pas_file
662 bra boucle
663 .no_probleme
664
665
666 **** ok ici on se separe celon le type du fichier a loader
667 cmp #2,type_fichier
668 beq .pas_low_load
669 * lit un .low
670 move.l dest,a1
671 moveq #4,d1
672 bsr read
673 move.l dest,a1
674 cmp.l #"OLLH",(a1)
675 beq.s .ko_low
676 bsr close
677 form_alert #1,#pas_fichier_low
678 bra boucle
679 .ko_low
680 move.l #"OLLH",type_mod
681
682 lea vitesse,a1 * vitesse par defaut
683 moveq #2,d1
684 bsr read
685 lea musicname,a1 * nom de la musique
686 moveq #20,d1
687 bsr read
688 lea nb_in,a1 * nb_in
689 moveq #2,d1
690 bsr read
691 lea nb_pos,a1 * nb_pos
692 moveq #2,d1
693 bsr read
694 lea pos_restart,a1 * pos_restart
695 moveq #2,d1
696 bsr read
697 lea nb_pat,a1 * nb_pat
698 moveq #2,d1
699 bsr read
700 ********* affich tt ce ki est neccessaire
701 move.l adr_first_loading,a2
702 lea tabc(pc),a3
703 move.l 12+fmusname*24(a2),a0
704 addq.l #7,a0
705 lea musicname,a1
706 moveq #19,d0
707 .rut1
708 move.b (a1)+,(a0)+
709 dbra d0,.rut1
710 move nb_in,d7
711 move.l 12+finstrument*24(a2),a0
712 lea 21(a0),a0
713 dtakea
714 move nb_pos,d7
715 move.l 12+fposition*24(a2),a0
716 lea 19(a0),a0
717 dtakea
718 move pos_restart,d7
719 move.l 12+frestart*24(a2),a0
720 lea 20-10(a0),a0
721 dtakea
722 move nb_pat,d7
723 move.l 12+fpattern*24(a2),a0
724 lea 18(a0),a0
725 dtakea
726 move vitesse,d7
727 move.l 12+fspeed*24(a2),a0
728 lea 17(a0),a0
729 dtakea1
730
731 form_dial #1,#0,#0,#0,#0,xcenter_first_loading,ycenter_first_loading,wcenter_first_loading,hcenter_first_loading
732 objc_draw adr_first_loading,#0,#4,xcenter_first_loading,ycenter_first_loading,wcenter_first_loading,hcenter_first_loading
733 lea name_instruments,a1 * noms de tts les instruments ...
734 moveq #0,d1
735 move nb_in,d1
736 mulu #22,d1
737 bsr read
738 lea tailein,a1 * informations sur tts les instruments
739 moveq #0,d1
740 move nb_in,d1
741 lsl.l #4,d1
742 bsr read
743
744 lea pos,a1 * ttes les positions du module
745 moveq #0,d1
746 move nb_pos,d1
747 lsl.l d1
748 bsr read
749 move.l dest,a1 * load tts les patterns du module...
750 moveq #0,d1
751 move nb_pat,d1
752 lsl.l #8,d1
753 lsl.l #2,d1
754 move.l a1,a2
755 adda.l d1,a2
756 *
757 move.l a2,-(sp)
758 bsr read
759 move.l (sp)+,a1
760 *
761 bra fin_loading_partoch *on rejoind l'autre a un endroit fini
762 .pas_low_load
763 move #6,vitesse
764
765 * lit nom de la zik
766 lea musicname,a1
767 moveq #20,d1
768 * a1 :adr ou loader
769 * d1 : nd d'octet loader
770 bsr read
771
772 move.l adr_first_loading,a0
773 move.l 12+24*fmusname(a0),a2
774 addq.l #7,a2
775 lea musicname,a1
776 moveq #19,d0
777 .lop
778 tst.b (a1)
779 bne.s .oklop
780 move.b #$20,(a1)
781 .oklop
782 move.b (a1)+,(a2)+
783 dbra d0,.lop
784
785 * cherche en seek $438 si music ancienne ou non
786 movem.l d0-a6,-(sp)
787 move #$438,d1
788 bsr seek
789 lea type_mod,a1
790 moveq #4,d1
791 bsr read
792 movem.l (sp)+,d0-a6
793
794 moveq #15,d7
795 cmp.l #"M.K.",type_mod
796 bne.s .anc
797 moveq #31,d7
798 .anc
799 move d7,nb_in
800 *
801 movem.l d0-a6,-(sp)
802 move.l adr_first_loading,a0
803 lea tabc(pc),a3
804 move.l 12+finstrument*24(a0),a0
805 lea 21(a0),a0
806 dtakea
807 form_dial #1,#0,#0,#0,#0,xcenter_first_loading,ycenter_first_loading,wcenter_first_loading,hcenter_first_loading
808 objc_draw adr_first_loading,#0,#1,xcenter_first_loading,ycenter_first_loading,wcenter_first_loading,hcenter_first_loading
809 movem.l (sp)+,d0-a6
810
811
812 movem.l d0-a6,-(sp)
813 moveq #20,d1
814 bsr seek
815 movem.l (sp)+,d0-a6
816 *
817 * phase 2 : instruments infos
818 phase_2
819 subq #1,d7
820
821 lea tailein,a2
822 lea name_instruments,a3
823 moveq #0,d2 * init max size
824 ******
825 movem.l d0-a6,-(sp)
826 lea buff_boulo,a1
827 moveq #0,d1
828 move nb_in,d1
829 mulu #30,d1
830 bsr read
831 movem.l (sp)+,d0-a6
832 ******
833 lea buff_boulo,a0
834 .lopin
835 *
836 move 22+6(a0),d0
837 cmp #1,d0
838 bne.s .bof
839 clr 22+6(a0)
840 .bof
841 *
842 moveq #0,d0 * lenght
843 move 22(a0),d0
844 add.l d0,d0
845 cmp.l d2,d0
846 ble.s .pas_plus
847 move.l d0,d2
848 .pas_plus
849 move.l d0,lenghtins(a2)
850 *
851 move 24(a0),volumein(a2) * volume
852 *
853 moveq #0,d0 * offset debut boucle
854 move 26(a0),d0
855 add.l d0,d0
856 move.l d0,debbou(a2)
857 *
858 moveq #0,d0 * offset fin boucle par arpport au precedant
859 move 28(a0),d0
860 add.l d0,d0
861 move.l d0,offset_finbou(a2)
862 *
863 clr.w indic_surplus(a2)
864 *
865 x set 0
866 rept 11
867 move.w x(a0),(a3)+
868 x set x+2
869 endr
870 lea 16(a2),a2
871 lea 30(a0),a0
872 dbra d7,.lopin
873
874 phase
875 ******
876 movem.l d0-a6,-(sp)
877 lea buff_boulo,a1
878 move.l #130,d1
879 bsr read
880 movem.l (sp)+,d0-a6
881 ******
882 lea buff_boulo,a0
883 moveq #0,d7
884 move.b (a0)+,d7
885 cmp #128,d7
886 ble.s .ok_pos_lo
887 move #128,d7
888 .ok_pos_lo
889 tst d7
890 bgt.s .ok_pos_hi
891 moveq #1,d7
892 .ok_pos_hi
893 move d7,nb_pos
894
895 moveq #0,d7
896 move.b (a0)+,d7
897 cmp #128,d7
898 ble.s .ok_pos_restart_lo
899 move #127,d7
900 .ok_pos_restart_lo
901 tst d7
902 bgt.s .ok_pos_restart_hi
903 moveq #0,d7
904 .ok_pos_restart_hi
905
906 cmp nb_pos,d7
907 ble.s .oka_y_restart_pos
908 moveq #0,d7
909 .oka_y_restart_pos
910 move d7,pos_restart
911
912 move nb_pos,d7
913 subq #1,d7
914 moveq #0,d0
915 moveq #0,d1
916 move.b (a0),d1
917 lea pos,a1
918 .loppos
919 move.b (a0)+,d0
920 cmp.b d1,d0
921 ble.s .loppos1
922 move d0,d1
923 .loppos1
924 move d0,(a1)+
925 dbra d7,.loppos
926 move d1,nb_pat
927 addq #1,nb_pat
928
929 ******
930 movem.l d0-a6,-(sp)
931 cmp.l #"M.K.",type_mod
932 bne.s .phase_4
933 moveq #4,d1
934 bsr rseek
935 .phase_4
936 * affiche n pattern et n partition
937 move.l adr_first_loading,a2
938 lea tabc(pc),a3
939 move nb_pos,d7
940 move.l 12+fposition*24(a2),a0
941 lea 19(a0),a0
942 dtakea
943 move pos_restart,d7
944 move.l 12+frestart*24(a2),a0
945 lea 20(a0),a0
946 dtakea
947 move nb_pat,d7
948 move.l 12+fpattern*24(a2),a0
949 lea 18(a0),a0
950 dtakea
951 move vitesse,d7
952 move.l 12+fspeed*24(a2),a0
953 lea 17(a0),a0
954 dtakea1
955 objc_draw adr_first_loading,#fpat,#4,xcenter_first_loading,ycenter_first_loading,wcenter_first_loading,hcenter_first_loading
956 movem.l (sp)+,d0-a6
957 ******
958
959 phase_4
960 move.l dest,a1
961 .contenu_pattern
962 ******
963 movem.l d0-a6,-(sp)
964 lea buff_boulo,a1
965 move.l #256*4,d1
966 bsr read
967 movem.l (sp)+,d0-a6
968 ******
969 lea buff_boulo,a2
970 move #255,d0
971
972 .contenu0
973 move.b (a2),d2
974 moveq #0,d3
975
976 btst #4,d2
977 beq.s .pas_plus_16
978 moveq #16,d3
979 .pas_plus_16
980
981 move (a2)+,d2
982 and #$3ff,d2
983 lea table,a6
984 moveq #0,d7
985 .chstable
986 addq #1,d7
987 cmp #39,d7
988 beq.s .aille
989 cmp (a6)+,d2
990 bne.s .chstable
991 bra.s .okaille
992 .aille
993 bsr close
994 form_alert #1,#pas_mod
995 bra boucle
996 .okaille
997 subq #1,D7
998
999 move.b (a2),d2
1000 lsr.b #4,d2
1001 add.b d3,d2
1002
1003 move.b (a2)+,d3
1004 move.b (a2)+,d6
1005
1006 and #$f,d3
1007 *d2 num inst
1008 *d7 num note
1009 move.b d3,(a1)+ * commande
1010 move.b d6,(a1)+ * parametre
1011 move.b d2,(a1)+ * n d'intrument
1012 move.b d7,(a1)+ * note
1013 dbra d0,.contenu0
1014 dbra d1,.contenu_pattern
1015
1016 fin_loading_partoch
1017
1018 *************** gestion midi (si oui)
1019 movem.l d1-a6,-(sp)
1020 form_alert #1,#mess_midi
1021 movem.l (sp)+,d1-a6
1022 cmp #1,d0
1023 beq.s .pas_midi
1024 movem.l d1-a6,-(sp)
1025 bsr midi_routs
1026 movem.l (sp)+,d1-a6
1027 .pas_midi
1028 ******************* fin gestion midi
1029
1030 movem.l d0-a6,-(sp)
1031 objc_draw adr_form1,#form1,#3,x_center,y_center,w_center,h_center
1032 movem.l (sp)+,d0-a6
1033
1034 move nb_in,d7
1035 subq #1,d7
1036 **
1037 moveq #1,d0
1038 lea tailein,a0
1039 lea name_instruments,a6
1040 move.l a1,adr_sample
1041 .loop
1042 move.l a0,info_instrument
1043 move.l a1,reste
1044 move d0,num_ins
1045 **
1046 move.l lenghtins(a0),d1
1047
1048 tst.b indic_surplus(a0)
1049 beq.s .pas_plus
1050 add.l #fin_ech,d1
1051 .pas_plus
1052
1053 tst.l d1
1054 beq .loom5
1055
1056 movem.l d0-a6,-(sp)
1057 move.l adr_form1,a2
1058 lea tabc,a3
1059 * a6 adr name instrument
1060 move.l 12+24*nameint(a2),a1
1061 move.l (a1),a1
1062 lea name_instruments,a6
1063 moveq #0,d7
1064 move num_ins,d7
1065 subq #1,d7
1066 mulu #22,d7
1067 adda d7,a6
1068 moveq #21,d7
1069 .rut
1070 move.b (a6)+,(a1)+
1071 dbra d7,.rut
1072 move d0,d7 * numero instrument
1073 move.l 12+24*numeroin(a2),a1
1074 addq.l #3,a1
1075 dtakeb
1076 move.l 12+24*numeromax(a2),a1 * nb maximum d'intrument existant
1077 move nb_in,d7
1078 addq.l #5,a1
1079 dtakeb
1080 move volumein(a0),d7 * volume par default
1081 move.l 12+24*volume_inf(a2),a1
1082 move.l (a1),a1
1083 dtakeb1
1084 move.l lenghtins(a0),d7 * lenght_instrument
1085 move.l 12+24*taillein(a2),a1
1086 addq.l #8,a1
1087 dtakec
1088 move.l debbou(a0),d7 * debut loop
1089 move.l 12+24*offsetin(a2),a1
1090 lea 14(a1),a1
1091 dtakec
1092 move.l offset_finbou(a0),d7 * lenght loop
1093 move.l 12+24*lenghtloo(a2),a1
1094 lea 15(a1),a1
1095 dtakec
1096 objc_draw adr_form1,#finfoin,#2,x_center,y_center,w_center,h_center
1097 movem.l (sp)+,d0-a6
1098 .loom01
1099 **
1100 move.l reste,a1
1101 movem.l d0-a6,-(sp)
1102 bsr read
1103 movem.l (sp)+,d0-a6
1104 **
1105 tst.b indic_surplus(a0)
1106 bmi.s .lopoa
1107 .lopo
1108 eor.b #$80,(a1)+
1109 subq.l #1,d1
1110 bne.s .lopo
1111 .lopoa
1112 **
1113 tst auto?
1114 bne .loom1
1115 .loom
1116 movem.l d0-a6,-(sp)
1117 bsr gestion_instrument
1118 movem.l (sp)+,d0-a6
1119
1120 movem.l d0-a6,-(sp)
1121 * recupere le nom
1122 lea name_instruments,a1
1123 moveq #0,d0
1124 move num_ins,d0
1125 subq #1,d0
1126 mulu #22,d0
1127 adda d0,a1
1128 move.l adr_form1,a0
1129 move.l 12+24*nameint(a0),a0
1130 move.l (a0),a0
1131 recuptext 22
1132 * recupere le volume par defaut
1133 move.l adr_form1,a1
1134 move.l 12+volume_inf*24(a1),a0
1135 move.l (a0),a0
1136 move.l info_instrument,a2
1137 addq.l #1+volumein,a2
1138 macsplit
1139
1140 movem.l (sp)+,d0-a6
1141 tst retour
1142 bne .loom
1143 .loom1
1144
1145 tst.b indic_surplus(a0)
1146 bmi.s .pas_bou
1147
1148 * fin d'echantillon ...
1149 move.l reste,a1
1150 tst.l offset_finbou(a0) * existe t'il une boucle ?
1151 bne.s .bou
1152
1153 adda.l lenghtins(a0),a1
1154 tst.l lenghtins(a0)
1155 beq.s .loom4 * taille de l'echantillon = 0??
1156 move #fin_ech-1,d1
1157 .loomcop
1158 move.b #$7f,(a1)+
1159 dbra d1,.loomcop
1160 bra.s .pas_bou
1161
1162 .bou
1163 * attention je coupe la fin (a ne faire ke pour un point low)
1164 move.l debbou(a0),d1
1165 add.l offset_finbou(a0),d1
1166 move.l d1,lenghtins(a0)
1167 * snif , voila , c fait ......
1168
1169
1170 move.l a1,a2
1171 adda.l debbou(a0),a2
1172 adda.l lenghtins(a0),a1
1173 move.l a2,a3
1174 move.l offset_finbou(a0),d2
1175 move #fin_ech-1,d1
1176 .bou1
1177 move.b (a3)+,(a1)+
1178 subq.l #1,d2
1179 bne.s .gr_bou
1180 move.l offset_finbou(a0),d2
1181 move.l a2,a3
1182 .gr_bou
1183 dbra d1,.bou1
1184
1185 .pas_bou
1186 st indic_surplus(a0)
1187 add.l #fin_ech,reste
1188 .loom4
1189 addq #1,d0
1190 move.l reste,a1
1191 adda.l lenghtins(a0),a1
1192 lea 16(a0),a0
1193 lea 22(a6),a6
1194 dbra d7,.loop
1195 bra .loom6
1196 .loom5 * unikement pour les echantillon ki ont la chance d'etre nul
1197 *
1198 move nb_in,d1
1199 sub d0,d1
1200 beq .der_instrument * c'etait le dernier instrument a traiter
1201 subq #1,d1
1202 move d1,d2
1203 move.l a0,a2
1204 move.l a6,a3
1205 .recop_sur
1206 rept 4
1207 move.l 16(a2),(a2)+ * info (tailein)
1208 endr
1209 rept 5
1210 move.l 22(a3),(a3)+
1211 endr
1212 move 22(a3),(a3)+
1213 dbra d2,.recop_sur
1214 .der_instrument
1215 subq #1,nb_in
1216 move.l reste,a1
1217 dbra d7,.loop
1218
1219 .loom6
1220 movem.l d0-a6,-(sp) * fini on ferme le 1er fichier ....
1221 bsr close
1222 movem.l (sp)+,d0-a6
1223
1224
1225 ****** phase final , le saving ......
1226 sub.l dest,a1
1227 move.l a1,taile
1228
1229 movem.l d1-a6,-(sp)
1230 lea sourcename,a0
1231 lea destname,a1
1232 rept 7
1233 move.w (a0)+,(a1)+
1234 endr
1235 form_alert #1,#opt2
1236 movem.l (sp)+,d1-a6
1237
1238 cmp #2,d0
1239 beq boucle
1240 * movem.l (sp)+,d0-a6
1241 .save_boucle
1242 movem.l d0-a6,-(sp)
1243 ** apres inserer parametre de sauvegarde ici !
1244 **** biensur en affichage ........
1245 bsr eff_ecran
1246 * converti les infos
1247 move.l adr_saving,a2
1248 lea tabc(pc),a3
1249 move.l 12+smusname*24(a2),a0
1250 move.l (a0),a0
1251 lea musicname,a1
1252 moveq #19,d0
1253 .rut1
1254 move.b (a1)+,(a0)+
1255 dbra d0,.rut1
1256 *
1257 move nb_in,d7
1258 move.l 12+sin*24(a2),a0
1259 lea 21(a0),a0
1260 dtakea
1261 *
1262 move nb_pos,d7
1263 move.l 12+spos*24(a2),a0
1264 lea 19(a0),a0
1265 dtakea
1266 *
1267 move pos_restart,d7
1268 move.l 12+srestart*24(a2),a0
1269 move.l (a0),a0
1270 dtakea
1271 *
1272 move nb_pat,d7
1273 move.l 12+spat*24(a2),a0
1274 lea 18(a0),a0
1275 dtakea
1276 *
1277 move vitesse,d7
1278 move.l 12+sspeed*24(a2),a0
1279 move.l (a0),a0
1280 dtakea1
1281 *
1282 moveq #0,d7
1283 move nb_pat,d7
1284 lsl.l #8,d7
1285 lsl.l #2,d7
1286 move.l 12+24*slenpat(a2),a1
1287 lea 19+8(a1),a1
1288 bsr change_dec
1289 *
1290 moveq #0,d7
1291 move nb_pos,d7
1292 lsl.l d7
1293 move.l 12+24*slenpos(a2),a1
1294 lea 20+8(a1),a1
1295 bsr change_dec
1296 *
1297 moveq #0,d7
1298 lea tailein,a0
1299 move nb_in,d0
1300 subq #1,d0
1301 .b_aj_ins
1302 add.l lenghtins(a0),d7
1303 lea 16(a0),a0
1304 dbra d0,.b_aj_ins
1305 move.l 12+24*slenin(a2),a1
1306 lea 18+8(a1),a1
1307 bsr change_dec
1308 *
1309 move.l taile,d7 * pattern+sample instrument
1310 add.l #4+2+20+6,d7 * index+nom de la mus+nb_in+nb_pos_nb_pat
1311 moveq #0,d0
1312 move nb_in,d0
1313 mulu #22,d0
1314 add.l d0,d7
1315 moveq #0,d0
1316 move nb_in,d0
1317 lsl.l #4,d0
1318 add.l d0,d7
1319 moveq #0,d0
1320 move nb_pos,d0
1321 lsl.l d0
1322 add.l d0,d7
1323 move.l 12+24*stotallen(a2),a1
1324 lea 16+8(a1),a1
1325 bsr change_dec
1326 form_dial #1,#0,#0,#0,#0,xcenter_saving,ycenter_saving,wcenter_saving,hcenter_saving
1327 objc_draw adr_saving,#0,#4,xcenter_saving,ycenter_saving,wcenter_saving,hcenter_saving
1328 * gestion du tout
1329 form_do adr_saving,#0 *saving
1330
1331 movem.l d0-a6,-(sp)
1332 mulu #24,d0
1333 move.l adr_saving,a0
1334 bclr #0,11(a0,d0.w)
1335 * recupere nom de la musique et vitesse par default
1336 move.l adr_saving,a2
1337 move.l 12+24*smusname(a2),a0
1338 move.l (a0),a0
1339 lea musicname,a1
1340 recuptext 20
1341 move.l 12+24*sspeed(a2),a0
1342 move.l (a0),a0
1343 lea vitesse+1,a2
1344 macsplit
1345
1346 move.l adr_saving,a2
1347 move.l 12+24*srestart(a2),a0
1348 move.l (a0),a0
1349 lea pos_restart,a2
1350 macsplit2
1351 movem.l (sp)+,d0-a6
1352
1353 cmp #cancel_save_mod,d0
1354 bne.s .pas_boucle
1355 movem.l (sp)+,d0-a6
1356 bra boucle
1357 .pas_boucle
1358 ******
1359 lea type,a0
1360 move.l adr_saving,a2
1361 btst #0,11+24*bslow(a2)
1362 bne.s .loip
1363 addq.l #4,a0
1364 .loip
1365 lea destname,a1
1366 .loip1
1367 cmp.b #".",(a1)
1368 beq.s .loip2
1369 tst.b (a1)+
1370 bne.s .loip1
1371 move.b #".",-(a1)
1372 .loip2
1373 addq.l #1,a1
1374 move.b (a0)+,(a1)+
1375 move.b (a0)+,(a1)+
1376 move.b (a0)+,(a1)+
1377 clr.b (a1)+
1378 subq.l #3,a0
1379 lea path,a1
1380 .bouli
1381 tst.b (a1)+
1382 bne.s .bouli
1383 .boulia
1384 cmp.b #"\",-(a1)
1385 bne.s .boulia
1386 addq.l #1,a1
1387 move.b #"*",(a1)+
1388 move.b #".",(a1)+
1389 move.b (a0)+,(a1)+
1390 move.b (a0)+,(a1)+
1391 move.b (a0)+,(a1)+
1392 clr.b (a1)+
1393 fsel_input #path,#destname
1394 tst int_out+2
1395 beq .save_boucle
1396 *
1397 bsr eff_ecran
1398 form_dial #1,#0,#0,#0,#0,xcenter_saving,ycenter_saving,wcenter_saving,hcenter_saving
1399 objc_draw adr_saving,#0,#3,xcenter_saving,ycenter_saving,wcenter_saving,hcenter_saving
1400 movem.l (sp)+,d0-a6
1401
1402 bsr clean_path
1403
1404 * path : a0
1405 * name : a1
1406 lea path,a0
1407 lea destname,a1
1408 bsr open_save
1409 tst d0
1410 bmi .problemesave
1411
1412 * reconnaissance du format ...
1413 move.l adr_saving,a2
1414 btst #0,11+24*bslow(a2)
1415 bne .save_low
1416
1417 * save obligatiorement .mod
1418 bsr eff_ecran
1419 objc_draw adr_saving_mod,#0,#3,xcenter_saving_mod,ycenter_saving_mod,wcenter_saving_mod,hcenter_saving_mod
1420 move #12,line_indic
1421 sf error?
1422
1423 * car pour l'instant pas d'autre options !!
1424 cmp #31,nb_in
1425 ble.s .ok_in_save
1426 lea trop_instrument,a0
1427 bsr insere
1428 .ok_in_save
1429
1430
1431 *** bon on fait comme si tt etait correct ...
1432 movem.l d0-a6,-(sp)
1433 lea operation1,a0
1434 bsr recopie
1435 objc_draw adr_saving_mod,#trace_operation,#2,xcenter_saving_mod,ycenter_saving_mod,wcenter_saving_mod,hcenter_saving_mod
1436 movem.l (sp)+,d0-a6
1437
1438 lea musicname,a2 * sauve le nom de la musique
1439 move.l #20,taile_write
1440 bsr write_save
1441 cmp.l taile_write,d0
1442 bne .problemesave
1443
1444
1445 movem.l d0-a6,-(sp)
1446 lea operation2,a0
1447 bsr recopie
1448 objc_draw adr_saving_mod,#trace_operation,#2,xcenter_saving_mod,ycenter_saving_mod,wcenter_saving_mod,hcenter_saving_mod
1449 movem.l (sp)+,d0-a6
1450
1451 move nb_in,d7
1452 cmp #31,d7
1453 ble.s .ok_int
1454 moveq #31,d7
1455 .ok_int
1456 moveq #0,d6
1457 lea name_instruments,a0 * noms de tts les instruments
1458 lea tailein,a1 * ttes les informations concernant tts les instruments
1459 subq #1,d7
1460 .bou_save_instrume
1461
1462 addq #1,d6
1463 lea buff_boulo,a2
1464 moveq #21,d0
1465 .rec_om
1466 move.b (a0)+,(a2)+
1467 dbra d0,.rec_om
1468 move.l lenghtins(a1),d0
1469
1470 cmp.l #65535,d0
1471 ble.s .ok_taille
1472 move.l a0,-(sp)
1473 move.l a1,-(sp)
1474 lea instrument_too_long,a0
1475 lea n_instrument_too_long,a1
1476 bsr insere_change
1477 move.l (sp)+,a1
1478 move.l (sp)+,a0
1479 .ok_taille
1480
1481 lsr.l d0
1482 move d0,(a2)+
1483 move volumein(a1),(a2)+
1484 move.l debbou(a1),d0
1485 lsr.l d0
1486 move d0,(a2)+
1487 move.l offset_finbou(a1),d0
1488 lsr.l d0
1489 tst d0
1490 bne .boule_exist
1491 move #1,d0
1492 .boule_exist
1493 move d0,(a2)+
1494 lea 16(a1),a1
1495 movem.l a0/a1/d7/d6,-(sp)
1496 *
1497 lea buff_boulo,a2
1498 move.l #30,taile_write
1499 bsr write_save
1500 cmp.l taile_write,d0
1501 bne .problemesave
1502 *
1503 movem.l (sp)+,a0/a1/d7/d6
1504 dbra d7,.bou_save_instrume
1505
1506 move nb_in,d0
1507 moveq #15,d1
1508 sf type_format
1509 cmp d1,d0
1510 ble.s .ancien_format
1511 moveq #31,d1
1512 st type_format
1513 cmp #31,d0
1514 ble.s .ancien_format
1515 moveq #31,d0
1516 .ancien_format
1517 sub d0,d1
1518 beq .ok_rien_a_clearer
1519 subq #1,d1
1520 lea buff_boulo,a2
1521 moveq #13,d0
1522 .clear_buf_boulo
1523 clr (a2)+
1524 dbra d0,.clear_buf_boulo
1525 move #1,(a2)+
1526 .clearer
1527 move d1,-(sp)
1528 *
1529 lea buff_boulo,a2
1530 move.l #30,taile_write
1531 bsr write_save
1532 cmp.l taile_write,d0
1533 bne .problemesave
1534 *
1535 move (sp)+,d1
1536 dbra d1,.clearer
1537 .ok_rien_a_clearer
1538
1539
1540 movem.l d0-a6,-(sp)
1541 lea operation3,a0
1542 bsr recopie
1543 objc_draw adr_saving_mod,#trace_operation,#2,xcenter_saving_mod,ycenter_saving_mod,wcenter_saving_mod,hcenter_saving_mod
1544 movem.l (sp)+,d0-a6
1545
1546 * maintenant sauve les positions
1547 lea buff_boulo,a1
1548 lea pos,a0
1549 move nb_pos,d0
1550 cmp #128,d0
1551 ble.s .ok_posl
1552 moveq #128,d0
1553 .ok_posl
1554 move.b d0,(a1)+
1555
1556 move pos_restart,d0
1557 cmp #128,d0
1558 ble.s .ok_posl_restart
1559 moveq #128,d0
1560 movem.l d0-a6,-(sp)
1561 lea position_restart_too_big,a0
1562 bsr insere
1563 movem.l (sp)+,d0-a6
1564 .ok_posl_restart
1565 move.b d0,(a1)+
1566
1567 move.l a1,a2
1568 moveq #127,d7
1569 .clear_pos
1570 clr.b (a2)+
1571 dbra d7,.clear_pos
1572
1573 move nb_pos,d7
1574 beq.s .pas_clear_pos
1575 cmp #128,d7
1576 ble.s .ok_nb_pos
1577 move.l a0,-(sp)
1578 lea too_many_pos,a0
1579 bsr insere
1580 move.l (sp)+,a0
1581 moveq #128,d7
1582 .ok_nb_pos
1583 subq #1,d7
1584 .decode_pos
1585 move (a0)+,d0
1586 move.b d0,(a1)+
1587 dbra d7,.decode_pos
1588 .pas_clear_pos
1589 *
1590 lea buff_boulo,a2
1591 move.l #130,taile_write
1592 bsr write_save
1593 cmp.l taile_write,d0
1594 bne .problemesave
1595
1596 tst.b type_format
1597 beq .pas_nouveau_format
1598 lea type_mod,a2
1599 move.l #"M.K.",(a2) * save indicateur de fichier .mod
1600 move.l #4,taile_write
1601 bsr write_save
1602 cmp.l taile_write,d0
1603 bne .problemesave
1604 .pas_nouveau_format
1605
1606
1607 movem.l d0-a6,-(sp)
1608 lea operation4,a0
1609 bsr recopie
1610 objc_draw adr_saving_mod,#trace_operation,#2,xcenter_saving_mod,ycenter_saving_mod,wcenter_saving_mod,hcenter_saving_mod
1611 movem.l (sp)+,d0-a6
1612
1613 * sauve maintenant les patterns
1614 move nb_pat,d7
1615 cmp #256,d7
1616 ble.s .ok_patl
1617 move #256,d7
1618 move.l a0,-(sp)
1619 lea too_many_pattern,a0
1620 bsr insere
1621 move.l (sp)+,a0
1622 .ok_patl
1623 subq #1,d7
1624 move.l dest,a1
1625 moveq #0,d5
1626 sf indic_pat_error
1627 .boucle_sauve_pattern
1628 lea buff_boulo,a2
1629 lea table,a3
1630 move #255,d6
1631 .decode_patterns
1632 clr.l (a2)
1633 * cmp.b #9,(a1)
1634 * bne.s .okau
1635 * illegal
1636 *.okau
1637 move.b (a1)+,2(a2) * commande
1638 move.b (a1)+,3(a2) * parametre
1639 moveq #0,d0
1640 move.b (a1)+,d0 * numero d'instrument
1641
1642 cmp #31,D0
1643 ble.s .ok_intl
1644 st indic_pat_error
1645 moveq #31,d0
1646 .ok_intl
1647
1648 cmp #16,d0
1649 blt.s .ok_num_inf
1650 sub #16,d0
1651 bset #4,(a2)
1652 .ok_num_inf
1653
1654 lsl #4,d0
1655 or.b d0,2(a2)
1656 moveq #0,d0
1657 move.b (a1)+,d0 * numero de note (0-39)
1658 add d0,d0
1659 move (a3,d0.w),d0
1660 and #$3ff,d0
1661 or d0,(a2)
1662 addq.l #4,a2
1663 dbra d6,.decode_patterns
1664 *
1665 tst.b indic_pat_error
1666 beq.s .yeah_pat
1667 movem.l a0/a1/d6,-(sp)
1668 lea inst_sup_31_pat,a0
1669 lea ninst_sup_31_pat,a1
1670 move d5,d6
1671 bsr insere_change
1672 sf indic_pat_error
1673 movem.l (sp)+,a0/a1/d6
1674 .yeah_pat
1675 *
1676 addq #1,d5
1677 movem.l d7/a0-a6/d5,-(sp)
1678 lea buff_boulo,a2
1679 move.l #256*4,taile_write
1680 bsr write_save
1681 movem.l (sp)+,d7/a0-a6/d5
1682 cmp.l taile_write,d0
1683 bne .problemesave
1684 *
1685 dbra d7,.boucle_sauve_pattern
1686
1687
1688 movem.l d0-a6,-(sp)
1689 lea operation5,a0
1690 bsr recopie
1691 objc_draw adr_saving_mod,#trace_operation,#2,xcenter_saving_mod,ycenter_saving_mod,wcenter_saving_mod,hcenter_saving_mod
1692 movem.l (sp)+,d0-a6
1693
1694 * maintenant sauve les instruments
1695 lea tailein,a0
1696 move.l adr_sample,a1
1697 move nb_in,d7
1698 cmp #31,d7
1699 ble.s .ok_intm
1700 moveq #31,d7
1701 .ok_intm
1702 subq #1,d7
1703 .sauve_instrument_mod
1704 *
1705 movem.l d7/a0-a6,-(sp)
1706 move.l a1,a2
1707 move.l lenghtins(a0),d0
1708 and #$fffe,d0
1709 move.l d0,taile_write
1710 beq.s .fin_eora
1711 subq #1,d0
1712 .eora
1713 eor.b #$80,(a1)+
1714 dbra d0,.eora
1715 .fin_eora
1716 bsr write_save
1717 movem.l (sp)+,d7/a0-a6
1718 cmp.l taile_write,d0
1719 bne .problemesave
1720 *
1721 add.l lenghtins(a0),a1
1722 add.l #fin_ech,a1
1723 lea 16(a0),a0
1724 dbra d7,.sauve_instrument_mod
1725 tst.b error?
1726 beq .fin_save
1727 bsr close_write
1728 *
1729 form_alert #1,#file_not_good
1730 *
1731 bra .save_boucle
1732 .save_low
1733 * a2 ou il faut sauve , taile_write ce k'il fo sauver
1734
1735 lea type_mod,a2
1736 move.l #"OLLH",(a2) * save indicateur de fichier .low
1737 move.l #4,taile_write
1738 bsr write_save
1739 cmp.l taile_write,d0
1740 bne .problemesave
1741
1742 lea vitesse,a2 * vitesse par defaut
1743 move.l #2,taile_write
1744 bsr write_save
1745 cmp.l taile_write,d0
1746 bne .problemesave
1747
1748 lea musicname,a2 * sauve le nom de la musique
1749 move.l #20,taile_write
1750 bsr write_save
1751 cmp.l taile_write,d0
1752 bne .problemesave
1753
1754 lea nb_in,a2 * nb_in
1755 move.l #2,taile_write
1756 bsr write_save
1757 cmp.l taile_write,d0
1758 bne .problemesave
1759
1760 lea nb_pos,a2 * nb_pos
1761 move.l #2,taile_write
1762 bsr write_save
1763 cmp.l taile_write,d0
1764 bne .problemesave
1765
1766 lea pos_restart,a2 * pos_restart
1767 move.l #2,taile_write
1768 bsr write_save
1769 cmp.l taile_write,d0
1770 bne .problemesave
1771
1772 lea nb_pat,a2 * nb_pat
1773 move.l #2,taile_write
1774 bsr write_save
1775 cmp.l taile_write,d0
1776 bne .problemesave
1777
1778 lea name_instruments,a2 * noms de tts les instruments
1779 moveq #0,d1
1780 move nb_in,d1
1781 mulu #22,d1
1782 move.l d1,taile_write
1783 bsr write_save
1784 cmp.l taile_write,d0
1785 bne.s .problemesave
1786
1787 lea tailein,a2 * ttes les informations concernant tts les instruments
1788 moveq #0,d1
1789 move nb_in,d1
1790 lsl.l #4,d1
1791 move.l d1,taile_write
1792 bsr write_save
1793 cmp.l taile_write,d0
1794 bne.s .problemesave
1795
1796 lea pos,a2 * sauve ttes les positions du module
1797 moveq #0,d1
1798 move nb_pos,d1
1799 lsl.l d1
1800 move.l d1,taile_write
1801 bsr write_save
1802 cmp.l taile_write,d0
1803 bne.s .problemesave
1804
1805 move.l dest,a2 * sauve les patterns ainsi ke les sample des instruments
1806 move.l taile,taile_write
1807 bsr write_save
1808 cmp.l taile_write,d0
1809 bne.s .problemesave
1810
1811 .fin_save
1812 bsr close_write
1813 bra boucle
1814
1815 .problemesave
1816 form_alert #1,#merde_kan_sauve
1817 bsr close_write
1818 bra .save_boucle
1819 fin_nana
1820 rts
1821
1822
1823 *************************************************************
1824 ************* routine anexe !!! ****************************
1825 *************************************************************
1826
1827 change_dec
1828 movem.l d0-a6,-(sp)
1829 move.l d7,d0
1830 moveq #7,d7
1831 .lop
1832 move.l d0,d1
1833 divu #10,d1
1834 moveq #0,d0
1835 move d1,d0
1836 swap d1
1837 move.b .tabc(pc,d1.w),-(a1)
1838 dbra d7,.lop
1839 movem.l (sp)+,d0-a6
1840 rts
1841 .tabc dc.b "0123456789"
1842
1843
1844
1845
1846 gestion_instrument
1847 ;
1848 bsr write
1849 ;
1850 movem.l d0-a6,-(sp)
1851
1852 form_do adr_form1,#0 *form1
1853
1854 move int_out,obj
1855 movem.l (sp)+,d0-a6
1856
1857 * on cleen le retour
1858 clr retour
1859 ;
1860 ********************* ici on gere toutes les options **********
1861 movem.l d0-a6,-(sp)
1862 move obj,d0
1863 st auto?
1864 cmp #end_instr,d0
1865 beq .fin_options
1866 clr auto?
1867 cmp #next_instr,d0
1868 beq .fin_options
1869 st retour
1870 * bien ici ttes les options
1871 cmp #hear,d0
1872 bne .pas_hear
1873
1874 *
1875 form_dial #1,#0,#0,#0,#0,xcenter0,ycenter0,wcenter0,hcenter0
1876 *
1877 objc_draw adr_form2,#0,#2,xcenter0,ycenter0,wcenter0,hcenter0
1878 *
1879 pea replay
1880 move #$26,-(sp)
1881 trap #14
1882 addq.l #6,sp
1883 *
1884 *
1885 form_dial #2,#0,#0,#0,#0,xcenter0,ycenter0,wcenter0,hcenter0
1886 *
1887
1888 bra .fin_options
1889 .pas_hear
1890 cmp #filter,d0
1891 bne .pas_filter
1892 movem.l d0-a6,-(sp)
1893 *
1894 form_dial #1,#0,#0,#0,#0,xcenter1,ycenter1,wcenter1,hcenter1
1895 *
1896 objc_draw adr_form3,#0,#2,xcenter1,ycenter1,wcenter1,hcenter1
1897 *
1898 movem.l (sp)+,d0-a6
1899
1900 moveq #0,d0
1901 move.l (a0),d0
1902 subq #3,d0
1903 addq.l #2,a1
1904 .filtre
1905 * formule : filtre passe-bas de Tchebychev d'ondulation en bande pass‚e de 1dB
1906 *
1907 * k_b=[1.103*k(a1)+(0.1747521275*(fe/fc)+0.05066059182*(fe^2/fc^2)*k-1(a1)-0.02533029591*(fe^2/fc^2)*k-2(a1)]
1908 *
1909 * k(a1)=1/(1.103+0.1747521275*(fe/fc)+0.02533029591*(fe^2/fc^2))*k_b
1910 *
1911 * Autres filtres : Butterworth, Legendre, Lagrange, Hermite
1912 *
1913 * fe : fr‚quence d'‚chantillonnage ; fc : fr‚quence de coupure (<fe/2)
1914 *
1915 *
1916
1917 * fe^2/fc^2
1918 * OPERATION DECIMAL , 9 DECIMAL :
1919
1920 addc macro *d0,d1 + d2,d3
1921 move.l d0,-(sp)
1922 move.l d1,-(sp)
1923 add.l d0,d2
1924 move.l #max,d0
1925 sub.l d2,d0
1926 add.l d0,d3
1927 cmp.l #max,d3
1928 ble.s .\@
1929 sub.l #max,d3
1930 addq.l #1,d2
1931 .\@
1932 move.l (sp)+,d1
1933 move.l (sp)+,d0
1934 endm
1935
1936 subc macro *d2,d3 - d0,d1
1937 move.l d0,-(sp)
1938 move.l d1,-(sp)
1939 sub.l d0,d2
1940 move.l #max,d0
1941 sub.l d2,d0
1942 sub.l d0,d3
1943 bpl.s .\@
1944 add.l #max,d3
1945 subq.l #1,d2
1946 .\@
1947 move.l (sp)+,d1
1948 move.l (sp)+,d0
1949 endm
1950
1951 mulc macro *d0,d1*d2,d3
1952 movem.l d0/d1/d4/d5,-(sp)
1953 move.l #max,d4
1954 sub.l d1,d4
1955 move.l d4,d1
1956 move.l #max,d4
1957 sub.l d3,d4
1958 move.l d4,d3
1959 *
1960 * a,b*c,d = a*d + c*b + a*c + b*d = a*(d,c) + d*(c,b)
1961
1962 ***********************
1963 movem.l d0-d3,-(sp)
1964 ;;; = a*(d,c)
1965 move.l d0,d4
1966 move.l d2,d0
1967 move.l d3,d1
1968 bne.s .\@
1969 moveq #0,d2
1970 moveq #0,d3
1971 bra.s .\@@
1972 .\@
1973 *
1974 .\@@@
1975 addc
1976 subq.l #1,d4
1977 bne.s .\@@@
1978
1979 .\@@
1980 movem.l (sp)+,d0-d3
1981
1982 movem.l d2-d3,-(sp)
1983 **********************
1984 ; phase 2 : d*(c,b)
1985 move.l d3,d0
1986 move.l d1,d3
1987 ; 0,d0*(d2,d3) ==> (d0*d2)/10^9+(d0*d3)/10^18
1988
1989 ;(d0*d2)/10^9
1990 moveq #0,d4
1991 .\@@@@
1992 add.l d0,d3
1993 bcs .\@@@@@
1994 addq.l #1,d4
1995 .\@@@@@
1996 subq.l #1,d1
1997 bne.s .\@@@@
1998
1999
2000 * final
2001 movem.l (sp)+,d0-d1
2002 addc
2003
2004 movem.l (sp)+,d0/d1/d4/d5
2005 endm
2006
2007
2008
2009
2010
2011 mulc
2012 dbra d0,.filtre
2013 *
2014 movem.l d0-a6,-(sp)
2015 form_dial #2,#0,#0,#0,#0,xcenter1,ycenter1,wcenter1,hcenter1
2016 movem.l (sp)+,d0-a6
2017 bra .fin_options
2018 .pas_filter
2019
2020 cmp #sam,d0
2021 bne .pas_sample
2022 movem.l d0-a6,-(sp)
2023 form_dial #1,#0,#0,#0,#0,xcenter3,ycenter3,wcenter3,hcenter3
2024 objc_draw adr_form5,#0,#3,xcenter3,ycenter3,wcenter3,hcenter3
2025 form_do adr_form5,#0 *form5
2026 *
2027 pea digit
2028 move #$26,-(sp)
2029 trap #14
2030 addq.l #6,sp
2031 *
2032 form_dial #2,#0,#0,#0,#0,xcenter3,ycenter3,wcenter3,hcenter3
2033 movem.l (sp)+,d0-a6
2034 bra .fin_options
2035 .pas_sample
2036
2037 cmp #setfreq,d0
2038 bne .set_freq
2039 movem.l d0-a6,-(sp)
2040 form_dial #1,#0,#0,#0,#0,xcenter2,ycenter2,wcenter2,hcenter2
2041 objc_draw adr_form4,#0,#3,xcenter2,ycenter2,wcenter2,hcenter2
2042 form_do adr_form4,#0 *form4
2043 *
2044 move int_out,d0
2045 move.l adr_form4,a0
2046 move frequence_choisi,d4
2047 mulu #24,d4
2048 bclr #0,11(a0,d4.l)
2049 move d0,d4
2050 move d4,frequence_choisi
2051 mulu #24,d4
2052 bset #0,11(a0,d4.l)
2053 lea frequence,a0
2054 lea frequence1,a1
2055 .loop
2056 move.l (a1)+,d2
2057 move.l (a1)+,d3
2058 move.l (a0)+,d1
2059 cmp d0,d1
2060 bne.s .loop
2061 swap d1
2062 move.b d1,gum
2063 move.l d2,frequ1 * ca c debile pour l'instant ,
2064 move.l d3,frequ2 * voir filtre .........
2065 *
2066 form_dial #2,#0,#0,#0,#0,xcenter2,ycenter2,wcenter2,hcenter2
2067 movem.l (sp)+,d0-a6
2068
2069 bra .fin_options
2070 .set_freq
2071
2072
2073
2074
2075 .fin_options
2076
2077
2078 movem.l (sp)+,d0-a6
2079 *********** on a fini de gerer toutes les options ...........
2080 ;
2081 movem.l d0-a6,-(sp)
2082 objc_change adr_form1,obj,x_center,y_center,w_center,h_center,#0,#1,#0
2083 dc.w $a00a
2084 move.l ecran,a0
2085 lea (200-128)*160(a0),a0
2086 move #(128*160/4)-1,d0
2087 .lop
2088 clr.l (a0)+
2089 dbra d0,.lop
2090 dc.w $a009
2091 movem.l (sp)+,d0-a6
2092 rts
2093
2094 timer_bis
2095 move.l d0,-(sp)
2096 move.l a0,-(sp)
2097 tst oto
2098 bne .pas_sample
2099 move.l adr_replay,a0
2100 cmp.l fin_sample,a0
2101 bne.s .joue
2102 move #1,oto
2103 bra .pas_sample
2104 .joue
2105 moveq #0,d0
2106 move.b $fffb0001,d0
2107 tst oto1
2108 beq.s .paav
2109 move.b d0,(a0)+
2110 .paav
2111 move.l a0,adr_replay
2112 lsl #3,d0
2113 lea $ffff8800.w,a0
2114 move.l digi(pc,d0.w),(a0)
2115 move.l digi+4(pc,d0.w),d0
2116 movep.l d0,(a0)
2117 .pas_sample
2118 move.l (sp)+,a0
2119 move.l (sp)+,d0
2120 rte
2121
2122 timer
2123 move.l d0,-(sp)
2124 move.l a0,-(sp)
2125 move.l adr_replay,a0
2126 cmp.l fin_sample_bis,a0
2127 bne.s .joue
2128 move.l debut_boucle,a0
2129 move.l fin_boucle,fin_sample_bis
2130 .joue
2131 moveq #0,d0
2132 move.b (a0)+,d0
2133 move.l a0,adr_replay
2134 lsl #3,d0
2135 lea $ffff8800.w,a0
2136 move.l digi(pc,d0.w),(a0)
2137 move.l digi+4(pc,d0.w),d0
2138 movep.l d0,(a0)
2139 move.l (sp)+,a0
2140 move.l (sp)+,d0
2141 rte
2142 digi
2143 incbin digital.bin
2144 merdouille dc.w $8080
2145
2146 digit
2147 move.l reste,adr_replay
2148 move.l reste,d0
2149 add.l #65535,d0
2150 move.l d0,fin_sample
2151
2152 move.l $134.w,s_134
2153 ;
2154 move #$2700,sr
2155 move.b $fffffa07.w,s_mfp
2156 move.b $fffffa09.w,s_mfp+1
2157 move.b $fffffa19.w,s_mfp+2
2158 move.b $fffffa1f.w,s_mfp+3
2159 bset #5,$fffffa07.w
2160 bset #5,$fffffa13.w
2161 bclr #3,$fffffa17.w
2162 move.l #timer_bis,$134.w
2163 move.b #1,$fffffa19.w
2164 move.b gum,$fffffa1f.w
2165
2166 lea $ffff8800.w,a0
2167 move.l #00000000,(a0)
2168 move.l #01000000,(a0)
2169 move.l #02000000,(a0)
2170 move.l #03000000,(a0)
2171 move.l #04000000,(a0)
2172 move.l #05000000,(a0)
2173 move.l #06000000,(a0)
2174 move.b #7,(a0)
2175 move.b 2(a0),s_ym
2176 move.b #$ff,2(a0)
2177 clr oto
2178 clr oto1
2179 move #$2300,sr
2180 ;
2181 .loop
2182 move #7,-(sp)
2183 trap #1
2184 addq.l #2,sp
2185 cmp.b #" ",d0
2186 beq.s .sui
2187 cmp.b #"S",d0
2188 beq.s .ok
2189 cmp.b #"s",d0
2190 bne.s .loop
2191 .ok
2192 st oto1
2193 move #7,-(sp)
2194 trap #1
2195 addq.l #2,sp
2196 move.l info_instrument,a0
2197 move.l adr_replay,d0
2198 sub.l reste,d0
2199 move.l d0,(a0)
2200 clr.l 4+2(a0)
2201 clr.l 4+2+4(a0)
2202
2203 ;
2204 .sui
2205 move #$2700,sr
2206 move.b s_mfp,$fffffa07.w
2207 move.b s_mfp+1,$fffffa13.w
2208 move.b s_mfp+2,$fffffa19.w
2209 move.b s_mfp+3,$fffffa1f.w
2210 move.l s_134,$134.w
2211 lea $ffff8800.w,a0
2212 move.b #7,(a0)
2213 move.b s_ym,2(a0)
2214
2215 move #$2300,sr
2216 *
2217 rts
2218
2219 replay
2220 move.l info_instrument,a0
2221 move.l reste,debut_sample
2222 move.l reste,adr_replay
2223 move.l reste,debut_boucle
2224
2225 *lenghtins rs.l 1 *0
2226 *volumein rs.w 1 *4
2227 *debbou rs.l 1 *6
2228 *offset_finbou rs.l 1 *10
2229 *indic_surplus rs.w 1
2230
2231 move.l lenghtins(a0),d0
2232 add.l reste,d0
2233 move.l d0,fin_sample
2234 move.l d0,fin_sample_bis
2235
2236 move.l debbou(a0),d0
2237 add.l d0,debut_boucle
2238 move.l debut_boucle,fin_boucle
2239
2240 move.l offset_finbou(a0),d0
2241 add.l d0,fin_boucle
2242 move.l debut_boucle,d0
2243 cmp.l fin_boucle,d0
2244 bne.s .okli
2245 move.l #merdouille,debut_boucle
2246 move.l #merdouille+2,fin_boucle
2247 .okli
2248 move.l $134.w,s_134
2249 ;
2250 move #$2700,sr
2251 move.b $fffffa07.w,s_mfp
2252 move.b $fffffa09.w,s_mfp+1
2253 move.b $fffffa19.w,s_mfp+2
2254 move.b $fffffa1f.w,s_mfp+3
2255 bset #5,$fffffa07.w
2256 bset #5,$fffffa13.w
2257 bclr #3,$fffffa17.w
2258 move.l #timer,$134.w
2259 move.b #1,$fffffa19.w
2260 move.b gum,$fffffa1f.w
2261
2262 lea $ffff8800.w,a0
2263 move.l #00000000,(a0)
2264 move.l #01000000,(a0)
2265 move.l #02000000,(a0)
2266 move.l #03000000,(a0)
2267 move.l #04000000,(a0)
2268 move.l #05000000,(a0)
2269 move.l #06000000,(a0)
2270 move.b #7,(a0)
2271 move.b 2(a0),s_ym
2272 move.b #$ff,2(a0)
2273
2274 move #$2300,sr
2275 ;
2276 .bou
2277 move #7,-(sp)
2278 trap #1
2279 addq.l #2,sp
2280 cmp.b #"R",d0
2281 beq.s .pquit
2282 cmp.b #"r",d0
2283 bne.s .quit
2284 .pquit
2285 move.l debut_sample,adr_replay
2286 move.l fin_sample,fin_sample_bis
2287 bra.s .bou
2288 .quit
2289 ;
2290 move #$2700,sr
2291 move.b s_mfp,$fffffa07.w
2292 move.b s_mfp+1,$fffffa13.w
2293 move.b s_mfp+2,$fffffa19.w
2294 move.b s_mfp+3,$fffffa1f.w
2295 move.l s_134,$134.w
2296 lea $ffff8800.w,a0
2297 move.b #7,(a0)
2298 move.b s_ym,2(a0)
2299
2300 move #$2300,sr
2301 rts
2302
2303
2304 write
2305 movem.l d0-a6,-(sp)
2306 dc.w $a00a
2307 movem.l (sp)+,d0-a6
2308
2309 movem.l d0-a6,-(sp)
2310 move.l reste,a2
2311 move.l ecran,a1
2312 lea 160*(200-63)(a1),a1
2313
2314 move.l a1,a4
2315 moveq #-1,d6
2316 move #160/4-1,d5
2317 .lop
2318 move.l d6,(a4)+
2319 dbra d5,.lop
2320
2321 moveq #0,d6
2322 move.l (a0),d6
2323 divu #640,d6
2324 move d6,div
2325 move #639,d6
2326 moveq #0,d5
2327 clr plot
2328 trace
2329 ;
2330 move d5,d4
2331 lsr #4,d4
2332 lsl #2,d4
2333 lea 0(a1,d4.w),a3
2334 move d5,d4
2335 and #$f,d4
2336 moveq #15,d3
2337 sub d4,d3
2338 *
2339 moveq #0,d2
2340
2341 move.b (a2),d2
2342 eor.b #$80,d2
2343 adda div,a2
2344 ext.w d2
2345 asr d2
2346 move d2,d0
2347 move plot,d4
2348 sub d2,d4
2349 move d2,plot
2350 move d4,d2
2351
2352 mulu #160,d0
2353 lea 2(a3,d0.w),a3
2354
2355 move.l a3,a4
2356 move d2,d0
2357 bpl.s .pos
2358 neg d0
2359 .pos
2360 beq.s .pas_sub
2361 subq #1,d0
2362 .pas_sub
2363 *
2364 move (a4),d4
2365 bset d3,d4
2366 move d4,(a4)
2367 *
2368 tst d2
2369 bmi.s .mi
2370 lea 160(a4),a4
2371 bra.s .ma
2372 .mi
2373 lea -160(a4),a4
2374 .ma
2375 *
2376 dbra d0,.pas_sub
2377 ;
2378 addq #1,d5
2379 dbra d6,trace
2380
2381 movem.l (sp)+,d0-a6
2382
2383 movem.l d0-a6,-(sp)
2384 dc.w $a009
2385 movem.l (sp)+,d0-a6
2386
2387 rts
2388 ;
2389
2390 choix
2391 moveq #3,d4
2392 .choi
2393 lsl.l #8,d3
2394 rept 4
2395 lsl d1
2396 roxl d2
2397 endr
2398 and #$f,d2
2399 move.b .ch(pc,d2.w),d3
2400 dbra d4,.choi
2401 move.l d3,d1
2402 rts
2403 .ch dc.b "0123456789ABCDEF"
2404
2405 print
2406 movem.l d0-a6,-(sp)
2407 dc.w $a00a
2408 movem.l (sp)+,d0-a6
2409
2410 movem.l d0-a6,-(sp)
2411 move.l adr_car,a1
2412 move.l ecran,a2
2413
2414 * d0=x , d1=y
2415 mulu #160,d1
2416 move d0,d2
2417 and #$fffe,d0
2418 add d0,d0
2419 and #1,d2
2420 add d2,d0
2421
2422 .loop
2423 moveq #0,d7
2424 move.b (a0)+,d7
2425 beq.s .end
2426 * options
2427 cmp #1,d7
2428 bne.s .pas_saut
2429 add #160*8,d1
2430 moveq #0,d0
2431 bra.s .loop
2432 .pas_saut
2433 cmp #2,d7
2434 bne.s .pas_efface
2435 moveq #0,d0
2436 move.l ecran,a3
2437 move.l a3,a2
2438 move #(32000/4)-1,d7
2439 .eff
2440 clr.l (a3)+
2441 dbra d7,.eff
2442 bra.s .loop
2443 .pas_efface
2444 * fini options
2445
2446 * print
2447 move d1,d5
2448 add d0,d5
2449 moveq #7,d6
2450 .print
2451 move.b (a1,d7.w),(a2,d5.w)
2452 move.b (a1,d7.w),2(a2,d5.w)
2453 add #256,d7
2454 add #160,d5
2455 dbra d6,.print
2456 * ajout
2457 cmp #160-3,d0
2458 blt .aj_loop0
2459 moveq #0,d0
2460 add #160*8,d1
2461 bra .loop
2462 .aj_loop0
2463 btst #0,d0
2464 beq.s .aj0
2465 addq #2,d0
2466 .aj0
2467 addq #1,d0
2468 *
2469 bra.s .loop
2470 .end
2471 movem.l (sp)+,d0-a6
2472
2473 movem.l d0-a6,-(sp)
2474 dc.w $a009
2475 movem.l (sp)+,d0-a6
2476 rts
2477
2478 waitkey
2479 move #7,-(sp)
2480 trap #1
2481 addq.l #2,sp
2482 rts
2483
2484 clean_path
2485 lea path,a0
2486 .lop
2487 tst.b (a0)+
2488 bne.s .lop
2489 .lop1
2490 cmp.b #"\",-(a0)
2491 bne.s .lop1
2492 clr.b 1(a0)
2493 rts
2494
2495 open
2496 * a0 :path
2497 * a1 :name
2498
2499 move.l a0,-(sp)
2500
2501 moveq #0,d0
2502 move.b (a0),d0
2503 cmp.b #"a",d0
2504 blt.s .okli
2505 sub.b #32,d0
2506 .okli
2507 sub.b #65,d0
2508 movem.l d0-a6,-(sp)
2509 move d0,-(sp)
2510 move #$e,-(sp)
2511 trap #1
2512 addq.l #4,sp
2513 movem.l (sp)+,d0-a6
2514
2515 .verifie
2516 tst.b (a0)+
2517 bne.s .verifie
2518 .verifie1
2519 cmp.b #"\",-(a0)
2520 bne.s .verifie1
2521 clr.b 1(a0)
2522 move.l (sp)+,a0
2523
2524 move.l a1,-(sp)
2525 move.l a0,-(sp)
2526 move #$3b,-(sp)
2527 trap #1
2528 addq.l #6,sp
2529 move.l (sp),a1
2530
2531 move #0,-(sp)
2532 move.l a1,-(sp)
2533 move #$4e,-(sp)
2534 trap #1
2535 addq.l #8,sp
2536
2537 move.l (sp)+,a1
2538 tst d0
2539 bne .pas_fichier
2540 move #0,-(sp)
2541 move.l a1,-(sp)
2542 move #$3d,-(sp)
2543 trap #1
2544 addq.l #8,sp
2545 tst d0
2546 bmi .pas_fichier
2547 move d0,handle_disk
2548 moveq #0,d0
2549 .pas_fichier
2550 rts
2551
2552 seek
2553 move #0,-(sp) * relatif au debut du fichier
2554 move handle_disk,-(sp)
2555 move.l d1,-(sp)
2556 move #$42,-(sp)
2557 trap #1
2558 lea 10(sp),sp
2559 rts
2560
2561 rseek
2562 move #1,-(sp) * relatif a la position actuelle du pointeur ds le fichier
2563 move handle_disk,-(sp)
2564 move.l d1,-(sp)
2565 move #$42,-(sp)
2566 trap #1
2567 lea 10(sp),sp
2568 rts
2569
2570 read
2571 move.l a1,-(sp)
2572 move.l d1,-(sp)
2573 move handle_disk,-(sp)
2574 move #$3f,-(sp)
2575 trap #1
2576 lea 12(sp),sp
2577 rts
2578
2579 close
2580 move handle_disk,-(sp)
2581 move #$3e,-(sp)
2582 trap #1
2583 addq.l #4,sp
2584 rts
2585
2586 save_as
2587 bsr open_save
2588 tst d0
2589 bmi .pas_save
2590 bsr write_save
2591 cmp.l taile_write,d0
2592 bne.s .pas_save
2593 bsr close_write
2594 moveq #0,d0
2595 .pas_save
2596 rts
2597
2598
2599 open_save
2600 * path : a0
2601 * name : a1
2602 * lieu ou il faut sauver : a2
2603 move.l a0,-(sp)
2604
2605 moveq #0,d0
2606 move.b (a0),d0
2607 cmp.b #"a",d0
2608 blt.s .okli
2609 sub.b #32,d0
2610 .okli
2611 sub.b #65,d0
2612 movem.l d0-a6,-(sp)
2613 move d0,-(sp)
2614 move #$e,-(sp)
2615 trap #1
2616 addq.l #4,sp
2617 movem.l (sp)+,d0-a6
2618
2619 .verifie
2620 tst.b (a0)+
2621 bne.s .verifie
2622 .verifie1
2623 cmp.b #"\",-(a0)
2624 bne.s .verifie1
2625 clr.b 1(a0)
2626 move.l (sp)+,a0
2627 move.l a2,-(sp)
2628 move.l a1,-(sp)
2629 move.l a0,-(sp)
2630 move #$3b,-(sp)
2631 trap #1
2632 addq.l #6,sp
2633 move.l (sp)+,a1
2634 move #0,-(sp)
2635 move.l a1,-(sp)
2636 move #$3c,-(sp)
2637 trap #1
2638 addq.l #8,sp
2639 move.l (sp)+,a2
2640 move d0,handle_disk_write
2641 rts
2642
2643 write_save
2644 move.l a2,-(sp)
2645 move.l taile_write,-(sp)
2646 move handle_disk_write,-(sp)
2647 move #$40,-(sp)
2648 trap #1
2649 lea 12(sp),sp
2650 rts
2651
2652 close_write
2653 move handle_disk_write,-(sp)
2654 move #$3e,-(sp)
2655 trap #1
2656 addq.l #4,sp
2657 rts
2658
2659 eff_ecran
2660 * eff l'ecran
2661 movem.l d0-a6,-(sp)
2662 dc.w $a00a
2663 pea disp
2664 move #9,-(sp)
2665 trap #1
2666 addq.l #6,sp
2667 dc.w $a009
2668 movem.l (sp)+,d0-a6
2669 * suite
2670 rts
2671
2672 ************************* gestion midi ************
2673
2674 midi_routs
2675 movem.l d0-a6,-(sp)
2676 .b_midi
2677 bsr eff_ecran
2678 objc_draw adr_midi,#0,#4,xcenter_midi,ycenter_midi,wcenter_midi,hcenter_midi
2679 form_do adr_midi,#0 *midi
2680 move int_out,d0
2681
2682 ******************* patch plit
2683 cmp #patchgo,d0
2684 bne .pas_pitch
2685 bsr eff_ecran
2686 clr canal_midi
2687
2688 .gere_pitch_split
2689
2690 * affichage du canal midi ...
2691 move.l adr_pitch,a0
2692 move.l chalmidi*24+12(a0),a0
2693 move canal_midi,d0
2694 lea tabc(pc),a3
2695 move.b (a3,d0.w),(a0)
2696
2697 * affichage du track par default
2698 lea def_track,a0
2699 add canal_midi,a0
2700 moveq #0,d0
2701 move.b (a0),d0
2702 move.l adr_pitch,a0
2703 move.l 12+deftrack*24(a0),a0
2704 move.b (a3,d0.w),1(a0)
2705
2706 * note off on ou off
2707 lea def_note_off,a0
2708 add canal_midi,a0
2709 move.b (a0),d0
2710 move.l adr_pitch,a0
2711 bclr #0,11+tnoteoff*24(a0)
2712 and #1,d0
2713 or.b d0,11+tnoteoff*24(a0)
2714
2715 lea def_note,a2
2716 add canal_midi,a2
2717 move.l adr_pitch,a0
2718 move.l 12+mi_st*24(a0),a0
2719 addq.l #2,a0
2720 dtake
2721
2722 * affichage de toutes les informations midi necessaires ....
2723 lea table_pitch_split,a2
2724 move canal_midi,d0
2725 lsl #7,d0
2726 adda d0,a2
2727
2728 lea table_note,a1
2729 moveq #nombre_de_notes_geres-1,d7
2730 .boucle_car
2731 move.l adr_pitch,a0
2732 adda.w (a1)+,a0
2733 move.l (a0),a0
2734 move.l (a0),a0
2735 * a0 a les 5 caracteres de suites ...
2736 take
2737 take
2738 take1
2739 dbra d7,.boucle_car
2740 *
2741 objc_draw adr_pitch,#0,#4,xcenter_pitch,ycenter_pitch,wcenter_pitch,hcenter_pitch
2742
2743 .gere_pitch_split_on
2744 form_do adr_pitch,#0 *pitch
2745 move int_out,d0
2746 *
2747 cmp #canalplu,d0
2748 bne.s .pas_aj
2749 cmp #15,canal_midi
2750 beq .gere_pitch_split
2751 bsr .recup_split
2752 addq #1,canal_midi
2753 bra .gere_pitch_split
2754 .pas_aj
2755
2756 cmp #canalmoi,d0
2757 bne.s .pas_sub
2758 tst canal_midi
2759 beq .gere_pitch_split
2760 bsr .recup_split
2761 subq #1,canal_midi
2762 bra .gere_pitch_split
2763 .pas_sub
2764
2765 cmp #exitsplit,d0
2766 bne .pas_fou
2767 bsr .recup_split
2768 move.l adr_pitch,a0
2769 bclr #0,exitsplit*24+10+1(a0)
2770 bra .b_midi
2771 .pas_fou
2772
2773 cmp #deftrackp,d0
2774 bne .pas_defp
2775 move.l adr_pitch,a0
2776 bclr #0,1+deftrackp*24+10(a0)
2777 lea def_track,a0
2778 adda canal_midi,a0
2779 cmp.b #4,(a0)
2780 beq .gere_pitch_split_def_trck
2781 addq.b #1,(a0)
2782
2783 * affichage du track par default
2784 lea def_track,a0
2785 adda canal_midi,a0
2786 moveq #0,d0
2787 move.b (a0),d0
2788 move.l adr_pitch,a0
2789 move.l 12+deftrack*24(a0),a0
2790 move.b (a3,d0.w),1(a0)
2791 .gere_pitch_split_def_trck
2792 objc_draw adr_pitch,#af_def_track,#4,xcenter_pitch,ycenter_pitch,wcenter_pitch,hcenter_pitch
2793 bra .gere_pitch_split_on
2794 .pas_defp
2795
2796 cmp #deftrackm,d0
2797 bne .pas_defm
2798 move.l adr_pitch,a0
2799 bclr #0,1+deftrackm*24+10(a0)
2800 lea def_track,a0
2801 adda canal_midi,a0
2802 cmp.b #1,(a0)
2803 beq .gere_pitch_split_def_trck
2804 subq.b #1,(a0)
2805
2806 * affichage du track par default
2807 lea def_track,a0
2808 adda canal_midi,a0
2809 moveq #0,d0
2810 move.b (a0),d0
2811 move.l adr_pitch,a0
2812 move.l 12+deftrack*24(a0),a0
2813 move.b (a3,d0.w),1(a0)
2814 objc_draw adr_pitch,#af_def_track,#4,xcenter_pitch,ycenter_pitch,wcenter_pitch,hcenter_pitch
2815 bra .gere_pitch_split_on
2816 .pas_defm
2817
2818 cmp #mi_st_m,d0
2819 bne .pas_mi_st_m
2820 bclr #0,1+mi_st_m*24+10(a0)
2821 lea def_note,a0
2822 adda canal_midi,a0
2823 cmp.b #1,(a0)
2824 beq .gere_pitch_split_def_note
2825 subq.b #1,(a0)
2826 lea def_note,a2
2827 adda canal_midi,a2
2828 move.l adr_pitch,a0
2829 move.l 12+mi_st*24(a0),a0
2830 addq.l #2,a0
2831 dtake
2832 .gere_pitch_split_def_note
2833 objc_draw adr_pitch,#af_def_note,#4,xcenter_pitch,ycenter_pitch,wcenter_pitch,hcenter_pitch
2834 bra .gere_pitch_split_on
2835 .pas_mi_st_m
2836
2837 cmp #mi_st_p,d0
2838 bne .pas_mi_st_p
2839 bclr #0,1+mi_st_p*24+10(a0)
2840 lea def_note,a0
2841 adda canal_midi,a0
2842 cmp.b #255-nombre_de_notes_geres,(a0)
2843 beq .gere_pitch_split_def_note
2844 addq.b #1,(a0)
2845 lea def_note,a2
2846 adda canal_midi,a2
2847 move.l adr_pitch,a0
2848 move.l 12+mi_st*24(a0),a0
2849 addq.l #2,a0
2850 dtake
2851 objc_draw adr_pitch,#af_def_note,#4,xcenter_pitch,ycenter_pitch,wcenter_pitch,hcenter_pitch
2852 bra .gere_pitch_split_on
2853 .pas_mi_st_p
2854
2855 cmp #loadpitch,d0
2856 bne .pas_loadpitch
2857 bsr .recup_split
2858 form_alert #1,#confirm_loadpitch
2859 cmp #1,d0
2860 beq .ouf_pas_load
2861 * la on load le pitch .....
2862 lea path,a0
2863 lea path1,a1
2864 .boipa
2865 tst.b (a0)
2866 beq.s .boipa1
2867 move.b (a0)+,(a1)+
2868 bra.s .boipa
2869 .boipa1
2870 cmp.b #"\",-(a1)
2871 bne.s .boipa1
2872 addq.l #1,a1
2873 move.b #"*",(a1)+
2874 move.b #".",(a1)+
2875 move.b #"P",(a1)+
2876 move.b #"I",(a1)+
2877 move.b #"T",(a1)+
2878 clr.b (a1)+
2879 clr.b namepitch
2880 fsel_input #path1,#namepitch
2881 bsr eff_ecran
2882 tst int_out+2
2883 beq .ouf_pas_load
2884 * a0 :path
2885 * a1 :name
2886 move handle_disk,-(sp)
2887 lea path1,a0
2888 lea namepitch,a1
2889 bsr open
2890 tst d0
2891 beq.s .no_probeleme_loadpitch
2892 form_alert #1,#probleme_loadpitch
2893 bra.s .probleme_loadpitch
2894 .no_probeleme_loadpitch
2895 * a1 :adr ou loader
2896 * d1 : nd d'octet loader
2897 lea table_pitch_split,a1
2898 move.l #128*16,d1
2899 bsr read
2900 bsr close
2901 .probleme_loadpitch
2902 move (sp)+,handle_disk
2903 *
2904 .ouf_pas_load
2905
2906 move.l adr_pitch,a0
2907 bclr #0,1+loadpitch*24+10(a0)
2908 bra .gere_pitch_split
2909 .pas_loadpitch
2910
2911 cmp #savepitch,d0
2912 bne .pas_savepitch
2913 bsr .recup_split
2914
2915 form_alert #1,#confirm_savepitch
2916 cmp #1,d0
2917 beq .ouf_pas_save
2918 * la on save le pitch .....
2919 lea path,a0
2920 lea path1,a1
2921 .boipaa
2922 tst.b (a0)
2923 beq.s .boipa1a
2924 move.b (a0)+,(a1)+
2925 bra.s .boipaa
2926 .boipa1a
2927 cmp.b #"\",-(a1)
2928 bne.s .boipa1a
2929 addq.l #1,a1
2930 move.b #"*",(a1)+
2931 move.b #".",(a1)+
2932 move.b #"P",(a1)+
2933 move.b #"I",(a1)+
2934 move.b #"T",(a1)+
2935 clr.b (a1)+
2936 clr.b namepitch
2937 fsel_input #path1,#namepitch
2938 bsr eff_ecran
2939 tst int_out+2
2940 beq .ouf_pas_save
2941
2942 * path : a0
2943 * name : a1
2944 * lieu ou il faut sauver : a2
2945 move.l #128*16,taile_write
2946 lea path1,a0
2947 lea namepitch,a1
2948 lea table_pitch_split,a2
2949 move handle_disk,-(sp)
2950 bsr save_as
2951 move (sp)+,handle_disk
2952 tst d0
2953 beq.s .no_probleme_savepitch
2954 form_alert #1,#probleme_savepitch
2955 .no_probleme_savepitch
2956 *
2957 .ouf_pas_save
2958 move.l adr_pitch,a0
2959 bclr #0,1+savepitch*24+10(a0)
2960 bra .gere_pitch_split
2961 .pas_savepitch
2962
2963 cmp #linstrum,d0
2964 bne.s .pas_l_instrum
2965 bsr .gere_instrum
2966 move.l adr_pitch,a0
2967 bclr #0,1+linstrum*24+10(a0)
2968 bsr eff_ecran
2969 bra .gere_pitch_split
2970 .pas_l_instrum
2971
2972 bra .gere_pitch_split
2973
2974 .recup_split
2975 * recuperation de toutes les informations midi necessaires ....
2976 lea tabc,a3
2977 lea table_pitch_split,a2
2978 move canal_midi,d0
2979 lsl #7,d0
2980 adda d0,a2
2981 lea table_note,a1
2982 moveq #nombre_de_notes_geres-1,d7
2983 .boucle_car1
2984 move.l adr_pitch,a0
2985 adda.w (a1)+,a0
2986 move.l (a0),a0
2987 move.l (a0),a0
2988 * a0 a les 5 caracteres de suites ...
2989 moveq #0,d3 * au cas ou le resutats est zero....
2990
2991 macsplit
2992 macsplit
2993 macsplit1
2994 cmp.b #4,-1(a2)
2995 ble.s .ok_track_only4
2996 move.b #4,-1(a2)
2997 .ok_track_only4
2998 dbra d7,.boucle_car1
2999 * recupere la gestion du note off
3000 move.l adr_pitch,a0
3001 move.b 11+24*tnoteoff(a0),d0
3002 and #1,d0
3003 lea def_note_off,a0
3004 add canal_midi,a0
3005 move.b d0,(a0)
3006 rts
3007
3008
3009
3010
3011
3012 .pas_pitch
3013
3014 ******************* speed
3015 cmp #speedgo,d0
3016 bne .pas_speed
3017 bsr eff_ecran
3018 lea tabc(pc),a3
3019 move.l adr_speed,a0
3020 move.l 12+24*viteedit(a0),a0
3021 move.l (a0),a0
3022 lea vitesse+1,a2
3023 take
3024 objc_draw adr_speed,#0,#4,xcenter_speed,ycenter_speed,wcenter_speed,hcenter_speed
3025 form_do adr_speed,#0 *speed
3026 move int_out,d0
3027 lea vitesse,a2
3028 clr.b (a2)+
3029 move.l adr_speed,a0
3030 move.l 12+24*viteedit(a0),a0
3031 move.l (a0),a0
3032 move vitesse,d7
3033 moveq #0,d3 * au cas ou le resutats est zero....
3034 macsplit
3035 tst.l d2
3036 bpl.s .arg_speed
3037 move d7,vitesse
3038 .arg_speed
3039 move.l adr_speed,a0
3040 bclr #0,exitspeed*24+10+1(a0)
3041 bra .b_midi
3042 .pas_speed
3043
3044 ******************* pattern & positions
3045 cmp #pattrec,d0
3046 bne .pas_pattern
3047 bsr eff_ecran
3048 *
3049 lea tabc,a3
3050 lea nb_pos,a2
3051 move.l adr_pattern,a0
3052 move.l 12+24*posmod(a0),a0
3053 dtake
3054 dtake
3055 lea nb_pat,a2
3056 move.l adr_pattern,a0
3057 move.l 12+24*patmod(a0),a0
3058 dtake
3059 dtake
3060 * init
3061 clr pos_edit
3062
3063
3064 .boucle_pattern
3065 *
3066 move.l adr_pattern,a4
3067 move.l 12+24*posnumb(a4),a0
3068 move.l (a0),a0
3069 lea pos_edit,a2
3070 dtake
3071 dtake
3072 move.l 12+24*recposstart(a4),a0
3073 move.l (a0),a0
3074 lea pos_rec_start,a2
3075 dtake
3076 dtake
3077 move.l 12+24*recposend(a4),a0
3078 move.l (a0),a0
3079 lea pos_rec_end,a2
3080 dtake
3081 dtake
3082 move.l 12+24*patnum(a4),a0
3083 move.l (a0),a0
3084 lea pos,a2
3085 move pos_edit,d0
3086 add d0,d0
3087 adda d0,a2
3088 dtake
3089 dtake
3090
3091
3092 objc_draw adr_pattern,#0,#4,xcenter_pattern,ycenter_pattern,wcenter_pattern,hcenter_pattern
3093 form_do adr_pattern,#0 *pattern
3094 move int_out,d0
3095
3096
3097 cmp #exitpattern,d0
3098 bne.s .pas_fin_pattern
3099 bsr .recup_donnee_pattern
3100 move.l adr_pattern,a0
3101 bclr #0,1+10+24*exitpattern(a0)
3102 * na !
3103 bra .b_midi
3104 .pas_fin_pattern
3105
3106 cmp #posplus,d0
3107 bne.s .pas_pos_plus
3108 bsr .recup_donnee_pattern
3109 move.l adr_pattern,a0
3110 bclr #0,1+10+24*posplus(a0)
3111 cmp #15000-1,pos_edit
3112 beq .boucle_pattern
3113 addq #1,pos_edit
3114 bra .boucle_pattern
3115 .pas_pos_plus
3116
3117 cmp #posmoin,d0
3118 bne.s .pas_pos_moin
3119 bsr .recup_donnee_pattern
3120 move.l adr_pattern,a0
3121 bclr #0,1+10+24*posmoin(a0)
3122 tst pos_edit
3123 beq .boucle_pattern
3124 subq #1,pos_edit
3125 bra .boucle_pattern
3126 .pas_pos_moin
3127
3128
3129 cmp #recposplus,d0
3130 bne.s .pas_recpos_plus
3131 bsr .recup_donnee_pattern
3132 move.l adr_pattern,a0
3133 bclr #0,1+10+24*recposplus(a0)
3134 cmp #15000-1,pos_rec_start
3135 beq .boucle_pattern
3136 addq #1,pos_rec_start
3137 move pos_rec_start,d0
3138 cmp pos_rec_end,d0
3139 ble .boucle_pattern
3140 move d0,pos_rec_end
3141 bra .boucle_pattern
3142 .pas_recpos_plus
3143
3144 cmp #recposmoin,d0
3145 bne.s .pas_recpos_moin
3146 bsr .recup_donnee_pattern
3147 move.l adr_pattern,a0
3148 bclr #0,1+10+24*recposmoin(a0)
3149 tst pos_rec_start
3150 beq .boucle_pattern
3151 subq #1,pos_rec_start
3152 bra .boucle_pattern
3153 .pas_recpos_moin
3154
3155 cmp #patmoin,d0
3156 bne.s .pas_sub_patpos
3157 bsr .recup_donnee_pattern
3158 move.l adr_pattern,a0
3159 bclr #0,1+10+24*patmoin(a0)
3160 lea pos,a0
3161 move pos_edit,d0
3162 add d0,d0
3163 adda d0,a0
3164 tst (a0)
3165 ble.s .creve_sub_patpos
3166 subq #1,(a0)
3167 .creve_sub_patpos
3168 bra .boucle_pattern
3169 .pas_sub_patpos
3170
3171 cmp #patplus,d0
3172 bne.s .pas_aj_patpos
3173 bsr .recup_donnee_pattern
3174 move.l adr_pattern,a0
3175 bclr #0,1+10+24*patplus(a0)
3176 lea pos,a0
3177 move pos_edit,d0
3178 add d0,d0
3179 adda d0,a0
3180 cmp #32767,(a0)
3181 bge.s .creve_aj_patpos
3182 addq #1,(a0)
3183 .creve_aj_patpos
3184 bra .boucle_pattern
3185 .pas_aj_patpos
3186
3187 cmp #clearpos,d0
3188 bne .pas_clear_pos
3189 bsr .recup_donnee_pattern
3190 move.l adr_pattern,a0
3191 bclr #0,1+10+24*clearpos(a0)
3192 form_alert #1,#confirm_clear_pos
3193 cmp #1,d0
3194 beq .boucle_pattern
3195 move d0,d7
3196 lea pos,a0
3197 move #15000-1,d0
3198 moveq #0,d1
3199 .cle_pos
3200 move d1,(a0)+
3201 addq #1,d1
3202 dbra d0,.cle_pos
3203 clr pos_rec_start
3204 clr pos_rec_end
3205 clr pos_edit
3206 cmp #3,d7
3207 bne .boucle_pattern
3208 * recopie des positions deja existante ds le module .
3209 move nb_pos,d0
3210 beq .boucle_pattern
3211 subq #1,d0
3212 moveq #0,d1
3213 lea pos,a1
3214 move.l adr_pos,a0
3215 .rec_pos_ex
3216 move.b (a0)+,d1
3217 move d1,(a1)+
3218 dbra d0,.rec_pos_ex
3219 bra .boucle_pattern
3220 .pas_clear_pos
3221
3222
3223 cmp #confsaisi,d0
3224 bne.s .pas_confsaisi
3225 bsr .recup_donnee_pattern
3226 move.l adr_pattern,a0
3227 bclr #0,1+10+24*confsaisi(a0)
3228 bra .boucle_pattern
3229 .pas_confsaisi
3230
3231 cmp #recposendplus,d0
3232 bne.s .pas_recposend_plus
3233 bsr .recup_donnee_pattern
3234 move.l adr_pattern,a0
3235 bclr #0,1+10+24*recposendplus(a0)
3236 cmp #15000-1,pos_rec_end
3237 beq .boucle_pattern
3238 addq #1,pos_rec_end
3239 bra .boucle_pattern
3240 .pas_recposend_plus
3241
3242 cmp #recposendmoin,d0
3243 bne.s .pas_recposend_moin
3244 bsr .recup_donnee_pattern
3245 move.l adr_pattern,a0
3246 bclr #0,1+10+24*recposendmoin(a0)
3247 move pos_rec_end,d0
3248 tst d0
3249 beq .boucle_pattern
3250 cmp pos_rec_start,d0
3251 ble .boucle_pattern
3252 subq #1,pos_rec_end
3253 bra .boucle_pattern
3254 .pas_recposend_moin
3255
3256 * load & save pattern .....................
3257 cmp #savepos,d0
3258 bne .pas_savepos
3259 bsr .recup_donnee_pattern
3260 move.l adr_pattern,a0
3261 bclr #0,1+10+24*savepos(a0)
3262 *
3263 form_alert #1,#confirm_save_pos
3264 cmp #1,d0
3265 beq .boucle_pattern
3266 * save
3267 clr save_startpos
3268 move #15000-1,save_endpos
3269 cmp #3,d0
3270 bne.s .pas_save_define
3271 move pos_rec_start,save_startpos
3272 move pos_rec_end,save_endpos
3273 addq #1,save_endpos
3274 .pas_save_define
3275 lea path,a0
3276 lea path1,a1
3277 .boipab
3278 tst.b (a0)
3279 beq.s .boipa1b
3280 move.b (a0)+,(a1)+
3281 bra.s .boipab
3282 .boipa1b
3283 cmp.b #"\",-(a1)
3284 bne.s .boipa1b
3285 addq.l #1,a1
3286 move.b #"*",(a1)+
3287 move.b #".",(a1)+
3288 move.b #"P",(a1)+
3289 move.b #"O",(a1)+
3290 move.b #"S",(a1)+
3291 clr.b (a1)+
3292 clr.b namepitch
3293 fsel_input #path1,#namepitch
3294 bsr eff_ecran
3295 tst int_out+2
3296 beq .boucle_pattern
3297 * path : a0
3298 * name : a1
3299 * lieu ou il faut sauver : a2
3300 moveq #0,d1
3301 move save_endpos,d1
3302 sub save_startpos,d1
3303 add d1,d1
3304 addq.l #4,d1
3305 move.l d1,taile_write
3306 lea path1,a0
3307 lea namepitch,a1
3308 lea save_startpos,a2
3309 moveq #0,d0
3310 move save_startpos,d0
3311 beq.s .ok_save_dep_debut
3312 * oups ca etre coton ............. regulariser
3313 move.l save_startpos,d2
3314 move.l d2,-(sp)
3315 add d0,d0
3316 adda d0,a2
3317 move.l a2,-(sp)
3318 move.l (a2),-(sp)
3319 move.l d2,(a2)
3320 bsr save_as
3321 move.l (sp)+,d1
3322 move.l (sp)+,a2
3323 move.l d1,(a2)
3324 move.l (sp)+,save_startpos
3325 bra.s .finsave_pos
3326 .ok_save_dep_debut
3327 bsr save_as
3328 .finsave_pos
3329 tst d0
3330 beq.s .no_probleme_savepos
3331 form_alert #1,#probleme_savepitch
3332 .no_probleme_savepos
3333 bra .boucle_pattern
3334 .pas_savepos
3335
3336 cmp #loadpos,d0
3337 bne .pas_loadpos
3338 bsr .recup_donnee_pattern
3339 move.l adr_pattern,a0
3340 bclr #0,1+10+24*loadpos(a0)
3341 *
3342 form_alert #1,#confirm_load_pos
3343 cmp #1,d0
3344 beq .boucle_pattern
3345
3346
3347 * la on load le pitch .....
3348 lea path,a0
3349 lea path1,a1
3350 .boipc
3351 tst.b (a0)
3352 beq.s .boipc1
3353 move.b (a0)+,(a1)+
3354 bra.s .boipc
3355 .boipc1
3356 cmp.b #"\",-(a1)
3357 bne.s .boipc1
3358 addq.l #1,a1
3359 move.b #"*",(a1)+
3360 move.b #".",(a1)+
3361 move.b #"P",(a1)+
3362 move.b #"O",(a1)+
3363 move.b #"S",(a1)+
3364 clr.b (a1)+
3365 clr.b namepitch
3366 fsel_input #path1,#namepitch
3367 bsr eff_ecran
3368 tst int_out+2
3369 beq .boucle_pattern
3370 * a0 :path
3371 * a1 :name
3372 move handle_disk,-(sp)
3373 lea path1,a0
3374 lea namepitch,a1
3375 bsr open
3376 tst d0
3377 beq.s .no_probeleme_loadpos
3378 form_alert #1,#probleme_loadpitch
3379 bra .boucle_pattern
3380 .no_probeleme_loadpos
3381 * a1 :adr ou loader
3382 * d1 : nd d'octet loader
3383 lea save_startpos,a1
3384 moveq #4,d1
3385 bsr read
3386 moveq #0,d1
3387 move save_endpos,d1
3388 sub save_startpos,d1
3389 add d1,d1
3390 lea pos,a1
3391 cmp #15000,save_endpos
3392 beq .ok_fermepos
3393 movem.l a1/d1,-(sp)
3394 form_alert #1,#ou_load_pos
3395 movem.l (sp)+,a1/d1
3396 cmp #1,d0
3397 beq .ok_fermepos1
3398 cmp #3,d0
3399 beq.s .ok_fermepos0
3400 * 2 saved
3401 moveq #0,d2
3402 move save_startpos,d2
3403 add d2,d2
3404 adda d2,a1
3405 move save_startpos,pos_rec_start
3406 move save_startpos,pos_edit
3407 move save_endpos,pos_rec_end
3408 bra .ok_fermepos1
3409 .ok_fermepos0
3410
3411 moveq #0,d2
3412 move pos_edit,d2
3413 add d2,d2
3414 adda d2,a1
3415
3416 move pos_edit,d2
3417 add save_endpos,d2
3418 sub save_startpos,d2
3419 cmp #15000,d2
3420 ble.s .tout_go_pos
3421 movem.l d0-a6,-(sp)
3422 form_alert #1,#cut_file_pos
3423 movem.l (sp)+,d0-a6
3424 sub #15000,d2
3425 move save_endpos,d3
3426 sub save_startpos,d3
3427 sub d2,d3
3428 add d3,d3
3429 move d3,d1
3430 sub d2,save_endpos
3431 .tout_go_pos
3432
3433 move pos_edit,pos_rec_start
3434 move pos_edit,d0
3435 add save_endpos,d0
3436 sub save_startpos,d0
3437 move d0,pos_rec_end
3438 .ok_fermepos1
3439 * clear ??
3440 movem.l d1/a1,-(sp)
3441 form_alert #1,#clear_rest_pos
3442 movem.l (sp)+,d1/a1
3443 cmp #1,d0
3444 beq .ok_fermepos
3445 move d0,d7
3446 lea pos,a0
3447 move #15000-1,d0
3448 moveq #0,d3
3449 .cle_posc
3450 move d3,(a0)+
3451 addq #1,d3
3452 dbra d0,.cle_posc
3453 cmp #3,d7
3454 bne .ok_fermepos
3455 * recopie des positions deja existante ds le module .
3456 move nb_pos,d0
3457 beq .boucle_pattern
3458 subq #1,d0
3459 moveq #0,d2
3460 lea pos,a2
3461 move.l adr_pos,a0
3462 .rec_pos_exc
3463 move.b (a0)+,d2
3464 move d2,(a2)+
3465 dbra d0,.rec_pos_exc
3466 .ok_fermepos
3467 bsr read
3468 bsr close
3469 move (sp)+,handle_disk
3470 *
3471 bra .boucle_pattern
3472 .pas_loadpos
3473
3474 bsr .recup_donnee_pattern
3475 bra .boucle_pattern
3476
3477
3478
3479 * rout exertne
3480 .recup_donnee_pattern
3481 move.l adr_pattern,a4
3482
3483 move.l 12+24*recposstart(a4),a0
3484 move.l (a0),a0
3485 lea pos_rec_start,a2
3486 move (a2),d7
3487 moveq #0,d3
3488 macsplit2
3489 cmp #-1,-(a2)
3490 bne.s .recup_pat1
3491 move d7,(a2)
3492 .recup_pat1
3493 cmp #15000,(a2)
3494 ble.s .recup_pata1
3495 move #15000,(a2)
3496 .recup_pata1
3497 move pos_rec_end,d0
3498 cmp (a2),d0
3499 bgt.s .recup_patb1
3500 move (a2),pos_rec_end
3501 .recup_patb1
3502
3503 move.l 12+24*patnum(a4),a0
3504 move.l (a0),a0
3505 lea pos,a2
3506 move pos_edit,d0
3507 add d0,d0
3508 adda d0,a2
3509 move (a2),d7
3510 moveq #0,d3
3511 macsplit2
3512 cmp #-1,-(a2)
3513 bne.s .recup_pat2
3514 move d7,(a2)
3515 .recup_pat2
3516 cmp #32767,(a2)
3517 ble.s .recup_pata2
3518 move #32767,(a2)
3519 .recup_pata2
3520
3521 move.l 12+24*posnumb(a4),a0
3522 move.l (a0),a0
3523 lea pos_edit,a2
3524 move (a2),d7
3525 moveq #0,d3
3526 macsplit2
3527 cmp #-1,-(a2)
3528 bne.s .recup_pat0
3529 move d7,(a2)
3530 .recup_pat0
3531 cmp #15000-1,(a2)
3532 ble.s .recup_pata0
3533 move #15000-1,(a2)
3534 .recup_pata0
3535
3536 move.l 12+24*recposend(a4),a0
3537 move.l (a0),a0
3538 lea pos_rec_end,a2
3539 move (a2),d7
3540 moveq #0,d3
3541 macsplit2
3542 cmp #-1,-(a2)
3543 bne.s .recup_pat3
3544 move d7,(a2)
3545 .recup_pat3
3546 cmp #15000-1,(a2)
3547 ble.s .recup_pata3
3548 move #15000-1,(a2)
3549 .recup_pata3
3550 move pos_rec_start,d0
3551 cmp (a2),d0
3552 blt.s .recup_patb3
3553 move pos_rec_start,(a2)
3554 .recup_patb3
3555 rts
3556
3557
3558
3559
3560 .pas_pattern
3561
3562 ******************* instruments names
3563 cmp #insna,d0
3564 bne .pas_instrum
3565 bsr .gere_instrum
3566 bra .b_midi
3567
3568 * routines annexes
3569 .gere_instrum
3570 clr num_ins
3571 lea tabc(pc),a3
3572 move.l adr_instrum,a0
3573 move.l 12+24*nbim(a0),a0
3574 lea nb_in,a2
3575 clr.b (a2)+
3576 dtake
3577
3578 bsr eff_ecran
3579
3580 .boucle_namein
3581 * aff nbcour
3582 lea tabc(pc),a3
3583 move.l adr_instrum,a0
3584 move.l 12+24*nbcour(a0),a0
3585 lea num_ins,a2
3586 clr.b (a2)+
3587 dtake
3588 *
3589 lea name_instruments,a0
3590 move num_ins,d0
3591 mulu #22,d0
3592 adda d0,a0
3593 move.l adr_instrum,a1
3594 move.l 12+24*inedit(a1),a1
3595 move.l (a1),a1
3596 moveq #21,d0
3597 .bnote
3598 move.b (a0)+,(a1)+
3599 dbra d0,.bnote
3600 *
3601 objc_draw adr_instrum,#0,#4,xcenter_instrum,ycenter_instrum,wcenter_instrum,hcenter_instrum
3602 form_do adr_instrum,#0 *instrum
3603 move int_out,d0
3604
3605 cmp #inplus,d0
3606 bne.s .pas_sub_instruments
3607 move.l adr_instrum,a0
3608 bclr #0,1+10+24*inplus(a0)
3609 bsr .recup_namein
3610 cmp #255,num_ins
3611 beq .boucle_namein
3612 addq #1,num_ins
3613 bra .boucle_namein
3614 .pas_sub_instruments
3615
3616 cmp #inmoin,d0
3617 bne.s .pas_add_instruments
3618 move.l adr_instrum,a0
3619 bclr #0,1+10+24*inmoin(a0)
3620 bsr .recup_namein
3621 tst num_ins
3622 beq .boucle_namein
3623 subq #1,num_ins
3624 bra .boucle_namein
3625 .pas_add_instruments
3626
3627 moveq #0,d1
3628 cmp #exitins1,d0
3629 beq.s .fin_namein
3630 cmp #exitins0,d0
3631 bne .pas_fin_namein
3632 .fin_namein
3633 bsr .recup_namein
3634 move.l adr_instrum,a0
3635 bclr #0,1+10+24*exitins0(a0)
3636 bclr #0,1+10+24*exitins1(a0)
3637 moveq #-1,d1
3638 .pas_fin_namein
3639 tst.l d1
3640 beq .boucle_namein
3641 rts
3642
3643 .recup_namein
3644 lea name_instruments,a1
3645 moveq #0,d0
3646 move num_ins,d0
3647 mulu #22,d0
3648 adda d0,a1
3649 move.l adr_instrum,a0
3650 move.l 12+24*inedit(a0),a0
3651 move.l (a0),a0
3652 recuptext 22
3653 *
3654 rts
3655
3656
3657
3658
3659 .pas_instrum
3660
3661 *********************** midi start or cancel
3662 * prend les 3 bouttons pour les init
3663
3664 move d0,-(sp)
3665 move.l adr_midi,a0
3666 move 10+velocity*24(a0),d0
3667 and #%1,d0
3668 move d0,velocityflag
3669 move 10+modulati*24(a0),d0
3670 and #%1,d0
3671 move d0,modulatiflag
3672 move 10+pitchben*24(a0),d0
3673 and #%1,d0
3674 move d0,pitchbenflag
3675 move (sp)+,d0
3676
3677 cmp #reccanc,d0
3678 beq .fin
3679
3680 cmp #recstart,d0
3681 bne .b_midi
3682
3683 .syncsrt
3684 *********** ici le midi
3685 move pos_rec_start,rec_start
3686 move pos_rec_end,rec_end
3687 clr offset_pat
3688 clr synchro_on_start
3689 move.l adr_midi_rec,a0
3690 bclr #0,11+24*midi_rec_sync(a0)
3691 .b_midi_rec
3692 bsr eff_ecran
3693 objc_draw adr_midi_rec,#0,#4,xcenter_midi_rec,ycenter_midi_rec,wcenter_midi_rec,hcenter_midi_rec
3694
3695 bsr ecrit_info_pattern_midi
3696
3697 lea operation_wait,a0
3698 moveq #64,d0
3699 moveq #38+10,d1
3700 bsr print
3701
3702 form_do adr_midi_rec,#0 *midi_rec
3703
3704 cmp #exit_rec,d0
3705 beq .fin_rec
3706
3707 cmp #start_midi_rec,d0
3708 bne .pas_start_midi_rec
3709
3710 * init midi
3711 * arg test si debut ..........
3712 lea note_voie,a0
3713 bsr eff_voie
3714 lea volume_voie,a0
3715 bsr eff_voie
3716 lea instrument_voie,a0
3717 bsr eff_voie
3718 lea effect_voie,a0
3719 bsr eff_voie
3720 clr canal_receive
3721
3722 move pos_rec_start,rec_start
3723 move pos_rec_end,rec_end
3724 clr offset_pat
3725 * test si on doit attendre des infos en midi
3726 tst synchro_on_start
3727 bra ._synchro_midi
3728 * bne ._synchro_midi
3729 st start_midi
3730 lea operation_start,a0
3731 moveq #64,d0
3732 moveq #38+10,d1
3733 bsr print
3734 ._synchro_midi
3735 bsr midi_take
3736 lea adr_midi_rec,a0
3737 bclr #0,11+24*start_midi_rec(a0)
3738 bra .b_midi_rec
3739 .pas_start_midi_rec
3740
3741 cmp #midi_rec_sync,d0
3742 bne.s .pas_rec_sync
3743 eor #1,synchro_on_start
3744 move synchro_on_start,d0
3745 move.l adr_midi_rec,a0
3746 bclr #0,11+24*midi_rec_sync(a0)
3747 or d0,10+24*midi_rec_sync(a0)
3748 bra .b_midi_rec
3749 .pas_rec_sync
3750
3751 bra .b_midi_rec
3752
3753
3754
3755 .fin_rec
3756 move.l adr_midi_rec,a0
3757 bclr #0,11+24*exit_rec(a0)
3758 bra .b_midi
3759 .fin
3760 bsr eff_ecran
3761 objc_draw adr_first_loading,#0,#3,xcenter_first_loading,ycenter_first_loading,wcenter_first_loading,hcenter_first_loading
3762 movem.l (sp)+,d0-a6
3763 rts
3764
3765 ******************* midi
3766 eff_voie
3767 rept 8
3768 clr.l (a0)+
3769 endr
3770 rts
3771
3772 ecrit_info_pattern_midi
3773 lea tabc(pc),a3
3774 lea ecrit_tout,a0
3775 lea rec_start,a2
3776 dtake
3777 dtake
3778 clr.b (a0)+
3779 lea ecrit_tout,a0
3780 moveq #56,d0
3781 moveq #39,d1
3782 bsr print
3783
3784 lea pos,a2
3785 lea ecrit_tout,a0
3786 adda rec_start,a2
3787 adda rec_start,a2
3788 dtake
3789 dtake
3790 clr.b (a0)+
3791 lea ecrit_tout,a0
3792 moveq #56,d0
3793 moveq #39+10,d1
3794 bsr print
3795
3796 lea offset_pat,a2
3797 lea ecrit_tout,a0
3798 dtake
3799 clr.b (a0)+
3800 lea ecrit_tout,a0
3801 moveq #56,d0
3802 moveq #39+20,d1
3803 bsr print
3804 rts
3805
3806 ecrit_info_midi_receive
3807 * canal
3808 lea tabc(pc),a3
3809 lea ecrit_tout,a0
3810 lea canal_receive+1,a2
3811 dtake
3812 clr.b (a0)+
3813 lea ecrit_tout,a0
3814 moveq #20,d0
3815 moveq #47,d1
3816 bsr print
3817
3818 * note
3819 lea ecrit_tout,a0
3820 lea note_voie,a1
3821 move canal_receive,d0
3822 add d0,d0
3823 add d0,a1
3824 move (a1),d0
3825
3826 lea def_note,a2
3827 add canal_receive,a2
3828 moveq #0,d7
3829 move.b (a2),d7
3830 * addq #1,d7
3831 cmp d7,d0
3832 bge.s .superieure_depart_synthe
3833 moveq #-1,d0
3834 .superieure_depart_synthe
3835 add #nombre_de_notes_geres,d7
3836 cmp d7,d0
3837 blt.s .note_inferieure_good
3838 moveq #-1,d0
3839 .note_inferieure_good
3840
3841 sub #nombre_de_notes_geres,d7
3842 sub d7,d0
3843 move.b d0,(a1)
3844 bmi .pas_ecrit_note_annule
3845 lea write_note,a1
3846 muls #3,d0
3847 add d0,a1
3848 move.b (a1)+,(a0)+
3849 move.b (a1)+,(a0)+
3850 move.b (a1)+,(a0)+
3851 clr.b (a0)+
3852 lea ecrit_tout,a0
3853 moveq #29,d0
3854 moveq #47,d1
3855 bsr print
3856
3857
3858 * volume
3859 lea tabc(pc),a3
3860 lea ecrit_tout,a0
3861 lea volume_voie,a2
3862 move canal_receive,d0
3863 add d0,d0
3864 add d0,a2
3865 dtake
3866 dtake
3867 clr.b (a0)+
3868 lea ecrit_tout,a0
3869 moveq #25,d0
3870 moveq #56,d1
3871 bsr print
3872
3873 * instrument
3874 lea tabc(pc),a3
3875 lea ecrit_tout,a0
3876 lea instrument_voie,a2
3877 move canal_receive,d0
3878 add d0,d0
3879 add d0,a2
3880 dtake
3881 dtake
3882 clr.b (a0)+
3883 lea ecrit_tout,a0
3884 moveq #25,d0
3885 moveq #57+8,d1
3886 bsr print
3887
3888 * effect
3889 lea effect_voie,a1
3890 lea table_effect,a0
3891 add canal_receive,a1
3892 moveq #0,d0
3893 move.b (a1),d0
3894 mulu #14,d0 * 13 caracteres + 0
3895 add d0,a0
3896 moveq #25-6,d0
3897 moveq #66+8,d1
3898 bsr print
3899
3900 .pas_ecrit_note_annule
3901 rts
3902
3903
3904 n_70
3905 movem.l d0-a6,-(sp)
3906 * tst cmpt_vbl
3907 * bne .fcmpt_vbl
3908 * move vitesse,cmpt_vbl
3909 *
3910 *.fcmpt_vbl
3911 * subq #1,cmpt_vbl
3912 *
3913
3914 movem.l (sp)+,d0-a6
3915 move.l s_70,-(sp)
3916 rts
3917
3918 n_118
3919 movem.l d0/a0/a1,-(sp)
3920
3921 lea $fffffc00,a0
3922 btst #7,(a0)
3923 beq .midi_inter
3924 btst #5,(a0)
3925 bne .midi_inter
3926 btst #0,(a0)
3927 beq .midi_inter
3928 move.b 2(a0),d0
3929 lea buffer_clavier,a1
3930 add nb_octets_clavier,a1
3931 cmp #400,nb_octets_clavier
3932 beq.s .midi_inter
3933 addq #1,nb_octets_clavier
3934 move.b d0,(a1)
3935 .midi_inter
3936
3937 lea $fffffc04.w,a0
3938 btst #7,(a0)
3939 beq .f_118
3940 * clavier
3941 btst #5,(a0)
3942 bne .f_118
3943 btst #0,(a0)
3944 beq .f_118
3945 move.b 2(a0),d0
3946 lea buffer_midi,a1
3947 add nb_octets_midi,a1
3948 cmp #400,nb_octets_midi
3949 beq.s .f_118
3950 addq #1,nb_octets_midi
3951 move.b d0,(a1)
3952 .f_118
3953 movem.l (sp)+,a0/a1/d0
3954 rte
3955
3956 ***************************************
3957 midi_take
3958 pea .midi_take
3959 move #$26,-(sp)
3960 trap #14
3961 addq.l #6,sp
3962 rts
3963
3964 .midi_take
3965 move sr,-(sp)
3966 move #$2700,sr
3967 move vitesse,cmpt_vbl
3968 move.l $70.w,s_70
3969 move.l $118.w,s_118
3970 move.b $fffffa07.w,s_mfp
3971 move.b $fffffa13.w,s_mfp+1
3972 move.b $fffffa19.w,s_mfp+2
3973 move.b $fffffa1f.w,s_mfp+3
3974 move.b $fffffa17.w,s_mfp+4
3975 move.b $fffffa09.w,s_mfp+5
3976 move.b $fffffa15.w,s_mfp+6
3977 bclr #3,$fffffa17.w
3978 move.l #n_70,$70.w
3979 move.l #n_118,$118.w
3980 clr.b $fffffa07.w
3981 move.b #%01000000,$fffffa09.w
3982 or.b #%01000000,$fffffa15.w
3983 move #$2300,sr
3984 * JE CLEAR LE BUFFER MIDI
3985 clr nb_octets_midi * facile non ?? hehehehehe
3986 clr nb_octets_clavier * facile non ?? hehehehehe
3987
3988 wait_midi
3989
3990 * debugging midi
3991 * move #7,-(sp)
3992 * trap #1
3993 * addq.l #2,sp
3994 * cmp.b #" ",d0
3995 * beq .fin
3996 ;
3997 * canal_receive , canal sur lekel on a recu la derniere information
3998 * des k'on recoit une informations on a juste a faire :
3999 * bsr ecrit_info_midi_receive * et ca imperime ttes les info
4000 * sur la derniere voie sur lakellle a ete recu la derniere info ....
4001
4002
4003
4004
4005
4006
4007 bsr prend
4008 tst indic_shift
4009 bne .fin
4010 *
4011
4012 cmp.b #$fa,d0 *start
4013 bne.s .pas_start
4014 st start_midi
4015 lea operation_start,a0
4016 moveq #64,d0
4017 moveq #38+10,d1
4018 bsr print
4019 * fodra penser a initialiser ici ttes les variables , gnarf , gnarf
4020 bra wait_midi
4021 .pas_start
4022
4023 cmp.b #$fb,d0 *continue
4024 bne.s .pas_continue
4025 st start_midi
4026 lea operation_continue,a0
4027 moveq #64,d0
4028 moveq #38+10,d1
4029 bsr print
4030 bra wait_midi
4031 .pas_continue
4032
4033 cmp.b #$fc,d0 *stop
4034 bne.s .pas_stop
4035 sf start_midi
4036 lea operation_stop,a0
4037 moveq #64,d0
4038 moveq #38+10,d1
4039 bsr print
4040 bra wait_midi
4041 .pas_stop
4042
4043 * pour l'instant on va pa plus loin
4044
4045 move d0,d2
4046 and #$f,d0 * canal midi
4047 move d0,canal_receive
4048 lsr #4,d2 * fonctions
4049 lea fonctions,a0
4050 and #$f,d2
4051 add d2,d2
4052 add d2,d2
4053 adda d2,a0
4054 move.l (a0),a0
4055 jsr (a0)
4056
4057 bsr ecrit_info_midi_receive
4058
4059 tst indic_shift
4060 beq wait_midi
4061 .fin
4062 move #$2700,sr
4063 move.b s_mfp,$fffffa07.w
4064 move.b s_mfp+1,$fffffa13.w
4065 move.b s_mfp+2,$fffffa19.w
4066 move.b s_mfp+3,$fffffa1f.w
4067 move.b s_mfp+4,$fffffa17.w
4068 move.b s_mfp+5,$fffffa09.w
4069 move.b s_mfp+6,$fffffa15.w
4070 move.l s_118,$118.w
4071 move.l s_70,$70.w
4072 move (sp)+,sr
4073 rts
4074
4075 *********************** sous routines MIDI
4076
4077 prend
4078 .wait_midi
4079 * ici fodra tester le clavier
4080 tst nb_octets_clavier
4081 beq.s .pas_sorti
4082 ;
4083 lea buffer_clavier,a0
4084 subq #1,nb_octets_clavier
4085 bsr take_on_buffer
4086 ;
4087 cmp.b #$39,d0
4088 bne.s .pas_sorti
4089 st indic_shift
4090 bra.s .prend
4091 .pas_sorti
4092 * ici la midi , nananere.......
4093 tst nb_octets_midi * teste si nombre d'octets ds le buffer est de 0
4094 beq .wait_midi
4095 ;
4096 lea buffer_midi,a0
4097 subq #1,nb_octets_midi
4098 bsr take_on_buffer
4099 ;
4100 cmp.b #$fe,d0 * active sensign
4101 beq.s .wait_midi
4102 cmp.b #$f8,d0 * horloge
4103 beq.s .wait_midi
4104 .prend
4105 rts
4106
4107 take_on_buffer
4108 moveq #0,d0
4109 move.b (a0),d0
4110 move d0,-(sp)
4111 move #398,d0
4112 .take
4113 move.b 1(a0),(a0)+
4114 dbra d0,.take
4115 move (sp)+,d0
4116 rts
4117
4118 note_off * 2 octets
4119 bsr prend * note
4120 tst indic_shift
4121 bne.s fnote_off
4122 move d0,-(sp)
4123 bsr prend * velocity
4124 move (sp)+,d0
4125 note_off_2
4126 tst indic_shift
4127 bne.s fnote_off
4128 lea note_voie,a1
4129 add canal_receive,a1
4130 add canal_receive,a1
4131 * addq #1,d0
4132 cmp (a1),d0
4133 bne fnote_off
4134 lea pedale_contrl,a0
4135 add canal_receive,a0
4136 add canal_receive,a0
4137 tst.b (a0)+
4138 beq.s fnote_off2
4139 st (a0)
4140 bra fnote_off
4141 fnote_off2
4142 lea def_note_off,a0
4143 add canal_receive,a0
4144 tst.b (a0)
4145 beq fnote_off
4146 clr (a1)
4147 fnote_off
4148 rts
4149
4150 note_on * 2 octets
4151 bsr prend * note
4152 tst indic_shift
4153 bne.s .fnote_on
4154 lea note_voie,a1
4155 add canal_receive,a1
4156 add canal_receive,a1
4157 * addq #1,d0
4158 move d0,(a1)
4159 bsr prend * velocity
4160 * si velocity = 0 alors note_off
4161 tst d0
4162 bne.s .fnote_on0
4163 lea note_voie,a1
4164 add canal_receive,a1
4165 add canal_receive,a1
4166 move (a1),d0
4167 bra note_off_2
4168 .fnote_on0
4169 tst velocityflag
4170 beq .fnote_on
4171 lea volume_voie,a1
4172 add canal_receive,a1
4173 add canal_receive,a1
4174 lsr d0
4175 move d0,(a1)
4176 .fnote_on
4177 rts
4178
4179 control_change * 2 octets
4180 * $40 $7f : pedale enfonce
4181 * $40 $00 : pedale relache
4182 * pedale : prolonge la duree de la derniere note sur son dernier canal midi
4183 * donc ne pas tenir compte du note off
4184
4185 * $01 $val , vibrato , $val/2
4186
4187 * $02 $val , vibrato , $val/2
4188
4189 * $07 $val , volume , $val/2
4190
4191 bsr prend * numero
4192 tst indic_shift
4193 bne .fcontrl
4194 cmp.b #$40,d0
4195 bne.s .pas_pedale
4196 bsr prend * valeur
4197 tst indic_shift
4198 bne.s .fcontrl
4199 tst d0
4200 beq .pedale_relache
4201 * PEDALE ENFONCE
4202 lea pedale_contrl,a0
4203 add canal_receive,a0
4204 add canal_receive,a0
4205 st (a0)
4206 bra .fcontrl
4207 .pedale_relache
4208 lea pedale_contrl,a0
4209 add canal_receive,a0
4210 add canal_receive,a0
4211 sf (a0)+
4212 tst.b (a0)
4213 beq .fcontrl
4214 sf (a0)
4215 lea note_voie,a1
4216 add canal_receive,a1
4217 add canal_receive,a1
4218 bra fnote_off2
4219 .pas_pedale
4220
4221 cmp #$7,d0
4222 bne .pas_volume_set
4223 bsr prend * valeur
4224 tst indic_shift
4225 bne.s .fcontrl
4226 lea volume_voie,a1
4227 add canal_receive,a1
4228 add canal_receive,a1
4229 lsr d0
4230 move d0,(a1)
4231 bra .fcontrl
4232 .pas_volume_set
4233
4234 .fcontrl
4235 rts
4236
4237 programm_change * 1 octets
4238 * ne pas ne tenir compte juste avertir
4239 bsr prend * numero du programmm
4240 rts
4241
4242 pression * 1 octets
4243 * $val vibrato , $val/2
4244 bsr prend * valeur de la pression
4245 rts
4246
4247 pitch_bend * 2 octets
4248 bsr prend * octets de poid fort
4249 tst indic_shift
4250 bne.s .fpitch
4251 bsr prend * octets de poid faible
4252 .fpitch
4253 rts
4254
4255 test_shift
4256 move #-1,-(sp)
4257 move #11,-(sp)
4258 trap #13
4259 addq.l #4,sp
4260 and #%11,d0
4261 clr indic_shift
4262 cmp #%11,d0
4263 bne.s .test
4264 move #3,indic_shift
4265 .test
4266 rts
4267 rts
4268
4269
4270 insere
4271 st error?
4272 movem.l d0-a6,-(sp)
4273 moveq #1,d0
4274 cmp #12,line_indic
4275 bne.s .aj
4276 moveq #0,d0
4277 lea info_saving_mod,a1
4278 move #(25*13)-1,d1
4279 .scroll_info
4280 move #" ",(a1)+
4281 dbra d1,.scroll_info
4282 clr line_indic
4283 .aj
4284 add d0,line_indic
4285
4286 lea info_saving_mod,a1
4287 move line_indic,d0
4288 mulu #50,d0
4289 add d0,a1
4290 moveq #49,d0
4291 .rec_mess
4292 move.b (a0)+,(a1)+
4293 dbra d0,.rec_mess
4294
4295
4296 lea info_saving_mod,a2
4297 move.l adr_saving_mod,a0
4298 move.l 12+24*line1(a0),a1
4299 bsr .copie
4300 move.l 12+24*line2(a0),a1
4301 bsr .copie
4302 move.l 12+24*line3(a0),a1
4303 bsr .copie
4304 move.l 12+24*line4(a0),a1
4305 bsr .copie
4306 move.l 12+24*line5(a0),a1
4307 bsr .copie
4308 move.l 12+24*line6(a0),a1
4309 bsr .copie
4310 move.l 12+24*line7(a0),a1
4311 bsr .copie
4312 move.l 12+24*line8(a0),a1
4313 bsr .copie
4314 move.l 12+24*line9(a0),a1
4315 bsr .copie
4316 move.l 12+24*line10(a0),a1
4317 bsr .copie
4318 move.l 12+24*line11(a0),a1
4319 bsr .copie
4320 move.l 12+24*line12(a0),a1
4321 bsr .copie
4322 move.l 12+24*line13(a0),a1
4323 bsr .copie
4324 move line_indic,d0
4325 add d0,d0
4326
4327 tst line_indic
4328 bne.s .pas_aff_indic
4329 objc_draw adr_saving_mod,#0,#3,xcenter_saving_mod,ycenter_saving_mod,wcenter_saving_mod,hcenter_saving_mod
4330 .pas_aff_indic
4331 move line_indic,d0
4332 add d0,d0
4333 move .line_in(pc,d0.w),d0
4334 objc_draw adr_saving_mod,d0,#0,xcenter_saving_mod,ycenter_saving_mod,wcenter_saving_mod,hcenter_saving_mod
4335 movem.l (sp)+,d0-a6
4336 rts
4337 .line_in
4338 dc.w line1,line2,line3,line4,line5,line6,line7,line8,line9,line10,line11,line12,line13
4339 .copie
4340 moveq #49,d0
4341 .bcopie
4342 move.b (a2)+,(a1)+
4343 dbra d0,.bcopie
4344 rts
4345
4346
4347 insere_change
4348 st error?
4349 movem.l d0-a6,-(sp)
4350 lea tabc,a2
4351 move d6,d5
4352 and #$f,d5
4353 lsr #4,d6
4354 and #$f,d6
4355 move.b (a2,d6.w),(a1)+
4356 move.b (a2,d5.w),(a1)+
4357
4358 moveq #1,d0
4359 cmp #12,line_indic
4360 bne.s .aj
4361 moveq #0,d0
4362 lea info_saving_mod,a1
4363 move #(25*13)-1,d1
4364 .scroll_info
4365 move #" ",(a1)+
4366 dbra d1,.scroll_info
4367 clr line_indic
4368 .aj
4369 add d0,line_indic
4370
4371 lea info_saving_mod,a1
4372 move line_indic,d0
4373 mulu #50,d0
4374 add d0,a1
4375 moveq #49,d0
4376 .rec_mess
4377 move.b (a0)+,(a1)+
4378 dbra d0,.rec_mess
4379
4380
4381 lea info_saving_mod,a2
4382 move.l adr_saving_mod,a0
4383 move.l 12+24*line1(a0),a1
4384 bsr .copie
4385 move.l 12+24*line2(a0),a1
4386 bsr .copie
4387 move.l 12+24*line3(a0),a1
4388 bsr .copie
4389 move.l 12+24*line4(a0),a1
4390 bsr .copie
4391 move.l 12+24*line5(a0),a1
4392 bsr .copie
4393 move.l 12+24*line6(a0),a1
4394 bsr .copie
4395 move.l 12+24*line7(a0),a1
4396 bsr .copie
4397 move.l 12+24*line8(a0),a1
4398 bsr .copie
4399 move.l 12+24*line9(a0),a1
4400 bsr .copie
4401 move.l 12+24*line10(a0),a1
4402 bsr .copie
4403 move.l 12+24*line11(a0),a1
4404 bsr .copie
4405 move.l 12+24*line12(a0),a1
4406 bsr .copie
4407 move.l 12+24*line13(a0),a1
4408 bsr .copie
4409 move line_indic,d0
4410 add d0,d0
4411
4412 tst line_indic
4413 bne.s .pas_aff_indic
4414 objc_draw adr_saving_mod,#0,#3,xcenter_saving_mod,ycenter_saving_mod,wcenter_saving_mod,hcenter_saving_mod
4415 .pas_aff_indic
4416 move line_indic,d0
4417 add d0,d0
4418 move .line_in(pc,d0.w),d0
4419 objc_draw adr_saving_mod,d0,#0,xcenter_saving_mod,ycenter_saving_mod,wcenter_saving_mod,hcenter_saving_mod
4420 movem.l (sp)+,d0-a6
4421 rts
4422 .line_in
4423 dc.w line1,line2,line3,line4,line5,line6,line7,line8,line9,line10,line11,line12,line13
4424 .copie
4425 moveq #49,d0
4426 .bcopie
4427 move.b (a2)+,(a1)+
4428 dbra d0,.bcopie
4429 rts
4430
4431 recopie
4432 move.l adr_saving_mod,a1
4433 move.l 12+24*operation(a1),a1
4434 moveq #19,d0
4435 .recopie
4436 move.b (a0)+,(a1)+
4437 dbra d0,.recopie
4438 rts
4439
4440 fonctions
4441 dc.l rts,rts,rts,rts,rts,rts,rts,rts
4442 dc.l note_off,note_on,rts,control_change,programm_change
4443 dc.l pression,pitch_bend
4444
4445 *** maintenant les datas
4446
4447
4448
4449 * section data
4450 tabc dc.b "0123456789ABCDEF"
4451 even
4452
4453 disp
4454 dc.b 27,"f",27,"E",27,"b",1,0
4455 even
4456
4457 table
4458 dc.w $0358,$0328,$02fa,$02d0,$02a6,$0280,$025c
4459 dc.w $023a,$021a,$01fc,$01e0,$01c5,$01ac,$0194,$017d
4460 dc.w $0168,$0153,$0140,$012e,$011d,$010d,$00fe,$00f0
4461 dc.w $00e2,$00d6,$00ca,$00be,$00b4,$00aa,$00a0,$0097
4462 dc.w $008f,$0087,$007f,$0078,$0071,$0000,$0000,$0000
4463
4464 commande
4465 dc.b 0 *0
4466 dc.b 1 *1
4467 dc.b 2 *2
4468 dc.b -1 *3
4469 dc.b -1 *4
4470 dc.b -1 *5
4471 dc.b -1 *6
4472 dc.b -1 *7
4473 dc.b -1 *8
4474 dc.b -1 *9
4475 dc.b 3 *a
4476 dc.b 4 *b
4477 dc.b 5 *c
4478 dc.b 6 *d
4479 dc.b -1 *e
4480 dc.b 7 *f
4481
4482
4483 table_effect * normalement 16 effects
4484 * fodra mettre les noms des vraies commandes , merci !
4485 rept 16
4486 dc.b "EFFET........",0
4487 endr
4488
4489 even
4490 nom_rsc dc.b "moulinex.rsc",0
4491 even
4492 modload dc.b "[3][Loading MOD|"
4493 musicname dc.b " ][Ah Yeah]"
4494 merde_kan_sauve dc.b "[1][AArrrggg ,|Error on Saving !!|operation Aborted][Gasp.]",0
4495 pas_file dc.b "[1][This file isn't|on the disk][Arf...]",0
4496 presente dc.b "[1][Programme Moulinex|Code by MIT|½1991][~Ah Yeah~]",0
4497 opt0 dc.b "[2][What do you want|do load ??][EXIT|.MOD|.LOW]",0
4498 opt1 dc.b "[2][Which Operation ?][LOAD|NEW|EXIT]",0
4499 pas_rsc dc.b "[1][.rsc missing !!!|programm aborted][ok]",0
4500 only_moyenne dc.b "[1][This programm|only work in|middle resolution][Beurk.]",0
4501 opt2 dc.b "[2][Do you want to|save this|module ???][YES|ABORD]",0
4502 pas_mod dc.b "[1][Not a good|module][ABORD]",0
4503 pasloadmod dc.b "[1][Sorry this fonction|don't work][Gasp.]",0
4504 mess_midi dc.b "[2][Edit and |transform pattern| with MIDI ??][NO...|OKAY!]",0
4505 confirm_loadpitch dc.b "[2][Do you want really|to load a|pitch split ??][NO|YES]",0
4506 confirm_savepitch dc.b "[2][Do you want really|to save a|pitch split ??][NO|YES]",0
4507 probleme_loadpitch dc.b "[1][The file isn't|on the disk !!][Arrgg..]",0
4508 probleme_savepitch dc.b "[1][Error on|saving file !|operation aborted][! OK !]",0
4509 confirm_clear_pos dc.b "[2][clear all |positions ??|and restore existing|positions'module ??][ NO |CLEAR|&RESTORE]",0
4510 confirm_save_pos dc.b "[2][What do you want |exactly to save ??|All or between |start & end pointeurs][ABORT|ALL|  POS ]",0
4511 confirm_load_pos dc.b "[2][Do you want really|to load this file|as positions ???][ NO ! | OK! ]",0
4512 ou_load_pos dc.b "[2][Do you want to load the|positions at first one ??|the saved positions ??|or the actual edit position ??][START|SAVED|ACTUAL]",0
4513 clear_rest_pos dc.b "[2][Do you want to clear |the rest of positions ??|and restore the current|module one ??][ NO | CLEAR |&RESTORE]",0
4514 cut_file_pos dc.b "[1][Arg , the file is too big| I must cut the end ...][ OKAY ]",0
4515 pas_fichier_low dc.b "[1][This isn't a|good .low file !!][ABORT]",0
4516 file_not_good dc.b "[1][The saved file is WRONG|save it in .LOW format|and then corrige|to try again][OKAY]",0
4517
4518
4519 trop_instrument dc.b " Error : Too many instrument !!! "
4520 instrument_too_long dc.b "Error the instrument $ "
4521 n_instrument_too_long dc.b "00 is so big (>65535 Bytes) "
4522 too_many_pos dc.b " Error : too many positions !!! (>128) "
4523 position_restart_too_big dc.b " The Restart-Position is so big (>128) "
4524 too_many_pattern dc.b " Error : too many pattern !!! (>256) "
4525 inst_sup_31_pat dc.b " Wrong instrument number (>31) , on pattern $"
4526 ninst_sup_31_pat dc.b "00 "
4527
4528 operation1 dc.b "Saving Music Name "
4529 operation2 dc.b "Saving Info Instruments"
4530 operation3 dc.b "Saving all positions"
4531 operation4 dc.b "Saving all patterns "
4532 operation5 dc.b "Saving Sample "
4533
4534 operation_wait dc.b " Waiting",0
4535 operation_start dc.b " Start ",0
4536 operation_stop dc.b " Stop ",0
4537 operation_continue dc.b "Continue",0
4538
4539 even
4540 type
4541 dc.b "LOW "
4542 dc.b "MOD "
4543 even
4544
4545 frequence
4546 dc.w 123,freq0
4547 dc.w 82,freq1
4548 dc.w 73,freq2
4549 dc.w 60,freq3
4550 dc.w 49,freq4
4551 dc.w 43,freq5
4552 dc.w 41,freq6
4553 dc.w 31,freq7
4554 dc.w 25,freq8
4555 dc.w 39,freq9
4556
4557 frequence1 * 9 decimal
4558 max = 999999999
4559 dc.l 4995
4560 dc.l max-121951000
4561 dc.l 7492
4562 dc.l max-682927000
4563 dc.l 8416
4564 dc.l max-438356000
4565 dc.l 10240
4566 dc.l max-0
4567 dc.l 12538
4568 dc.l max-775510000
4569 dc.l 14288
4570 dc.l max-372090000
4571 dc.l 14985
4572 dc.l max-365850000
4573 dc.l 19819
4574 dc.l max-354840000
4575 dc.l 24576
4576 dc.l max-0
4577 dc.l 15753
4578 dc.l max-846150000
4579
4580 dc.b " "
4581 write_note
4582 dc.b "C3 "
4583 dc.b "#C3"
4584 dc.b "D3 "
4585 dc.b "#D3"
4586 dc.b "E3 "
4587 dc.b "F3 "
4588 dc.b "#F3"
4589 dc.b "G3 "
4590 dc.b "#G3"
4591 dc.b "A3 "
4592 dc.b "#A3"
4593 dc.b "B3 "
4594 dc.b "C4 "
4595 dc.b "#C4"
4596 dc.b "D4 "
4597 dc.b "#D4"
4598 dc.b "E4 "
4599 dc.b "F4 "
4600 dc.b "#F4"
4601 dc.b "G4 "
4602 dc.b "#G4"
4603 dc.b "A4 "
4604 dc.b "#A4"
4605 dc.b "B4 "
4606 dc.b "C5 "
4607 dc.b "#C5"
4608 dc.b "D5 "
4609 dc.b "#D5"
4610 dc.b "E5 "
4611 dc.b "F5 "
4612 dc.b "#F5"
4613 dc.b "G5 "
4614 dc.b "#G5"
4615 dc.b "A5 "
4616 dc.b "#A5"
4617 dc.b "B5 "
4618 dc.b "C6 "
4619
4620 even
4621
4622 table_note
4623 dc.w 12+24*c3
4624 dc.w 12+24*c_3
4625 dc.w 12+24*d3
4626 dc.w 12+24*d_3
4627 dc.w 12+24*e3
4628 dc.w 12+24*f3
4629 dc.w 12+24*f_3
4630 dc.w 12+24*g3
4631 dc.w 12+24*g_3
4632 dc.w 12+24*a3
4633 dc.w 12+24*a_3
4634 dc.w 12+24*b3
4635 dc.w 12+24*c4
4636 dc.w 12+24*c_4
4637 dc.w 12+24*d4
4638 dc.w 12+24*d_4
4639 dc.w 12+24*e4
4640 dc.w 12+24*f4
4641 dc.w 12+24*f_4
4642 dc.w 12+24*g4
4643 dc.w 12+24*g_4
4644 dc.w 12+24*a4
4645 dc.w 12+24*a_4
4646 dc.w 12+24*b4
4647 dc.w 12+24*c5
4648 dc.w 12+24*c_5
4649 dc.w 12+24*d5
4650 dc.w 12+24*d_5
4651 dc.w 12+24*e5
4652 dc.w 12+24*f5
4653 dc.w 12+24*f_5
4654 dc.w 12+24*g5
4655 dc.w 12+24*g_5
4656 dc.w 12+24*a5
4657 dc.w 12+24*a_5
4658 dc.w 12+24*b5
4659 dc.w 12+24*c6
4660
4661 even
4662 include vdilib.s
4663 include aeslib.s
4664
4665 section bss
4666 def_track = *+nombre_de_notes_geres*3
4667 def_note = *+128++nombre_de_notes_geres*3
4668 def_note_off = *+128*2++nombre_de_notes_geres*3
4669 table_pitch_split ds.b 128*16
4670 dest ds.l 1
4671 taile ds.l 1
4672
4673 info_saving_mod ds.w 25*13
4674
4675 tailein ds.l 4*256 * 16 octets par info instruments
4676 name_instruments ds.w 11*256 * 22 caracteres par noms d'instruments
4677
4678 ecran ds.l 1
4679 div ds.w 1
4680 plot ds.w 1
4681 reste ds.l 1
4682 s_color ds.l 8
4683 adr_car ds.l 1
4684 s_mouse ds.l 16
4685 ap_id ds.w 1
4686 s_usp ds.l 1
4687 s_sr ds.w 1
4688 type_fichier ds.w 1
4689 commande_op ds.w 1
4690
4691 adr_form1 ds.l 1
4692 adr_form2 ds.l 1
4693 adr_form3 ds.l 1
4694 adr_form4 ds.l 1
4695 adr_form5 ds.l 1
4696 adr_instrum ds.l 1
4697 adr_midi ds.l 1
4698 adr_pitch ds.l 1
4699 adr_speed ds.l 1
4700 adr_pattern ds.l 1
4701 adr_midi_rec ds.l 1
4702 adr_first_loading ds.l 1
4703 adr_saving ds.l 1
4704 adr_saving_mod ds.l 1
4705
4706 x_center ds.w 1
4707 y_center ds.w 1
4708 w_center ds.w 1
4709 h_center ds.w 1
4710 xcenter0 ds.w 1
4711 ycenter0 ds.w 1
4712 wcenter0 ds.w 1
4713 hcenter0 ds.w 1
4714 xcenter1 ds.w 1
4715 ycenter1 ds.w 1
4716 wcenter1 ds.w 1
4717 hcenter1 ds.w 1
4718 xcenter2 ds.w 1
4719 ycenter2 ds.w 1
4720 wcenter2 ds.w 1
4721 hcenter2 ds.w 1
4722 xcenter3 ds.w 1
4723 ycenter3 ds.w 1
4724 wcenter3 ds.w 1
4725 hcenter3 ds.w 1
4726 xcenter_instrum ds.w 1
4727 ycenter_instrum ds.w 1
4728 wcenter_instrum ds.w 1
4729 hcenter_instrum ds.w 1
4730 xcenter_midi ds.w 1
4731 ycenter_midi ds.w 1
4732 wcenter_midi ds.w 1
4733 hcenter_midi ds.w 1
4734 xcenter_pitch ds.w 1
4735 ycenter_pitch ds.w 1
4736 wcenter_pitch ds.w 1
4737 hcenter_pitch ds.w 1
4738 xcenter_speed ds.w 1
4739 ycenter_speed ds.w 1
4740 wcenter_speed ds.w 1
4741 hcenter_speed ds.w 1
4742 xcenter_pattern ds.w 1
4743 ycenter_pattern ds.w 1
4744 wcenter_pattern ds.w 1
4745 hcenter_pattern ds.w 1
4746 xcenter_midi_rec ds.w 1
4747 ycenter_midi_rec ds.w 1
4748 wcenter_midi_rec ds.w 1
4749 hcenter_midi_rec ds.w 1
4750 xcenter_first_loading ds.w 1
4751 ycenter_first_loading ds.w 1
4752 wcenter_first_loading ds.w 1
4753 hcenter_first_loading ds.w 1
4754 xcenter_saving ds.w 1
4755 ycenter_saving ds.w 1
4756 wcenter_saving ds.w 1
4757 hcenter_saving ds.w 1
4758 xcenter_saving_mod ds.w 1
4759 ycenter_saving_mod ds.w 1
4760 wcenter_saving_mod ds.w 1
4761 hcenter_saving_mod ds.w 1
4762
4763 debut_sample ds.l 1
4764 fin_sample ds.l 1
4765 fin_sample_bis ds.l 1
4766 debut_boucle ds.l 1
4767 fin_boucle ds.l 1
4768 adr_replay ds.l 1
4769 objadr ds.l 1
4770 s_134 ds.l 1
4771 s_mfp ds.l 2
4772 s_484 ds.w 1
4773 obj ds.w 1
4774 oto ds.w 1
4775 retour ds.w 1
4776 s_ym ds.w 1
4777 gum ds.w 1
4778 w_handle ds.w 1
4779 twind ds.w 4
4780
4781 path ds.b 200
4782 path1 ds.b 200
4783
4784 namepitch ds.b 14
4785 sourcename ds.b 14
4786 destname ds.b 14
4787
4788 info_instrument ds.l 1
4789 oto1 ds.w 1
4790 auto? ds.w 1
4791 nb_in ds.w 1
4792 type_mod ds.l 1
4793 handle_disk ds.w 1
4794 handle_disk_write ds.w 1
4795 frequ1 ds.l 1
4796 frequ2 ds.l 1
4797 * flag
4798 velocityflag ds.w 1
4799 modulatiflag ds.w 1
4800 pitchbenflag ds.w 1
4801 canal_midi ds.w 1
4802 vitesse ds.w 1
4803 num_ins ds.w 1
4804 pos_restart ds.w 1
4805 nb_pos ds.w 1
4806 nb_pat ds.w 1
4807 pos_rec_start ds.w 1
4808 pos_rec_end ds.w 1
4809 pos_edit ds.w 1
4810 rec_start ds.w 1
4811 rec_end ds.w 1
4812 offset_pat ds.w 1
4813 s_70 ds.l 1
4814 indic_shift ds.w 1
4815 cmpt_vbl ds.w 1
4816 adr_sample ds.l 1
4817 taile_write ds.l 1
4818 frequence_choisi ds.w 1
4819 type_format ds.w 1
4820 line_indic ds.w 1
4821 indic_pat_error ds.w 1
4822 error? ds.w 1
4823
4824
4825 * midi in
4826 synchro_on_start ds.w 1
4827 start_midi ds.w 1
4828 ecrit_tout ds.w 4
4829 canal_receive ds.w 1
4830 note_voie ds.l 8
4831 volume_voie ds.l 8
4832 instrument_voie ds.l 8
4833 effect_voie ds.l 8
4834 nb_octets_midi ds.w 1
4835 nb_octets_clavier ds.w 1
4836 buffer_midi ds.l 100
4837 buffer_clavier ds.l 100
4838 s_118 ds.l 1
4839 pedale_contrl ds.w 16
4840 ***************** ne jamais separer
4841 save_startpos ds.w 1
4842 save_endpos ds.w 1
4843 pos ds.w 15000 * en tout maximum 15000 positions....
4844 ***************** fin de la der al
4845 buff_boulo ds.w 256*2
4846 adr_pos ds.l 1
4847 ds.l 2000
4848 a7_pile
4849 buffersource ds.l 70000

  ViewVC Help
Powered by ViewVC 1.1.26