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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26