Mercurial > sdl-ios-xcode
comparison src/audio/mint/SDL_mintaudio_it.S @ 1097:c83fa1c650dd
Move GSXB callback to C source
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Wed, 20 Jul 2005 17:44:11 +0000 |
parents | 37b766becf3b |
children | d48ead2d2ba5 ea2a327b92d7 |
comparison
equal
deleted
inserted
replaced
1096:37b766becf3b | 1097:c83fa1c650dd |
---|---|
28 | 28 |
29 .text | 29 .text |
30 | 30 |
31 .globl _SDL_MintAudio_Callback | 31 .globl _SDL_MintAudio_Callback |
32 | 32 |
33 .globl _SDL_MintAudio_GsxbInterrupt | |
34 .globl _SDL_MintAudio_EmptyGsxbInterrupt | |
35 .globl _SDL_MintAudio_XbiosInterrupt | 33 .globl _SDL_MintAudio_XbiosInterrupt |
36 .globl _SDL_MintAudio_XbiosInterruptMeasureClock | 34 .globl _SDL_MintAudio_XbiosInterruptMeasureClock |
37 .globl _SDL_MintAudio_Dma8Interrupt | 35 .globl _SDL_MintAudio_Dma8Interrupt |
38 .globl _SDL_MintAudio_StfaInterrupt | 36 .globl _SDL_MintAudio_StfaInterrupt |
39 | 37 |
54 */ | 52 */ |
55 | 53 |
56 #define savptr 0x4a2 | 54 #define savptr 0x4a2 |
57 #define savamt 0x46 | 55 #define savamt 0x46 |
58 | 56 |
59 /*--- GSXB interrupt vector ---*/ | |
60 | |
61 .text | |
62 _SDL_MintAudio_GsxbInterrupt: | |
63 | |
64 /* Check if we are not already running */ | |
65 tstw _SDL_MintAudio_mutex | |
66 bnes _SDL_MintAudio_EmptyGsxbInterrupt | |
67 notw _SDL_MintAudio_mutex | |
68 | |
69 /* Swap buffers */ | |
70 eorw #1,_SDL_MintAudio_numbuf | |
71 | |
72 moveml d0-d7/a0-a6,sp@- | |
73 | |
74 /* Callback */ | |
75 jsr _SDL_MintAudio_Callback | |
76 | |
77 /* Set new buffer */ | |
78 | |
79 moveq #0,d0 | |
80 movel _SDL_MintAudio_audiosize,d1 | |
81 | |
82 movew _SDL_MintAudio_numbuf,d0 | |
83 lsll #2,d0 | |
84 lea _SDL_MintAudio_audiobuf,a0 | |
85 movel a0@(d0:l),a1 | |
86 | |
87 lea a1@(d1:l),a2 | |
88 | |
89 movel a2,sp@- | |
90 movel a1,sp@- | |
91 clrw sp@- | |
92 movew #131,sp@- | |
93 trap #14 | |
94 lea sp@(12),sp | |
95 | |
96 moveml sp@+,d0-d7/a0-a6 | |
97 | |
98 clrw _SDL_MintAudio_mutex | |
99 _SDL_MintAudio_EmptyGsxbInterrupt: | |
100 rts | |
101 | |
102 /*--- Xbios interrupt vector to measure Falcon external clock ---*/ | 57 /*--- Xbios interrupt vector to measure Falcon external clock ---*/ |
103 | 58 |
104 _SDL_MintAudio_XbiosInterruptMeasureClock: /* 1 mS */ | 59 _SDL_MintAudio_XbiosInterruptMeasureClock: /* 1 mS */ |
105 | 60 |
106 btst #0,0xFFFF8901:w /* state DMA sound */ | 61 btst #0,0xFFFF8901:w /* state DMA sound */ |