home *** CD-ROM | disk | FTP | other *** search
/ Computer Club Elmshorn Atari PD / CCE_PD.iso / pc / 0900 / CCE_0940.ZIP / CCE_0940.PD / WAXPLAY / DIRECT22.S < prev    next >
Text File  |  1994-10-25  |  39KB  |  2,055 lines

  1. MOD_BOX=0
  2. MOD_BOX2=1
  3. MOD_HEXA=0
  4. MOD_DECI=1
  5. MOD_WIND=0
  6. MOD_MENU=1
  7. MOD_ACC=0
  8.  
  9. WHO=0    ; 0=wax, 1=gen, 2=roro
  10.  
  11.     ifeq WHO
  12.     incdir d:\assemble\asources.wax\direct2d
  13.     endc
  14.     ifeq (WHO-1)
  15.     incdir d:\assemble\sources.wax\direct2d
  16.     endc
  17.     ifeq (WHO-2)
  18.     incdir d:\devpac\source\genuwax\direct2d
  19.     endc
  20.  
  21.     include guw_mac3.s
  22.     include direct2d.hs
  23.     ifeq MOD_ACC
  24.     ifeq WHO
  25.     output d:\assemble\asources.wax\direct2d\wax2play.prg
  26.     endc
  27.     ifeq (WHO-1)
  28.     output d:\assemble\sources.wax\direct2d\wax2play.prg
  29.     endc
  30.     ifeq (WHO-2)
  31.     output d:\devpac\source\genuwax\direct2d\wax2play.prg
  32.     endc
  33.     else
  34.     output c:\wax2play.acc
  35.     endc
  36.  
  37.     ; Direct to disk en lecture
  38.     ; NB buf variable, rattrape le retard, et décompression incluse
  39.     ; module externe utilisable par n'importe quel programme.
  40.     ; Passage de paramètres .TTP, et messages applications GEM.
  41.     ; 24 VII 93 / 27 VII 93 / 30 VII 93 / 07 VIII 93 / 16 VIII 93  / 30 VIII 93 / 25-IX-93
  42.     ; 18/II/94, 25/II/94, 02/IV/94, 04/IV/94, 15/IV/94, 23/IV 24/IV, 27/IV
  43.     ; 30/IV 29/V 30/V 1/VI 18/VI 24/VII
  44.     ; Gem version : 23/II/1994.
  45.  
  46.     section TEXT
  47.  
  48. debut:    init_prg 1024,#name_rsc
  49.  
  50.     shel_write #9,#1,#0,#0,#0
  51.  
  52.     clr sample_playing
  53.     clr.l are_there_more
  54.     clr.l play_list_ptr
  55.     clr which_clock        ; interne
  56.  
  57.     move.l #dec0,charge_octets    ; routine par défaut
  58.  
  59.     tst acc_app
  60.     bne.s .not_acc
  61.     menu_register global+4,#string_acc    ; C 1 ACC
  62.     move d0,acc_number
  63.     bmi fin
  64.  
  65.     bra boucle_gem_principale
  66.  
  67. .not_acc:    move #METHOD_1,d0        ; C 1 PRG
  68.     move d0,previous_check2
  69.     moveq #1,d1
  70.     bsr check_menu
  71.  
  72.     move #FREQUENCY_0,d0        ; interne
  73.     moveq #1,d1
  74.     bsr check_menu
  75.  
  76. *    move #FREQUENCY_9,d0
  77. *    move #0,d1
  78. *    bsr grey_menu    
  79.  
  80.     tst copro
  81.     bne.s .is_copro
  82.     move #SPECIAL,d0
  83.     move #0,d1
  84.     bsr grey_menu    
  85. .is_copro:
  86.  
  87.     move.b #freq8,frequency_for_play
  88.     move #FREQUENCY_1,d0
  89.     move d0,previous_check1
  90.     moveq #1,d1
  91.     bsr check_menu
  92.  
  93. *    move #1,loop
  94. *    move #FILES_LOOP,d0
  95. *    moveq #1,d1
  96. *    bsr check_menu
  97.  
  98.     lea original_table_dvswax,a0
  99.     lea table_dvswax,a1
  100.     move #256-1,d0
  101. .default:    move.w (a0)+,(a1)+
  102.     dbf d0,.default
  103.  
  104.     save a5
  105.     bsr show_menu
  106.     load a5
  107.  
  108.     clr d0
  109.     move.b $80(a5),d0
  110.     beq.s boucle_gem_principale
  111.     subq #1,d0
  112.     lea $81(a5),a0
  113.     lea name_2_load,a1
  114. copy_name:    move.b (a0)+,(a1)+
  115.     dbf d0,copy_name
  116.  
  117.     bra load_file2
  118.  
  119. boucle_gem_principale:
  120.     clr d0
  121.     tst acc_app
  122.     beq.s .its_acc
  123.     bset #EVNT_KEYBD,d0
  124. .its_acc:    bset #EVNT_MESAG,d0
  125.     bset #EVNT_TIMER,d0
  126.     move #300,d1        ; timer en ms
  127.     bsr traite_evenement_gem
  128.  
  129.     btst #EVNT_KEYBD,d0
  130.     bne keyboard
  131.  
  132.     btst #EVNT_TIMER,d0
  133.     bne.s timer
  134.  
  135.     btst #EVNT_MESAG,d0
  136.     bne message
  137.  
  138.     bra.s boucle_gem_principale
  139.  
  140.  
  141. timer:    tst sample_playing
  142.     beq.s .no
  143.     tst loop
  144.     bne.s .loop            ; si loop pas de fin de fichier...
  145.     tst end_of_file
  146.     bne.s .wait
  147. .loop:    clr end_of_file
  148.     bsr check_d2d_load
  149. .no:    bra boucle_gem_principale
  150.  
  151. .wait:    move semaphore,d0
  152.     cmp.w #NB_BUFF-1,d0        ; on laisse jouer les derniers
  153.     blt boucle_gem_principale
  154.     clr end_of_file
  155.     bsr stop_if_running
  156.  
  157.     tst.l are_there_more
  158.     bne load_file
  159.  
  160.     tst.l play_list_ptr
  161.     bne load_file
  162.  
  163.     bra boucle_gem_principale
  164.  
  165. unknown_message:
  166.     neg d1
  167.     cmp.w #AP_TERM,d1        ; AP_TERM
  168.     beq fin
  169.  
  170.     cmp.w #ACC_OPEN,d1        ; ACC_OPEN
  171.     bne.s .not_open_acc
  172.  
  173.     move.w acc_number,d2    ; store the application id
  174.     cmp.w buffer_msg+4*2,d2
  175.     bne boucle_gem_principale
  176.  
  177.     bsr stop_if_running
  178.     clr.l are_there_more
  179.     bra load_file
  180. .not_open_acc:
  181.  
  182.     cmp.w #ACC_CLOSE,d1        ; ACC_CLOSE
  183.     bne.s .not_close_acc
  184.  
  185.     move.w acc_number,d2    ; store the application id
  186.     cmp.w buffer_msg+3*2,d2
  187.     bne boucle_gem_principale
  188.  
  189. *    tst sample_playing
  190. *    beq boucle_gem_principale
  191.  
  192. *    lea alert_accclose,a0
  193. *    bsr alert_box
  194.  
  195. *    cmp.w #1,d0
  196. *    beq boucle_gem_principale
  197.  
  198.     bsr stop_if_running
  199.     bra boucle_gem_principale
  200. .not_close_acc:
  201.  
  202.     cmp.w #224,d1        ; on m'a envoye 1 msg
  203.     bne.s pas_pour_moi
  204.  
  205.     *move buffer_msg+2,d0        ; qui m'a anvoyé ça ?
  206.     move buffer_msg+4,d0
  207.     lea buffer_msg+2*3,a0
  208.     lea store_msg,a1
  209.     move #8-3-1,d1
  210. .cp:    move.w (a0)+,(a1)+
  211.     dbf d1,.cp
  212.  
  213.     tst d0
  214.     beq.s .finish
  215.     appl_read global+4,d0,a1
  216. .finish:
  217.  
  218.     lea store_msg,a0
  219.  
  220.     cmp.l #'stop',(a0)        ;'stop'
  221.     bne.s .pastop 
  222.     bsr stop_if_running
  223.     bra boucle_gem_principale
  224.  
  225. .pastop:    cmp.l #'play',(a0)
  226.     bne.s .pasplay
  227.  
  228.     lea 4+1(a0),a0        ;'play='
  229.     lea name_2_load,a1
  230. .ccp:    move.b (a0)+,(a1)+
  231.     tst.b -1(a1)
  232.     bne.s .ccp
  233.  
  234.     bra load_file2
  235.  
  236. .pasplay:
  237.     bra boucle_gem_principale
  238.  
  239. pas_pour_moi:
  240.     bra boucle_gem_principale
  241.  
  242. keyboard:    lea conversion,a0
  243.     bsr convert_key_in_event
  244.     tst d7
  245.     bne boucle_gem_principale
  246.  
  247. message:    tst d1
  248.     bmi unknown_message
  249.  
  250.     cmp.b #FREQUENCY_1,d1
  251.     bne.s pas_1
  252.     move.b #freq8,frequency_for_play
  253.     move #FREQUENCY_1,d6
  254.     bsr menu_freq_check
  255. pas_1:    cmp.b #FREQUENCY_2,d1
  256.     bne.s pas_2
  257.     move.b #freq10,frequency_for_play
  258.     move #FREQUENCY_2,d6
  259.     bsr menu_freq_check
  260. pas_2:    cmp.b #FREQUENCY_3,d1
  261.     bne.s pas_3
  262.     move.b #freq12,frequency_for_play
  263.     move #FREQUENCY_3,d6
  264.     bsr menu_freq_check
  265. pas_3:    cmp.b #FREQUENCY_4,d1
  266.     bne.s pas_4
  267.     move.b #freq16,frequency_for_play
  268.     move #FREQUENCY_4,d6
  269.     bsr menu_freq_check
  270. pas_4:    cmp.b #FREQUENCY_5,d1
  271.     bne.s pas_5
  272.     move.b #freq20,frequency_for_play
  273.     move #FREQUENCY_5,d6
  274.     bsr menu_freq_check
  275. pas_5:    cmp.b #FREQUENCY_6,d1
  276.     bne.s pas_6
  277.     move.b #freq25,frequency_for_play
  278.     move #FREQUENCY_6,d6
  279.     bsr menu_freq_check
  280. pas_6:    cmp.b #FREQUENCY_7,d1
  281.     bne.s pas_7
  282.     move.b #freq33,frequency_for_play
  283.     move #FREQUENCY_7,d6
  284.     bsr menu_freq_check
  285. pas_7:    cmp.b #FREQUENCY_8,d1
  286.     bne.s pas_8
  287.     move.b #freq49,frequency_for_play
  288.     move #FREQUENCY_8,d6
  289.     bsr menu_freq_check
  290. pas_8:    cmp.b #FREQUENCY_9,d1
  291.     bne.s pas_9
  292.  
  293.     move.w #1,which_clock
  294.     tst sample_playing
  295.     beq.s .not_set
  296.     
  297.     move.w #1,-(sp)        ; no hand shaking
  298.     clr d0
  299.     move.b frequency_for_play,d0
  300.     move.w d0,-(sp)
  301.     move.w which_clock,-(sp)    ; 1=externe
  302.     move.w #8,-(sp)        ; destination : DAC
  303.     move.w #0,-(sp)        ; source : DMA
  304.     appel xbios,139,12
  305. .not_set:    move.w #FREQUENCY_9,d0
  306.     moveq #1,d1
  307.     bsr check_menu
  308.     move.w #FREQUENCY_0,d0
  309.     moveq #0,d1
  310.     bsr check_menu
  311.  
  312. pas_9:    cmp.b #FREQUENCY_0,d1
  313.     bne.s pas_0
  314.  
  315.     move.w #0,which_clock
  316.     tst sample_playing
  317.     beq.s .not_set
  318.     
  319.     move.w #1,-(sp)        ; no hand shaking
  320.     clr d0
  321.     move.b frequency_for_play,d0
  322.     move.w d0,-(sp)
  323.     move.w which_clock,-(sp)    ; 0=interne
  324.     move.w #8,-(sp)        ; destination : DAC
  325.     move.w #0,-(sp)        ; source : DMA
  326.     appel xbios,139,12
  327.  
  328. .not_set:    move.w #FREQUENCY_0,d0
  329.     moveq #1,d1
  330.     bsr check_menu
  331.     move.w #FREQUENCY_9,d0
  332.     moveq #0,d1
  333.     bsr check_menu
  334. pas_0:
  335.  
  336.     cmp.b #METHOD_1,d1
  337.     bne.s pas_f1
  338.     bsr check_method
  339.     move.l #dec0,charge_octets
  340. pas_f1:    cmp.b #METHOD_2,d1
  341.     bne.s pas_f2
  342.     bsr check_method
  343.     move.l #dec1,charge_octets
  344. pas_f2:    cmp.b #METHOD_3,d1
  345.     bne.s pas_f3
  346.     bsr check_method
  347.     move.l #dec2,charge_octets
  348. pas_f3:    cmp.b #METHOD_4,d1
  349.     bne.s pas_f4
  350.     bsr check_method
  351.     move.l #dec3,charge_octets
  352. pas_f4:    cmp.b #METHOD_5,d1
  353.     bne.s pas_f5
  354.     bsr check_method
  355.     move.l #dec4,charge_octets
  356. pas_f5:    cmp.b #METHOD_6,d1
  357.     bne.s pas_f6
  358.     bsr check_method
  359.     move.l #dec5,charge_octets
  360. pas_f6:    cmp.b #METHOD_7,d1
  361.     bne.s pas_f7
  362.     bsr check_method
  363.     move.l #dec6,charge_octets
  364. pas_f7:    cmp.b #METHOD_8,d1
  365.     bne.s pas_f8
  366.     bsr check_method
  367.     move.l #dec7,charge_octets
  368. pas_f8:    cmp.b #METHOD_9,d1
  369.     bne.s pas_f9
  370.     bsr check_method
  371.     move.l #dec8,charge_octets
  372. pas_f9:
  373.  
  374.     cmp.w #INFO_MENU,d1
  375.     bne.s .pas1
  376.     move.w #FORM_INFOS,d0
  377.     bsr traite_formulaire
  378.     bra boucle_gem_principale
  379.     
  380. .pas1:
  381.     cmp.w #FILES_QUIT,d1
  382.     beq fin
  383.  
  384.     cmp.w #FILES_STOP,d1
  385.     bne.s .no1
  386.     bsr stop_if_running
  387.     bra boucle_gem_principale
  388. .no1:
  389.     cmp.w #FILES_LOAD,d1
  390.     beq load_file
  391.  
  392.     cmp.w #FILES_LOOP,d1
  393.     beq loop_file
  394.  
  395.     cmp.w #FILES_INFO,d1
  396.     beq show_info_about_a_file    ; infos sur 1 DVW
  397.  
  398.     cmp.w #CONVERSION_1,d1        ; stéréo -> mono
  399.     beq conv1
  400.  
  401.     cmp.w #CONVERSION_2,d1
  402.     beq conv2
  403.  
  404.     cmp.w #CONVERSION_3,d1        ; mono -> stéréo
  405.     beq conv3
  406.  
  407.     cmp.w #CONVERSION_4,d1        ; dvsm -> trk
  408.     beq conv4
  409.  
  410.     cmp.w #CONVERSION_5,d1        ; trk stéréo -> DVSW
  411.     beq conv5
  412.  
  413.     cmp.w #CONVERSION_6,d1        ; trk mono -> DVSW
  414.     beq conv6
  415.  
  416.     cmp.w #CONVERSION_7,d1        ; dvsw -> TRK
  417.     beq conv7
  418.  
  419.     cmp.w #SPECIAL_ANALYSE,d1
  420.     beq analyse_trk
  421.  
  422.     cmp.w #CONVERSION_CHOOS,d1
  423.     beq choose_table
  424.  
  425.     cmp.w #SPECIAL_DISTORS,d1
  426.     beq analyse_distorsion
  427.  
  428.     bra boucle_gem_principale
  429. ************************************************************************************************
  430. show_info_about_a_file:
  431.     move.l #'*.DV',whato
  432.     move.l #'W,*.',whato+4
  433.     move.l #'LT'*65536,whato+8
  434.     lea text_infodvw,a0
  435.     bsr copy_in2_select
  436.     bsr fileselect
  437.     tst d4
  438.     beq annn
  439.  
  440.     lea params_it,a0
  441. .f:    tst.b (a0)+        ; X X X 0 ptr
  442.     bne.s .f
  443.  
  444.     cmp.l #'.LT'*256,-4(a0)
  445.     beq its_list_of_track
  446.  
  447.     FS_FIRST #$23,params_it
  448.     GET_DTA
  449.     move.l d0,a0
  450.     move.l 26(a0),taille_fich_dvw
  451.  
  452.     file_open read,params_it
  453.     tst d0
  454.     bmi annn
  455.     move.w d0,handle1
  456.  
  457.     file_read #read_info_dvw,#4,handle1
  458.  
  459.     move.l read_info_dvw,d0
  460.     cmp.l #'DVSW',d0
  461.     bne annn2
  462.  
  463.     file_read #read_info_dvw,#4,handle1
  464.     file_close handle1
  465.  
  466.     move.w #INFO_ON_FILE,d0
  467.     lea add_tree,a0
  468.     bsr get_addr_tree
  469.  
  470.     move.l add_tree,a0        ; a0
  471.     move.w #PACKED_YES_NO,d0
  472.     bsr get_text_add        ; a1
  473.     move.l #'NO'*65536,(a1)
  474.     tst.b read_info_dvw
  475.     beq.s .no
  476.     move.l #'YES'*256,(a1)
  477. .no:
  478.     move.l add_tree,a0        ; a0
  479.     move.w #LENGTH_PACK_CODE,d0
  480.     bsr get_text_add        ; a1
  481.     clr.l d0
  482.     move.b read_info_dvw+1,d0
  483.     bsr deci2
  484.  
  485.     move.l add_tree,a0        ; a0
  486.     move.w #FREQUENZ,d0
  487.     bsr get_text_add        ; a1
  488.  
  489.     move.w #'??',(a1)
  490.     clr.b 2(a1)
  491.     move.l #33000,freq_dvw
  492.     clr d0
  493.     move.b read_info_dvw+3,d0
  494.     beq.s .fin            ; unknown
  495.     lea table_cv_freq,a0
  496. .recom:    tst.w (a0)
  497.     beq.s .fin
  498.     cmp.w 2(a0),d0
  499.     beq.s .found
  500.     lea 8(a0),a0
  501.     bra.s .recom
  502. .found:    move.w (a0),(a1)
  503.     clr.l d0
  504.     move.w 6(a0),d0
  505.     move.l d0,freq_dvw
  506. .fin:
  507.  
  508.     ; 0=stéréo,1=mono
  509.     move.l add_tree,a0        ; a0
  510.     move.w #TYPE_OF_SOUND,d0
  511.     bsr get_text_add        ; a1
  512.  
  513.     move.l taille_fich_dvw,d7
  514.     sub.l #16+256*2+4,d7
  515.  
  516.     move.l #'ster',(a1)
  517.     move.w #'eo',4(a1)
  518.     clr.b 6(a1)
  519.     tst.b read_info_dvw+2
  520.     beq.s .str
  521.     move.l #'mono',(a1)
  522.     clr.b 4(a1)
  523.     add.l #2,d7
  524.     mulu.l #2,d7
  525. .str:    divu.l #2,d7
  526.  
  527.     divu.l freq_dvw,d7
  528.  
  529. same_as_before:            ; le programme pour *.LT reprend ici
  530.  
  531.     divu #60,d7
  532.     move.w d7,d6
  533.     ext.l d6        ; minutes
  534.     swap d7
  535.     ext.l d7        ; secs
  536.     save d6-d7
  537.  
  538.     move.l add_tree,a0        ; a0
  539.     move.w #MINUTES,d0
  540.     bsr get_text_add        ; a1
  541.     load d6-d7
  542.     move.l d6,d0
  543.     save d7
  544.     move.w #'??',(a1)
  545.     clr.b 2(a1)
  546.     tst.b read_info_dvw+3
  547.     beq.s .ok
  548.     bsr deci2
  549. .ok:
  550.  
  551.     move.l add_tree,a0        ; a0
  552.     move.w #SECONDS,d0
  553.     bsr get_text_add        ; a1
  554.     load d7
  555.     move.l d7,d0
  556.     move.w #'??',(a1)
  557.     tst.b read_info_dvw+3
  558.     beq.s .ok2
  559.     bsr deci2
  560. .ok2:
  561.  
  562.     move #INFO_ON_FILE,d0
  563.     bsr traite_formulaire
  564.  
  565. annn:    bra boucle_gem_principale
  566. annn2:    file_close handle1
  567.     bra.s annn
  568.                 ***************
  569. its_list_of_track:
  570.     file_open read,params_it
  571.     move d0,d7
  572.     bmi annn
  573.  
  574.     file_read #list_of_tracks,#4096,d7
  575.     move.l d0,d6
  576.     bmi.s annn
  577.  
  578.     file_close d7
  579.  
  580.     cmp.l #4096,d6        ; liste trop grande
  581.     beq.s annn
  582.  
  583.     lea list_of_tracks,a0
  584.     clr.b (a0,d6.l)
  585.     clr.l d1            ; compte les secondes
  586.  
  587. treat_nxt:    tst.b (a0)
  588.     beq dis_was_last
  589.  
  590.     cmp.b #' ',(a0)
  591.     beq.s .zap_dis
  592.     cmp.b #lf,(a0)
  593.     beq.s .zap_dis
  594.     cmp.b #rc,(a0)
  595.     beq.s .zap_dis
  596.     cmp.b #9,(a0)    ; tab
  597.     beq.s .zap_dis
  598.     bra.s .cool
  599. .zap_dis:    lea 1(a0),a0
  600.     bra.s treat_nxt
  601.  
  602. .cool:    lea name_2_load,a1
  603.  
  604. .redo:    move.b (a0)+,d0
  605.     beq.s .end_ofl
  606.     cmp.b #' ',d0
  607.     beq.s .last
  608.     cmp.b #lf,d0
  609.     beq.s .last
  610.     cmp.b #rc,d0
  611.     beq.s .last
  612.     cmp.b #9,d0
  613.     beq.s .last
  614.     move.b d0,(a1)+
  615.     bra.s .redo
  616. .end_ofl:    lea -1(a0),a0    ; pour pointer sur le 0
  617.  
  618. .last:    clr.b (a1)+
  619.  
  620.     save a0/d1
  621.  
  622.     FS_FIRST #$23,name_2_load
  623.     GET_DTA
  624.     move.l d0,a0
  625.     move.l 26(a0),taille_fich_dvw
  626.  
  627.     file_open read,name_2_load
  628.     load a0/d1
  629.  
  630.     move.w d0,d7
  631.     bmi do_not_count
  632.  
  633.     save a0/d1
  634.  
  635.     file_read #read_info_dvw,#4,d7
  636.     move.l read_info_dvw,d6
  637.     file_read #read_info_dvw,#4,d7
  638.     file_close d7
  639.  
  640.     load a0/d1
  641.  
  642.     cmp.l #'DVSW',d6
  643.     bne do_not_count
  644.  
  645.     clr d0
  646.     move.b read_info_dvw+3,d0
  647.     beq.s do_not_count
  648.  
  649.     lea table_cv_freq,a1
  650. .recom:    tst.w (a1)
  651.     beq.s do_not_count
  652.     cmp.w 2(a1),d0
  653.     beq.s .found
  654.     lea 8(a1),a1
  655.     bra.s .recom
  656. .found:    clr.l d0
  657.     move.w 6(a1),d0
  658.  
  659.     move.l taille_fich_dvw,d7
  660.     sub.l #16+256*2+4,d7
  661.  
  662.     tst.b read_info_dvw+2
  663.     beq.s .str
  664.     add.l #2,d7
  665.     mulu.l #2,d7
  666. .str:    divu.l #2,d7
  667.  
  668.     divu.l d0,d7
  669.  
  670.     add.l d7,d1
  671.  
  672. do_not_count:
  673.     bra treat_nxt
  674.  
  675. dis_was_last:
  676.     save d1
  677.     move.w #INFO_ON_FILE,d0
  678.     lea add_tree,a0
  679.     bsr get_addr_tree
  680.  
  681.     move.l add_tree,a0        ; a0
  682.     move.w #PACKED_YES_NO,d0
  683.     bsr get_text_add        ; a1
  684.     move.l #'YES'*256,(a1)
  685.  
  686.     move.l add_tree,a0        ; a0
  687.     move.w #TYPE_OF_SOUND,d0
  688.     bsr get_text_add        ; a1
  689.     move.l #'???'*256,(a1)
  690.  
  691.     move.l add_tree,a0        ; a0
  692.     move.w #FREQUENZ,d0
  693.     bsr get_text_add        ; a1
  694.     move.w #'?'*256,(a1)
  695.  
  696.     move.l add_tree,a0        ; a0
  697.     move.w #LENGTH_PACK_CODE,d0
  698.     bsr get_text_add        ; a1
  699.     move.w #'8'*256,(a1)
  700.  
  701.     load d7
  702.     move.b #1,read_info_dvw+3    : pour ruser et forcer la rout à afficher
  703.     bra same_as_before
  704.  
  705. ************************************************************************************************
  706.  
  707. choose_table:
  708.     move.l #'*.TA',whato
  709.     move.w #'B'*256,whato+4
  710.     lea text_table,a0
  711.     bsr copy_in2_select
  712.     bsr fileselect
  713.     tst d4
  714.     beq ann
  715.  
  716.     file_open read,params_it
  717.     tst d0
  718.     bmi ann
  719.     move.w d0,handle1
  720.  
  721.     file_read #table_dvswax,#256*2,handle1
  722.     move.l d0,d7
  723.  
  724.     file_close handle1
  725.     cmp.l #256*2,d7
  726.     bne .pas_c
  727.  
  728.     cmp.w #$8000,table_dvswax
  729.     bne .pas_c
  730.     cmp.w #$0000,table_dvswax+128*2
  731.     bne .pas_c
  732.     cmp.w #$7fff,table_dvswax+255*2
  733.     bne .pas_c
  734.  
  735.     bra.s ann
  736.  
  737. .pas_c:    lea original_table_dvswax,a0
  738.     lea table_dvswax,a1
  739.     move #256-1,d0
  740. .default:    move.w (a0)+,(a1)+
  741.     dbf d0,.default
  742.  
  743.     lea alert_table,a0
  744.     bsr alert_box
  745.  
  746. ann:    bra boucle_gem_principale
  747.     
  748.         ********** Analyses **********
  749. analyse_distorsion:
  750.     move.l #'*.TR',whato        ; Left/Right -> Left + Right
  751.     move.w #'K'*256,whato+4
  752.     lea text_dist1,a0
  753.     bsr copy_in2_select
  754.     bsr fileselect
  755.     tst d4
  756.     beq .annule_dist
  757.  
  758.     bsr stop_if_running        ; car je fais test_if_wax_info_present2
  759.  
  760.     lea params_it,a0
  761.     bsr test_if_wax_info_present2
  762.     file_open read,params_it
  763.     move.w d0,handle1
  764.     bmi .annule_dist
  765.     file_seek #0,handle1,header
  766.  
  767.     lea text_dist2,a0
  768.     bsr copy_in2_select
  769.     bsr fileselect
  770.     tst d4
  771.     beq .annule_dist1
  772.  
  773.     lea params_it,a0
  774.     bsr test_if_wax_info_present2
  775.     file_open read,params_it
  776.     move.w d0,handle2
  777.     bmi .annule_dist1
  778.     file_seek #0,handle2,header
  779.  
  780. .analyse_again:
  781.     file_read #load,#taille_buff*2,handle1
  782.     cmp.l #taille_buff*2,d0
  783.     bne .annule_dist2
  784.     file_read #load+taille_buff*2,#taille_buff*2,handle2
  785.     cmp.l #taille_buff*2,d0
  786.     bne .annule_dist2
  787.  
  788.     lea load,a0
  789.     lea load+taille_buff*2,a1
  790.     fmove.w #0,fp0        ; somme des deltas
  791.     fmove.w #0,fp7        ; compteur
  792.  
  793. .redo:    move.w (a0)+,d6
  794.     move.w (a1)+,d7
  795.     ext.l d6
  796.     ext.l d7
  797.     beq.s .zero
  798.  
  799.     sub.l d7,d6
  800.     fmove.l d6,fp1
  801.     fmove.l d7,fp2
  802.     fabs.x fp1
  803.     fabs.x fp2
  804.     fdiv.x fp2,fp1
  805.     fadd.x fp1,fp0
  806.     fadd.x #1,fp7
  807.  
  808. .zero:    subq.l #2,d0
  809.     bgt.s .redo
  810.  
  811.     fdiv.x fp7,fp0
  812.     fmul.x #1000,fp0
  813.  
  814.     move.w #DISTORSION,d0
  815.     lea add_tree,a0
  816.     bsr get_addr_tree
  817.  
  818.     move.l add_tree,a0        ; a0
  819.     move.w #DIST_PER_MILE,d0
  820.     bsr get_text_add        ; a1
  821.     fmove.l fp0,d0
  822.     bsr deci2
  823.  
  824.     move #DISTORSION,d0
  825.     bsr traite_formulaire
  826.  
  827.     cmp.w #DMORE,d0
  828.     beq .analyse_again
  829.  
  830. .annule_dist2:
  831.     file_close handle2
  832. .annule_dist1:
  833.     file_close handle1
  834. .annule_dist:
  835.     bra boucle_gem_principale
  836.  
  837.     
  838. analyse_trk:move.l #'*.TR',whato        ; stéréo -> Mono
  839.     move.w #'K'*256,whato+4
  840.     lea text_analyse,a0
  841.     bsr copy_in2_select
  842.     bsr fileselect
  843.     tst d4
  844.     beq annule_ana
  845.  
  846.     bsr stop_if_running
  847.  
  848.     file_open read,params_it
  849.     move.w d0,handle1
  850.     bmi annule_ana
  851.  
  852. analyse_again:
  853.     file_read #load,#taille_buff*2,handle1
  854.     cmp.l #taille_buff*2,d0
  855.     bne pas_c
  856.  
  857.     lea load+taille_buff*2,a0
  858.     move.l #taille_buff*2/4,d0
  859. .clr:    clr.l (a0)+
  860.     subq.l #1,d0
  861.     bne.s .clr
  862.  
  863.     lea load,a0
  864.     lea load+taille_buff*2,a1
  865.     move.w (a0)+,d0
  866.     ext.l d0
  867.     move.w (a0)+,d1
  868.     ext.l d1
  869. .redo:    cmp.l #load+taille_buff*2,a0
  870.     bge.s .fini
  871.     move.l d0,d2
  872.     move.w (a0)+,d0
  873.     ext.l d0
  874.     sub.l d0,d2
  875.     bpl.s .pos1
  876.     neg.l d2
  877. .pos1:    move.l d1,d3
  878.     move.w (a0)+,d1
  879.     ext.l d1
  880.     sub.l d1,d3
  881.     bpl.s .pos2
  882.     neg.l d3
  883. .pos2:    addq.w #1,(a1,d2.l*2)
  884.     addq.w #1,(a1,d3.l*2)
  885.     bra.s .redo
  886.  
  887. .fini:
  888.  
  889.     move.w #ANALYSE,d0
  890.     lea add_tree,a0
  891.     bsr get_addr_tree
  892.     move.l add_tree,a0        ; a0
  893.  
  894.     move.w #ABS_MIN_DELTA,d0
  895.     bsr get_text_add        ; a1
  896.     lea load+taille_buff*2,a2
  897. .ze:    tst.w (a2)+
  898.     beq.s .ze
  899.     lea -2(a2),a2
  900.     sub.l #load+taille_buff*2,a2
  901.     move.l a2,d0
  902.     lsr.l #1,d0
  903.     bsr deci2
  904.  
  905.     move.w #ABS_MAX_DELTA,d0
  906.     bsr get_text_add        ; a1
  907.     lea load+taille_buff*2+65536*2,a2
  908. .ze0:    tst.w -(a2)
  909.     beq.s .ze0
  910.     sub.l #load+taille_buff*2,a2
  911.     move.l a2,d0
  912.     lsr.l #1,d0
  913.     bsr deci2
  914.  
  915.     move.w #AVERAGE_DELTA,d0
  916.     bsr get_text_add
  917.     lea load+taille_buff*2,a2
  918.     fmove.w #0,fp0        ; index
  919.     fmove.w #0,fp2        ; somme
  920.     clr.l d0
  921.  
  922. .redoo:    cmp.l #load+taille_buff*2+65536*2,a2
  923.     beq.s .f
  924.     move.w (a2)+,d0        ; jusqu'à 65535
  925.     fmove.l d0,fp1
  926.     fmul.x fp0,fp1
  927.     fadd.x fp1,fp2
  928.     fadd.x #1,fp0
  929.     bra.s .redoo
  930. .f:    fmove.l #taille_buff*2/2,fp0    ; nombre d'échantillons traité
  931.     fdiv.x fp0,fp2
  932.     fmove.l fp2,d0
  933.     bsr deci2
  934.  
  935.     move.w #DELTA_VARIANCE,d0
  936.     bsr get_text_add
  937.     lea load+taille_buff*2,a2
  938.     ;fp2: moyenne
  939.     fmove.w #0,fp0        ; index (delta 0 -> 65535)
  940.     fmove.w #0,fp3        ; somme des carrés
  941.     clr.l d0
  942.  
  943. .redooo:    cmp.l #load+taille_buff*2+65536*2,a2
  944.     beq.s .ff
  945.     move.w (a2)+,d0        ; jusqu'à 65535
  946.     fmove.l d0,fp1        ; nombre
  947.     
  948.     fmove.x fp2,fp4        ; moy
  949.     fsub.x fp0,fp4        ; -val actuelle
  950.     fmul.x fp4,fp4        ; ^2
  951.     fmul.x fp1,fp4        ; * nb val actuelle
  952.     
  953.     fadd.x fp4,fp3
  954.     fadd.x #1,fp0
  955.     bra.s .redooo
  956. .ff:    fmove.l #taille_buff*2/2,fp0    ; nombre d'échantillons traités
  957.     fdiv.x fp0,fp3
  958.     fsqrt.x fp3
  959.     fmove.l fp3,d0
  960.     bsr deci2
  961.  
  962.     move #ANALYSE,d0
  963.     bsr traite_formulaire
  964.  
  965.     cmp.w #MORE,d0
  966.     beq analyse_again
  967.  
  968. pas_c:    file_close handle1
  969. annule_ana:    bra boucle_gem_principale
  970.     
  971.         ********** Conversions ************
  972.  
  973. conv1:    move.l #'*.TR',whato        ; stéréo -> Mono
  974.     move.w #'K'*256,whato+4
  975.     lea text_mono1,a0
  976.     bsr copy_in2_select
  977.     bsr fileselect
  978.     tst d4
  979.     beq annule1
  980.  
  981.     bsr check_d2d_load
  982.  
  983.     file_open read,params_it
  984.     move.w d0,handle1
  985.     bmi annule1
  986.  
  987.     lea text_mono2,a0
  988.     bsr copy_in2_select
  989.     bsr fileselect
  990.     tst d4
  991.     beq .annule2
  992.  
  993.     file_open write,params_it
  994.     move.w d0,handle2
  995.     bmi .annule2
  996.  
  997.     bsr stop_if_running
  998.  
  999. .all_file:    file_read #load,#taille_buff*NB_BUFF/2,handle1
  1000.     tst.l d0
  1001.     beq.s .annule3
  1002.  
  1003.     lsr.l #1,d0        ; /2
  1004.     move.l d0,d7
  1005.     lsr.l #1,d0        ; /2 : combien de fois (1.w+1.w)=4 octets ?
  1006.  
  1007.     lea load,a0
  1008.     lea load+taille_buff*NB_BUFF/2,a1
  1009.  
  1010. .mono:    move.w (a0)+,d1    ; 4 par 4
  1011.     ext.l d1
  1012.     move.w (a0)+,d2
  1013.     ext.l d2
  1014.     add.l d2,d1
  1015.     asr.l #1,d1
  1016.     move.w d1,(a1)+
  1017.     subq.l #1,d0
  1018.     bgt.s .mono
  1019.  
  1020.     file_write #load+taille_buff*NB_BUFF/2,d7,handle2
  1021.     cmp.l d7,d0            ; écrit OK ?
  1022.     bne.s .annule3
  1023.     cmp.l #taille_buff*NB_BUFF/2/2,d7
  1024.     beq.s .all_file
  1025.  
  1026. .annule3:    file_close handle2
  1027. .annule2:    file_close handle1
  1028.  
  1029. annule1:    bra boucle_gem_principale
  1030.  
  1031. conv2:    move.l #'*.TR',whato        ; Left/Right -> Left + Right
  1032.     move.w #'K'*256,whato+4
  1033.     lea text_two1,a0
  1034.     bsr copy_in2_select
  1035.     bsr fileselect
  1036.     tst d4
  1037.     beq annule2
  1038.  
  1039.     bsr check_d2d_load
  1040.  
  1041.     file_open read,params_it
  1042.     move.w d0,handle1
  1043.     bmi annule2
  1044.  
  1045.     lea text_two2,a0
  1046.     bsr copy_in2_select
  1047.     bsr fileselect
  1048.     tst d4
  1049.     beq .annule2
  1050.  
  1051.     bsr check_d2d_load
  1052.  
  1053.     file_open write,params_it
  1054.     move.w d0,handle2
  1055.     bmi .annule2
  1056.  
  1057.     lea text_two3,a0
  1058.     bsr copy_in2_select
  1059.     bsr fileselect
  1060.     tst d4
  1061.     beq .annule3
  1062.  
  1063.     file_open write,params_it
  1064.     move.w d0,handle3
  1065.     bmi .annule3
  1066.  
  1067.     bsr stop_if_running
  1068.  
  1069. .all_file:    file_read #load,#taille_buff*NB_BUFF/2,handle1
  1070.     tst.l d0
  1071.     beq.s .annule4
  1072.  
  1073.     lsr.l #1,d0        ; /2
  1074.     move.l d0,d7
  1075.     lsr.l #1,d0        ; /2
  1076.  
  1077.     lea load,a0
  1078.     lea load+taille_buff*NB_BUFF/2,a1
  1079.     lea load+taille_buff*NB_BUFF*3/4,a2
  1080.  
  1081. .mono:    move.w (a0)+,(a1)+    ; 4 par 4
  1082.     move.w (a0)+,(a2)+
  1083.     subq.l #1,d0
  1084.     bgt.s .mono
  1085.  
  1086.     file_write #load+taille_buff*NB_BUFF/2,d7,handle2
  1087.     cmp.l d7,d0            ; écrit OK ?
  1088.     bne.s .annule4
  1089.     file_write #load+taille_buff*NB_BUFF*3/4,d7,handle3
  1090.     cmp.l d7,d0            ; écrit OK ?
  1091.     bne.s .annule4
  1092.     cmp.l #taille_buff*NB_BUFF/2/2,d7
  1093.     beq.s .all_file
  1094.  
  1095. .annule4:    file_close handle3
  1096. .annule3:    file_close handle2
  1097. .annule2:    file_close handle1
  1098.  
  1099. annule2:    bra boucle_gem_principale
  1100.  
  1101. conv3:    move.l #'*.TR',whato        ; Mono -> Stéréo
  1102.     move.w #'K'*256,whato+4
  1103.     lea text_stereo1,a0
  1104.     bsr copy_in2_select
  1105.     bsr fileselect
  1106.     tst d4
  1107.     beq annule3
  1108.  
  1109.     bsr check_d2d_load
  1110.  
  1111.     file_open read,params_it
  1112.     move.w d0,handle1
  1113.     bmi annule3
  1114.  
  1115.     lea text_stereo2,a0
  1116.     bsr copy_in2_select
  1117.     bsr fileselect
  1118.     tst d4
  1119.     beq .annule2
  1120.  
  1121.     file_open write,params_it
  1122.     move.w d0,handle2
  1123.     bmi .annule2
  1124.  
  1125.     bsr stop_if_running
  1126.  
  1127. .all_file:    file_read #load,#taille_buff*NB_BUFF/2/2,handle1
  1128.     tst.l d0
  1129.     beq.s .annule3
  1130.  
  1131.     move.l d0,d7
  1132.     lsr.l #1,d0        ; /2
  1133.     lsl.l #1,d7        ; *2
  1134.  
  1135.     lea load,a0
  1136.     lea load+taille_buff*NB_BUFF/2,a1
  1137.  
  1138. .mono:    move.w (a0)+,d1    ; 2 par 2
  1139.     move.w d1,(a1)+
  1140.     move.w d1,(a1)+
  1141.     subq.l #1,d0
  1142.     bgt.s .mono
  1143.  
  1144.     file_write #load+taille_buff*NB_BUFF/2,d7,handle2
  1145.     cmp.l d7,d0            ; écrit OK ?
  1146.     bne.s .annule3
  1147.     cmp.l #taille_buff*NB_BUFF/2,d7
  1148.     beq.s .all_file
  1149.  
  1150. .annule3:    file_close handle2
  1151. .annule2:    file_close handle1
  1152.  
  1153. annule3:    bra boucle_gem_principale
  1154.  
  1155. conv4:    move.l #'*.DV',whato        ; DVSM -> Track
  1156.     move.w #'S'*256,whato+4
  1157.     lea text_dvs1,a0
  1158.     bsr copy_in2_select
  1159.     bsr fileselect
  1160.     tst d4
  1161.     beq annule4
  1162.  
  1163.     bsr check_d2d_load
  1164.  
  1165.     file_open read,params_it
  1166.     move.w d0,handle1
  1167.     bmi annule4
  1168.  
  1169.     move.l #'*.TR',whato
  1170.     move.w #'K'*256,whato+4
  1171.     lea text_dvs2,a0
  1172.     bsr copy_in2_select
  1173.     bsr fileselect
  1174.     tst d4
  1175.     beq .annule2
  1176.  
  1177.     file_open write,params_it
  1178.     move.w d0,handle2
  1179.     bmi .annule2
  1180.  
  1181.     bsr stop_if_running
  1182.  
  1183.     file_read #load,#8,handle1
  1184.     lea load,a0
  1185.     cmp.l #'DVSM',(a0)
  1186.     bne .annule3
  1187.     clr.l d0
  1188.     move.w 6(a0),d0    ; header length
  1189.     sub.l #6+2,d0
  1190.  
  1191.     file_read #load,d0,handle1
  1192.     lea load,a0
  1193.     cmp.w #$0201,2(a0)    ; packed/stereo 16 bit
  1194.     bne .annule3
  1195.     move.l 4(a0),save_blocklength
  1196.  
  1197. .redo:    file_read #load,#4,handle1
  1198.     cmp.l #4,d0
  1199.     bne .annule3
  1200.     lea load,a0
  1201.     move.w (a0),d6
  1202.     move.w 2(a0),d7
  1203.  
  1204.     move.l save_blocklength,d0
  1205.     subq.l #4,d0
  1206.     save d0
  1207.     file_read #load,d0,handle1
  1208.     tst.l d0
  1209.     beq .annule3
  1210.     load d1        ; d1=what we wanted
  1211.     move.l d0,d2    ; d2=what we have
  1212.  
  1213.     lea load,a0
  1214.     lea load+taille_buff,a1
  1215.     lea table_dvs+128*2,a2
  1216.     lsr.l #1,d0        ; 2 par 2
  1217.     move d6,(a1)+
  1218.     move d7,(a1)+
  1219.  
  1220.     bra.s .x
  1221. .pb:    bmi.s .neg
  1222.     move.w #-32768,d6
  1223.     bra.s .g
  1224. .neg:    move.w #32767,d6
  1225.     bra.s .g
  1226. .pb2:    bmi.s .neg2
  1227.     move.w #-32768,d7
  1228.     bra.s .g2
  1229. .neg2:    move.w #32767,d7
  1230.     bra.s .g2
  1231.  
  1232. .x
  1233. .decomp:    move.b (a0)+,d3
  1234.     ext.w d3
  1235.     add.w (a2,d3.w*2),d6
  1236.     bvs.s .pb
  1237. .g:    move.b (a0)+,d3
  1238.     ext.w d3
  1239.     add.w (a2,d3.w*2),d7
  1240.     bvs.s .pb2
  1241. .g2:    move.w d6,(a1)+
  1242.     move.w d7,(a1)+
  1243.     subq.l #1,d0
  1244.     bgt.s .decomp
  1245.     
  1246.     addq.l #2,d1
  1247.     addq.l #2,d2
  1248.     lsl.l #1,d1
  1249.     lsl.l #1,d2
  1250.     save d1-d2
  1251.     file_write #load+taille_buff,d2,handle2
  1252.     load d1-d2
  1253.     cmp.l d2,d0            ; écrit OK ?
  1254.     bne.s .annule3
  1255.     cmp.l d1,d2
  1256.     beq .redo
  1257.  
  1258. .annule3:    file_close handle2
  1259. .annule2:    file_close handle1
  1260.  
  1261. annule4:    bra boucle_gem_principale
  1262.  
  1263.         ******* WAX conversions *********
  1264.  
  1265. treat:    macro        ; don't touch d0 d6 d7
  1266.     move.w (a0)+,d1
  1267.     ext.l d1
  1268.     sub.l \1,d1
  1269.     bsr change_delta_in_byte
  1270. .\@red:    move.b d1,(a1)+
  1271.     move.w (a2,d1.w*2),d2
  1272.     ext.l d2
  1273.     add.l d2,\1
  1274.     cmp.l #32767,\1
  1275.     bgt.s .\@trop
  1276.     cmp.l #-32768,\1
  1277.     bge.s .\@coool
  1278.  
  1279.     lea -1(a1),a1
  1280.     sub.l d2,\1
  1281.     addq.w #1,d1
  1282.     bra.s .\@red
  1283. .\@trop:    lea -1(a1),a1
  1284.     sub.l d2,\1
  1285.     subq.w #1,d1
  1286.     bra.s .\@red
  1287. .\@coool:
  1288.     endm
  1289.  
  1290. conv6:    bsr stop_if_running
  1291.     move.w #1,mono_stereo_dvsw    ; Mono Track -> DVSW
  1292.     bra.s conv6b
  1293.  
  1294. conv5:    bsr stop_if_running
  1295.     clr mono_stereo_dvsw        ; Stereo Track -> DVSW
  1296.  
  1297. conv6b:    move.l #'*.TR',whato
  1298.     move.w #'K'*256,whato+4
  1299.     lea text_dvsw1,a0
  1300.     bsr copy_in2_select
  1301.     bsr fileselect
  1302.     tst d4
  1303.     beq annule5
  1304.  
  1305.     file_open read,params_it
  1306.     move.w d0,handle1
  1307.     bmi annule5
  1308.  
  1309.     move.l #'*.DV',whato
  1310.     move.w #'W'*256,whato+4
  1311.     lea text_dvsw2,a0
  1312.     bsr copy_in2_select
  1313.     bsr fileselect
  1314.     tst d4
  1315.     beq .annule2
  1316.  
  1317.     file_open write,params_it
  1318.     move.w d0,handle2
  1319.     bmi .annule2
  1320.  
  1321.     lea load,a0
  1322.     move.l #'DVSW',(a0)+
  1323.     move.b #1,(a0)+        ; 1=packé
  1324.     move.b #8,(a0)+        ; 8bits pack code
  1325.     move.w mono_stereo_dvsw,d0
  1326.     move.b d0,(a0)+        ; 0=stéréo,1=mono
  1327.  
  1328.     move.b frequency_for_play,(a0)+
  1329.  
  1330.     move #16-8-1,d0
  1331. .clr:    clr.b (a0)+
  1332.     dbf d0,.clr
  1333.  
  1334.     file_write #load,#4+1+1+1+1+(16-8),handle2
  1335.     cmp.l #16,d0
  1336.     bne .annule3
  1337.  
  1338.     file_write #table_dvswax,#256*2,handle2
  1339.     cmp.l #256*2,d0
  1340.     bne .annule3
  1341.  
  1342.     move.l #4,d7
  1343.     tst mono_stereo_dvsw    
  1344.     beq.s .st
  1345.     move.l #2,d7
  1346. .st:    file_read #load,d7,handle1
  1347.     cmp.l d7,d0
  1348.     bne .annule3
  1349.  
  1350.     file_write #load,d7,handle2
  1351.     cmp.l d7,d0
  1352.     bne .annule3
  1353.  
  1354.     lea load,a0
  1355.     move.w (a0),d6
  1356.     move.w 2(a0),d7
  1357.     ext.l d6
  1358.     ext.l d7
  1359.  
  1360.  
  1361. .redo:    
  1362.     move.w  #-1,-(sp)    ; Shift_Droit:1, SG:2 CTRL:4 ALT:8
  1363.     appel bios,11,4    ; état des touches spéciales
  1364.     and.w #3,d0
  1365.     cmp.w #3,d0
  1366.     beq .annule3    ; d6 d7 INTACTS
  1367.  
  1368.     file_read #load,#taille_buff,handle1
  1369.     tst.l d0
  1370.     beq .annule3
  1371.     move.l d0,d5
  1372.     lea load,a0
  1373.     lea load+taille_buff,a1
  1374.     lea table_dvswax+128*2,a2
  1375.  
  1376. .traite:    move mono_stereo_dvsw,d3
  1377. .traite2:    save d3
  1378.     treat d6
  1379.     load d3
  1380.  
  1381.     tst mono_stereo_dvsw
  1382.     beq.s .continue
  1383.     dbf d3,.traite2    
  1384.     bra.s .mono
  1385.  
  1386. .continue:    treat d7
  1387.  
  1388. .mono:    subq.l #4,d0
  1389.     bgt .traite
  1390.  
  1391.     lsr.l #1,d5
  1392.     save d5
  1393.     file_write #load+taille_buff,d5,handle2
  1394.     load d1
  1395.     cmp.l d0,d1
  1396.     bne.s .annule3
  1397.     cmp.l #taille_buff/2,d1
  1398.     beq .redo
  1399.  
  1400. .annule3:    file_close handle2
  1401. .annule2:    file_close handle1
  1402.  
  1403. annule5:    bra boucle_gem_principale
  1404.  
  1405. change_delta_in_byte:
  1406.     cmp.l #32767,d1
  1407.     bge.s .sup
  1408.     cmp.l #-32768,d1
  1409.     ble.s .inf
  1410.  
  1411.     tst.l d1            ; dichotomie de rang 2
  1412.     ble.s .inf0
  1413.     move.w table_dvswax+128*2+64*2,d2
  1414.     ext.l d2
  1415.     cmp.l d2,d1
  1416.     ble.s .34
  1417. .44:    lea table_dvswax+128*2+64*2,a3
  1418.     bra.s .zap
  1419. .34:    lea table_dvswax+128*2,a3
  1420.     bra.s .zap
  1421. .inf0:    move.w table_dvswax+64*2,d2
  1422.     ext.l d2
  1423.     cmp.l d2,d1
  1424.     ble.s .14
  1425. .24    lea table_dvswax+64*2,a3
  1426.     bra.s .zap
  1427. .14    lea table_dvswax,a3
  1428. .zap:
  1429.  
  1430. .sear:    lea 2(a3),a3
  1431.     move (a3),d2        ; (a3) ; la 2ème valeur
  1432.     ext.l d2
  1433.     cmp.l d2,d1
  1434.     bgt.s .sear
  1435.     beq.s .ok
  1436.  
  1437.     move.w -2(a3),d3
  1438.     ext.l d3
  1439.     neg.l d3
  1440.     add.l d1,d3            ; gauche à milieu
  1441.  
  1442.     move.l d2,d4        ; milieu à droite
  1443.     sub.l d1,d4
  1444.  
  1445.     cmp.l d3,d4
  1446.     ble.s .peti    
  1447.     lea -2(a3),a3
  1448. .peti:
  1449. .ok:    sub.l #table_dvswax,a3
  1450.     move.w a3,d1
  1451.     asr.w #1,d1
  1452.     add.w #-128,d1
  1453.     rts
  1454. .sup:    move.w #127,d1
  1455.     rts
  1456. .inf:    move.w #-128,d1
  1457.     rts
  1458.  
  1459.  
  1460. conv7:    move.l #'*.DV',whato        ; DVSW -> Track
  1461.     move.w #'W'*256,whato+4
  1462.     lea text_dvsw3,a0
  1463.     bsr copy_in2_select
  1464.     bsr fileselect
  1465.     tst d4
  1466.     beq annule7
  1467.  
  1468.     bsr check_d2d_load
  1469.  
  1470.     file_open read,params_it
  1471.     move.w d0,handle1
  1472.     bmi annule7
  1473.  
  1474.     move.l #'*.TR',whato
  1475.     move.w #'K'*256,whato+4
  1476.     lea text_dvsw4,a0
  1477.     bsr copy_in2_select
  1478.     bsr fileselect
  1479.     tst d4
  1480.     beq .annule2
  1481.  
  1482.     file_open write,params_it
  1483.     move.w d0,handle2
  1484.     bmi .annule2
  1485.  
  1486.     bsr stop_if_running
  1487.  
  1488.     file_read #load,#16,handle1
  1489.     cmp.l #16,d0
  1490.     bne .annule3
  1491.  
  1492.     lea load,a0
  1493.     cmp.l #'DVSW',(a0)+
  1494.     bne .annule3
  1495.     cmp.b #1,(a0)+        ; 1=packé
  1496.     bne .annule3
  1497.     cmp.b #8,(a0)+        ; 8bits pack code
  1498.     bne .annule3
  1499.     move.b (a0)+,mono_stereo_dvsw+1
  1500.  
  1501.     file_read #table_dec_dvsw,#256*2,handle1
  1502.     cmp.l #256*2,d0
  1503.     bne .annule3
  1504.  
  1505.     move.l #4,d5
  1506.     tst mono_stereo_dvsw    
  1507.     beq.s .st
  1508.     move.l #2,d5
  1509. .st:    file_read #load,d5,handle1
  1510.     cmp.l d5,d0
  1511.     bne .annule3
  1512.     move.w load,d6
  1513.     move.w load+2,d7
  1514.  
  1515.     file_write #load,d5,handle2
  1516.     cmp.l d5,d0
  1517.     bne .annule3
  1518.  
  1519. .redo:    file_read #load,#taille_buff,handle1
  1520.     tst.l d0
  1521.     beq.s .annule3
  1522.     move.l d0,d5
  1523.     lea load,a0
  1524.     lea load+taille_buff,a1
  1525.  
  1526.     lea table_dec_dvsw+128*2,a2
  1527.     lsr.l #1,d0        ; 2 par 2
  1528.  
  1529. .trai:    move mono_stereo_dvsw,d3
  1530. .trai2:    move.b (a0)+,d1
  1531.     ext.w d1
  1532.     add.w (a2,d1.w*2),d6
  1533.     move.w d6,(a1)+
  1534.  
  1535.     tst mono_stereo_dvsw
  1536.     beq.s .continue
  1537. *    move.w d6,(a1)+    ; on décompacte un DVSW mono -> track mono
  1538.     dbf d3,.trai2
  1539.     bra.s .mono
  1540.  
  1541. .continue:
  1542.     move.b (a0)+,d1
  1543.     ext.w d1
  1544.     add.w (a2,d1.w*2),d7
  1545.     move.w d7,(a1)+
  1546.  
  1547. .mono:    subq.l #1,d0
  1548.     bgt.s .trai
  1549.  
  1550.     lsl.l #1,d5
  1551.     save d5
  1552.     file_write #load+taille_buff,d5,handle2
  1553.     load d1
  1554.     cmp.l d0,d1            ; écrit OK ?
  1555.     bne.s .annule3
  1556.     cmp.l #taille_buff*2,d0
  1557.     beq .redo
  1558.  
  1559. .annule3:    file_close handle2
  1560. .annule2:    file_close handle1
  1561.  
  1562. annule7:    bra boucle_gem_principale
  1563.  
  1564.         ******** Loop mode ********
  1565. loop_file:    tst loop
  1566.     beq.s .null
  1567.     move #0,loop
  1568.     move #FILES_LOOP,d0
  1569.     moveq #0,d1
  1570.     bsr check_menu
  1571.     bra boucle_gem_principale
  1572. .null    move #1,loop
  1573.     move #FILES_LOOP,d0
  1574.     moveq #1,d1
  1575.     bsr check_menu
  1576.     bra boucle_gem_principale
  1577.  
  1578.         ******* Load file sélectrix *********
  1579. load_file:
  1580.     tst.l play_list_ptr
  1581.     bne copy_next_in_list
  1582. ask_selctor:
  1583.  
  1584.     tst.l sltr_adress        ; sélectrix is here ?
  1585.     beq.s no_trix
  1586.  
  1587.     tst.l are_there_more
  1588.     bne.s .more
  1589.  
  1590.     move.l sltr_communication_word,a0
  1591.     move.w #3,(a0)
  1592.     move.l sltr_out_counter,a0
  1593.     move.w #256,(a0)
  1594.     move.l sltr_out_pointer,a0
  1595.     move.l #return_more_names,(a0)
  1596.     bra.s no_trix
  1597.  
  1598. .more:    move.l are_there_more,a0
  1599. troc2:    lea params_it,a1
  1600. cpp:    move.b (a0)+,(a1)+
  1601.     tst.b -1(a1)
  1602.     beq.s .that_was_last
  1603.     cmp.b #' ',-1(a1)
  1604.     bne.s cpp
  1605.     clr.b -1(a1)
  1606.     move.l a0,are_there_more
  1607.     bra no_selector
  1608. .that_was_last:
  1609.     clr.l are_there_more
  1610.     bra.s no_selector
  1611. no_trix:
  1612.  
  1613.  
  1614.     move.l #'*.TR',whato
  1615.     tst.l sltr_adress
  1616.     beq.s .no_trix3
  1617.     move.l #'K,*.',whato+4
  1618.     move.l #'DVW,',whato+8        ; *.TRK,*.DVW,*.LT 0
  1619.     move.l #'*.LT',whato+12
  1620.     move.b #0,whato+16
  1621.     bra.s .zap
  1622. .no_trix3:    move.w #'K'*256,whato+4
  1623. .zap:
  1624.     lea texte_fsel,a0        ; 35 chars max.
  1625.     bsr copy_in2_select
  1626.     bsr fileselect
  1627. az:    cmp.w #1,d4
  1628.     bne.s f_i_n
  1629.  
  1630.     tst.l sltr_adress
  1631.     beq.s .no_trix2
  1632.     tst.b return_more_names
  1633.     beq.s .no_trix2        ; aucune sélection (*.S par ex)
  1634.     move.l #return_more_names,a0
  1635.     bra troc2
  1636. .no_trix2:
  1637.     tst.b params_it        ; le mec tappe enter
  1638.     beq.s f_i_n
  1639.  
  1640. no_selector:
  1641.  
  1642.     bsr stop_if_running
  1643.  
  1644.     lea params_it,a0
  1645.     lea name_2_load,a1
  1646. .cp:    move.b (a0)+,(a1)+
  1647.     tst.b -1(a1)
  1648.     bne.s .cp
  1649.  
  1650. load_file2:    bsr test_if_itsa_play_list
  1651.     tst d7
  1652.     bpl load_file
  1653. load_it_now:
  1654.  
  1655.     bsr test_if_wax_info_present
  1656.     bsr init_d2d
  1657.     tst d7
  1658.     bmi.s fuck
  1659.     bsr play_d2d
  1660.  
  1661. f_i_n:    bra boucle_gem_principale
  1662.  
  1663. fuck:    move #SOUND_SEMAPHORE,d0
  1664.     bsr traite_formulaire
  1665.  
  1666.     bra boucle_gem_principale
  1667.  
  1668.  
  1669.         ******* List of Tracks *******
  1670. test_if_itsa_play_list:
  1671.     lea name_2_load,a0
  1672.  
  1673.     lea name_for_wax,a1
  1674. .cp:    move.b (a0)+,(a1)+
  1675.     tst.b -1(a1)
  1676.     bne.s .cp
  1677.     lea -1(a1),a1
  1678.  
  1679.     cmp.l #name_for_wax+4,a1
  1680.     ble .return
  1681.  
  1682.     cmp.l #'.LT'*256,-3(a1)
  1683.     bne.s .return
  1684.  
  1685.     file_open read,name_for_wax    ; name for wax : sert aussi de buffer
  1686.     move d0,d7
  1687.     bmi .return
  1688.  
  1689.     file_read #list_of_tracks,#4096,d7
  1690.     move.l d0,d6
  1691.  
  1692.     file_close d7
  1693.  
  1694.     cmp.l #4096,d6        ; liste trop grande
  1695.     beq.s .return
  1696.  
  1697.     lea list_of_tracks,a0
  1698.     clr.b (a0,d6.l)
  1699.  
  1700.     move.l a0,play_list_ptr
  1701.  
  1702.     clr d7
  1703.     rts    
  1704.  
  1705. .return:    moveq #-1,d7
  1706.     rts
  1707.  
  1708.     bra.s .return
  1709.  
  1710. copy_next_in_list:
  1711.     move.l play_list_ptr,a0
  1712.  
  1713. .next:    tst.b (a0)
  1714.     beq.s .fin
  1715.  
  1716.     cmp.b #' ',(a0)
  1717.     beq.s .zap_dis
  1718.     cmp.b #lf,(a0)
  1719.     beq.s .zap_dis
  1720.     cmp.b #rc,(a0)
  1721.     beq.s .zap_dis
  1722.     cmp.b #9,(a0)    ; tab
  1723.     beq.s .zap_dis
  1724.     bra.s .cool
  1725. .zap_dis:    lea 1(a0),a0
  1726.     bra.s .next
  1727.  
  1728. .cool:    lea name_2_load,a1
  1729.  
  1730. .redo:    move.b (a0)+,d0
  1731.     beq.s .end_ofl
  1732.     cmp.b #' ',d0
  1733.     beq.s .last
  1734.     cmp.b #lf,d0
  1735.     beq.s .last
  1736.     cmp.b #rc,d0
  1737.     beq.s .last
  1738.     cmp.b #9,d0
  1739.     beq.s .last
  1740.     move.b d0,(a1)+
  1741.     bra.s .redo
  1742.  
  1743. .last:    clr.b (a1)+
  1744.     move.l a0,play_list_ptr
  1745.     bsr stop_if_running
  1746.     bra load_it_now
  1747.  
  1748. .end_ofl:    clr.l play_list_ptr
  1749.     bra load_it_now
  1750.  
  1751. .fin:    clr.l play_list_ptr
  1752.     bra ask_selctor
  1753.             ******* Format WAX *******
  1754.  
  1755. test_if_wax_info_present:
  1756.     lea name_2_load,a0
  1757.  
  1758. test_if_wax_info_present2:
  1759.     clr wax_info_present
  1760.     clr.l header
  1761.  
  1762.     lea name_for_wax,a1
  1763. .cp:    move.b (a0)+,(a1)+
  1764.     tst.b -1(a1)
  1765.     bne.s .cp
  1766.  
  1767. .again:    move.b -(a1),d0
  1768.     cmp.b #'.',d0
  1769.     beq.s .foundp
  1770.     cmp.l #name_for_wax,a1
  1771.     beq.s .noa
  1772.     cmp.b #'\',d0
  1773.     bne.s .again
  1774. .noa:
  1775. .f0:    tst.b (a1)+
  1776.     bne.s .f0
  1777.     move.l #'.WAX',-1(a1)
  1778.     clr.b 3(a1)
  1779.     bra.s .got_name
  1780.  
  1781. .foundp:    move.l #'WAX'*256,1(a1)
  1782.  
  1783. .got_name:    file_open read,name_for_wax    ; name for wax : set aussi de buffer
  1784.     move d0,d7
  1785.     bmi pacool
  1786.  
  1787.     file_read #name_for_wax,#256,d7
  1788.     lea name_for_wax,a1
  1789.     add.l d0,a1
  1790.     save a1
  1791.     file_close d7
  1792.     load a1
  1793.  
  1794.     lea name_for_wax,a0
  1795.  
  1796. redox:    cmp.l a0,a1
  1797.     ble pacool
  1798.  
  1799.     cmp.b #';',(a0)
  1800.     bne.s .paspv
  1801. .notf:    cmp.l a0,a1
  1802.     ble pacool
  1803.     move.b (a0)+,d0
  1804.     cmp.b #lf,d0
  1805.     bne.s .notf
  1806.     bra.s redox
  1807.  
  1808. .paspv:    cmp.l #'freq',(a0)        ; Fréquence
  1809.     bne.s .pasfreq
  1810.     lea 5(a0),a0        ; après le =
  1811.     
  1812.     lea table_cv_freq,a2
  1813. .f1:    tst.w (a2)
  1814.     beq redox 
  1815.     move.w (a0),d0
  1816.     cmp.w (a2),d0
  1817.     beq.s .f
  1818.     lea 8(a2),a2
  1819.     bra.s .f1
  1820. .f:    move.w 2(a2),d0
  1821.     move.b d0,frequency_for_play
  1822.     move.w 4(a2),d6        ; menu check
  1823.     save a0/a1
  1824.     bsr menu_freq_check2
  1825.     load a0/a1
  1826.     move #1,wax_info_present
  1827.     bra redox
  1828.  
  1829. .pasfreq:    cmp.l #'form',(a0)        ; Format
  1830.     bne.s .pasform
  1831.     lea 5(a0),a0        ; après le =
  1832.  
  1833.     cmp.l #'16bs',(a0)
  1834.     bne.s .pa16bs
  1835.     move.l #dec0,d0
  1836.     move #METHOD_1,d1
  1837.     bra.s .set_it
  1838. .pa16bs:    cmp.l #'16bm',(a0)
  1839.     bne.s .pa16bm
  1840.     move.l #dec5,d0
  1841.     move #METHOD_6,d1
  1842.     bra.s .set_it
  1843. .pa16bm:    cmp.l #'dvsw',(a0)
  1844.     bne redox
  1845.     move.l #dec8,d0
  1846.     move #METHOD_9,d1
  1847. .set_it:    move.l d0,charge_octets
  1848.     save a0/a1
  1849.     bsr check_method
  1850.     load a0/a1
  1851.     move #1,wax_info_present
  1852.     bra redox
  1853.  
  1854. .pasform:    cmp.l #'head',(a0)        ; Header length
  1855.     bne.s .pashead
  1856.     lea 5(a0),a0        ; après le =
  1857.  
  1858.     clr.l d1
  1859. .redo:    clr d0
  1860.     move.b (a0)+,d0
  1861.     cmp.b #'0',d0
  1862.     blt.s .finihed
  1863.     cmp.b #'9',d0
  1864.     bgt.s .finihed
  1865.     mulu.l #10,d1
  1866.     sub.b #'0',d0
  1867.     ext.l d0
  1868.     add.l d0,d1
  1869.     bra.s .redo
  1870.     
  1871. .finihed:    move.l d1,header
  1872.     move #1,wax_info_present
  1873.     bra redox
  1874.  
  1875. .pashead:    lea 1(a0),a0
  1876.     bra redox
  1877.  
  1878. pacool:    rts
  1879.         ******* Fin Format WAX *******
  1880.  
  1881. fin:    bsr stop_if_running
  1882.     restore_prg
  1883.  
  1884. menu_freq_check:
  1885.     tst sample_playing        ; sera updaté de toute façon
  1886.     beq.s menu_freq_check2        ; à l'init 2 play
  1887.  
  1888.     save d1            ; d6=menu
  1889.     move.w #1,-(sp)        ; no hand shaking
  1890.     clr d0
  1891.     move.b frequency_for_play,d0
  1892.     move.w d0,-(sp)
  1893.     move.w which_clock,-(sp)    ; 0=interne 25 HHz,1=externe
  1894.     move.w #8,-(sp)        ; destination : DAC
  1895.     move.w #0,-(sp)        ; source : DMA
  1896.     appel xbios,139,12
  1897.     load d1
  1898.  
  1899. menu_freq_check2:            ; set menu but not dma freq
  1900.     save d1
  1901.     move previous_check1,d0
  1902.     move #0,d1
  1903.     bsr check_menu        ; uncheck
  1904.     move d6,d0
  1905.     move d6,previous_check1
  1906.     move #1,d1
  1907.     bsr check_menu        ; check
  1908.  
  1909.     load d1
  1910.     rts
  1911.  
  1912. check_method:
  1913.     save d1
  1914.     move previous_check2,d0
  1915.     move #0,d1
  1916.     bsr check_menu
  1917.     move.l (sp),d1
  1918.     move d1,d0
  1919.     move d0,previous_check2
  1920.     moveq #1,d1
  1921.     bsr check_menu
  1922.     load d1
  1923.     rts    
  1924.  BSS
  1925. frequ:    ds.b 1
  1926.  even
  1927.  TEXT
  1928. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;    
  1929. taille_buff=128*1024    ; mini >= max (65536,length block of DVSM)
  1930. NB_BUFF=4        ; attention nombre minimal : 4 (pour conversions)!!
  1931.         ; décompactage des données au chargement variable
  1932. SATURATION=0
  1933.     ;move.b FREQ8,frequency_for_play
  1934.     ;move.w #1,loop
  1935.     ;clr.l header
  1936.     ;clr.w mono_stereo_dvsw
  1937.  
  1938.     include mod_d2d4.s
  1939. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;    
  1940.     section DATA
  1941.  
  1942. text_mono1:        dc.b 'Stereo 16-bit file to convert mono :',0
  1943. text_mono2:        dc.b 'Select Mono destination file :',0
  1944.  
  1945. text_two1:        dc.b 'Stereo 16-bit file to convert L+R :',0
  1946. text_two2:        dc.b 'Mono 16-bit file for Left chanel :',0
  1947. text_two3:        dc.b 'Mono 16-bit file for Right chanel :',0
  1948.  
  1949. text_stereo1:    dc.b 'Select 16-bit Mono source file :',0
  1950. text_stereo2:    dc.b 'Select Stereo 16-bit file :',0
  1951.  
  1952. text_dvs1:        dc.b 'Select 16-bit DVSM source file :',0
  1953. text_dvs2:        dc.b 'Destination Stereo 16-bit file :',0
  1954. text_dvsw1:        dc.b 'Select 16-bit TRK source file :',0
  1955. text_dvsw2:        dc.b 'Destination file (16-bit DVS WAX):',0
  1956. text_dvsw3:        dc.b 'Source file (16-bit DVS WAX):',0
  1957. text_dvsw4:        dc.b 'Destination 16-bit TRK file :',0
  1958.  
  1959. text_analyse:    dc.b 'Select stereo file to analyse :',0
  1960. text_dist1:        dc.b 'Select first Track (TRK no header):',0
  1961. text_dist2:        dc.b 'Select track to compare to :',0
  1962. text_table:        dc.b 'Choose a 256*2 bytes table :',0
  1963. alert_table:    dc.b "[3][There is a|problem with|your table !|setting default][OK]",0
  1964. text_infodvw:    dc.b 'Choose DVW file to get info about :',0
  1965.  
  1966. *alert_accclose:    dc.b "[3][I've received an|ACC_CLOSE event,|shall I close|or continue to play ?][CONTINUE|STOP]",0
  1967.  even
  1968.  
  1969. table_dvs:    incbin dvsm.tab
  1970.  
  1971. original_table_dvswax:
  1972.     incbin dvswax2.tab
  1973.  
  1974. conversion:    dc.w $1709,FILES_INFO
  1975.     dc.w $1e11,FILES_QUIT
  1976.     dc.w $260c,FILES_LOAD
  1977.     dc.w $1f13,FILES_STOP
  1978.     dc.w $0001,SPECIAL_ANALYSE
  1979.     dc.w $0003,SPECIAL_DISTORS
  1980.     dc.w $6d31,FREQUENCY_1
  1981.     dc.w $6e32,FREQUENCY_2
  1982.     dc.w $6f33,FREQUENCY_3
  1983.     dc.w $6a34,FREQUENCY_4
  1984.     dc.w $6b35,FREQUENCY_5
  1985.     dc.w $6c36,FREQUENCY_6
  1986.     dc.w $6737,FREQUENCY_7
  1987.     dc.w $6838,FREQUENCY_8
  1988.     dc.w $6839,FREQUENCY_9
  1989.     dc.w $6830,FREQUENCY_0
  1990.     dc.w $3b00,METHOD_1
  1991.     dc.w $3c00,METHOD_2
  1992.     dc.w $3d00,METHOD_3
  1993.     dc.w $3e00,METHOD_4
  1994.     dc.w $3f00,METHOD_5
  1995.     dc.w $4000,METHOD_6
  1996.     dc.w $4100,METHOD_7
  1997.     dc.w $4200,METHOD_8
  1998.     dc.w $4300,METHOD_9
  1999.     dc.l 0
  2000.  
  2001. table_cv_freq:
  2002.     dc.w '8.',freq8,FREQUENCY_1,8195
  2003.     dc.w '10',freq10,FREQUENCY_2,9834
  2004.     dc.w '12',freq12,FREQUENCY_3,12292
  2005.     dc.w '16',freq16,FREQUENCY_4,16490
  2006.     dc.w '20',freq20,FREQUENCY_5,20770
  2007.     dc.w '25',freq25,FREQUENCY_6,24585
  2008.     dc.w '33',freq33,FREQUENCY_7,32880
  2009.     dc.w '49',freq49,FREQUENCY_8,49170
  2010.     dc.w 0
  2011.  
  2012. name_rsc:
  2013.     ifeq WHO
  2014.     dc.b 'd:\assemble\asources.wax\direct2d\direct2d.rsc',0
  2015.     endc
  2016.     ifeq (WHO-1)
  2017.     dc.b 'd:\assemble\sources.wax\direct2d\direct2d.rsc',0
  2018.     endc
  2019.     ifeq (WHO-2)
  2020.     dc.b 'd:\devpac\source\genuwax\direct2d\direct2d.rsc',0
  2021.     endc
  2022.  
  2023. texte_fsel:    dc.b 'Select a 16-bit track :',0
  2024.  
  2025. string_acc:    dc.b '  Wax Direct Player  ',0
  2026.  even
  2027.  
  2028.     section BSS
  2029. handle1:        ds.w 1
  2030. handle2:        ds.w 1
  2031. handle3:        ds.w 1
  2032. save_blocklength:    ds.l 1
  2033.  
  2034. flag_dvs:        ds.w 1
  2035. previous_check1:    ds.w 1        ; frequency
  2036. previous_check2:    ds.w 1        ; what method
  2037.  
  2038. wax_info_present:    ds.w 1
  2039. name_for_wax:    ds.b 256
  2040. table_dvswax:    ds.w 256
  2041.  
  2042. play_list_ptr:    ds.l 1        ; pour la liste .TL
  2043. list_of_tracks:    ds.b 4096
  2044.  
  2045. read_info_dvw:    ds.l 1        ; pour l'analyse d'un dvw
  2046. taille_fich_dvw:    ds.l 1
  2047. freq_dvw:        ds.l 1        ; fréquence
  2048.  
  2049. are_there_more:    ds.l 1        ; pour sélectrix
  2050. return_more_names:    ds.b (8+1+3+1)*256
  2051.  
  2052. acc_number:    ds.w 1            ; ne sert à rien ... à priori
  2053. store_msg:    ds.b 256            ; pour les messages envoyés par appl.
  2054.     END
  2055.