home *** CD-ROM | disk | FTP | other *** search
/ ST-Computer Leser 2002 January / STC_CD_01_2002.iso / GAMES / COLUMSRC / DSP_SNDT / DSPMOD2.S < prev   
Text File  |  1994-02-17  |  4KB  |  148 lines

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