forked from KolibriOS/kolibrios
Converted sound driver selector to PE format.
git-svn-id: svn://kolibrios.org@5070 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
1bf349abae
commit
205caf29cf
@ -131,7 +131,6 @@ FASM_PROGRAMS:=\
|
|||||||
drivers/emu10k1x.obj:DRIVERS/EMU10K1X.OBJ:$(KERNEL)/drivers/emu10k1x.asm \
|
drivers/emu10k1x.obj:DRIVERS/EMU10K1X.OBJ:$(KERNEL)/drivers/emu10k1x.asm \
|
||||||
drivers/fm801.obj:DRIVERS/FM801.OBJ:$(KERNEL)/drivers/fm801.asm \
|
drivers/fm801.obj:DRIVERS/FM801.OBJ:$(KERNEL)/drivers/fm801.asm \
|
||||||
drivers/infinity.obj:DRIVERS/INFINITY.OBJ:$(KERNEL)/drivers/infinity.asm \
|
drivers/infinity.obj:DRIVERS/INFINITY.OBJ:$(KERNEL)/drivers/infinity.asm \
|
||||||
drivers/sound.obj:DRIVERS/SOUND.OBJ:$(KERNEL)/drivers/sound.asm \
|
|
||||||
drivers/intelac97.obj:DRIVERS/INTELAC97.OBJ:$(KERNEL)/drivers/intelac97.asm \
|
drivers/intelac97.obj:DRIVERS/INTELAC97.OBJ:$(KERNEL)/drivers/intelac97.asm \
|
||||||
drivers/vt823x.obj:DRIVERS/VT823X.OBJ:$(KERNEL)/drivers/vt823x.asm \
|
drivers/vt823x.obj:DRIVERS/VT823X.OBJ:$(KERNEL)/drivers/vt823x.asm \
|
||||||
drivers/3c59x.obj:DRIVERS/3C59X.OBJ:$(REPOSITORY)/drivers/ethernet/3c59x.asm \
|
drivers/3c59x.obj:DRIVERS/3C59X.OBJ:$(REPOSITORY)/drivers/ethernet/3c59x.asm \
|
||||||
@ -230,6 +229,7 @@ FASM_PROGRAMS_PESTRIP:=\
|
|||||||
drivers/tmpdisk.sys:DRIVERS/TMPDISK.SYS:$(REPOSITORY)/drivers/disk/tmpdisk.asm \
|
drivers/tmpdisk.sys:DRIVERS/TMPDISK.SYS:$(REPOSITORY)/drivers/disk/tmpdisk.asm \
|
||||||
drivers/intel_hda.sys:DRIVERS/intel_hda.sys:$(REPOSITORY)/drivers/audio/intel_hda/intel_hda.asm \
|
drivers/intel_hda.sys:DRIVERS/intel_hda.sys:$(REPOSITORY)/drivers/audio/intel_hda/intel_hda.asm \
|
||||||
drivers/sb16.sys:DRIVERS/SB16.SYS:$(REPOSITORY)/drivers/audio/sb16/sb16.asm \
|
drivers/sb16.sys:DRIVERS/SB16.SYS:$(REPOSITORY)/drivers/audio/sb16/sb16.asm \
|
||||||
|
drivers/sound.sys:DRIVERS/SOUND.SYS:$(REPOSITORY)/drivers/audio/sound.asm \
|
||||||
# end of list
|
# end of list
|
||||||
# The list of all FASM programs with one main FASM file for CD image.
|
# The list of all FASM programs with one main FASM file for CD image.
|
||||||
# Format of an item is exactly the same as in the previous list.
|
# Format of an item is exactly the same as in the previous list.
|
||||||
|
@ -5,14 +5,16 @@
|
|||||||
;; ;;
|
;; ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
format MS COFF
|
format PE DLL native 0.05
|
||||||
|
entry START
|
||||||
|
|
||||||
DEBUG = 1
|
DEBUG = 1
|
||||||
|
|
||||||
include 'proc32.inc'
|
section '.flat' code readable writable executable
|
||||||
include 'imports.inc'
|
include '../proc32.inc'
|
||||||
include '../struct.inc'
|
include '../struct.inc'
|
||||||
|
include '../macros.inc'
|
||||||
|
include '../peimport.inc'
|
||||||
|
|
||||||
VID_INTEL = 0x8086
|
VID_INTEL = 0x8086
|
||||||
VID_NVIDIA = 0x10DE
|
VID_NVIDIA = 0x10DE
|
||||||
@ -145,12 +147,6 @@ CTRL_RDC_R3010 = 0x3010
|
|||||||
|
|
||||||
CTRL_VMWARE_UNK1 = 0x1977
|
CTRL_VMWARE_UNK1 = 0x1977
|
||||||
|
|
||||||
API_VERSION = 0x01000100
|
|
||||||
|
|
||||||
public START
|
|
||||||
public service_proc
|
|
||||||
public version
|
|
||||||
|
|
||||||
struct SRV
|
struct SRV
|
||||||
srv_name rb 16 ;ASCIIZ string
|
srv_name rb 16 ;ASCIIZ string
|
||||||
magic dd ? ;+0x10 ;'SRV '
|
magic dd ? ;+0x10 ;'SRV '
|
||||||
@ -164,17 +160,14 @@ struct SRV
|
|||||||
ends
|
ends
|
||||||
|
|
||||||
|
|
||||||
section '.flat' code readable align 16
|
proc START c, state:dword, cmdline:dword
|
||||||
|
|
||||||
proc START stdcall, state:dword
|
|
||||||
|
|
||||||
mov eax, [srv_entry]
|
|
||||||
cmp [state], 1
|
cmp [state], 1
|
||||||
jne .stop
|
jne .stop
|
||||||
|
|
||||||
if DEBUG
|
if DEBUG
|
||||||
mov esi, msgInit
|
mov esi, msgInit
|
||||||
call SysMsgBoardStr
|
invoke SysMsgBoardStr
|
||||||
end if
|
end if
|
||||||
|
|
||||||
test eax, eax
|
test eax, eax
|
||||||
@ -191,14 +184,12 @@ proc START stdcall, state:dword
|
|||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
align 4
|
|
||||||
proc service_proc stdcall, ioctl:dword
|
proc service_proc stdcall, ioctl:dword
|
||||||
|
|
||||||
or eax, -1
|
or eax, -1
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
align 4
|
|
||||||
proc detect_controller
|
proc detect_controller
|
||||||
|
|
||||||
locals
|
locals
|
||||||
@ -210,7 +201,7 @@ proc detect_controller
|
|||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov [bus], eax
|
mov [bus], eax
|
||||||
inc eax
|
inc eax
|
||||||
call PciApi
|
invoke PciApi
|
||||||
cmp eax, -1
|
cmp eax, -1
|
||||||
je .err
|
je .err
|
||||||
|
|
||||||
@ -219,7 +210,7 @@ proc detect_controller
|
|||||||
.next_bus:
|
.next_bus:
|
||||||
and [devfn], 0
|
and [devfn], 0
|
||||||
.next_dev:
|
.next_dev:
|
||||||
stdcall PciRead32, [bus], [devfn], dword 0
|
invoke PciRead32, [bus], [devfn], dword 0
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .next
|
jz .next
|
||||||
cmp eax, -1
|
cmp eax, -1
|
||||||
@ -250,16 +241,16 @@ proc detect_controller
|
|||||||
|
|
||||||
if DEBUG
|
if DEBUG
|
||||||
mov esi, msgLoading
|
mov esi, msgLoading
|
||||||
call SysMsgBoardStr
|
invoke SysMsgBoardStr
|
||||||
|
|
||||||
mov esi, dword[edi+4]
|
mov esi, dword[edi+4]
|
||||||
call SysMsgBoardStr
|
invoke SysMsgBoardStr
|
||||||
|
|
||||||
mov esi, msgNewline
|
mov esi, msgNewline
|
||||||
call SysMsgBoardStr
|
invoke SysMsgBoardStr
|
||||||
end if
|
end if
|
||||||
|
|
||||||
stdcall GetService, dword[edi+4]
|
invoke GetService, dword[edi+4]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .err
|
jz .err
|
||||||
|
|
||||||
@ -270,7 +261,7 @@ proc detect_controller
|
|||||||
.err:
|
.err:
|
||||||
if DEBUG
|
if DEBUG
|
||||||
mov esi, msgFail
|
mov esi, msgFail
|
||||||
call SysMsgBoardStr
|
invoke SysMsgBoardStr
|
||||||
end if
|
end if
|
||||||
|
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
@ -402,8 +393,6 @@ devices dd (CTRL_ICH shl 16)+VID_INTEL, intelac97
|
|||||||
dd 0 ; terminator
|
dd 0 ; terminator
|
||||||
|
|
||||||
|
|
||||||
version dd (5 shl 16) or (API_VERSION and 0xFFFF)
|
|
||||||
|
|
||||||
srv_entry dd 0
|
srv_entry dd 0
|
||||||
|
|
||||||
intelac97 db 'INTELAC97', 0
|
intelac97 db 'INTELAC97', 0
|
||||||
@ -419,5 +408,6 @@ msgFail db 'No compatible soundcard found!',13,10,0
|
|||||||
msgLoading db 'Loading ',0
|
msgLoading db 'Loading ',0
|
||||||
msgNewline db 13,10,0
|
msgNewline db 13,10,0
|
||||||
|
|
||||||
|
align 4
|
||||||
section '.data' data readable writable align 16
|
data fixups
|
||||||
|
end data
|
Loading…
Reference in New Issue
Block a user