forked from aburguera/YAP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AUDIO.X68
64 lines (62 loc) · 2.57 KB
/
AUDIO.X68
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
; =============================================================================
; AUDIO MANAGEMENT
; =============================================================================
; -----------------------------------------------------------------------------
AUDINIT
; INITALIZES THE AUDIO MANAGER
; INPUT - NONE
; OUTPUT - NONE
; MODIFIES - NONE
; -----------------------------------------------------------------------------
MOVEM.L D0-D1/A0-A2,-(A7)
LEA .AUDLIST,A0
LEA .IDLIST,A2
.LOOP MOVE.L (A0)+,D0 ; LOAD ALL AUDIO FILES
BEQ .END
MOVE.B (A2)+,D1
MOVE.L D0,A1
MOVE.B #71,D0
TRAP #15
BRA .LOOP
.END MOVE.B #AUDACCY,(AUDACCSN) ; START BY ACCEPTING SOUNDS
MOVEM.L (A7)+,D0-D1/A0-A2
RTS
.AUDLIST DC.L .MUSIC1,.MUSIC2,.MUSIC3,.JUMP,.SPLASH,.WOAH,.FUNNY,.BOING,0
.MUSIC1 DC.B 'SND/MUSIC1.WAV',0
.MUSIC2 DC.B 'SND/MUSIC2.WAV',0
.MUSIC3 DC.B 'SND/MUSIC3.WAV',0
.JUMP DC.B 'SND/JUMP.WAV',0
.SPLASH DC.B 'SND/SPLASH.WAV',0
.WOAH DC.B 'SND/WOAH.WAV',0
.FUNNY DC.B 'SND/FUNNY.WAV',0
.BOING DC.B 'SND/BOING.WAV',0
.IDLIST DC.B AUDMU1ID,AUDMU2ID,AUDMU3ID,AUDJMPID,AUDSPLID,AUDWOAID,AUDFUNID,AUDBNGID
DS.W 0
; -----------------------------------------------------------------------------
AUDPLAY
; CHANGES AUDIO TO PLAY
; INPUT - D1.B BIT 7=1 LOOP, BIT 7=0 PLAY ONLY ONCE
; BITS 6-0 SOUND ID
; OUTPUT - NONE
; MODIFIES - NONE
; -----------------------------------------------------------------------------
CMP.B #AUDACCN,(AUDACCSN) ; CHECK IF SOUNDS ACCEPTED
BEQ .END ; NO: END
MOVEM.L D0-D2,-(A7)
MOVE.B #76,D0
MOVE.L #3,D2
TRAP #15 ; STOP ALL SOUNDS
CLR.L D2
BCLR #7,D1 ; CLEAR MSB AND CHECK
BEQ .CONT ; IF ZERO, CONTINUE
ADDQ.W #1,D2 ; IF ONE, ACTIVATE LOOP
.CONT CMP.B #AUDENDID,D1 ; IS IT STOP SOUND ID?
BEQ .DONE ; NOT PLAY
MOVE.B #76,D0 ; SELECT STANDARD PLAYER
TRAP #15 ; AND PLAY
.DONE MOVEM.L (A7)+,D0-D2
.END RTS
*~Font name~Courier New~
*~Font size~10~
*~Tab type~0~
*~Tab size~4~