home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 4: The Falcon Archive / nf_archive_four_v1.0.iso / ARCHIVE / WORK / MSX / GTK08777.ZIP / GTK.DEV / SOURCES.NEW / REPLAY.S < prev    next >
Text File  |  1996-08-02  |  6KB  |  203 lines

  1. *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
  2. *≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈*
  3. *                            *
  4. *               DSP-replay routine            *
  5. *        for Graoumf Tracker modules (.GT2)        *
  6. *            Falcon 030                *
  7. *            Code 68030                *
  8. *                            *
  9. *≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈*
  10. *                            *
  11. *    Utilisation des routines de soundtrack avec le noyau sonore    *
  12. *    non résident.                    *
  13. *          => Donne le fichier REPLAY.PGT (à assembler avec GFA_FLAG = 1).    *
  14. *                            *
  15. *≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈*
  16. * Version     : 21/7/1996, v0.865                *
  17. * Tab setting : 11                        *
  18. *≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈(C)oderight L. de Soras 1994-96*
  19. *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
  20.  
  21.  
  22.  
  23.     opt    p=68030
  24.     opt    d-        ; Pas de table des symboles
  25.     output    F:\DEV.GTK\SOURCES\REPLAY.PGT
  26.  
  27.  
  28.  
  29. *~~~ Constantes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
  30.  
  31. ;--- Contrôle du Noyau -------------------------------------------------------
  32. GFA_FLAG:        Equ    1    ; 0 = assembleur
  33.                 ; 1 = routine pour GfA Basic et
  34.                 ;     fichier REPLAY.PGT
  35. RESIDENT_KER:    Equ    0    ; On ne reste pas résident
  36.  
  37.  
  38.  
  39. *~~~ Macros ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
  40.  
  41. ;--- Pour les routines GfA Basic  --------------------------------------------
  42.  
  43.     IfNe    GFA_FLAG
  44. jump_r:    Macro            ; Sauts dans les routines
  45.     cmp.w    #\1,d7        ; Comparaison avec le numéro de fonction
  46.     beq    \2        ; L'adresse de retour doit déjà être dans la pile !
  47.     EndM
  48.     EndC
  49.  
  50.  
  51.  
  52. *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
  53.  
  54.     Section    Text
  55.  
  56.  
  57.  
  58. ;≡≡≡ Partie GfA Basic ≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
  59.  
  60.     IfNe    GFA_FLAG
  61.  
  62.     bra    gfa_relocation
  63.  
  64. ;--- Sauts aux routines, pour le GfA Basic ------------------------------------
  65.     move.l    (sp),gfa_adresse_appel
  66.     move.l    sp,gfa_pile
  67.     lea    gfa_autrepile,sp
  68.  
  69.     movem.l    d1-a6,-(sp)
  70.     pea    gfa_sauts
  71.     move.w    #$26,-(sp)
  72.     trap    #14
  73.     addq.l    #6,sp
  74.     movem.l    (sp)+,d1-a6
  75.     move.l    gfa_pile,sp
  76.     move.l    gfa_adresse_appel,(sp)
  77.     rts
  78.  
  79. gfa_sauts:
  80.     move.l    sp,gfa_superpile
  81.     move.l    gfa_pile,sp    ; On se place sur la ribambelle de paramètres GfA
  82.     move.w    4(sp),d7        ; Prends le No de fonction, après l'adr de retour
  83.     addq.l    #2,sp        ; Ecrase le-dit numéro
  84.     move.l    #gfa_fin,(sp)    ; Met l'adresse de retour juste avant le 1er paramètre
  85.  
  86.     jump_r    $001,gtkr_kernel_status
  87.     jump_r    $002,gtkr_kernel_on
  88.     jump_r    $003,gtkr_kernel_off
  89.     jump_r    $004,gtkr_reset_kernel_tracks
  90.     jump_r    $005,gtkr_reserve_track
  91.     jump_r    $006,gtkr_free_track
  92.     jump_r    $007,gtkr_make_rbuffer
  93.     jump_r    $008,gtkr_play_sample
  94.     jump_r    $009,gtkr_stop_track
  95.     jump_r    $00A,gtkr_pause_track
  96.     jump_r    $00B,gtkr_cont_track
  97.     jump_r    $00C,gtkr_add_routine
  98.     jump_r    $00D,gtkr_remove_routine
  99.     jump_r    $00E,gtkr_get_master_vol
  100.     jump_r    $00F,gtkr_set_master_vol
  101.     jump_r    $010,gtkr_get_vblsize
  102.     jump_r    $011,gtkr_set_vblsize
  103.     jump_r    $012,gtkr_get_track_adr
  104.     jump_r    $013,gtkr_set_track_adr
  105.     jump_r    $014,gtkr_get_replay_freq
  106.     jump_r    $015,gtkr_set_replay_freq
  107.     jump_r    $016,gtkr_total_nbr_of_tracks
  108.     jump_r    $017,gtkr_nbr_of_free_tracks
  109.     jump_r    $018,gtkr_put_new_app_id
  110.     jump_r    $019,gtkr_get_app_id
  111.     jump_r    $01A,gtkr_remove_app_id
  112.     jump_r    $01B,gtkr_nbr_of_app_id
  113.     jump_r    $01C,gtkr_interpolate_track
  114.  
  115.     jump_r    $102,gtkpl_player_on
  116.     jump_r    $103,gtkpl_player_off
  117.     jump_r    $104,gtkpl_reset_sndtrk_tracks
  118.     jump_r    $105,gtkpl_convert_module
  119.     jump_r    $106,gtkpl_make_rb_module
  120.     jump_r    $107,gtkpl_get_adr_samples
  121.     jump_r    $108,gtkpl_set_adr_samples
  122.     jump_r    $109,gtkpl_new_module
  123.     jump_r    $10A,gtkpl_stop_module
  124.     jump_r    $10B,gtkpl_pause_module
  125.     jump_r    $10C,gtkpl_cont_module
  126.     jump_r    $10D,gtkpl_change_modpos
  127.     jump_r    $10E,gtkpl_get_modsongpos
  128.     jump_r    $10F,gtkpl_get_modlinepos
  129.     jump_r    $110,gtkpl_get_tempo
  130.     jump_r    $111,gtkpl_set_tempo
  131.     jump_r    $112,gtkpl_get_synchro_adr
  132.  
  133. gfa_fin:    move.l    gfa_superpile,sp        ; Remet la bonne pile
  134.     rts
  135.  
  136. ;--- Relocation du programme --------------------------------------------------
  137. gfa_relocation:   
  138.     movem.l    d1-d2/a0-a3,-(sp)
  139.     move.l    24+4(sp),a0    ; 4(sp) : adresse du PRG
  140.     move.l    2(a0),d0
  141.     add.l    6(a0),d0
  142.     add.l    14(a0),d0
  143.     move.l    10(a0),d2
  144.     adda.l    #$1c,a0
  145.     move.l    a0,d1
  146.     movea.l    a0,a1
  147.     movea.l    a1,a2
  148.     adda.l    d0,a1
  149.     move.l    a1,a3
  150.     move.l    (a1)+,d0
  151.     adda.l    d0,a2
  152.     add.l    d1,(a2)
  153.     clr.l    d0
  154. .loop:    move.b    (a1)+,d0
  155.     beq.s    .end
  156.     cmp.b    #1,d0
  157.     beq.s    .next
  158.     adda.l    d0,a2
  159.     add.l    d1,(a2)
  160.     bra.s    .loop
  161. .next:    adda.l    #$fe,a2
  162.     bra.s    .loop
  163. .end:    clr.w    (a3)+        ; Vide la zone BSS
  164.     subq.l    #2,d2
  165.     bgt.s    .end
  166.     move.l    #gfa_info_track,d0    ; Renvoie l'adresse des infos sur les pistes
  167.     movem.l    (sp)+,d1-d2/a0-a3
  168.     rts
  169.  
  170.     EndC
  171.  
  172.  
  173.  
  174. *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
  175.  
  176.     Include    'sndkernl.s'    ; Les routines du noyau
  177.     Include    'gt2playr.s'    ; Les routines du soundtracker
  178.  
  179.  
  180.  
  181. *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
  182.  
  183.     Section    Bss
  184.  
  185.  
  186.  
  187. ;--- Pour le GfA -------------------------------------------------------------
  188.         IfNe    GFA_FLAG
  189.  
  190. gfa_adresse_appel:    Ds.l    1
  191. gfa_pile:        Ds.l    1
  192. gfa_superpile:    Ds.l    1
  193.         Ds.l    256
  194. gfa_autrepile:
  195. gfa_info_track:    Ds.b    next_t*NBRVOIES_MAXI    ; Informations sur les pistes
  196.         Even
  197.  
  198.         EndC
  199.  
  200.  
  201.  
  202. *~~~ FIN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
  203.