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

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

  ViewVC Help
Powered by ViewVC 1.1.26