Subversion Repositories Kolibri OS

Rev

Rev 5071 | Rev 5168 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5071 Rev 5077
Line 9... Line 9...
9
entry START
9
entry START
Line 10... Line 10...
10
 
10
 
Line 11... Line 11...
11
        DEBUG = 1
11
        DEBUG = 1
12
 
-
 
13
section '.flat' code readable writable executable
12
 
14
 
13
section '.flat' code readable writable executable
15
include '../proc32.inc'
14
include '../proc32.inc'
-
 
15
include '../struct.inc'
Line 16... Line 16...
16
include '../struct.inc'
16
include '../macros.inc'
17
include '../macros.inc'
17
include '../peimport.inc'
18
 
18
 
19
VID_INTEL         = 0x8086
19
VID_INTEL         = 0x8086
Line 158... Line 158...
158
        srv_proc        dd ?     ;+0x28 ;user mode service handler
158
        srv_proc        dd ?     ;+0x28 ;user mode service handler
159
        srv_proc_ex     dd ?     ;+0x2C ;kernel mode service handler
159
        srv_proc_ex     dd ?     ;+0x2C ;kernel mode service handler
160
ends
160
ends
Line 161... Line 161...
161
 
161
 
Line -... Line 162...
-
 
162
 
162
 
163
proc START c uses ebx esi edi, state:dword, cmdline:dword
163
proc START c, state:dword, cmdline:dword
164
 
Line 164... Line 165...
164
 
165
        mov     eax, [srv_entry]
165
        cmp     [state], 1
166
        cmp     [state], 1
166
        jne     .fail
167
        jne     .stop
167
 
168
 
Line -... Line 169...
-
 
169
     if DEBUG
-
 
170
        mov     esi, msgInit
168
     if DEBUG
171
        invoke  SysMsgBoardStr
169
        mov     esi, msgInit
172
     end if
170
        invoke  SysMsgBoardStr
173
 
-
 
174
        test    eax, eax
-
 
175
        jnz     .done
-
 
176
        call    detect_controller
-
 
177
        ret
171
     end if
178
.stop:
172
 
179
        test    eax, eax
173
        call    detect_controller
180
        jz      .done
174
        ret
181
        leave
Line 175... Line 182...
175
 
182
        jmp     eax
Line 227... Line 234...
227
        mov     eax, [bus]
234
        mov     eax, [bus]
228
        inc     eax
235
        inc     eax
229
        mov     [bus], eax
236
        mov     [bus], eax
230
        cmp     eax, [last_bus]
237
        cmp     eax, [last_bus]
231
        jna     .next_bus
238
        jna     .next_bus
232
     if DEBUG
-
 
233
        mov     esi, msgNotFound
-
 
234
        invoke  SysMsgBoardStr
-
 
235
     end if
-
 
236
        xor     eax, eax
239
        xor     eax, eax
237
        ret
240
        ret
238
  .found:
241
  .found:
Line 239... Line 242...
239
 
242
 
Line 400... Line 403...
400
ensoniq         db 'ENSONIQ', 0
403
ensoniq         db 'ENSONIQ', 0
401
emu10k1x        db 'EMU10K1X', 0
404
emu10k1x        db 'EMU10K1X', 0
402
intelhda        db 'INTEL_HDA', 0
405
intelhda        db 'INTEL_HDA', 0
Line 403... Line 406...
403
 
406
 
404
msgInit         db 'Detecting hardware...',13,10,0
407
msgInit         db 'Detecting hardware...',13,10,0
405
msgNotFound     db 'No compatible soundcard found!',13,10,0
-
 
406
msgFail         db 'Failed',13,10,0
408
msgFail         db 'No compatible soundcard found!',13,10,0
407
msgLoading      db 'Loading ',0
409
msgLoading      db 'Loading ',0
Line 408... Line 410...
408
msgNewline      db 13,10,0
410
msgNewline      db 13,10,0
409
 
411
 
410
align 4
412
align 4
411
data fixups
-
 
412
end data
-
 
413
 
413
data fixups