Skip to content

Latest commit

 

History

History
125 lines (98 loc) · 2.82 KB

SDL_mintaudio_it.S

File metadata and controls

125 lines (98 loc) · 2.82 KB
 
1
2
/*
SDL - Simple DirectMedia Layer
Dec 31, 2011
Dec 31, 2011
3
Copyright (C) 1997-2012 Sam Lantinga
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Sam Lantinga
slouken@libsdl.org
*/
/*
Audio interrupts
Oct 29, 2004
Oct 29, 2004
26
Patrice Mandin, Didier Méquignon
27
28
29
30
*/
.text
Jul 28, 2014
Jul 28, 2014
31
32
.globl _SDL_MintAudio_XbiosInterruptMeasureClock
.globl _SDL_MintAudio_clocktics
33
34
35
36
37
.globl _SDL_MintAudio_XbiosInterrupt
.globl _SDL_MintAudio_Dma8Interrupt
.globl _SDL_MintAudio_StfaInterrupt
Jul 28, 2014
Jul 28, 2014
38
.globl _SDL_MintAudio_num_its
Nov 7, 2009
Nov 7, 2009
39
Oct 29, 2004
Oct 29, 2004
40
41
42
/*--- Xbios interrupt vector to measure Falcon external clock ---*/
_SDL_MintAudio_XbiosInterruptMeasureClock: /* 1 mS */
Jul 28, 2014
Jul 28, 2014
43
44
/* state DMA sound */
Nov 7, 2009
Nov 7, 2009
45
46
47
48
#if defined(__mcoldfire__)
movel d0,sp@-
moveql #0,d0
Jul 28, 2014
Jul 28, 2014
49
btst d0,0xFFFF8901:w
Nov 7, 2009
Nov 7, 2009
50
#else
Jul 28, 2014
Jul 28, 2014
51
btst #0,0xFFFF8901:w
Nov 7, 2009
Nov 7, 2009
52
#endif
Oct 29, 2004
Oct 29, 2004
53
54
55
beqs SDL_MintAudio_EndIntMeasure
addql #1,_SDL_MintAudio_clocktics
SDL_MintAudio_EndIntMeasure:
Jul 28, 2014
Jul 28, 2014
56
57
/* Clear service bit */
Nov 7, 2009
Nov 7, 2009
58
59
#if defined(__mcoldfire__)
moveql #5,d0
Jul 28, 2014
Jul 28, 2014
60
bclr d0,0xFFFFFA0F:w
Nov 7, 2009
Nov 7, 2009
61
62
63
movel sp@+,d0
#else
Jul 28, 2014
Jul 28, 2014
64
bclr #5,0xFFFFFA0F:w
Nov 7, 2009
Nov 7, 2009
65
#endif
Oct 29, 2004
Oct 29, 2004
66
67
rte
Jul 28, 2014
Jul 28, 2014
68
69
70
/*--- Interrupt vectors ---*/
/* Xbios, DMA 8 bits: need to set ISR on MFP */
/* STFA: do not touch MFP */
71
72
73
_SDL_MintAudio_XbiosInterrupt:
_SDL_MintAudio_Dma8Interrupt:
Jan 13, 2019
Jan 13, 2019
74
75
76
77
78
79
#if defined(__mcoldfire__)
lea sp@(-12),sp
moveml d0-d1/a0,sp@
#else
moveml d0-d1/a0,sp@-
#endif
80
81
/* Clear service bit, so other MFP interrupts can work */
Nov 7, 2009
Nov 7, 2009
82
83
84
85
#if defined(__mcoldfire__)
moveql #5,d0
bclr d0,0xfffffa0f:w
#else
Jul 28, 2014
Jul 28, 2014
86
bclr #5,0xfffffa0f:w
Nov 7, 2009
Nov 7, 2009
87
#endif
88
89
_SDL_MintAudio_StfaInterrupt:
Jan 13, 2019
Jan 13, 2019
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
move.l _SDL_MintAudio_num_its,d0
addql #1,d0
move.l d0,_SDL_MintAudio_num_its
cmp.l #5,d0
bmi.s _SDL_MintAudio_nosilence
move.l _SDL_MintAudio_itbuffer,d1
beq.s _SDL_MintAudio_nosilence
move.l d1,a0
move.l _SDL_MintAudio_itbuflen,d0
move.l _SDL_MintAudio_itsilence,d1
_SDL_MintAudio_fillsilence:
move.l d1,a0@+
subq.l #1,d0
bpl.s _SDL_MintAudio_fillsilence
_SDL_MintAudio_nosilence:
#if defined(__mcoldfire__)
moveml sp@,d0-d1/a0
lea sp@(12),sp
#else
moveml sp@+,d0-d1/a0
#endif
Jul 28, 2014
Jul 28, 2014
115
rte
116
Jul 28, 2014
Jul 28, 2014
117
.bss
118
Jul 28, 2014
Jul 28, 2014
119
120
121
.even
.comm _SDL_MintAudio_clocktics,4
.comm _SDL_MintAudio_num_its,4
Jan 13, 2019
Jan 13, 2019
122
123
124
125
.comm _SDL_MintAudio_itbuffer,4 /* Audio DMA buffer */
.comm _SDL_MintAudio_itbuflen,4 /* Length in longword */
.comm _SDL_MintAudio_itsilence,4 /* Silence value */