home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / falcon / sound / dsp_play / dspmod.s < prev    next >
Text File  |  1994-02-16  |  5KB  |  157 lines

  1. *****************************************************************************
  2. *                                                                           *
  3. *     Just For Fun , une autre routine de soundtrack au DSP, et oui.        *
  4. *                                                                           *
  5. *****************************************************************************
  6.  
  7.                 opt D+
  8.  
  9. * coderight by bITmASTER of BSW of CC *
  10.  
  11.                 >PART 'equ'
  12. ; 26/08/93
  13.  
  14. iera            equ $fffffa07           ;Interrupt-Enable-Register A
  15. ierb            equ $fffffa09           ;                                                               B
  16. imra            equ $fffffa13
  17. isra            equ $fffffa0f
  18. isrb            equ $fffffa11
  19. tacr            equ $fffffa19
  20. tbcr            equ $fffffa1b
  21. tadr            equ $fffffa1f
  22. tbdr            equ $fffffa21
  23. tccr            equ $fffffa1d
  24. tcdr            equ $fffffa23
  25. aer             equ $fffffa03
  26. STColor         equ $ffff8240
  27. FColor          equ $ffff9800
  28. vbl             equ $70
  29. timer_int       equ $0120
  30. timer_c_int     equ $0114
  31.  
  32. ym_select       equ $ffff8800
  33. ym_write        equ $ffff8802
  34. ym_read         equ $ffff8800
  35.  
  36. vbaselow        equ $ffff820d
  37. vbasemid        equ $ffff8203
  38. vbasehigh       equ $ffff8201
  39. vcountlow       equ $ffff8209
  40. vcountmid       equ $ffff8207
  41. vcounthigh      equ $ffff8205
  42. linewid         equ $ffff820f
  43. hscroll         equ $ffff8265
  44.  
  45. keyctl          equ $fffffc00
  46. keybd           equ $fffffc02
  47.  
  48. DspHost         equ $ffffa200
  49. HostIntVec      equ $03fc
  50.  
  51. PCookies        equ $05a0
  52.  
  53. hop             equ $ffff8a3a
  54. op              equ $ffff8a3b
  55. line_nr         equ $ffff8a3c
  56. mode            equ $ffff8a3c
  57. skew            equ $ffff8a3d
  58. endmask1        equ $ffff8a28
  59. endmask2        equ $ffff8a2a
  60. endmask3        equ $ffff8a2c
  61. x_count         equ $ffff8a36
  62. y_count         equ $ffff8a38
  63. dest_x_inc      equ $ffff8a2e
  64. dest_y_inc      equ $ffff8a30
  65. dest_adr        equ $ffff8a32
  66. src_x_inc       equ $ffff8a20
  67. src_y_inc       equ $ffff8a22
  68. src_adr         equ $ffff8a24
  69.  
  70. mpx_src         equ $ffff8930
  71. mpx_dst         equ $ffff8932
  72.                 endpart
  73.  
  74.                 lea     player,a0
  75.                 bsr     reloziere
  76.  
  77.  
  78.                 moveq   #1,d0
  79.                 lea     mod1,a0
  80.                 bsr     player+28       ;ein
  81.                 pea     init
  82.                 move.w  #$26,-(sp)
  83.                 trap    #14
  84.                 addq.l  #6,sp
  85.  
  86.  
  87.                 move.w  #1,-(sp)
  88.                 trap    #1
  89.                 addq.l  #2,sp
  90.  
  91.                 pea     off
  92.                 move.w  #$26,-(sp)
  93.                 trap    #14
  94.                 addq.l  #6,sp
  95.                 bsr     player+28+4     ;aus
  96.  
  97.                 clr.w   -(sp)
  98.                 trap    #1
  99.  
  100.  
  101. timer_b:        movem.l d0-a6,-(sp)
  102.                 bsr     player+28+8
  103.                 movem.l (sp)+,d0-a6
  104.                 bclr    #0,$fffffa0f.w
  105.                 rte
  106.  
  107.  
  108.  
  109. init:           lea     SaveArea,a0
  110.                 move.l  timer_int.w,(a0)+
  111.                 move.b  tbcr.w,(a0)+
  112.                 move.b  tbdr.w,(a0)+
  113.                 move.b  #246,tbdr.w
  114.                 move.b  #7,tbcr.w
  115.                 move.l  #timer_b,timer_int.w
  116.                 bset    #0,imra.w
  117.                 bset    #0,iera.w
  118.                 rts
  119.  
  120. off:            bclr    #0,iera.w
  121.                 bclr    #0,imra.w
  122.                 lea     SaveArea,a0
  123.                 move.l  (a0)+,timer_int.w
  124.                 move.b  (a0)+,tbcr.w
  125.                 move.b  (a0)+,tbdr.w
  126.                 rts
  127.  
  128. reloziere:      >PART
  129.                 move.l  2(a0),d0        ;Relozieren
  130.                 add.l   6(a0),d0
  131.                 add.l   14(a0),d0
  132.                 adda.l  #$1c,a0
  133.                 move.l  a0,d1
  134.                 movea.l a0,a1
  135.                 movea.l a1,a2
  136.                 adda.l  d0,a1
  137.                 move.l  (a1)+,d0
  138.                 adda.l  d0,a2
  139.                 add.l   d1,(a2)
  140.                 clr.l   d0
  141. L000A:          move.b  (a1)+,d0
  142.                 beq     L000C
  143.                 cmp.b   #1,d0
  144.                 beq     L000B
  145.                 adda.l  d0,a2
  146.                 add.l   d1,(a2)
  147.                 bra     L000A
  148. L000B:          adda.l  #$fe,a2
  149.                 bra     L000A
  150. L000C:          rts
  151.                 endpart
  152.  
  153. player:         ibytes 'd:\SOURCES\DSP_PLAY\DSPMOD.BSW'
  154. mod1:           ibytes 'd:\SOURCES\DSP_PLAY\CREAM.MOD'
  155. SaveArea:       ds.b 6
  156.  
  157.