In an attempt to take control away from the mouse driver, I realised that I needed the InterfaceNum.
So this code is an attempt to get the interfaceNum.
I used all values as "Dont care"
- Code: Select all
irs.RequestType = .FindRegIntf
irs.HostIndex = 255
irs.HostIndex = 255
irs.SearchIndex = 255
irs.VendorID = &HFFFF
irs.ProductID = &HFFFF
irs.DvcClass = &HFF
irs.DvcSubClass = &HFF
irs.DvcProtocol = &HFF
irs.IntfClass = &HFF
irs.IntfSubClass = &HFF
irs.IntfProtocol = &HFF
.StepNbr = 9
rval = GetUSB
If rval Then
USBErrCheck ''
GoTo ErrEnd '' Dont go any further if err.
EndIf
.Temp1 = dpmir.h.dl
.Temp2 = dpmir.h.dh
irs.InterfaceNum = dpmir.h.dl
Also fills in DvcClass & DvcSubClass as Zero.
However I get an error &H32 "Interface not found"
Using usbDevic I get
- Code: Select all
DEVICE ADDRESSES
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Host Index: 0 Host Type: UHCI Bus Type: PCI IRQ#: 10 Root Hub Ports: 2
Vendor: 1106h = VIA Technologies Inc Product: 3038h
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
DEVICES INTERFACES
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
L C I A O
ADRS o P o n l w
ÍÍÍÍ (hex) S o BUS n t t n
Test VEND PROD Sub Pro p USB HUB r POWR f f I e Sub Pro
RWak ID ID Cls Cls col d VER ADR t (mA) g c n DESCRIPTION d Cls Cls col
ÍÍÍÍ ÍÍÍÍ ÍÍÍÍ ÍÍÍ ÍÍÍ ÍÍÍ Í ÍÍÍ ÍÍÍ Í ÍÍÍÍ Í Í Í ÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Í ÍÍÍ ÍÍÍ ÍÍÍ
1 1106 3038 9 0 0 . 1.0 ... . s 0 1 0 0*Root Hub Y 9 0 0
VIA Technologies Inc
ÄÄÄÄ ÄÄÄÄ ÄÄÄÄ ÄÄÄ ÄÄÄ ÄÄÄ Ä ÄÄÄ ÄÄÄ Ä ÄÄÄÄ Ä Ä Ä ÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Ä ÄÄÄ ÄÄÄ ÄÄÄ
2 D209 1501 0 0 0 . 2.0 1 2 500 1 0 0*USBSUPT1.COM!! . 3 0 0
Ultimarc? 1 0*USBSUPT1.COM!! . 3 0 0
2 0*USBSUPT1.COM!! . 3 0 0
3 0*USBSUPT1.COM!! . 3 1 2
You may notice that the device is not owned according to this printout, so I made a small change to the bootup
This now shows the device is owned before and after the USBTestcd\usb
usbuhcil
Delay 2
usbmouse
cd\
C:\Dos32\ctmouse
C:\Dos32\LBACache
C:\usb\Delay 3
c:\usb\usbdevic
C:\dos32\HDPMI32
C:\USBTest.exe
c:\usb\usbdevic
Regards
Edit: This is the actual uhci calling routine.(I renamed it from GetUSB)
- Code: Select all
Function Calluhci As Integer
'-------------------------------------
'Struct fields set by caller.
'-------------------------------------
With irs
CopyToRM( sel, @irs, 0, 64 ) '' copy Struc to RealMode
dpmir.x.bx = &h5553 '' set dpmi registers(ax already set)
dpmir.x.cx = &h4221 '' prepare registers for
dpmir.x.ds = seg '' call
dpmir.x.dx = 0 '' offset of Struc is 0
asm
mov ax, 0x300 '' Simulate Real Mode Interrupt
mov bl, 0x14 '' interrupt number (for dpmi)
lea edi, [dpmir] '' load address of dpmir registers
Int 0x31 '' call dpmi Int
End Asm
End With
If dpmir.x.flags And CF Then '' Any errors ?
Function = dpmir.x.ax '' send them to caller
Else
CopyToPM( sel, 0, @irs, 64 ) '' Get filled in Struc
Function = 0 '' No error
EndIf
End Function