home *** CD-ROM | disk | FTP | other *** search
/ Supremacy 1 / Supremacy-1.iso / DEMOS / U-V / ULTCHPDK.ZIP / SOURCES.ZIP / ASM68000.ZIP / TAO_ACF1.S < prev    next >
Text File  |  1996-06-07  |  2KB  |  100 lines

  1. ;
  2. ; TAO Digi Music Driver
  3. ; ---------------------
  4. ;
  5. ; I didn't hack or rip these - Thanks to Penguin of Animal Mine for
  6. ; sending them to me !!
  7. ;
  8. ; Released on "Makin' Sweet Music Volume II" - 24/10/1992
  9.  
  10.  
  11. start    clr.l    -(a7)        ; supervisor mode
  12.     move.w    #$20,-(a7)
  13.     trap    #1
  14.     addq.l    #6,a7
  15.     move.l    d0,old_sp
  16.  
  17.     move.l    $70.w,old_70    ; store old VBL
  18.     move.w    $ffff8240.w,old8240    ; store border colour
  19.  
  20.     lea    text(pc),a0    ; print text
  21.     bsr    print
  22.     move.b    #12,$fffffc02.w    ; kiss it mousey !!
  23.  
  24.     bsr.s    play        ; start the music
  25.  
  26. wait    move.b    $fffc02,d0    ; key pressed ?
  27.     cmpi.b    #$39,d0        ; was it space ?
  28.     bne.s    wait        ; nope !!
  29.  
  30.     bsr.s    stop        ; stop music
  31.     move.b    #8,$fffffc02.w    ; come back mousey - I forgive you !
  32.  
  33. exit    move.l    old_70,$70.w    ; restore VBL
  34.     move.w    old8240,$ffff8240.w    ; restore border colour
  35.  
  36.     move.l    #old_sp,-(sp)    ; user mode
  37.     move.w    #$20,-(sp)
  38.     trap    #1
  39.     addq.l    #6,sp
  40.  
  41.     clr.l    -(sp)        ; bye bye everybody
  42.     trap    #1
  43.  
  44. play    bclr    #0,$484.w        ; silence bell
  45.     moveq    #0,d0        ; initialise music
  46.     jsr    music
  47.     move.l    #new_70,$70.w    ; start new VBL
  48. exitpl    rts
  49.  
  50.  
  51. stop    moveq    #1,d0        ; switch off music
  52.     jsr    music        ; call routine
  53.     bset    #0,$484.w        ; bell on
  54.     rts
  55.  
  56. new_70    movem.l    d0-d7/a0-a6,-(sp)    ; store registers
  57.     move.w    #$fff,d0        ; a wee pause
  58. loop    dbf    d0,loop
  59.  
  60.     move.w    #$700,$ff8240    ; red
  61.     jsr    music+8        ; call music
  62.     move.w    #$777,$ff8240    ; white
  63.     movem.l    (sp)+,d0-d7/a0-a6    ; restore registers
  64.     rte
  65.  
  66. print    move.l    a0,-(sp)        ; print a0 routine
  67.     move.w    #9,-(sp)
  68.     trap    #1
  69.     addq.l    #6,sp
  70.     rts
  71.  
  72. text    dc.b    $1b,"E"
  73.     dc.b    "+----------------+",13,10
  74.     dc.b    "| TAO Digi Music |",13,10
  75.     dc.b    "+----------------+",13,10,10
  76.     dc.b    "Space to exit.",13,10
  77.     dc.b    0
  78.  
  79. old_sp    ds.l    1
  80. old_70    ds.l    1
  81. old8240    ds.w    1
  82.  
  83. music    incbin "sanxion.mus"    ; music file
  84.     even
  85.  
  86. ; List of files:
  87. ; --------------
  88. ;
  89. ; INIT = start + 0    ; d0 = 0 start music / 1 = switch off music
  90. ; VBL  = start + 8
  91. ;
  92. ; SANXION.MUS    ; Sanxion Loader
  93. ; SPELL.MUS    ; ???
  94. ; CATS.MUS    ; Thundercats
  95. ; MASTER.MUS    ; Master Of Magic
  96. ;
  97. ; Don't forget to credit this guy (I assume that it is a bloke!) for 
  98. ; converting these tunes.
  99. ;
  100. ; MUG U.K - 24/10/1992