tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / workbench / devs / AHI / Drivers / Aura / asmfuncs.a
blob89cc6325f8f04c41c289a24a5477d7d55d344e21
4 MACHINE 68010
6 incdir include:
7 include devices/ahi.i
8 include exec/execbase.i
9 include hardware/all.i
10 include libraries/ahi_sub.i
11 include utility/hooks.i
13 include lvo/exec_lib.i
14 include aura.i
15 include macros.i
17 XDEF _intAHIsub_Disable
18 XDEF _intAHIsub_Enable
19 XDEF _intAHIsub_SetVol
20 XDEF _intAHIsub_SetFreq
21 XDEF _intAHIsub_SetSound
22 XDEF _intAHIsub_SetEffect
23 XDEF _intAHIsub_LoadSound
24 XDEF _intAHIsub_UnloadSound
26 XDEF _InstallUglyInterruptHack
27 XDEF _UninstallUglyInterruptHack
29 XDEF _DummyFunc
30 XDEF _DummyInt
31 XDEF _PlayIntMono
32 XDEF _RecordIntMono
33 XDEF _PlayAndRecordIntMono
34 XDEF _PlayIntStereo
35 XDEF _RecordIntStereo
36 XDEF _PlayAndRecordIntStereo
38 XDEF _SoftFunc
40 CIAB EQU $bfd000
42 AURAL EQU $a20000 ; Left DA/AD
43 AURAR EQU $a20002 ; Right DA/AD
45 *******************************************************************************
47 ;in:
48 * a2 struct AHI_AudioCtrl
49 _intAHIsub_Disable:
50 push a6
51 move.l 4.w,a6
52 call Disable
53 pop a6
54 rts
56 ;in:
57 * a2 struct AHI_AudioCtrl
58 _intAHIsub_Enable:
59 push a6
60 move.l 4.w,a6
61 call Enable
62 pop a6
63 rts
65 _intAHIsub_SetVol:
66 _intAHIsub_SetFreq:
67 _intAHIsub_SetSound:
68 _intAHIsub_SetEffect:
69 _intAHIsub_LoadSound:
70 _intAHIsub_UnloadSound:
71 moveq #AHIS_UNKNOWN,d0
72 rts
75 *******************************************************************************
77 ;in:
78 * a1 Interrupt code to install
79 * a2 struct aura *
80 _InstallUglyInterruptHack:
81 pushm a5/a6
82 move.l a2,Aura1+2
83 ; move.l a2,Aura2+2
84 ; move.l a2,Aura3+2
85 ; move.l a2,Aura4+2
86 ; move.l a2,Aura5+2
87 ; move.l a2,Aura6+2
89 lea a_IntLocalData(a2),a0
90 move.l a0,Local1+2
91 ; move.l a0,Local2+2
92 ; move.l a0,Local3+2
93 ; move.l a0,Local4+2
94 ; move.l a0,Local5+2
95 ; move.l a0,Local6+2
97 suba.l a0,a0
98 move.l 4.w,a6
99 move.w AttnFlags(a6),d0
100 btst #AFB_68010,d0
101 beq .gotVBR
102 lea GerVBR(pc),a5
103 call Supervisor
104 .gotVBR
105 tst.l a_OldLevel6Int(a2)
106 bne .dontsave
107 move.l $78(a0),a_OldLevel6Int(a2)
108 .dontsave
109 move.l a1,$78(a0)
111 call CacheClearU ; Flush all caches
112 popm a5/a6
115 ;in:
116 * a2 struct aura *
117 _UninstallUglyInterruptHack:
118 push a5
119 tst.l a_OldLevel6Int(a2)
120 beq .dontrestore
121 suba.l a0,a0
122 move.l 4.w,a6
123 move.w AttnFlags(a6),d0
124 btst #AFB_68010,d0
125 beq .gotVBR
126 lea GerVBR(pc),a5
127 call Supervisor
128 .gotVBR
129 move.l a_OldLevel6Int(a2),$78(a0)
130 .dontrestore
131 pop a5
134 GerVBR:
135 movec.l VBR,a0
138 _DummyFunc:
139 moveq #1,d0
142 ; These functions are optimized for speed, not compability.
144 _DummyInt:
145 move.w #INTF_EXTER,CUSTOM+INTREQ ;Clear interrupt flag
146 tst.b CIAB+ciaicr ;Clear
149 _PlayIntMono:
150 pushm a0-a1
151 move.w #INTF_EXTER,CUSTOM+INTREQ ;Clear interrupt flag
152 tst.b CIAB+ciaicr ;Clear
153 Local1:
154 move.l #$C0DECAFE,a0 ;Modified by InstallUglyInterruptHack()
155 move.l (a0),a1 ;MixBufferPtr
156 move.w (a1),AURAL
157 move.w (a1)+,AURAR
158 move.l a1,(a0)+ ;Update pointer
159 subq.l #1,(a0)+
160 beq .endofbuffer
161 popm a0-a1
164 * Our mixing buffer is now empty, switch to the new one and Cause()
166 .endofbuffer
167 push a6
168 Aura1:
169 move.l #$ABADC0DE,a0 ;Modified by InstallUglyInterruptHack()
170 move.l a_MixBuffer2(a0),a1
171 move.l a_MixBuffer1(a0),a_MixBuffer2(a0)
172 move.l a1,a_MixBuffer1(a0)
173 move.l a1,a_MixBufferPtr(a0)
174 move.l 4.w,a6
175 move.l a_SoftInt(a0),a1
176 call Cause
177 pop a6
178 popm a0-a1
181 _RecordIntMono:
182 _PlayAndRecordIntMono:
183 _PlayIntStereo:
184 _RecordIntStereo:
185 _PlayAndRecordIntStereo:
186 pushm d0-d7/a0-a6
187 move.w #INTF_EXTER,CUSTOM+INTREQ ;Clear interrupt flag
188 * btst #CIAICRB_TA,CIAB+ciaicr ;Check if Timer A is the source, clear
189 * beq 1$
190 tst.b CIAB+ciaicr ;Clear
192 move.w $dff006,$dff180
193 popm d0-d7/a0-a6
196 _SoftFunc:
197 move.w $dff006,$dff182