Subversion Repositories Kolibri OS

Rev

Rev 4961 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4961 Rev 5057
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7
 
7
 
-
 
8
format PE DLL native 0.05
8
format MS COFF
9
entry START
9
 
10
 
10
include 'CONFIG.INC'
11
include 'CONFIG.INC'
11
 
12
 
12
;structs----------------------------------------------------------
-
 
13
struc IOCTL
13
section '.flat' code readable writable executable
14
{  .handle      dd ?
-
 
15
   .io_code     dd ?
-
 
16
   .input       dd ?
-
 
17
   .inp_size    dd ?
-
 
18
   .output      dd ?
-
 
19
   .out_size    dd ?
-
 
20
}
-
 
21
 
-
 
22
virtual at 0
-
 
23
  IOCTL IOCTL
-
 
24
end virtual
-
 
25
 
-
 
26
;something--------------------------------------------------------
-
 
27
public START
14
include '..\..\struct.inc'
28
public service_proc
-
 
29
public version
-
 
30
 
15
include '..\..\macros.inc'
31
include '..\proc32.inc'
16
include '..\..\proc32.inc'
32
include '..\imports.inc'
-
 
33
 
-
 
34
section '.flat' code readable align 16
17
include '..\..\peimport.inc'
35
 
18
 
36
include 'SB16.INC'
19
include 'SB16.INC'
37
 
20
 
38
;-------------------------------------------------------------------------------
21
;-------------------------------------------------------------------------------
39
proc START stdcall, state:dword
22
proc START c uses ebx esi edi, state:dword, cmdline:dword
40
        cmp     [state], 1
23
        cmp     [state], 1
41
        jne     .stop
24
        jne     .stop
42
.entry:
25
.entry:
43
 
26
 
44
if DEBUG
27
if DEBUG
45
        mov     esi, msgInit
28
        mov     esi, msgInit
46
        call    SysMsgBoardStr
29
        invoke  SysMsgBoardStr
47
end if
30
end if
48
 
31
 
49
        call    detect           ;returns DSP version or zero if
32
        call    detect           ;returns DSP version or zero if
50
        test    eax, eax         ;SB card not found
33
        test    eax, eax         ;SB card not found
51
        jz      .exit
34
        jz      .exit
52
 
35
 
53
if DEBUG
36
if DEBUG
54
        movzx   eax, al          ;major version
37
        movzx   eax, al          ;major version
55
        mov     esi, sb_DSP_description
38
        mov     esi, sb_DSP_description
56
        dec     eax
39
        dec     eax
57
        jz      .sb_say_about_found_dsp
40
        jz      .sb_say_about_found_dsp
58
        mov     dword[esi], '2.x '
41
        mov     dword[esi], '2.x '
59
        dec     eax
42
        dec     eax
60
        jz      .sb_say_about_found_dsp
43
        jz      .sb_say_about_found_dsp
61
        mov     dword[esi], 'Pro '
44
        mov     dword[esi], 'Pro '
62
        dec     eax
45
        dec     eax
63
        jz      .sb_say_about_found_dsp
46
        jz      .sb_say_about_found_dsp
64
        mov     dword[esi], '16  '
47
        mov     dword[esi], '16  '
65
.sb_say_about_found_dsp:
48
.sb_say_about_found_dsp:
66
        mov     esi, msgDSPFound
49
        mov     esi, msgDSPFound
67
        call    SysMsgBoardStr
50
        invoke  SysMsgBoardStr
68
end if
51
end if
69
 
52
 
70
        xor     ebx, ebx
53
        xor     ebx, ebx
71
        mov     ecx, [sb_base_port]
54
        mov     ecx, [sb_base_port]
72
        lea     edx, [ecx+0xF]
55
        lea     edx, [ecx+0xF]
73
        call    ReservePortArea  ;these ports must be mine !
56
        invoke  ReservePortArea  ;these ports must be mine !
74
 
57
 
75
        dec     eax
58
        dec     eax
76
        jnz     @f
59
        jnz     @f
77
 
60
 
78
if DEBUG
61
if DEBUG
79
        mov     esi, msgErrRsrvPorts
62
        mov     esi, msgErrRsrvPorts
80
        call    SysMsgBoardStr
63
        invoke  SysMsgBoardStr
81
end if
64
end if
82
        jmp     .exit
65
        jmp     .exit
83
 
66
 
84
@@:
67
@@:
-
 
68
        invoke  AllocDMA24, sb_buffer_size
-
 
69
        test    eax, eax
-
 
70
        jz      .exit
-
 
71
        mov     [SB16Buffer], eax
85
 
72
 
86
        call    sb_setup         ;clock it, etc
73
        call    sb_setup         ;clock it, etc
87
 
74
 
88
        stdcall AttachIntHandler, sb_irq_num, sb_irq, 0
75
        invoke  AttachIntHandler, sb_irq_num, sb_irq, 0
89
 
76
 
90
if DEBUG
77
if DEBUG
91
        test    eax, eax
78
        test    eax, eax
92
        jnz     @f
79
        jnz     @f
93
 
80
 
94
        mov     esi, msgErrAtchIRQ
81
        mov     esi, msgErrAtchIRQ
95
        call    SysMsgBoardStr
82
        invoke  SysMsgBoardStr
96
 
83
 
97
;        stdcall GetIntHandler, sb_irq_num
84
;        stdcall GetIntHandler, sb_irq_num
98
;        call    SysMsgBoardNum
85
;        call    SysMsgBoardNum
99
 
86
 
100
        jmp     .stop
87
        jmp     .stop
101
@@:
88
@@:
102
        mov     esi, msgSucAtchIRQ
89
        mov     esi, msgSucAtchIRQ
103
        call    SysMsgBoardStr
90
        invoke  SysMsgBoardStr
104
end if
91
end if
105
        stdcall RegService, my_service, service_proc
92
        invoke  RegService, my_service, service_proc
106
        ret
93
        ret
107
.stop:
94
.stop:
108
        call    sb_reset
95
        call    sb_reset
109
.exit:
96
.exit:
110
 
97
 
111
if DEBUG
98
if DEBUG
112
        mov     esi, msgExit
99
        mov     esi, msgExit
113
        call    SysMsgBoardStr
100
        invoke  SysMsgBoardStr
114
end if
101
end if
115
 
102
 
116
        xor     eax, eax
103
        xor     eax, eax
117
        ret
104
        ret
118
endp
105
endp
119
;-------------------------------------------------------------------------------
106
;-------------------------------------------------------------------------------
120
 
-
 
121
handle     equ  IOCTL.handle
-
 
122
io_code    equ  IOCTL.io_code
-
 
123
input      equ  IOCTL.input
-
 
124
inp_size   equ  IOCTL.inp_size
-
 
125
output     equ  IOCTL.output
-
 
126
out_size   equ  IOCTL.out_size
-
 
127
 
-
 
128
align 4
107
 
129
proc service_proc stdcall, ioctl:dword
108
proc service_proc stdcall uses ebx esi edi, ioctl:dword
130
        mov     edi, [ioctl]
109
        mov     edi, [ioctl]
131
        mov     eax, [edi+io_code]
110
        mov     eax, [edi+IOCTL.io_code]
132
        cmp     eax, SRV_GETVERSION
111
        cmp     eax, SRV_GETVERSION
133
        jne     @F
112
        jne     @F
134
 
113
 
135
        mov     eax, [edi+output]
114
        mov     eax, [edi+IOCTL.output]
136
        cmp     [edi+out_size], 4
115
        cmp     [edi+IOCTL.out_size], 4
137
        jne     .fail
116
        jne     .fail
138
        mov     [eax], dword API_VERSION
117
        mov     [eax], dword API_VERSION
139
        xor     eax, eax
118
        xor     eax, eax
140
        ret
119
        ret
141
@@:
120
@@:
142
        cmp     eax, DEV_PLAY
121
        cmp     eax, DEV_PLAY
143
        jne     @f
122
        jne     @f
144
if DEBUG
123
if DEBUG
145
        mov     esi, msgPlay
124
        mov     esi, msgPlay
146
        call    SysMsgBoardStr
125
        invoke  SysMsgBoardStr
147
end if
126
end if
148
        call    sb_stop          ;to play smth new we must stop smth old
127
        call    sb_stop          ;to play smth new we must stop smth old
149
 
128
 
150
        call    pre_fill_data    ;fill first and second half of the buffer
129
        call    pre_fill_data    ;fill first and second half of the buffer
151
        call    pre_fill_data    ;
130
        call    pre_fill_data    ;
152
 
131
 
153
        call    sb_set_dma       ;is it really needed here? Paranoia.
132
        call    sb_set_dma       ;is it really needed here? Paranoia.
154
        call    sb_play
133
        call    sb_play
155
        xor     eax, eax          ;set maximum volume
134
        xor     eax, eax          ;set maximum volume
156
        call    sb_set_master_vol
135
        call    sb_set_master_vol
157
        xor     eax, eax
136
        xor     eax, eax
158
        ret
137
        ret
159
;@@:                             ;all this commented stuff in service proc
138
;@@:                             ;all this commented stuff in service proc
160
;           cmp  eax,DEV_STOP    ;is never used. Mixer do this virtually,
139
;           cmp  eax,DEV_STOP    ;is never used. Mixer do this virtually,
161
;           jne  @f              ;e.g. instead of stopping driver it
140
;           jne  @f              ;e.g. instead of stopping driver it
162
;if DEBUG                        ;outputs silence
141
;if DEBUG                        ;outputs silence
163
;           mov  esi,msgStop
142
;           mov  esi,msgStop
164
;           call SysMsgBoardStr
143
;           call SysMsgBoardStr
165
;end if
144
;end if
166
;           call sb_stop
145
;           call sb_stop
167
;           xor  eax,eax
146
;           xor  eax,eax
168
;           ret
147
;           ret
169
@@:
148
@@:
170
        cmp     eax, DEV_CALLBACK
149
        cmp     eax, DEV_CALLBACK
171
        jne     @f
150
        jne     @f
172
if DEBUG
151
if DEBUG
173
        mov     esi, msgCallback
152
        mov     esi, msgCallback
174
        call    SysMsgBoardStr
153
        invoke  SysMsgBoardStr
175
end if
154
end if
176
        mov     edi, [edi+input]
155
        mov     edi, [edi+IOCTL.input]
177
        mov     eax, [edi]
156
        mov     eax, [edi]
178
        mov     [callback], eax
157
        mov     [callback], eax
179
if DEBUG
158
if DEBUG
180
        call    SysMsgBoardNum
159
        call    SysMsgBoardNum
181
end if
160
end if
182
        xor     eax, eax
161
        xor     eax, eax
183
        ret
162
        ret
184
@@:
163
@@:
185
        cmp     eax, DEV_SET_MASTERVOL;Serge asked me to unlock
164
        cmp     eax, DEV_SET_MASTERVOL;Serge asked me to unlock
186
        jne     @F ;DEV_SET(GET)_MASTERVOL, although mixer doesn't use it.
165
        jne     @F ;DEV_SET(GET)_MASTERVOL, although mixer doesn't use it.
187
           ;It doesn't use it _in current version_ - but in the future...
166
           ;It doesn't use it _in current version_ - but in the future...
188
 
167
 
189
if DEBUG
168
if DEBUG
190
        mov     esi, msgSetVol
169
        mov     esi, msgSetVol
191
        call    SysMsgBoardStr
170
        invoke  SysMsgBoardStr
192
end if
171
end if
193
        mov     eax, [edi+input]
172
        mov     eax, [edi+IOCTL.input]
194
        mov     eax, [eax]
173
        mov     eax, [eax]
195
        call    sb_set_master_vol
174
        call    sb_set_master_vol
196
        xor     eax, eax
175
        xor     eax, eax
197
        ret
176
        ret
198
@@:
177
@@:
199
        cmp     eax, DEV_GET_MASTERVOL
178
        cmp     eax, DEV_GET_MASTERVOL
200
        jne     @F
179
        jne     @F
201
if DEBUG
180
if DEBUG
202
        mov     esi, msgGetVol
181
        mov     esi, msgGetVol
203
        call    SysMsgBoardStr
182
        invoke  SysMsgBoardStr
204
end if
183
end if
205
        mov     eax, [edi+output]
184
        mov     eax, [edi+IOCTL.output]
206
        mov     edx, [sb_master_vol]
185
        mov     edx, [sb_master_vol]
207
        mov     [eax], edx
186
        mov     [eax], edx
208
        xor     eax, eax
187
        xor     eax, eax
209
        ret
188
        ret
210
 
189
 
211
.fail:
190
.fail:
212
        or      eax, -1
191
        or      eax, -1
213
        ret
192
        ret
214
endp
193
endp
215
 
-
 
216
restore   handle
-
 
217
restore   io_code
-
 
218
restore   input
-
 
219
restore   inp_size
-
 
220
restore   output
-
 
221
restore   out_size
-
 
222
 
194
 
223
;-------------------------------------------------------------------------------
-
 
224
align 4
195
;-------------------------------------------------------------------------------
225
proc sb_irq
196
proc sb_irq
226
        mov     edx, [sb_base_port];tell the DSP that we have processed IRQ
197
        mov     edx, [sb_base_port];tell the DSP that we have processed IRQ
227
        add     dl, 0xF            ;0xF for 16 bit sound, 0xE for 8 bit sound
198
        add     dl, 0xF            ;0xF for 16 bit sound, 0xE for 8 bit sound
228
        in      al, dx             ;for non-stop sound
199
        in      al, dx             ;for non-stop sound
229
 
200
 
230
pre_fill_data:
201
pre_fill_data:
231
        mov     eax, int_flip_flop
202
        mov     eax, int_flip_flop
232
        not     dword[eax]
203
        not     dword[eax]
233
        mov     eax, [eax]
204
        mov     eax, [eax]
234
        test    eax, eax
205
        test    eax, eax
235
        jns     .fill_second_half
206
        jns     .fill_second_half
236
 
207
 
237
if sb_buffer_size eq small_buffer
208
if sb_buffer_size eq small_buffer
-
 
209
        mov     eax, [SB16Buffer]
238
        stdcall [callback], SB16Buffer0   ;for 32k buffer
210
        stdcall [callback], eax           ;for 32k buffer
239
else if sb_buffer_size eq full_buffer
211
else if sb_buffer_size eq full_buffer
-
 
212
        mov     eax, [SB16Buffer]
-
 
213
        push    eax
240
        stdcall [callback], SB16Buffer0   ;for 64k buffer
214
        stdcall [callback], eax           ;for 64k buffer
-
 
215
        pop     eax
-
 
216
        add     eax, 16384
241
        stdcall [callback], SB16Buffer1   ;for 64k buffer
217
        stdcall [callback], eax           ;for 64k buffer
242
end if
218
end if
243
        xor     eax, eax
219
        xor     eax, eax
244
        not     eax
220
        not     eax
245
        ret
221
        ret
246
 
222
 
247
.fill_second_half:
223
.fill_second_half:
248
if sb_buffer_size eq small_buffer
224
if sb_buffer_size eq small_buffer
-
 
225
        mov     eax, [SB16Buffer]
-
 
226
        add     eax, 16384
249
        stdcall [callback], SB16Buffer1   ;for 32k buffer
227
        stdcall [callback], eax           ;for 32k buffer
250
else if sb_buffer_size eq full_buffer
228
else if sb_buffer_size eq full_buffer
-
 
229
        mov     eax, [SB16Buffer]
-
 
230
        add     eax, 32768
-
 
231
        push    eax
251
        stdcall [callback], SB16Buffer2   ;for 64k buffer
232
        stdcall [callback], eax           ;for 64k buffer
-
 
233
        pop     eax
-
 
234
        add     eax, 16384
252
        stdcall [callback], SB16Buffer3   ;for 64k buffer
235
        stdcall [callback], eax           ;for 64k buffer
253
end if
236
end if
254
        xor     eax, eax
237
        xor     eax, eax
255
        not     eax
238
        not     eax
256
        ret
239
        ret
257
endp
240
endp
258
;-------------------------------------------------------------------------------
241
;-------------------------------------------------------------------------------
259
align 4
242
align 4
260
proc detect
243
proc detect
261
.sb_detect_next_port:
244
.sb_detect_next_port:
262
if DEBUG
245
if DEBUG
263
        inc     dword[port_second_digit_num]
246
        inc     dword[port_second_digit_num]
264
end if
247
end if
265
        mov     edx, sb_base_port
248
        mov     edx, sb_base_port
266
        add     byte[edx], 10h
249
        add     byte[edx], 10h
267
        cmp     byte[edx], 80h
250
        cmp     byte[edx], 80h
268
        jbe     .sb_try_to_detect_at_specified_port
251
        jbe     .sb_try_to_detect_at_specified_port
269
;error - no SB card detected
252
;error - no SB card detected
270
.sb_not_found_err:
253
.sb_not_found_err:
271
        xor     eax, eax
254
        xor     eax, eax
272
        ret
255
        ret
273
 
256
 
274
.sb_try_to_detect_at_specified_port:
257
.sb_try_to_detect_at_specified_port:
275
        call    sb_reset
258
        call    sb_reset
276
        add     dl, 8
259
        add     dl, 8
277
        mov     ecx, 100
260
        mov     ecx, 100
278
.sb_check_port:
261
.sb_check_port:
279
        in      al, dx
262
        in      al, dx
280
        test    al, al           ;is DSP port ready to be read?
263
        test    al, al           ;is DSP port ready to be read?
281
        jns     .sb_port_not_ready
264
        jns     .sb_port_not_ready
282
 
265
 
283
        sub     dl, 4
266
        sub     dl, 4
284
        in      al, dx           ;check for AAh response
267
        in      al, dx           ;check for AAh response
285
        add     dl, 4
268
        add     dl, 4
286
        cmp     al, 0xAA
269
        cmp     al, 0xAA
287
        jne     .sb_port_not_ready
270
        jne     .sb_port_not_ready
288
.sb_card_found:
271
.sb_card_found:
289
        and     dl, 0xF0
272
        and     dl, 0xF0
290
        add     dl, 0xC
273
        add     dl, 0xC
291
           sb_out 0xE1           ;get DSP version
274
        sb_out 0xE1              ;get DSP version
292
        add     dl, 2
275
        add     dl, 2
293
@@:
276
@@:
294
        in      al, dx
277
        in      al, dx
295
        test    al, al           ;is DSP port ready to be read?
278
        test    al, al           ;is DSP port ready to be read?
296
        jns     @b
279
        jns     @b
297
        sub     dl, 4
280
        sub     dl, 4
298
        in      al, dx           ;get major version
281
        in      al, dx           ;get major version
299
        ror     eax, 16
282
        ror     eax, 16
300
        add     dl, 4
283
        add     dl, 4
301
@@:
284
@@:
302
        in      al, dx
285
        in      al, dx
303
        test    al, al           ;is DSP port ready to be read?
286
        test    al, al           ;is DSP port ready to be read?
304
        jns     @b
287
        jns     @b
305
        sub     dl, 4
288
        sub     dl, 4
306
        in      al, dx           ;get minor version
289
        in      al, dx           ;get minor version
307
        xor     edx, edx
290
        xor     edx, edx
308
        mov     dl, 10
291
        mov     dl, 10
309
        div     dl
292
        div     dl
310
        ror     eax, 16
293
        ror     eax, 16
311
        xor     ah, ah
294
        xor     ah, ah
312
        mov     [sb_DSP_version_int], eax;for internal usage
295
        mov     [sb_DSP_version_int], eax;for internal usage
313
if DEBUG
296
if DEBUG
314
        add     [sb_DSP_version], eax
297
        add     [sb_DSP_version], eax
315
end if
298
end if
316
        ret
299
        ret
317
 
300
 
318
.sb_port_not_ready:
301
.sb_port_not_ready:
319
        loop    .sb_check_port   ;100 retries (~100 microsec.)
302
        loop    .sb_check_port   ;100 retries (~100 microsec.)
320
        jmp     .sb_detect_next_port
303
        jmp     .sb_detect_next_port
321
endp
304
endp
322
;-------------------------------------------------------------------------------
305
;-------------------------------------------------------------------------------
323
if DEBUG
306
if DEBUG
324
proc SysMsgBoardNum ;warning: destroys eax,ebx,ecx,esi
307
proc SysMsgBoardNum ;warning: destroys eax,ebx,ecx,esi
325
        mov     ebx, eax
308
        mov     ebx, eax
326
        mov     ecx, 8
309
        mov     ecx, 8
327
        mov     esi, (number_to_out+1)
310
        mov     esi, (number_to_out+1)
328
.1:
311
.1:
329
        mov     eax, ebx
312
        mov     eax, ebx
330
        and     eax, 0xF
313
        and     eax, 0xF
331
        add     al, '0'
314
        add     al, '0'
332
        cmp     al, (10+'0')
315
        cmp     al, (10+'0')
333
        jb      @f
316
        jb      @f
334
        add     al, ('A'-'0'-10)
317
        add     al, ('A'-'0'-10)
335
@@:
318
@@:
336
        mov     [esi+ecx], al
319
        mov     [esi+ecx], al
337
        shr     ebx, 4
320
        shr     ebx, 4
338
        loop    .1
321
        loop    .1
339
        dec     esi
322
        dec     esi
340
        call    SysMsgBoardStr
323
        invoke  SysMsgBoardStr
341
        ret
324
        ret
342
endp
325
endp
343
end if
326
end if
344
;all initialized data place here
327
;all initialized data place here
345
align 4
328
align 4
346
version       dd (5 shl 16) or (API_VERSION and 0xFFFF)
-
 
347
 
329
 
348
sb_base_port:
330
sb_base_port:
349
              dd 200h ;don't ask me why - see the code&docs
331
              dd 200h ;don't ask me why - see the code&docs
350
 
332
 
351
sound_dma     dd sb_dma_num
333
sound_dma     dd sb_dma_num
352
 
334
 
353
;note that 4th DMA channel doesn't exist, it is used for cascade
335
;note that 4th DMA channel doesn't exist, it is used for cascade
354
;plugging the first DMA controler to the second
336
;plugging the first DMA controler to the second
355
dma_table     db 0x87,0x83,0x81,0x82,0xFF,0x8B,0x89,0x8A
337
dma_table     db 0x87,0x83,0x81,0x82,0xFF,0x8B,0x89,0x8A
356
 
338
 
357
my_service    db 'SOUND',0  ;max 16 chars include zero
339
my_service    db 'SOUND',0  ;max 16 chars include zero
358
 
340
 
359
if DEBUG
341
if DEBUG
360
number_to_out db '0x00000000',13,10,0
342
number_to_out db '0x00000000',13,10,0
361
 
343
 
362
msgInit       db 'detecting hardware...',13,10,0
344
msgInit       db 'detecting hardware...',13,10,0
363
msgExit       db 'exiting... May be some problems found?',13,10,0
345
msgExit       db 'exiting... May be some problems found?',13,10,0
364
msgPlay       db 'start play',13,10,0
346
msgPlay       db 'start play',13,10,0
365
;msgStop       db 'stop play',13,10,0
347
;msgStop       db 'stop play',13,10,0
366
msgCallback   db 'set_callback received from the mixer!',13,10
348
msgCallback   db 'set_callback received from the mixer!',13,10
367
              db 'callback handler is: ',0
349
              db 'callback handler is: ',0
368
msgErrAtchIRQ db 'failed to attach IRQ',(sb_irq_num+'0'),13,10
350
msgErrAtchIRQ db 'failed to attach IRQ',(sb_irq_num+'0'),13,10
369
              db 'owner',39,'s handler: ',0
351
              db 'owner',39,'s handler: ',0
370
msgSucAtchIRQ db 'succesfully attached IRQ',(sb_irq_num+'0')
352
msgSucAtchIRQ db 'succesfully attached IRQ',(sb_irq_num+'0')
371
              db ' as hardcoded',13,10,0
353
              db ' as hardcoded',13,10,0
372
msgErrRsrvPorts db 'failed to reserve needed ports.',13,10,0
354
msgErrRsrvPorts db 'failed to reserve needed ports.',13,10,0
373
msgSetVol     db 'DEV_SET_MASTERVOL call came',13,10,0
355
msgSetVol     db 'DEV_SET_MASTERVOL call came',13,10,0
374
msgGetVol     db 'DEV_GET_MASTERVOL call came',13,10,0
356
msgGetVol     db 'DEV_GET_MASTERVOL call came',13,10,0
375
msgErrDMAsetup db 'failed to setup DMA - bad channel',13,10,0
357
msgErrDMAsetup db 'failed to setup DMA - bad channel',13,10,0
376
;-------------------------------------------------------------------------------
358
;-------------------------------------------------------------------------------
377
msgDSPFound   db 'DSP found at port 2'
359
msgDSPFound   db 'DSP found at port 2'
378
label port_second_digit_num dword at $
360
label port_second_digit_num dword at $
379
              db '00h',13,10,'DSP version '
361
              db '00h',13,10,'DSP version '
380
sb_DSP_version:
362
sb_DSP_version:
381
                db '0.00 - SB'
363
                db '0.00 - SB'
382
sb_DSP_description:
364
sb_DSP_description:
383
                    db 32,32,32,32,13,10,0
365
                    db 32,32,32,32,13,10,0
384
;-------------------------------------------------------------------------------
366
;-------------------------------------------------------------------------------
385
end if
367
end if
-
 
368
 
386
 
369
align 4
387
section '.data' data readable writable align 16
370
data fixups
-
 
371
end data
388
;all uninitialized data place here
372
 
389
 
373
align 4
390
;pTempBuf          rd 1
374
SB16Buffer         rd 1
391
 
375
 
392
callback           rd 1
376
callback           rd 1
393
 
377
 
394
int_flip_flop      rd 1
378
int_flip_flop      rd 1
395
 
379
 
396
sb_master_vol      rd 1
380
sb_master_vol      rd 1
397
 
381
 
398
sb_DSP_version_int rd 1
382
sb_DSP_version_int rd 1